query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Return the value associated with the column: check_opinion
public java.lang.String getCheckOpinion () { return checkOpinion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCheckOpinion (java.lang.String checkOpinion) {\n\t\tthis.checkOpinion = checkOpinion;\n\t}", "public Integer getHighOpinion() {\n return highOpinion;\n }", "public String getOpinionFound() {\n if (OpinionFinding_Type.featOkTst && ((OpinionFinding_Type)jcasType).casFeat_opinionFound == null)\n jcasType.jcas.throwFeatMissing(\"opinionFound\", \"de.unidu.langtech.pp.teaching.type.OpinionFinding\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((OpinionFinding_Type)jcasType).casFeatCode_opinionFound);}", "public Object getCol2check() {\n return col2check;\n }", "public Integer getCorrectflag() {\n return correctflag;\n }", "@Nullable\n Object getValueOfColumn(ModelColumnInfo<Item> column);", "public int getCorrect()\n\t{\n\t\treturn correct;\t\n\t}", "public Object getCheckedValue();", "public abstract Object getDecisionValue();", "int getConditionValue();", "public int getAlcance() {\n return alcance;\n }", "private String getCriterionValueValue()\n {\n return getConvertedValue(myCriterionValue.get());\n }", "boolean getValue();", "int getCriterionTypeValue();", "boolean getCorrect();", "private static Integer getOutcome(List<String> row) {\n\t return Integer.parseInt(row.get(8));\n\t}", "@Override\r\n\tpublic Object getValueAt(int row, int col) {\n\t\tCheck tempCheck = checks.get(row);\r\n\t\t\r\n\t\tswitch(col) {\r\n\t\t\tcase CHECK_NUMBER_COL:\r\n\t\t\t\treturn tempCheck.getCheckNum();\r\n\t\t\tcase DATE_OF_CHECK_COL:\r\n\t\t\t\treturn tempCheck.getDateOfCheck();\r\n\t\t\tcase ROUTING_NUMBER_COL:\r\n\t\t\t\treturn tempCheck.getRoutingNum();\r\n\t\t\tcase HEALTH_INSURANCE_PROVIDER_COL:\r\n\t\t\t\treturn tempCheck.getHealthInsProv();\r\n\t\t\tcase CHECK_TOTAL_COL:\r\n\t\t\t\treturn tempCheck.getCheckTotal();\r\n\t\t\tcase REMAINDER_COL:\r\n\t\t\t\treturn tempCheck.getCheckRemain();\r\n\t\t\tcase OBJECT_COL:\r\n\t\t\t\treturn tempCheck;\r\n\t\t\tdefault:\r\n\t\t\t\treturn tempCheck.getCheckNum();\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic boolean evaluate(Object value, String columnName)\r\n\t\t\tthrows SQLException {\n\t\treturn false;\r\n\t}", "public boolean getValue();", "public int getTrueValue()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start getTrueValue Method ***************/\n\n // Return true value\n return trueValue;\n\n }", "String getConfirmed();", "public boolean getValue() {\n\t\treturn _checked;\n\t}", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "int getCouponStat();", "protected RelicRecoveryVuMark WhatColumnToScoreIn(){\n return test;\n }", "public int getInsuredValue() {\n return insuredValue;\n }", "Boolean getBoolean(int col_num);", "public int getValueOfBonus() {\n return valueOfBonus;\n }", "public int getValue()\n { \n return table.get(getSelectedItem());\n }", "int getVoteValue(UserId userId, QuestionId questionId);", "public String getVarimaxOption(){\n if(this. varimaxOption){\n return \"normal varimax option\";\n }\n else{\n return \"raw varimax option\";\n }\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public int getValue() { return getValue(OPEN); }", "String getValue(String column, int row);", "int getOperationValue();", "public java.lang.String getIsComparation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ISCOMPARATION$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\n public Object getCellEditorValue() {\n if (item_.allowed.length == 1) {\n if (item_.singleProp && item_.hasLimits) {\n return slider_.getText();\n } else if (item_.singlePropAllowed != null && item_.singlePropAllowed.length == 0) {\n return text_.getText();\n } else {\n return combo_.getSelectedItem();\n }\n } else {\n return combo_.getSelectedItem();\n }\n }", "private byte getInsuranceType() {\n\t\tString insuranceType = cbInsurance.getText();\n\n\t\t//Check with optionA\n\t\tfor (byte i = 0; i < 3; i++) {\n\t\t\tif (optionA[i].equals(insuranceType))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn 0;\n\t}", "public Boolean getValue() {\n return value;\n }", "private int getGoalValue(Proposition goalProposition) {\r\n \tGdlRelation relation = (GdlRelation) goalProposition.getName();\r\n GdlConstant constant = (GdlConstant) relation.get(1);\r\n return Integer.parseInt(constant.toString());\r\n }", "Integer getBusinessValue();", "public net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision getDecision() {\n net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision result = net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision.valueOf(decision_);\n return result == null ? net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision.ACCEPTED : result;\n }", "public net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision getDecision() {\n net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision result = net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision.valueOf(decision_);\n return result == null ? net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision.ACCEPTED : result;\n }", "public boolean getBoolean(int row, int column) {\n return columns[column].getBoolean(row);\n }", "@Override\r\n\tpublic boolean evaluate(Object value, int column) throws SQLException {\n\t\treturn false;\r\n\t}", "public String getColumnNameOne(){\n return columnNameOneLbl.getText();\n }", "public RowSet getYesNoLovVO1() {\n return (RowSet)getAttributeInternal(YESNOLOVVO1);\n }", "public BigDecimal getOP_NO() {\r\n return OP_NO;\r\n }", "public Number getAncho()\n {\n return (Number)getAttributeInternal(ANCHO);\n }", "private int intValue(String columnName) {\r\n int value = 0;\r\n try {\r\n if ((rowSet != null) && selectContactInRowSet()) {\r\n value = rowSet.getInt(columnName);\r\n }\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n return value;\r\n }", "int getCouponType();", "public String getColumnNameTwo(){\n return columnNameTwoLbl.getText();\n }", "public Boolean getValue() {\n/* 60 */ return Boolean.valueOf(this.val);\n/* */ }", "public Boolean getValue() {\n\t\treturn b;\n\t}", "public Boolean getValue() {\n return this.value;\n }", "public Boolean getValue() {\n return this.value;\n }", "public Boolean getValue() {\n return this.value;\n }", "public String getApprove() {\r\n if (approve == null)\r\n approve = initApproveElement().findElement(By.cssSelector(\"[data-role*='approvalStatus']\")).getText();\r\n return approve;\r\n }", "public java.lang.Integer getNocCheck() {\r\n return nocCheck;\r\n }", "public net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision getDecision() {\n net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision result = net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision.valueOf(decision_);\n return result == null ? net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision.ACCEPTED : result;\n }", "private String eligibleToDonote() {\n if(Integer.parseInt(bloodPressureTxtField.getText())>100 || Integer.parseInt(heartRateTxtField.getText())>80 \n || alcoholConsumptionTxtField.getText().equals(\"Y\") || drugConsumptionTxtField.getText().equals(\"Y\"))\n {\n return \"Ineligibe to Donate Blood\";\n }\n return \"Eligible to Donate Blood\";\n }", "public String haeValittuAlgoritmi() {\n RadioButton valittu = (RadioButton) algoritmiNapit.getSelectedToggle();\n\n if (valittu == null) {\n return \"Et ole valinnut algoritmia!\";\n } else {\n return valittu.getText();\n }\n }", "public Integer getwPrIsCoupon() {\n return wPrIsCoupon;\n }", "Boolean getCompletelyCorrect();", "public Character getWoceAutocheckFlag(int sampleIdx) throws IllegalArgumentException {\n\t\tif ( (sampleIdx < 0) || (sampleIdx >= numSamples) )\n\t\t\tthrow new IndexOutOfBoundsException(\"sample index is invalid: \" + sampleIdx);\n\t\tif ( (woceAutocheckIndex < 0) || (woceAutocheckIndex >= numDataCols) )\n\t\t\tthrow new IllegalArgumentException(\"no WOCE autocheck column\");\n\t\treturn (Character) stdObjects[sampleIdx][woceAutocheckIndex];\n\t}", "@Override\r\n\tpublic int operar() {\n\t\treturn this.valor;\r\n\t}", "public net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision getDecision() {\n net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision result = net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision.valueOf(decision_);\n return result == null ? net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision.ACCEPTED : result;\n }", "public Integer getChecked() {\n return checked;\n }", "int getCouponNum();", "int getPokeballValue();", "public boolean isRequiresTaxCertificate() \n{\nObject oo = get_Value(COLUMNNAME_RequiresTaxCertificate);\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}", "public Boolean getIndicadorFactura()\r\n/* 697: */ {\r\n/* 698:765 */ return this.indicadorFactura;\r\n/* 699: */ }", "public int getBit(String columnName) {\n BitVector vector = (BitVector) table.getVector(columnName);\n return vector.get(rowNumber);\n }", "Boolean getAccruedInterest();", "public int getC_POSDocType_ID() \n{\nInteger ii = (Integer)get_Value(COLUMNNAME_C_POSDocType_ID);\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "int getResultValue();" ]
[ "0.599743", "0.5506738", "0.5495229", "0.5229709", "0.5187985", "0.5138739", "0.51346815", "0.51330036", "0.5119929", "0.50696784", "0.50670177", "0.50624204", "0.5040266", "0.50369567", "0.5031764", "0.50263494", "0.50100076", "0.49941775", "0.4970659", "0.49392366", "0.49230483", "0.4919363", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49090227", "0.49058968", "0.4898648", "0.489637", "0.4885091", "0.4882315", "0.48717347", "0.4861477", "0.4856659", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.48465213", "0.4838052", "0.48262593", "0.48259276", "0.48208213", "0.4819863", "0.4807116", "0.48055458", "0.4801995", "0.47981787", "0.47972873", "0.47804794", "0.47707656", "0.47642136", "0.4761609", "0.47606638", "0.4750723", "0.4748984", "0.4742215", "0.4739368", "0.47334313", "0.47240636", "0.47141188", "0.47121352", "0.47121352", "0.47121352", "0.47118348", "0.46853524", "0.4683992", "0.4669721", "0.46662438", "0.46627933", "0.46625823", "0.4657503", "0.4652228", "0.46487898", "0.46476558", "0.46444148", "0.4643478", "0.46372136", "0.46363258", "0.46335867", "0.46309328", "0.46066847", "0.4602218" ]
0.68126535
0
Set the value related to the column: check_opinion
public void setCheckOpinion (java.lang.String checkOpinion) { this.checkOpinion = checkOpinion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getCheckOpinion () {\n\t\treturn checkOpinion;\n\t}", "void setConfirmed(String value);", "@SuppressWarnings(\"null\")\n private void setIDCupon() {\n int id_opinion = 1;\n ResultSet rs = null;\n Statement s = null;\n //cb_TS.addItem(\"Seleccione una opinion...\");\n //Creamos la query\n try {\n s = conexion.createStatement();\n } catch (SQLException se) {\n System.out.println(\"probando conexion de consulta\");\n }\n try {\n rs = s.executeQuery(\"SELECT id_cupon FROM cupon order by id_cupon desc LIMIT 1\");\n while (rs.next()) {\n id_opinion = Integer.parseInt(rs.getString(1))+1;\n }\n tf_ID.setText(Integer.toString(id_opinion));\n } catch (SQLException ex) {\n Logger.getLogger(N_Opinion.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setHighOpinion(Integer highOpinion) {\n this.highOpinion = highOpinion;\n }", "public abstract void setCheck(Boolean check);", "void setManualCheck (boolean value);", "public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}", "public void setCorrectFlag(){\n\t\tcorrectFlag = true;\n\t}", "public void setIndicadorImpreso(boolean indicadorImpreso)\r\n/* 175: */ {\r\n/* 176:190 */ this.indicadorImpreso = indicadorImpreso;\r\n/* 177: */ }", "public void setCheckedValue(Object pValue);", "void setInvoiced(boolean invoiced);", "public void setOp ( boolean value ) {\n\t\texecute ( handle -> handle.setOp ( value ) );\n\t}", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n ref = database.getReference(\"Permisos/\" + permisos.getID() + \"/habilitado\");\n ref.setValue(isChecked);\n }", "public void setCorrectflag(Integer correctflag) {\n this.correctflag = correctflag;\n }", "public void setOp(boolean value) {}", "public void setIndicadorNuevo(boolean indicadorNuevo)\r\n/* 215: */ {\r\n/* 216:222 */ this.indicadorNuevo = indicadorNuevo;\r\n/* 217: */ }", "public void setValueAt(Object value, int row, int col) {\r\n \tswitch(col){\r\n case 0:\r\n \tattributs.get(row).setPk((Boolean)value);\r\n \tbreak;\r\n case 1:\r\n \tSystem.out.println(value);\r\n \tattributs.get(row).setName((String)value);\r\n \tbreak;\r\n case 2:\r\n \tattributs.get(row).setType((String)value);\r\n \tbreak;\r\n case 3:\r\n \tattributs.get(row).setTaille((String)value);\r\n \tbreak;\r\n case 4:\r\n \tattributs.get(row).setNul((Boolean)value);\r\n \tbreak;\r\n case 5:\r\n \tattributs.get(row).setUk((Boolean)value);\r\n \tbreak;\r\n \t\r\n \t}\r\n fireTableCellUpdated(row, col);\r\n }", "public void setOP_NO(BigDecimal OP_NO) {\r\n this.OP_NO = OP_NO;\r\n }", "public void setCorrect(boolean ncorrect) {\r\n this.correct = ncorrect;\r\n }", "public void setIsSuccessInSolving(Integer isSuccessInSolving)\n/* */ {\n/* 219 */ this.isSuccessInSolving = isSuccessInSolving;\n/* */ }", "public void onAssigned(View view) {\n if (checked==1) {\n checked = 0;\n } else {\n checked=1;\n }\n }", "public void setIndicadorFactura(Boolean indicadorFactura)\r\n/* 702: */ {\r\n/* 703:769 */ this.indicadorFactura = indicadorFactura;\r\n/* 704: */ }", "protected void onChange_InfectionRisk() {\n onChange_InfectionRisk_xjal( InfectionRisk );\n }", "void setCheckedOut(boolean checkedOut);", "public void setCValueEditable(boolean status);", "void setValueOfColumn(ModelColumnInfo<Item> column, @Nullable Object value);", "public void setO(boolean o) {\n\tthis.o = o;\n }", "public void setPredeterminado(boolean predeterminado)\r\n/* 159: */ {\r\n/* 160:274 */ this.predeterminado = predeterminado;\r\n/* 161: */ }", "private void getUserCoownerChoice() {\n int checkedChipId = mBinding.chipGroupCoowner.getCheckedChipId();\n if (checkedChipId == R.id.chip_yes) {\n mChipCoownerInput = 1;\n } else if (checkedChipId == R.id.chip_no) {\n mChipCoownerInput = 0;\n } else {\n mChipCoownerInput = 10;\n }\n }", "public void setCol2check(Object col2check) {\n this.col2check = col2check;\n }", "public void setOnHoldFlag(String value)\n {\n // Valid values are null, Y and N\n\n if ((value != null) && (!(\"\".equals(value.trim()))))\n { \n if (!((\"Y\".equals(value)) || (\"N\".equals(value))))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"OnHoldFlag\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_ONHOLD_INVALID\"); // Message name\n\n }\n }\n\n setAttributeInternal(ONHOLDFLAG, value);\n \n }", "public void setPreference(HttpServletRequest request) throws Exception {\n\t\tString setPrefID = (String) ((request.getParameter(\"inptPrefID\") != null)?request.getParameter(\"inptPrefID\"):request.getAttribute(\"inptPrefID\"));\n\t\tpreparedStatement = connect.prepareStatement(\"UPDATE ch_preferences set status = '0' WHERE id <> \" + setPrefID);\n\t\tpreparedStatement.executeUpdate();\n\t\tpreparedStatement = connect.prepareStatement(\"UPDATE ch_preferences set status = '1' WHERE id = \" + setPrefID);\n\t\tpreparedStatement.executeUpdate();\n\t\t\n\t}", "public void setPrecioc(int p){\n this.precioc=p;\n \n }", "public void setValue(boolean value) {\n this.value = value;\n }", "public void setIndicadorFacturaElectronica(boolean indicadorFacturaElectronica)\r\n/* 199: */ {\r\n/* 200:340 */ this.indicadorFacturaElectronica = indicadorFacturaElectronica;\r\n/* 201: */ }", "public void setOpinionFound(String v) {\n if (OpinionFinding_Type.featOkTst && ((OpinionFinding_Type)jcasType).casFeat_opinionFound == null)\n jcasType.jcas.throwFeatMissing(\"opinionFound\", \"de.unidu.langtech.pp.teaching.type.OpinionFinding\");\n jcasType.ll_cas.ll_setStringValue(addr, ((OpinionFinding_Type)jcasType).casFeatCode_opinionFound, v);}", "public void assignDiscountType(int acc_no, String discount_type){\n try {\n Stm = conn.prepareStatement(\"UPDATE `bapers`.`Customer` SET Discount_type = ? WHERE Account_no =? AND Customer_type = ?;\");\n Stm.setString(1, discount_type);\n Stm.setInt(2,acc_no);\n Stm.setString(3, \"Valued\");\n Stm.executeUpdate();\n Stm.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "public void enviarOpinion(View view) {\n Button button = (Button) view;\n button.setEnabled(false);\n String opinion = ((EditText) findViewById(R.id.aOpinionEditTextWriteOpinion)).getText().toString().trim();\n int numStars = (int) ((RatingBar) findViewById(R.id.aOpinionRatingBarOpinion)).getRating();\n\n if (restaurante_id != 0 && usuario_email != null) {\n if (numStars != 0) {\n if (opinion.equals(\"\") || opinion.length() < 4) {\n Toast.makeText(context, \"Mínimo 5 caracteres\", Toast.LENGTH_LONG).show();\n } else {\n new SendOpinion().execute(String.valueOf(restaurante_id), usuario_email, String.valueOf(numStars), opinion);\n }\n } else {\n Toast.makeText(context, \"Seleccione un número de estrellas.\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(context, \"Error interno\", Toast.LENGTH_LONG).show();\n }\n\n button.setEnabled(true);\n }", "public void setTrueValue(int newValue)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start setTrueValue Method ***************/\n\n\t// Set true value of card\n trueValue = newValue;\n\n }", "private void setAnswer() {\n DbHelper dbhelper = new DbHelper(context);\n questionNo = questionNo + 1;\n QuizAnswer answer = new QuizAnswer();\n answer.setQuizId(quizId);\n answer.setQuestionId(questionId);\n int optionId = shareprefs.getInt(\"optionId\", 0);\n answer.setOptionId(optionId);\n int correctAns = shareprefs.getInt(\"correctAns\", 0);\n answer.setAnswer(correctAns);\n answer.setContentId(contentId);\n boolean flage = dbhelper.upsertQuizAnswerEntity(answer);\n if (flage) {\n shareprefs.edit().clear().commit();//clear select OptionPreferences\n setValue();\n }\n }", "public void setSecurity_answer(String security_answer);", "public Builder setCorrect(boolean value) {\n bitField0_ |= 0x00000001;\n correct_ = value;\n onChanged();\n return this;\n }", "public void setM_Splitting_ID (int M_Splitting_ID)\n{\nset_ValueNoCheck (\"M_Splitting_ID\", new Integer(M_Splitting_ID));\n}", "public void setValue(FreeColAction value) {\n logger.warning(\"Calling unsupported method setValue.\");\n }", "public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}", "public Builder setCouponStat(int value) {\n \n couponStat_ = value;\n onChanged();\n return this;\n }", "public Integer getHighOpinion() {\n return highOpinion;\n }", "public void setPerishable(boolean value) {\r\n this.perishable = value;\r\n }", "public void setActivo(boolean activo)\r\n/* 178: */ {\r\n/* 179:328 */ this.activo = activo;\r\n/* 180: */ }", "public void setConcern(long concern);", "public void setClaim(boolean a){\n isClaimed= a;\n \n}", "@Override\n\tpublic void setMeetinExperienceFlagFromPH(int appointmentId, int meetingExpFromPH) {\n\t\ttry{\n\t\t\tjdbcTemplate.update(UPDATE_HASMEETINGEXPERIENCE_FROM_PH, (ps)->{\n\t\t\t\tps.setInt(1, meetingExpFromPH);\n\t\t\t\tps.setInt(2, appointmentId);\n\t\t\t});\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void setBoolean(int index, boolean value) throws SQLException;", "public void setIsFixPrice (String IsFixPrice);", "public void setPromotion(Promotion promo) {\n\n\t\tthis.promo = promo;\n\t\tbinder.setBean(promo);\n\n\t\tsetVisible(true);\n\t\tdescription.selectAll();\n\t}", "public void setNocCheck(java.lang.Integer nocCheck) {\r\n this.nocCheck = nocCheck;\r\n }", "public void setActivo(boolean activo)\r\n/* 115: */ {\r\n/* 116:142 */ this.activo = activo;\r\n/* 117: */ }", "public void setAchieved(Boolean newValue);", "SrInwardTruckQualityCheck edit(SrInwardTruckQualityCheck srInwardTruckQualityCheck);", "public void setIsComparation(java.lang.String isComparation)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ISCOMPARATION$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ISCOMPARATION$2);\n }\n target.setStringValue(isComparation);\n }\n }", "public void setActivo(boolean activo)\r\n/* 149: */ {\r\n/* 150:255 */ this.activo = activo;\r\n/* 151: */ }", "void xsetCapitalInKind(ch.crif_online.www.webservices.crifsoapservice.v1_00.NullableBoolean capitalInKind);", "public void setCheck(CheckInOut check) {\n\t\tthis.check = check;\n\t}", "public void setOcuppied(boolean ocuppied) {\n this.ocuppied = ocuppied;\n }", "public void addOption(String opiton, boolean correct);", "public void setWon(){\n won = true;\n }", "public void setChecked(Integer checked) {\n this.checked = checked;\n }", "public void setOnion(double countNo) {\n onion = countNo;\r\n }", "@Override\r\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked){\r\n\t\t\t\t\tsp.edit().putBoolean(\"theft\", true).commit();\r\n\t\t\t\t\tcb_set.setText(\"防盗保护开启\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsp.edit().putBoolean(\"theft\", false).commit();\r\n\t\t\t\t\tcb_set.setText(\"防盗保护没有开启\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void setOpr(Integer opr) {\n this.opr = opr;\n }", "public void \nsetFlag( int pFlagNumber, boolean pYesNo ) {\n if (pYesNo)\n fFlagBox = fFlagBox | (1 << pFlagNumber); \n else\n fFlagBox = fFlagBox & (~(1 << pFlagNumber));\n}", "public void setCorrect_answer(String correct_answer) {\n this.correct_answer=correct_answer;\n }", "public void setForua(boolean newValue);", "@Override\n\tpublic boolean doAction() {\n\t\tfield.setValue(value);\n\n\t\tif (checkBox != null)\n\t\t\tcheckBox.setSelected(value);\n\n\t\treturn true;\n\t}", "public void setOcena(int value) {\n this.ocena = value;\n }", "public void setOn(boolean arg) {\n isOn = arg;\n }", "void set(boolean on);", "public void setAnio(int p) { this.anio = p; }", "public void testEditBooleanCellWithOtherColumnOnSameFeatureName() throws Exception {\n final UITableRepresentation table = localSession.getLocalSessionBrowser().perCategory().selectViewpoint(\"read_only_column\").selectRepresentation(\"read_only_column\")\n .selectRepresentationInstance(\"new read_only_column\", UITableRepresentation.class).open();\n // Get the second line, which is actually the first sub-line of the first top-level line.\n SWTBotTreeItem[] items = table.getTable().getAllItems()[0].getItems();\n\n // Check the values before.\n assertEquals(\"newEReference1 : B0\", items[0].cell(0));\n assertEquals(\"false\", items[0].cell(1));\n assertEquals(\"false\", items[0].cell(2));\n\n pressKey(table.getTable(), \"arrow_down\");\n pressKey(table.getTable(), \"arrow_down\");\n pressKey(table.getTable(), \"arrow_right\");\n pressKey(table.getTable(), \"space\");\n\n table.getTable().display.syncExec(new Runnable() {\n public void run() {\n table.getTable().widget.update();\n }\n });\n \n // Check the values after: no change expected, the column through which we tried to do the edition has canEdit = <%false%>\n assertEquals(\"newEReference1 : B0\", items[0].cell(0));\n assertEquals(\"false\", items[0].cell(1));\n assertEquals(\"false\", items[0].cell(2));\n\n }", "void setDiscount(BigDecimal discount);", "public void set(boolean bol);", "protected void doSetValue(Object _value) {\n\t\tthis.value = (Boolean) _value;\n\t}", "public void updateBoolean(String columnName, boolean x) throws SQLException {\n\n try {\n if (isDebugEnabled()) {\n debugCode(\"updateBoolean(\" + quote(columnName) + \", \" + x + \");\");\n }\n update(columnName, ValueBoolean.get(x));\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public void setBoton() {\n SharedPreferences preferences = getSharedPreferences(STRING_PREFERENCES,MODE_PRIVATE);\n preferences.edit().putBoolean(PREFERENCE_ESTADO_BUTTON_SESION,checkBox.isChecked()).apply();\n\n }", "public void setActual(boolean value) {\n this.actual = value;\n }", "public void setSecurity_question(String security_question);", "@Override\r\n\tpublic Integer editInsuranceComapny(Insurance insurance) {\n\t\treturn null;\r\n\t}", "public void setIsApproved (boolean IsApproved);", "public void setIsApproved (boolean IsApproved);", "public void makeApprovedIfNull() {\n int x = getHifiveRating();\n if (x == 0) {\n setHifiveRating(HIFIVERATING_approved);\n }\n }", "public void setStoreIBEligibilityInd(boolean value) {\n this.storeIBEligibilityInd = value;\n }", "@DesireNoWarning(\"TQ\")\n public void set(@CheckForSigned int possibleNegativeValue) {\n if (possibleNegativeValue >= 0)\n nonNegativeValue = possibleNegativeValue;\n }", "public boolean alterarSituacaoCarroTrue() {\n String sql = \"UPDATE carro set situacao=true where placa=?\";\n \n // conectando no banco de dados\n Connection con = Conexao.conectar();\n // \n try {\n PreparedStatement stm = con.prepareStatement(sql);\n stm.setString(1, this.placa);\n stm.execute();\n } catch (SQLException ex) {\n System.out.println(\"Erro:\" + ex.getMessage());\n }\n return true;\n }", "public void setBonus(double bonus){\r\n this.bonus = bonus;\r\n }", "public void setPromotion(Long promotion) {\n this.promotion = promotion;\n }", "@Test\n public void test_SetOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's setOxideCorr(boolean value)\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = true;\n instance.setOxideCorr(true);\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance.setOxideCorr(false);\n result = instance.isOxideCorr();\n expResult=false;\n assertEquals(expResult, result);\n }", "public boolean setOperand(int operandNumber, String operandValue);", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "public void setPromotionalPrice(double value) {\n this.promotionalPrice = value;\n }" ]
[ "0.58904654", "0.5753125", "0.56847984", "0.55484134", "0.5505187", "0.5395468", "0.5269351", "0.5243939", "0.5241723", "0.5237964", "0.5099469", "0.50934565", "0.5088146", "0.50838363", "0.5052276", "0.5043812", "0.50375485", "0.5017503", "0.50045174", "0.499354", "0.49773324", "0.49638465", "0.49603993", "0.4950342", "0.49402657", "0.49375546", "0.49099928", "0.49085426", "0.49078962", "0.49048698", "0.49039605", "0.4884976", "0.48806214", "0.48798162", "0.48786786", "0.48473173", "0.48399463", "0.4821254", "0.48171654", "0.48168427", "0.48166633", "0.4790207", "0.47731626", "0.4772316", "0.47706673", "0.47690764", "0.47667837", "0.47622234", "0.47562033", "0.47498408", "0.47451854", "0.47384322", "0.47307715", "0.47125238", "0.47115704", "0.47106972", "0.47053245", "0.47041458", "0.46872854", "0.46758518", "0.46730644", "0.46688583", "0.46562716", "0.46554908", "0.46487525", "0.46344438", "0.4634315", "0.46252158", "0.46244794", "0.46229562", "0.46198088", "0.4617849", "0.46102926", "0.46100473", "0.46020156", "0.45976728", "0.45962733", "0.4594792", "0.45934674", "0.4585117", "0.45839816", "0.45757142", "0.45715195", "0.45705268", "0.45697516", "0.45638245", "0.45594203", "0.45576513", "0.45550045", "0.45550045", "0.45542064", "0.45493317", "0.45448026", "0.45429933", "0.45395473", "0.45389926", "0.45389745", "0.45311546", "0.4529112", "0.45290798" ]
0.69215083
0
Return the value associated with the column: is_rejected
public java.lang.Boolean getRejected () { return rejected; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getRejected() {\n return rejected;\n }", "public boolean getRejected() {\n return rejected;\n }", "public void setRejected(boolean value) {\n this.rejected = value;\n }", "public String getReject() {\n return reject;\n }", "public String getRejector() {\n return rejector;\n }", "public String getRejectReason() {\n\t\treturn rejectReason;\n\t}", "public Date getDATE_REJECTED() {\r\n return DATE_REJECTED;\r\n }", "public Date getDATE_REJECTED() {\r\n return DATE_REJECTED;\r\n }", "public GetACDHistoryRequest setRejected(boolean d) {\n this.rejected = Boolean.valueOf(d);\n return this;\n }", "public boolean hasRejected() {\n return fieldSetFlags()[19];\n }", "public boolean isSetRejected_reason() {\n return EncodingUtils.testBit(__isset_bitfield, __REJECTED_REASON_ISSET_ID);\n }", "public com.example.DNSLog.Builder setRejected(boolean value) {\n validate(fields()[19], value);\n this.rejected = value;\n fieldSetFlags()[19] = true;\n return this;\n }", "public String getREJECTED_BY() {\r\n return REJECTED_BY;\r\n }", "public String getREJECTED_BY() {\r\n return REJECTED_BY;\r\n }", "public void setRejected (java.lang.Boolean rejected) {\n\t\tthis.rejected = rejected;\n\t}", "public void setReject(String reject) {\n this.reject = reject;\n }", "TypeSelectEvaluator(boolean reject) {\r\n this.reject = reject;\r\n }", "@ApiModelProperty(value = \"The reject action text. If not specified the reject button will NOT be rendered, and the user will only see an approve action button.\")\n public String getRejectText() {\n return rejectText;\n }", "boolean getAccepted();", "public String getRejectionMessage() {\r\r\n return rejectionMessage;\r\r\n }", "public int getDisabledReasonValue(int index) {\n return disabledReason_.get(index);\n }", "public boolean getAccepted()\n {\n return accepted;\n }", "private JButton getRejectButton() {\n return ((OkCancelButtonPanel) getButtonPanel()).getCancelButton();\n }", "public void setDATE_REJECTED(Date DATE_REJECTED) {\r\n this.DATE_REJECTED = DATE_REJECTED;\r\n }", "public void setDATE_REJECTED(Date DATE_REJECTED) {\r\n this.DATE_REJECTED = DATE_REJECTED;\r\n }", "public String getReasonRejection()\n\t{\n\t\treturn reasonRejection;\n\t}", "public boolean getStatusForRejected(String cartItemStatus) {\n boolean flag = false;\n\t\t\t/* Checking for the transaction status and below are satisfied then return true */\n if (cartItemStatus.equals(PdfConstants.REJECTED)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_POSTING_CATEGORY_CHANGED)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_INVALID_PAYMENT_AMOUNT)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_VELOCITY_LIMIT_EXCEEDED)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_PAYMENT_CARD_FAILED)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_PROGRAM_ENDED)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_NOT_AUTHED)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_POSTING_WINDOW_EXPIRED)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_BAN_VELOCITY_LIMIT_EXCEEDED)\n || cartItemStatus.equals(PdfConstants.SCHEDULED_CANCELLED_CARD_NO_LONGER_AVAILABLE)) {\n flag = true;\n }\n return flag;\n }", "boolean getPossiblyBad();", "@ApiModelProperty(value = \"The message provided by the reviewer when a submission is rejected.\")\n\n\n public String getRejectionMessage() {\n return rejectionMessage;\n }", "public Object getPropertyValueOrRejectedUpdate(String objName, String field) {\n\t\tFieldError fe = getError(objName, field);\n\t\tif (fe == null)\n\t\t\treturn getBeanWrapperFor(objName).getPropertyValue(field);\n\t\treturn fe.getRejectedValue();\n\t}", "String getNeedsInventoryIssuance();", "@java.lang.Override\n public int getDisabledReasonValue(int index) {\n return disabledReason_.get(index);\n }", "boolean getValue();", "public boolean getValue();", "boolean getNegated();", "public boolean getAccepted() {\n return accepted_;\n }", "public void setRejector(String rejector) {\n this.rejector = rejector;\n }", "public String getNotAcceptReason() {\r\n\t\treturn notAcceptReason;\r\n\t}", "public boolean getAccepted() {\n return accepted_;\n }", "public net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision getDecision() {\n net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision result = net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision.valueOf(decision_);\n return result == null ? net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision.ACCEPTED : result;\n }", "public StrColumn getRecvdInternalApproval() {\n return delegate.getColumn(\"recvd_internal_approval\", DelegatingStrColumn::new);\n }", "public net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision getDecision() {\n net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision result = net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision.valueOf(decision_);\n return result == null ? net.nyhm.protonet.example.proto.LoginProto.RegisterResponse.Decision.ACCEPTED : result;\n }", "boolean isSetIssued();", "@Override\n\tpublic boolean isDenied() {\n\t\treturn model.isDenied();\n\t}", "public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }", "UserStatusReason getStatusReason();", "public Boolean getValue() {\n\t\treturn b;\n\t}", "public int reason() {\r\n return Integer.parseInt(getParm(1));\r\n }", "public java.math.BigInteger getNotOkForPickupReasonCode() {\r\n return notOkForPickupReasonCode;\r\n }", "public java.lang.String getRejectionCode() {\n return rejectionCode;\n }", "Boolean getCompletelyCorrect();", "String failureReason();", "public int getForbidCondition() {\n\t\t\treturn forbidCondition;\n\t\t}", "@Override\r\n\tpublic boolean evaluate(Object value, String columnName)\r\n\t\t\tthrows SQLException {\n\t\treturn false;\r\n\t}", "T getFalseValue();", "public StrColumn getUnpublishedFlag() {\n return delegate.getColumn(\"unpublished_flag\", DelegatingStrColumn::new);\n }", "java.lang.String getReason();", "public Boolean getValue() {\n return value;\n }", "public net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision getDecision() {\n net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision result = net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision.valueOf(decision_);\n return result == null ? net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision.ACCEPTED : result;\n }", "public Integer getIsscheduling() {\n return isscheduling;\n }", "@Override\n\tpublic boolean getVanished() {\n\t\treturn this.vanished;\n\t}", "org.hl7.fhir.String getReason();", "public String getIsNegative() {\r\n return isNegative;\r\n }", "java.lang.String getStateReason();", "public net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision getDecision() {\n net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision result = net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision.valueOf(decision_);\n return result == null ? net.nyhm.protonet.example.proto.LoginProto.LoginResponse.Decision.ACCEPTED : result;\n }", "public PriorityCode.Enum getMissivePriority() {\n\n // Get the missive document priority\n return this.sepamailMissive001.getMsvPri();\n }", "String getBooleanFalseExpression();", "int getDeliveryStatusValue();", "@Override\r\n\tpublic boolean evaluate(Object value, int column) throws SQLException {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isDenied();", "org.hl7.fhir.Boolean getInactive();", "public static boolean rejectRequest(String fid) {\r\n\t\tboolean status = false;\r\n\t\tint i = 0;\r\n\r\n\t\ttry {\r\n\t\t\tDBconn cn = new DBconn();\r\n\t\t\tConnection con = cn.getConn();\r\n\t\t\tPreparedStatement ps2 = null;\r\n\t\t\tps2 = con.prepareStatement(\" update custemp717 set Recstatus='R' where custcode=?\");\r\n\t\t\tint k = Integer.parseInt(fid);\r\n\t\t\tps2.setInt(1, k);\r\n\t\t\ti = ps2.executeUpdate();\r\n\r\n\t\t\tcon.commit();\r\n\t\t\tps2.close();\r\n\t\t\tcon.close();\r\n\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tstatus = true;\r\n\t\t\t}\r\n\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"Rejecting the record...\");\r\n\t\treturn status;\r\n\t}", "public String getReason();", "public boolean getValue() {\r\n\t\treturn this.value;\r\n\t}", "public boolean getValidity();", "public Integer getIsInvalid() {\n return isInvalid;\n }", "public Boolean getValue() {\n/* 60 */ return Boolean.valueOf(this.val);\n/* */ }", "public String getResultValueText() {\n if (mResultValue == 0) {\n return \"Passed\";\n }\n if (mResultValue == 1) {\n return \"Warning\";\n }\n if (mResultValue == 2) {\n return \"Failed\";\n }\n if (mResultValue == 3) {\n return \"Not executed\";\n }\n\n return \"Unknown\";\n }", "public Rejection getRejectionReason() {\n\t\treturn resolutionReason;\n\t}", "public BidEvaluationReport getBidResultCode() {\n return bidResultCode;\n }", "public Double findRatioRejectedParadesFinalMode() {\n\t\tDouble result;\n\n\t\tresult = this.paradeRepository.findRatioRejectedParadesFinalMode();\n\n\t\treturn result;\n\t}", "public Cursor getRejectedWords()\n\t{\n\t\treturn getWordsByType(DBConstants.WORDTYPE_REJECTED);\n\t}", "public String disabledReasonMessage() {\n return this.disabledReasonMessage;\n }", "private Object eval(NotFact expr) {\n if (expr.getOpt() != null) {\n Object res = eval(expr.getExpr());\n if (res instanceof Boolean) {\n return !(Boolean) res;\n } else {\n throw new RaydenScriptException(\"Expression error: NotFact result is no boolean\");\n }\n } else {\n return eval(expr.getExpr());\n }\n }", "private String eligibleToDonote() {\n if(Integer.parseInt(bloodPressureTxtField.getText())>100 || Integer.parseInt(heartRateTxtField.getText())>80 \n || alcoholConsumptionTxtField.getText().equals(\"Y\") || drugConsumptionTxtField.getText().equals(\"Y\"))\n {\n return \"Ineligibe to Donate Blood\";\n }\n return \"Eligible to Donate Blood\";\n }", "public java.lang.String getNotOkForPickupReasonDescription() {\r\n return notOkForPickupReasonDescription;\r\n }", "public Boolean getBlocked() {\n return this.blocked;\n }", "public Boolean getValue() {\n return this.value;\n }", "public Boolean getValue() {\n return this.value;\n }", "public Boolean getValue() {\n return this.value;\n }", "public Integer getCorrectflag() {\n return correctflag;\n }", "public boolean getValue() {\n\t\treturn _checked;\n\t}", "int getCauseValue();", "int getConditionValue();", "pb4server.CheckAllianceCompetitionAskReq getCheckAllianceCompetitionAskReq();", "public boolean getNegated() {\r\n return Negated;\r\n }", "public Integer getTradeFail() {\n return tradeFail;\n }", "public boolean isApproved();", "public boolean isApproved();", "public void setRejectReason(String rejectReason) {\n\t\tthis.rejectReason = rejectReason == null ? null : rejectReason.trim();\n\t}" ]
[ "0.7102963", "0.7043231", "0.6812107", "0.6695766", "0.62820464", "0.6255999", "0.6225763", "0.6225763", "0.6215481", "0.61301345", "0.60277736", "0.597109", "0.59291315", "0.59291315", "0.59192777", "0.57441854", "0.566243", "0.5576732", "0.54775554", "0.5442128", "0.53182954", "0.5307245", "0.5293831", "0.52704173", "0.52704173", "0.5266886", "0.5240155", "0.5225729", "0.52244395", "0.52166706", "0.5177574", "0.51607764", "0.5141236", "0.5127637", "0.5127577", "0.5112206", "0.51096165", "0.51061344", "0.5039668", "0.5035853", "0.5027521", "0.5027503", "0.50061834", "0.49886423", "0.49828818", "0.49659672", "0.49609452", "0.49562767", "0.49547005", "0.49448016", "0.49423233", "0.49386862", "0.48851386", "0.48560756", "0.48551208", "0.48473033", "0.4831653", "0.48237902", "0.48130968", "0.48102123", "0.4809864", "0.48070845", "0.48006845", "0.47960967", "0.4795371", "0.47911093", "0.47848386", "0.47809035", "0.4777266", "0.4770407", "0.47659633", "0.47577703", "0.47555465", "0.47421634", "0.47396973", "0.47311527", "0.47298157", "0.47297636", "0.47211275", "0.47166404", "0.47107694", "0.47041914", "0.4689269", "0.46815038", "0.46805117", "0.46796793", "0.46781164", "0.4676456", "0.4676456", "0.4676456", "0.4666198", "0.46622393", "0.46613842", "0.46522725", "0.46412218", "0.463947", "0.4638929", "0.46332976", "0.46332976", "0.4631284" ]
0.6771641
3
Set the value related to the column: is_rejected
public void setRejected (java.lang.Boolean rejected) { this.rejected = rejected; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRejected(boolean value) {\n this.rejected = value;\n }", "public com.example.DNSLog.Builder setRejected(boolean value) {\n validate(fields()[19], value);\n this.rejected = value;\n fieldSetFlags()[19] = true;\n return this;\n }", "public GetACDHistoryRequest setRejected(boolean d) {\n this.rejected = Boolean.valueOf(d);\n return this;\n }", "public boolean getRejected() {\n return rejected;\n }", "public boolean getRejected() {\n return rejected;\n }", "public void setReject(String reject) {\n this.reject = reject;\n }", "public void setDATE_REJECTED(Date DATE_REJECTED) {\r\n this.DATE_REJECTED = DATE_REJECTED;\r\n }", "public void setDATE_REJECTED(Date DATE_REJECTED) {\r\n this.DATE_REJECTED = DATE_REJECTED;\r\n }", "public java.lang.Boolean getRejected () {\n\t\treturn rejected;\n\t}", "public boolean isSetRejected_reason() {\n return EncodingUtils.testBit(__isset_bitfield, __REJECTED_REASON_ISSET_ID);\n }", "public String getReject() {\n return reject;\n }", "public Date getDATE_REJECTED() {\r\n return DATE_REJECTED;\r\n }", "public Date getDATE_REJECTED() {\r\n return DATE_REJECTED;\r\n }", "public boolean hasRejected() {\n return fieldSetFlags()[19];\n }", "TypeSelectEvaluator(boolean reject) {\r\n this.reject = reject;\r\n }", "public void setRejector(String rejector) {\n this.rejector = rejector;\n }", "public String getRejectReason() {\n\t\treturn rejectReason;\n\t}", "@ApiModelProperty(value = \"The reject action text. If not specified the reject button will NOT be rendered, and the user will only see an approve action button.\")\n public String getRejectText() {\n return rejectText;\n }", "public String getRejector() {\n return rejector;\n }", "public void setIsApproved (boolean IsApproved);", "public void setIsApproved (boolean IsApproved);", "public void setAccepted() {\r\n\t\tstatus = \"Accepted\";\r\n\t}", "@Override\n public void acceptReject(boolean accept)\n {\n if (!accept)\n variable.setValue(savedValue);\n \n }", "@Override\r\n\tpublic void rejectApplier(Applier applier) {\n\t\tapplier.setStatus(\"Rejected\");\r\n\t\tem.merge(applier);\r\n\r\n\t}", "public void setDenied() {\r\n\t\tstatus = \"Denied\";\r\n\t}", "public void setRejectReason(String rejectReason) {\n\t\tthis.rejectReason = rejectReason == null ? null : rejectReason.trim();\n\t}", "public void setIsInvalid(Integer isInvalid) {\n this.isInvalid = isInvalid;\n }", "public String getREJECTED_BY() {\r\n return REJECTED_BY;\r\n }", "public String getREJECTED_BY() {\r\n return REJECTED_BY;\r\n }", "public void setUnproved() {\n\t\tproveState = UNPROVED;\n\t}", "public void setAchieved(Boolean newValue);", "public void setOnRejectBranchsequenceType(Enumerator newValue);", "public void markUnsold(){\n\n myMaxRejectCountCount--;\n }", "void setConfirmed(String value);", "private void setBlocked(boolean value) {\n\n blocked_ = value;\n }", "@DesireNoWarning(\"TQ\")\n public void set(@CheckForSigned int possibleNegativeValue) {\n if (possibleNegativeValue >= 0)\n nonNegativeValue = possibleNegativeValue;\n }", "public void setRejectionMessage(String rejectionMessage) {\r\r\n this.rejectionMessage = rejectionMessage;\r\r\n }", "public Builder setAccepted(boolean value) {\n \n accepted_ = value;\n onChanged();\n return this;\n }", "@objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);", "boolean approveDeny(String choice, int id, int resolverId);", "protected void setProved() {\n\t\tproveState = PROVED;\n\t}", "public void setTradeResult(String id, Boolean isAccepted){\n for (Trade trade : trades){\n if(trade.getId().equals(id)){\n if(isAccepted && trade.getStatus().equals(\"Pending\")){\n trade.setStatus(\"In-progress\");\n\n }else if(!isAccepted && trade.getStatus().equals(\"Pending\")){\n trade.setStatus(\"Declined\");\n changeTradeType(trade.getId());//have to change type to \"past\"\n }\n return;\n }\n }\n\n Log.d(TAG, \"Decision has been made on this trade request\");\n }", "@ApiModelProperty(value = \"The message provided by the reviewer when a submission is rejected.\")\n\n\n public String getRejectionMessage() {\n return rejectionMessage;\n }", "public void testUpdateRejectReason_ExistRejectReasonAccuracy() {\r\n ExpenseEntryRejectReason reason = new ExpenseEntryRejectReason(1);\r\n entry.addRejectReason(reason);\r\n\r\n ExpenseEntryRejectReason reasonNew = new ExpenseEntryRejectReason(1);\r\n assertTrue(\"The reject reason should be updated.\", entry.updateRejectReason(reasonNew));\r\n\r\n // check whether is updated properly\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reason should be updated.\", 1, rejectReasonsMap.size());\r\n assertEquals(\"The reject reason should be updated.\", reasonNew, rejectReasonsMap.get(new Integer(1)));\r\n }", "public void changeCanThrowFlag()\r\n\t{\r\n\t\tcanThrowFlag = !canThrowFlag;\r\n\t}", "public boolean getAccepted()\n {\n return accepted;\n }", "boolean isSetIssued();", "protected void markAsInappropriate(Post p, Boolean b) {\n this.setFlag(p, \"inappropriate\", b);\n }", "boolean getAccepted();", "public void testUpdateRejectReason_NotExistRejectReasonAccuracy() {\r\n ExpenseEntryRejectReason reason = new ExpenseEntryRejectReason(1);\r\n\r\n assertFalse(\"The reject reason should not be updated.\", entry.updateRejectReason(reason));\r\n }", "@When(\"^the value of the deposit is true$\")\n public void the_value_of_the_deposit_is_true() throws Throwable {\n throw new PendingException();\n }", "public void testUpdateRejectReasons_Accuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[1];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] nonExisting = entry.updateRejectReasons(rejectReasons);\r\n\r\n // check it should be updated in the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should be updated.\", 1, rejectReasonsMap.size());\r\n assertEquals(\"The reject reasons should be updated.\", rejectReasons[0], rejectReasonsMap.get(new Integer(1)));\r\n\r\n // check the duplicate result\r\n assertNull(\"The nonExisting result should be correct.\", nonExisting);\r\n }", "public void setRejectIfNoRule(final boolean reject) {\n \t\t_rejectIfNoRule = reject;\n \t}", "public void setIsNegative(String isNegative) {\r\n this.isNegative = isNegative;\r\n }", "public static boolean rejectRequest(String fid) {\r\n\t\tboolean status = false;\r\n\t\tint i = 0;\r\n\r\n\t\ttry {\r\n\t\t\tDBconn cn = new DBconn();\r\n\t\t\tConnection con = cn.getConn();\r\n\t\t\tPreparedStatement ps2 = null;\r\n\t\t\tps2 = con.prepareStatement(\" update custemp717 set Recstatus='R' where custcode=?\");\r\n\t\t\tint k = Integer.parseInt(fid);\r\n\t\t\tps2.setInt(1, k);\r\n\t\t\ti = ps2.executeUpdate();\r\n\r\n\t\t\tcon.commit();\r\n\t\t\tps2.close();\r\n\t\t\tcon.close();\r\n\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tstatus = true;\r\n\t\t\t}\r\n\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"Rejecting the record...\");\r\n\t\treturn status;\r\n\t}", "@Override\r\n\tpublic void setCanceled(boolean value) {\n\r\n\t}", "public boolean getAccepted() {\n return accepted_;\n }", "public void setREJECTED_BY(String REJECTED_BY) {\r\n this.REJECTED_BY = REJECTED_BY == null ? null : REJECTED_BY.trim();\r\n }", "public void setREJECTED_BY(String REJECTED_BY) {\r\n this.REJECTED_BY = REJECTED_BY == null ? null : REJECTED_BY.trim();\r\n }", "public final void setBoolean(String name, boolean value, int resolveID, int rejectID) {\n setBooleanImpl(name, value, ResolverFactory.createVoidResolver(this, resolveID, rejectID));\n }", "public boolean getAccepted() {\n return accepted_;\n }", "public void setRequested(){\n this.status = \"Requested\";\n }", "public void setIsSuccessInSolving(Integer isSuccessInSolving)\n/* */ {\n/* 219 */ this.isSuccessInSolving = isSuccessInSolving;\n/* */ }", "public void setFailure(boolean value) {\n\t\tif (value) {\n\t\t\tcountdown = EXIT_COUNT;\n\t\t}\n\t\tfailed = value;\n\t}", "public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}", "public void setValidated(Player p, boolean value) {\n this.getInstance(p).setValidated(value);\n }", "public void setInvalid();", "public void setClaim(boolean a){\n isClaimed= a;\n \n}", "public void rejectProduct() {\n self.increaseRejectCount();\n env.updateMachine(self);\n }", "private void setBidded(){\n this.status = \"Bidded\";\n }", "@Override\n\tpublic int updateRejectWannaBook(String num) throws RemoteException {\n\t\treturn 0;\n\t}", "@Test\n\tpublic void rejectedOfferCanNotBeAccepted() {\n\t}", "public void setNotSupplied(final boolean value) {\n this.notSupplied = value;\n }", "@Override\n\tpublic boolean isDenied() {\n\t\treturn model.isDenied();\n\t}", "@Override\n\tpublic void ruleReject(String campaignActivityId) throws ASException {\n\t\tCampaignActivity ca = caDao.get(campaignActivityId);\n\t\t\n\t\tif( ca.getRedeemStatus().equals(CampaignActivity.REDEEM_STATUS_DELIVERED)) { \n\t\t\t\n\t\t\tca.setRedeemStatus(CampaignActivity.REDEEM_STATUS_RULE_REJECTED);\n\t\t\tca.setStatusChangeDateTime(new Date());\n\t\t\t\n\t\t\tcaDao.update(ca);\n\n\t\t} else {\n\t\t\tthrow ASExceptionHelper.forbiddenException();\n\t\t}\n\t}", "protected final void\n setOutcome(boolean outcome)\n {\n if (hasOutcome_)\n throw new IllegalArgumentException\n (\"The ValidationState already has an outcome\");\n\n hasOutcome_ = true;\n outcome_ = outcome;\n }", "@RequestMapping(value = \"/reject\", method = RequestMethod.POST)\r\n\tpublic String rejectIssue(HttpServletRequest request) {\r\n\t\tIssueDAO issueDAO = (IssueDAO) ApplicationContextProvider.getApplicationContext().getBean(\"issueDAO\");\r\n\t\tDepartmentDAO deptDAO = (DepartmentDAO) ApplicationContextProvider.getApplicationContext()\r\n\t\t\t\t.getBean(\"departmentDAO\");\r\n\r\n\t\tint issueId = Integer.parseInt(request.getParameter(\"issueId\"));\r\n\r\n\t\tIssue issue = null;\r\n\t\tDepartment dept = null;\r\n\t\ttry {\r\n\t\t\tissue = issueDAO.readById(issueId);\r\n\t\t\tdept = deptDAO.readById(1);\r\n\t\t} catch (IssueDoesNotExistException | DepartmentDoesNotExistException e) {\r\n\t\t\tlogger.error(\"Issue or Department does not exist\", e);\r\n\t\t}\r\n\r\n\t\tAssignIssueCommand assign = new AssignIssueCommand(issue, dept, Status.REJECTED);\r\n\t\tassign.execute();\r\n\r\n\t\tlogger.info(issue.getTitle()+\": department changed to 'General' because it was rejected by Department Admin\");\r\n\r\n\r\n\t\tString[] headers = request.getHeader(\"referer\").split(\"/\");\r\n\t\tString sendTo = headers[headers.length - 1];\r\n\t\tlogger.trace(\"redirecting to: \"+sendTo);\r\n\t\treturn \"redirect:/\" + sendTo;\r\n\t}", "public void setAccepted_tou(boolean accepted_tou);", "public void testUpdateRejectReason_NullRejectReason() {\r\n try {\r\n entry.updateRejectReason(null);\r\n fail(\"Should throw IllegalArgumentException\");\r\n } catch (IllegalArgumentException e) {\r\n // good\r\n }\r\n }", "public void permittedValues(BooleanExpression permitted) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(permitted));\n\t}", "public int approve_reject_Request(int approval_status, String approvedBy, String approverComment, Timestamp time_approved,String social_Email)\r\n\t{\r\n\t\tConnection conn=getConnection();\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tint result=0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"update SOCIAL_EAI_APPROVAL set (APPROVAL_STATUS,APPROVED_BY,APPROVER_COMMENT,TIME_APPROVED)=(?,?,?,?) where REQ_SOCIAL_EMAIL=?\";\r\n\t\t\tpstmt = conn.prepareStatement(query); \r\n\t\t\tpstmt.setInt(1,approval_status); \r\n\t\t\tpstmt.setString(2,approvedBy); \r\n\t\t\tpstmt.setString(3,approverComment);\r\n\t\t\tpstmt.setTimestamp(4,time_approved);\r\n\t\t\tpstmt.setString(5,social_Email);\r\n\r\n\t\t\tresult=pstmt.executeUpdate(); \r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\r\n\t\t\tSystem.out.println(\"EXception:\");\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\r\n\r\n\t\treturn result;\r\n\t}", "public String getRejectionMessage() {\r\r\n return rejectionMessage;\r\r\n }", "public void changeIsInvincible()\r\n\t{\r\n\t\tisInvincible = !isInvincible;\r\n\t}", "public void setIsAssigned(boolean isAssigned) {\r\n this.isAssigned = isAssigned;\r\n }", "@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}", "public void setCorrectFlag(){\n\t\tcorrectFlag = true;\n\t}", "public void setFailed() throws RemoteException;", "@Test\n public void respondRejected() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var rejectBy = UserId.random();\n var rejectAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstGrant = grant\n .reject(rejectBy, rejectAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstGrant.approve(rejectBy, rejectAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstGrant.reject(UserId.random(), rejectAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(approve.isFailure())\n .as(\"The 2nd call to approve cannot be successful\")\n .isTrue();\n\n assertThat(reject)\n .as(\"The 2nd call to reject is also successful with the same result\")\n .satisfies(r -> {\n var secondGrant = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondGrant).isEqualTo(firstGrant);\n });\n }", "void setDraft(boolean d);", "public void setApproved(boolean approved) {\n this.approved = approved;\n }", "public int setInactiveForNoRebill();", "@Override\n\t\t\tpublic void setCanceled(boolean value) {\n\t\t\t\t\n\t\t\t}", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "public void setField(long messageId, boolean newValue);", "public String getReasonRejection()\n\t{\n\t\treturn reasonRejection;\n\t}", "public void setReject(final Configuration configuration) {\n\t\tfinal ConfigurationButton button = configurationToButtonMap.get(configuration);\n\t\tif (button == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (button.state == ConfigurationButton.NORMAL) {\n\t\t\tbutton.setState(ConfigurationButton.REJECT);\n\t\t}\n\t\tbutton.doClick();\n\t}", "public void makeApprovedIfNull() {\n int x = getHifiveRating();\n if (x == 0) {\n setHifiveRating(HIFIVERATING_approved);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tis_draft = \"0\";\n\t\t\t\tValidateValue();\n\n\t\t\t}", "@Override\n public void setPlayerDoneEliminating(Player player, boolean value) {\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneEliminating\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneEliminating\");\n }\n\n }", "protected void handleRejectProposal(ACLMessage cfp, ACLMessage propose, ACLMessage reject) {\r\n\t\t}" ]
[ "0.805112", "0.7284399", "0.68703514", "0.6642701", "0.6610167", "0.64693385", "0.6227789", "0.6227789", "0.6165047", "0.61393213", "0.61292505", "0.6071017", "0.6071017", "0.5870062", "0.58534795", "0.5743453", "0.5713678", "0.56684196", "0.5637364", "0.557099", "0.557099", "0.55650383", "0.5562775", "0.55082875", "0.5436452", "0.5378185", "0.5345386", "0.5340227", "0.5340227", "0.5324957", "0.5321463", "0.5313359", "0.52647907", "0.5255186", "0.52450174", "0.52406377", "0.52373224", "0.5218928", "0.5217092", "0.5202302", "0.5184528", "0.51498145", "0.5134433", "0.51084185", "0.5100989", "0.50933284", "0.50618505", "0.5043824", "0.50359637", "0.50192314", "0.50157577", "0.5010452", "0.50026816", "0.50008464", "0.49945456", "0.4990507", "0.49649024", "0.4962111", "0.4962111", "0.4933365", "0.4909972", "0.48987308", "0.4872884", "0.4870159", "0.4868891", "0.4864914", "0.4859828", "0.48560032", "0.4853767", "0.48402503", "0.48331657", "0.48320678", "0.48305795", "0.48292115", "0.48274365", "0.48169562", "0.48111525", "0.48026407", "0.4792963", "0.4791083", "0.4790137", "0.47847822", "0.47765318", "0.47746754", "0.4769749", "0.476879", "0.4766622", "0.4764557", "0.4762446", "0.47621992", "0.47544712", "0.4754141", "0.47413364", "0.47334018", "0.47314543", "0.47303733", "0.47232032", "0.47182602", "0.4716438", "0.47131267" ]
0.72163326
2
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel3 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jRadioButton1 = new javax.swing.JRadioButton(); jRadioButton2 = new javax.swing.JRadioButton(); jRadioButton3 = new javax.swing.JRadioButton(); jLabel6 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); jTextField2 = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); jButton1.setFont(new java.awt.Font("Gill Sans MT", 0, 24)); // NOI18N jButton1.setText("Create"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("Gill Sans MT", 0, 24)); // NOI18N jButton2.setText("Cancel"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1) .addGap(18, 18, 18) .addComponent(jButton2) .addGap(20, 20, 20)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icons8_sewing_machine_128px.png"))); // NOI18N jLabel2.setFont(new java.awt.Font("Gill Sans MT", 0, 48)); // NOI18N jLabel2.setForeground(new java.awt.Color(102, 102, 255)); jLabel2.setText("Gangsa Tailor"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addGap(18, 18, 18) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)) .addGap(23, 23, 23)) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 2), "Vermak", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Gill Sans MT", 0, 24))); // NOI18N jLabel3.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel3.setText("No. Pesanan"); jLabel4.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel4.setText("XXXXXXXXXXXXXXX"); jLabel5.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel5.setText("Nama Pemesan"); jTextField1.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel7.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel7.setText("XXXXXXXXXXXXXXX"); jLabel8.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel8.setText("Tanggal"); jLabel9.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel9.setText("Jenis"); buttonGroup1.add(jRadioButton1); jRadioButton1.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jRadioButton1.setText("Potong"); jRadioButton1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jRadioButton1MouseClicked(evt); } }); buttonGroup1.add(jRadioButton2); jRadioButton2.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jRadioButton2.setText("Mengecilkan"); jRadioButton2.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { jRadioButton2MouseDragged(evt); } }); jRadioButton2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jRadioButton2MouseClicked(evt); } }); buttonGroup1.add(jRadioButton3); jRadioButton3.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jRadioButton3.setText("Tambal"); jRadioButton3.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jRadioButton3MouseClicked(evt); } }); jLabel6.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel6.setText("Total"); jLabel10.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N jLabel10.setText("0,-"); jLabel11.setFont(new java.awt.Font("Gill Sans MT", 0, 24)); // NOI18N jLabel11.setText("RP"); jButton3.setFont(new java.awt.Font("Gill Sans MT", 0, 24)); // NOI18N jButton3.setText("Calculate"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jTextField2.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel13.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel13.setText("Kuantitas"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jLabel9) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6) .addComponent(jLabel13)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField2) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(30, 30, 30) .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jTextField1) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jRadioButton1) .addGap(18, 18, 18) .addComponent(jRadioButton2) .addGap(18, 18, 18) .addComponent(jRadioButton3) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap()) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(240, 240, 240) .addComponent(jButton3) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent(jRadioButton1) .addComponent(jRadioButton2) .addComponent(jRadioButton3)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addGap(18, 18, 18) .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
full design insert design == tailor
void ProcessInput() throws SQLException { if ("".equals(jTextField1.getText()) || "".equals(buttonGroup1.getSelection().getActionCommand()) || "".equals(jTextField2.getText())) {JOptionPane.showMessageDialog(null , "Isi Form dengan benar");} else { String nama = jTextField1.getText(); String tanggal = jLabel7.getText(); String jenis = buttonGroup1.getSelection().getActionCommand(); String kuantitas = jTextField2.getText(); String idPesanan = jLabel4.getText(); String pembayaran = jLabel10.getText(); sql1 = "INSERT INTO vermak(tanggal, nama, jenis, kuantitas) VALUES ('" +tanggal+"','" +nama+"','" +jenis+"','" +kuantitas+"')"; sql2 = "insert into payvermak(idPesanan, pembayaran) values ('"+idPesanan+"','"+pembayaran+"')"; stat = (com.mysql.jdbc.Statement) connection.prepareStatement(sql1); stat.execute(sql1); stat1 = (com.mysql.jdbc.Statement) connection.prepareStatement(sql2); stat1.execute(sql2); stat.close(); stat1.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void insert(Design design) {\n\t\tdesignMapper.insert(design);\n\t}", "private void designCompleteSeatMapUi() {\n\n //load NetworkImageView\n loadNetworkImages();\n\n labelsLocalize();\n //passenger design\n designViewForSelectedPassengerList(seatMapData.getPassengerArray());\n\n //cabin design\n designColumnBySeatMarker(seatMapData.getSeatMarkarr(), layout_columnSeatMark);\n\n designSeatByColumn(seatMapData.getSeatdetailarr());\n\n lyt_seat.setVisibility(View.VISIBLE);\n\n setLeftVerticalRow(seatMapData.getSeatdetailarr(), lytLeftVerticalRow, parentViewForRecycler, relative_seatmap_parent);\n\n\n }", "public JComponent addInsert(Color color)\n {\n Category category = new Category(this, \"Insert FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox[] insert = new HBox[6];\n\n \n // OFF\n insert[0] = new HBox();\n\n\n // EQ Bandpass\n insert[1] = new HBox(); \n\n comp = new LabelledDial(\"Mid\", this, \"bandpassmidfreq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Freq\");\n insert[1].add(comp);\n \n comp = new LabelledDial(\"Mid\", this, \"bandpassmidgain\", color, 0, 127)\n {\n public boolean isSymmetric() { return true; }\n public String map(int value)\n {\n if (value <= 64) return \"\" + (((value - 64) * 100) / 64) + \"%\";\n else return \"\" + (((value - 64) * 100) / 63) + \"%\";\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[1].add(comp);\n\n comp = new LabelledDial(\"Mid\", this, \"bandpassmidq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Q\");\n insert[1].add(comp);\n\n\n // Compressor\n insert[2] = new HBox(); \n\n comp = new LabelledDial(\"Attack\", this, \"compressorattack\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Release\", this, \"compressorrelease\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Threshold\", this, \"compressorthreshold\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Ratio\", this, \"compressorratio\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Makeup\", this, \"compressorgain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[2].add(comp);\n\n\n // Auto Wah\n insert[3] = new HBox(); \n\n VBox vbox = new VBox();\n params = AUTO_WAH_TYPES;\n comp = new Chooser(\"Wah Wah Type\", this, \"autowahtype\", params);\n vbox.add(comp);\n insert[3] .add(vbox);\n\n comp = new LabelledDial(\"Cutoff\", this, \"autowahcutoff\", color, 0, 127);\n insert[3].add(comp);\n \n comp = new LabelledDial(\"Resonance\", this, \"autowahresonance\", color, 0, 127);\n insert[3].add(comp);\n \n comp = new LabelledDial(\"Sensitivity\", this, \"autowahsensitivity\", color, 0, 127);\n insert[3].add(comp);\n \n // shared with Compressor\n comp = new LabelledDial(\"Attack\", this, \"compressorattack\", color, 0, 127);\n insert[3].add(comp);\n \n // shared with Compressor\n comp = new LabelledDial(\"Release\", this, \"compressorrelease\", color, 0, 127);\n insert[3].add(comp);\n \n \n\n // Distortion\n insert[4] = new HBox(); \n\n vbox = new VBox();\n params = DISTORTION_TYPES;\n comp = new Chooser(\"Distortion Type\", this, \"distortiontype\", params);\n vbox.add(comp);\n insert[4].add(vbox);\n\n comp = new LabelledDial(\"Depth\", this, \"distortiondepth\", color, 0, 127);\n insert[4].add(comp);\n \n comp = new LabelledDial(\"Pre\", this, \"distortionpregain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[4].add(comp);\n \n comp = new LabelledDial(\"Post\", this, \"distortionpostgain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[4].add(comp);\n \n comp = new LabelledDial(\"High\", this, \"distortionhighcutoff\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Cutoff\");\n insert[4].add(comp);\n \n\n // Reducer\n insert[5] = new HBox(); \n\n comp = new LabelledDial(\"Bit\", this, \"reducerbitdepth\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Depth\");\n insert[5].add(comp);\n \n comp = new LabelledDial(\"Sample\", this, \"reducersamplerate\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Rate\");\n insert[5].add(comp);\n \n \n /// CHOOSER\n \n final HBox fx = new HBox();\n\n vbox = new VBox();\n params = INSERT_FX_TYPES;\n comp = new Chooser(\"Type\", this, \"channelfxtype\", params) // I *think* this is insert\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n fx.removeLast();\n int channelfxtype = model.get(\"channelfxtype\", 0);\n if (channelfxtype >= 0 && channelfxtype < insert.length)\n fx.addLast(insert[channelfxtype]);\n else Synth.handleException(new Throwable(\"Invalid channel fx type: \" + channelfxtype));\n fx.revalidate();\n fx.repaint();\n }\n }; \n vbox.add(comp);\n hbox.add(vbox);\n fx.add(insert[0]); // empty\n hbox.add(fx);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void preInsert() {\n\n\t}", "void hackInsertWidget(Widget w, int beforeIndex) {\n panel.insert(w, beforeIndex);\n }", "public dame8()\n { this.setTitle(\"dame8\");\n creation_damier();\n damier.setPreferredSize(new Dimension(1000, 1000));\n damier.setBackground(Color.RED);\n\n\n damier.setLayout(Layout);\n\n\n\n/*\n placer_dame(3);\n placer_dame(14);\n placer_dame(18);\n placer_dame(31);\n placer_dame(33);\n placer_dame(44);\n placer_dame(48);\n placer_dame(61);\n*/\n\n //recherche_solution();\n\n\n\n //On ajoute le conteneur\n this.setContentPane(damier);\n this.setVisible(true);\n }", "public interface ExtenderInterface {\r\n\r\n\t/**\r\n\t * Extends the diagram for new generated elements.\r\n\t */\r\n\tvoid extend();\r\n\t\r\n}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public planillaInsert() {\n initComponents();\n int lebar = this.getWidth()/2;\n int tinggi = this.getHeight()/2;\n int x = (Toolkit.getDefaultToolkit().getScreenSize().width/2)-lebar;\n int y = (Toolkit.getDefaultToolkit().getScreenSize().height/2)-tinggi;\n this.setLocation(x, y);\n }", "protected abstract void iniciarLayout();", "public TransformDesign() {\n tLayerPool = new TransformLayerPool();\n }", "private void prepare()\n {\n addObject(new TempoLimite(), 432, 207);\n addObject(new NumeroVidas(), 395, 278);\n\n Cliqueparajogar clique = new Cliqueparajogar();\n addObject(clique, getWidth()/2, getHeight()/2);\n\n Som som = new Som();\n addObject(som, getWidth() - 37, getHeight()-57);\n \n umMin ummin = new umMin();\n addObject(ummin,630,206);\n\n doisMin doismin = new doisMin();\n addObject(doismin,670,206);\n \n tresMin tresmin = new tresMin();\n addObject(tresmin,710,206);\n \n quatroMin quatromin = new quatroMin();\n addObject(quatromin,750,206);\n \n cincoMin cincomin = new cincoMin();\n addObject(cincomin,790,206);\n \n umaVida umavida = new umaVida();\n addObject(umavida,630,280);\n \n duasVidas duasvidas = new duasVidas();\n addObject(duasvidas,670,280);\n \n tresVidas tresvidas = new tresVidas();\n addObject(tresvidas,710,280);\n \n quatroVidas quatrovidas = new quatroVidas();\n addObject(quatrovidas,750,280);\n \n cincoVidas cincovidas = new cincoVidas();\n addObject(cincovidas,790,280);\n \n voltaratras voltar = new voltaratras();\n addObject(voltar, getWidth() -37, 428);\n }", "public AddEditionPatternParameter(ViewPointBuilder builder) {\n \t\t\tsuper(builder);\n \t\t}", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "public insertExp() throws SQLException {\n this.setExtendedState(JFrame.MAXIMIZED_BOTH);\n initComponents();\n jLabel1.setVisible(false);\n idLable.setVisible(false);\n showNextId();\n showProjCombo();\n detailsText.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\n }", "public void expand() {\n\t\tconvertHeadToTailComponent();\n\t\taddNewHead();\n\t}", "@Override\r\n public void insertUpdate(DocumentEvent e) {\n HayCambio();\r\n }", "@Override\n\tprotected final void ajouterUneParticule() {\n\t\tfinal int offsetX = (int) (vitesseX * dureeDeVieParticule)/2;\n\t\tfinal int offsetY = (int) (vitesseY * dureeDeVieParticule)/2;\n\t\t\n\t\tfinal Particule nouvelleParticule;\n\t\tfinal int x0 = Maths.generateurAleatoire.nextInt(Fenetre.LARGEUR_ECRAN) - offsetX;\n\t\tfinal int y0 = Maths.generateurAleatoire.nextInt(Fenetre.HAUTEUR_ECRAN) - offsetY;\n\t\tif (this.bassinDeParticules.size() > 0) {\n\t\t\t// On peut recycler une particule issue du bassin\n\t\t\tnouvelleParticule = this.rehabiliterParticule();\n\t\t\tnouvelleParticule.reinitialiser(x0, y0, dureeDeVieParticule, 0);\n\t\t} else {\n\t\t\t// Le bassin est vide, il faut creer une nouvelle particule\n\t\t\tnouvelleParticule = new Particule(x0, y0, dureeDeVieParticule, 0);\n\t\t}\n\t\tparticules.add(nouvelleParticule);\n\t}", "public String _designercreateview(Object _base,anywheresoftware.b4a.objects.LabelWrapper _lbl,anywheresoftware.b4a.objects.collections.Map _props) throws Exception{\n_mbase = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_base));\n //BA.debugLineNum = 35;BA.debugLine=\"Tag = mBase.Tag : mBase.Tag = Me\";\n_tag = _mbase.getTag();\n //BA.debugLineNum = 35;BA.debugLine=\"Tag = mBase.Tag : mBase.Tag = Me\";\n_mbase.setTag(this);\n //BA.debugLineNum = 36;BA.debugLine=\"cvs.Initialize(mBase)\";\n_cvs.Initialize(_mbase);\n //BA.debugLineNum = 37;BA.debugLine=\"mMin = Props.Get(\\\"Min\\\")\";\n_mmin = (int)(BA.ObjectToNumber(_props.Get((Object)(\"Min\"))));\n //BA.debugLineNum = 38;BA.debugLine=\"mMax = Props.Get(\\\"Max\\\")\";\n_mmax = (int)(BA.ObjectToNumber(_props.Get((Object)(\"Max\"))));\n //BA.debugLineNum = 39;BA.debugLine=\"pnl = xui.CreatePanel(\\\"pnl\\\")\";\n_pnl = _xui.CreatePanel(ba,\"pnl\");\n //BA.debugLineNum = 40;BA.debugLine=\"xlbl = Lbl\";\n_xlbl = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_lbl.getObject()));\n //BA.debugLineNum = 41;BA.debugLine=\"mBase.AddView(xlbl, 0, 0, 0, 0)\";\n_mbase.AddView((android.view.View)(_xlbl.getObject()),(int) (0),(int) (0),(int) (0),(int) (0));\n //BA.debugLineNum = 42;BA.debugLine=\"mBase.AddView(pnl, 0, 0, 0, 0)\";\n_mbase.AddView((android.view.View)(_pnl.getObject()),(int) (0),(int) (0),(int) (0),(int) (0));\n //BA.debugLineNum = 43;BA.debugLine=\"ValueColor = xui.PaintOrColorToColor(Props.Get(\\\"V\";\n_valuecolor = _xui.PaintOrColorToColor(_props.Get((Object)(\"ValueColor\")));\n //BA.debugLineNum = 44;BA.debugLine=\"If xui.IsB4A Or xui.IsB4i Then\";\nif (_xui.getIsB4A() || _xui.getIsB4i()) { \n //BA.debugLineNum = 45;BA.debugLine=\"stroke = 8dip\";\n_stroke = __c.DipToCurrent((int) (8));\n }else if(_xui.getIsB4J()) { \n //BA.debugLineNum = 47;BA.debugLine=\"stroke = 6dip\";\n_stroke = __c.DipToCurrent((int) (6));\n };\n //BA.debugLineNum = 49;BA.debugLine=\"Base_Resize(mBase.Width, mBase.Height)\";\n_base_resize(_mbase.getWidth(),_mbase.getHeight());\n //BA.debugLineNum = 50;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "private void supportDND(final FormatComposite formatComposite) {\n\n Transfer transfer [] = new Transfer[]{\n new ODOMElementTransfer(context.getODOMFactory(),\n \"layoutElements\")\n };\n\n final ODOMSelectionFilter filter =\n new ODOMSelectionFilter(null,\n new String[]{\n context.getRootElement().getName(),\n LayoutSchemaType.CANVAS_LAYOUT.getName(),\n LayoutSchemaType.MONTAGE_LAYOUT.getName()\n });\n\n final ArrayBasedActionDetails actionDetails =\n new ArrayBasedActionDetails();\n\n // Set up a listener that will update the action's enablement\n // status, using the {@link ODOMActionCommand#enable} method return\n // value, storing the selection in the actionDetails\n ODOMElementSelectionListener dndListener =\n new ODOMElementSelectionListener() {\n public void selectionChanged(ODOMElementSelectionEvent event) {\n actionDetails.setElements(event.getSelection().\n toODOMElementArray());\n }\n };\n\n context.getODOMSelectionManager().\n addSelectionListener(dndListener, filter);\n\n int operations = DND.DROP_COPY | DND.DROP_MOVE;\n\n DragSource source = new DragSource(formatComposite, operations);\n DropTarget target = new DropTarget(formatComposite, operations);\n\n source.addDragListener(\n new LayoutDragSourceListener(transfer[0], actionDetails));\n source.setTransfer(transfer);\n target.addDropListener(new LayoutDropTargetListener(\n actionDetails, context.getODOMSelectionManager(),\n ((LayoutODOMEditorContext) context).getLayoutEditorContext()) {\n\n protected ODOMElement getCurrentTarget(DropTargetEvent event) {\n return formatComposite.getElement();\n }\n });\n\n target.setTransfer(transfer);\n }", "@Override\n\tpublic int taille() {\n\t\treturn 1;\n\t}", "public void insert() {\n CardGame.instance.getTriggers().register(Triggers.END_FILTER, AfflictTrigger);\r\n }", "org.openxmlformats.schemas.presentationml.x2006.main.CTGuide insertNewGuide(int i);", "@Override\n protected void replot() {\n // Get the root of the feature model\n COREFeatureModel fm = concern.getFeatureModel();\n root = fm.getRoot();\n\n // Container for the aspects defined in the concern\n aspectContainer = new COREAspectContainer(concern, this);\n aspectContainer.setElements(getAllRealisationModels());\n\n // Container for the constraints defined in the concern\n constraintContainer = new COREConstraintContainer(HorizontalStick.RIGHT, VerticalStick.BOTTOM, true);\n constraintContainer.setElements(getConstraints(root));\n\n // Container for the goals defined in the concern's impact model\n impactEditContainer = new COREImpactConcernEditContainer(concern, this);\n\n // Draw feature diagram\n redrawFeatureDiagram(true);\n\n containerLayer.addChild(aspectContainer);\n containerLayer.addChild(constraintContainer);\n containerLayer.addChild(impactEditContainer);\n }", "PiviDiagram createPiviDiagram();", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "public void mo9839a() {\n onLayout(false, 0, 0, 0, 0);\n }", "private void m57186g() {\n setClipChildren(false);\n setVisibility(8);\n this.f41186b = ViewDragHelper.create(this, 1.0f, new C10484a());\n this.f41185a = LayoutInflater.from(getContext()).inflate(mo64140f(), (ViewGroup) null, false);\n this.f41185a.setVisibility(4);\n addView(this.f41185a);\n this.f41193i = 70;\n }", "private void buildTank(){\n LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n //add foliage\n ImageView foliageImageView = (ImageView) layoutInflater.inflate(R.layout.foliage_layout, null);\n\n foliageImageView.setX(0);\n foliageImageView.setY(0);\n foliageImageView.setAlpha((float) 0.97);\n fishTankLayout.addView(foliageImageView,0);\n\n //add virtual fish\n //add foliage\n fishImageView = (ImageView) layoutInflater.inflate(R.layout.fish_image, null);\n fishImageView.setScaleX((float) .3);\n fishImageView.setScaleY((float) .3);\n fishImageView.setX(fish.x);\n fishImageView.setY(fish.y);\n fishImageView.setAlpha((float) 0.97);\n fishTankLayout.addView(fishImageView,0);\n }", "@Override\n\tpublic void hacerDevolucion() {\n\t\tSystem.out.println(\"Hacer Devolucion pantalon\");\n\t}", "private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }", "public void prepareEditor(){\n System.out.println(\"Prepare editor to be used !\");\r\n ((EditorScene)map.getScene()).initScene(20,20,map);\r\n ((EditorScene)map.getScene()).setController(this);\r\n builder.registerBasicEffect();\r\n ((EditorScene)map.getScene()).initListView(builder.getEffects(),selectEffects);\r\n\r\n\r\n\r\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private void geometry()\n\t\t{\n\t\t\t// JComponent : Instanciation\n\t\tthis.jPanelAction = new JPanelAction();\n\t\tthis.jPanelCommande = new JPanelCommande(jPanelAction);\n\n\t\t\t// Layout : Specification\n\t\t\t{\n\t\t\tBorderLayout borderLayout = new BorderLayout();\n\t\t\tsetLayout(borderLayout);\n\n\t\t\t// flowlayout.setHgap(20);\n\t\t\t// flowlayout.setVgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\t\tthis.add(this.jPanelAction, BorderLayout.CENTER);\n\t\tthis.add(this.jPanelCommande, BorderLayout.SOUTH);\n\t\t}", "void insertView(ViewFrame view);", "@Override\n public void perish() {\n \n }", "@Override\n \t\t\t\tpublic void doCreateProjectedWater() {\n \n \t\t\t\t}", "abstract void snapshotLayout();", "Vaisseau_positionner createVaisseau_positionner();", "@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }", "public boolean insert(Panier nouveau) {\n\t\treturn false;\r\n\t}", "protected abstract StackManipulation preparation();", "protected void inicializar(){\n kr = new CreadorHojas(wp);\n jPanel1.add(wp,0); // inserta el workspace en el panel principal\n wp.insertarHoja(\"Hoja 1\");\n //wp.insertarHoja(\"Hoja 2\");\n //wp.insertarHoja(\"Hoja 3\");\n }", "private void affCarte (JPanel panel, int position) {\r\n\t\tconstraints.gridwidth = 2;\r\n\t\tconstraints.gridheight = 2;\r\n\t\t// On regarde quelle carte doit etre ajoutee\r\n\t\tswitch (position) {\r\n\t\t\tcase 0 : \r\n\t\t\t\tconstraints.gridx = 9;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1 : \r\n\t\t\t\tconstraints.gridx = 8;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2 : \r\n\t\t\t\tconstraints.gridx = 7;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3 : \r\n\t\t\t\tconstraints.gridx = 6;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4 : \r\n\t\t\t\tconstraints.gridx = 5;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void show4() {\n\t\t\n\t}", "@Override\r\n public void prenderVehiculo() {\r\n System.out.println(\"___________________________________________________\");\r\n System.out.println(\"prender Jet\");\r\n }", "public void Exterior() {\n\t\t\r\n\t}", "public void visit(Design designator) {\n \tObj obj = null;\r\n\t\t\r\n \tobj = designatorObject;\r\n \t\r\n \tif (obj == null) {\r\n \t\tobj = Tab.noObj;\r\n \t}\r\n\t\t\r\n \tif (obj == Tab.noObj) {\r\n\t\t\treport_error(\"Greska na liniji \" + designator.getLine()+ \" : ime \"+obj.getName()+\" nije deklarisano! \", null);\r\n\t\t\tdesignator.obj = obj;\r\n\t\t\treturn;\r\n \t}\r\n \t\r\n \t\r\n \t// A nivo\r\n \tif(obj.getKind() == Obj.Con) {\r\n\t\t\treport_info(\"Detektovan pristup simbolickoj konstanti: \" + designator.getDesignatorIdent().getName() + \" na liniji \" + designator.getLine(), designator);\r\n\t\t}\r\n\t\t\r\n\t\tif(obj.getKind() == Obj.Var && obj.getLevel() == 0) {\r\n\t\t\treport_info(\"Detektovan pristup globalnoj promenljivoj: \" + designator.getDesignatorIdent().getName() + \" na liniji \" + designator.getLine(), designator);\r\n\t\t}\r\n\t\t\r\n\t\tif (obj.getKind() == Obj.Elem) {\r\n\t\t\treport_info(\"Detektovan pristup elementu niza: \" + obj.getName() + \" na liniji \" + designator.getLine(), designator);\r\n\t\t}\r\n\t\t\r\n\t\t// B nivo\r\n\t\t\r\n//\t\tif (obj.getKind() == Obj.Meth && designator.getDesignatorElemList() instanceof MyNoDesignatorElemList) { \r\n//\t\t\treport_info(\"Detektovan poziv globalne f-je: \" + designator.getDesignatorIdent().getName() + \" na liniji \" + designator.getLine(), designator);\r\n//\t\t\tcallFunctionClassField = 0;\r\n//\t\t}\r\n\t\t\r\n\t\tif (obj.getKind() == Obj.Var && obj.getLevel() != 0 && currentMethod != null && currentMethod.getLevel() > obj.getAdr()) {\r\n\t\t\treport_info(\"Detektovan pristup formalnom parametru f-je: \" + obj.getName() + \" na liniji \" + designator.getLine(), designator);\r\n\t\t}\r\n\t\r\n\t\t// C nivo \r\n\t\r\n\t\r\n\t\tif(obj.getKind() == Obj.Fld) {\r\n\t\t\treport_info(\"Detektovan pristup polju klase: \" + obj.getName() + \" na liniji \" + designator.getLine(), designator);\r\n\t\t}\r\n\t\t\r\n\t\tif (obj.getKind() == Obj.Meth && !(designator.getDesignatorElemList() instanceof MyNoDesignatorElemList)) { \r\n\t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + obj.getName() + \" na liniji \" + designator.getLine(), designator);\r\n\t\t\tcallFunctionClassField = 1;\r\n\t\t}\r\n\r\n \tdesignator.obj = obj;\r\n }", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void buildPart() {\n\t\t\r\n\t}", "public void insert()\n\t{\n\t}", "private void addViews() {\n\t}", "@Override\n \t\t\t\tpublic void doCreateQuadWater() {\n \n \t\t\t\t}", "private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "@Override\n\tpublic void alterar() {\n\t\t\n\t}", "public static void test10(World w){\n\t\tUtilities.generateGeometry2(w.points ,w.pivots, \"Front.png\", \"Side.png\", 1900, 2500, 0, 0, 1/7.0);\r\n\t\t\r\n\t}", "void insert(Registerdeductmarks registerdeductmarks);", "public void deplacements () {\n\t\t//Efface de la fenetre le mineur\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getLabyrinthe()[this.laby.getMineur().getY()][this.laby.getMineur().getX()].imageCase(themeJeu));\n\t\t//Deplace et affiche le mineur suivant la touche pressee\n\t\tpartie.laby.deplacerMineur(Partie.touche);\n\t\tPartie.touche = ' ';\n\n\t\t//Operations effectuees si la case ou se trouve le mineur est une sortie\n\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Sortie) {\n\t\t\t//On verifie en premier lieu que tous les filons ont ete extraits\n\t\t\tboolean tousExtraits = true;\t\t\t\t\t\t\t\n\t\t\tfor (int i = 0 ; i < partie.laby.getHauteur() && tousExtraits == true ; i++) {\n\t\t\t\tfor (int j = 0 ; j < partie.laby.getLargeur() && tousExtraits == true ; j++) {\n\t\t\t\t\tif (partie.laby.getLabyrinthe()[i][j] instanceof Filon) {\n\t\t\t\t\t\ttousExtraits = ((Filon)partie.laby.getLabyrinthe()[i][j]).getExtrait();\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Si c'est le cas alors la partie est terminee et le joueur peut recommencer ou quitter, sinon le joueur est averti qu'il n'a pas recupere tous les filons\n\t\t\tif (tousExtraits == true) {\n\t\t\t\tpartie.affichageLabyrinthe ();\n\t\t\t\tSystem.out.println(\"\\nFelicitations, vous avez trouvé la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire à present : [r]ecommencer ou [q]uitter ?\");\n\t\t\t\tString[] choixPossiblesFin = {\"Quitter\", \"Recommencer\"};\n\t\t\t\tint choixFin = JOptionPane.showOptionDialog(null, \"Felicitations, vous avez trouve la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire a present :\", \"Fin de la partie\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, choixPossiblesFin, choixPossiblesFin[0]);\n\t\t\t\tif ( choixFin == 1) {\n\t\t\t\t\tPartie.touche = 'r';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tPartie.touche = 'q';\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpartie.enTete.setText(\"Tous les filons n'ont pas ete extraits !\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Si la case ou se trouve le mineur est un filon qui n'est pas extrait, alors ce dernier est extrait.\n\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Filon && ((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getExtrait() == false) {\n\t\t\t\t((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setExtrait();\n\t\t\t\tSystem.out.println(\"\\nFilon extrait !\");\n\t\t\t}\n\t\t\t//Sinon si la case ou se trouve le mineur est une clef, alors on indique que la clef est ramassee, puis on cherche la porte et on l'efface de la fenetre, avant de rendre la case quelle occupe vide\n\t\t\telse {\n\t\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Clef && ((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getRamassee() == false) {\n\t\t\t\t\t((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setRamassee();\n\t\t\t\t\tint[] coordsPorte = {-1,-1};\n\t\t\t\t\tfor (int i = 0 ; i < this.laby.getHauteur() && coordsPorte[1] == -1 ; i++) {\n\t\t\t\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() && coordsPorte[1] == -1 ; j++) {\n\t\t\t\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Porte) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcoordsPorte[0] = j;\n\t\t\t\t\t\t\t\tcoordsPorte[1] = i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpartie.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].setEtat(true);\n\t\t\t\t\t((JLabel)grille.getComponents()[coordsPorte[1]*this.laby.getLargeur()+coordsPorte[0]]).setIcon(this.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].imageCase(themeJeu));\n\t\t\t\t\tSystem.out.println(\"\\nClef ramassee !\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void insert(DhtmlxGridForm f) throws Exception {\n\t\t\n\t}", "public void insertAtFront(Employee e) {\r\n\t//TODO\r\n\t\r\n}", "public void insert(Conge conge) ;", "public void createDienst()\n\t{\n\t\twriteDb(\"INSERT INTO dienstleistung (Bezeichnung, Preis)\" + \"VALUES('\" + typ + \"', '\" + preis +\"')\", getWriteCon());\n\t\tcommitDbConnection(getWriteCon());\n\t}", "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tComposite composite = new Composite(shlFaststone, SWT.NONE);\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm = new SashForm(composite, SWT.VERTICAL);\n\t\t//\n\t\tMenu menu = new Menu(shlFaststone, SWT.BAR);\n\t\tshlFaststone.setMenuBar(menu);\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setSelection(true);\n\t\tmenuItem.setText(\"\\u6587\\u4EF6\");\n\t\t\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\t\t\n\t\tfinal Canvas down=new Canvas(shlFaststone,SWT.NONE|SWT.BORDER|SWT.DOUBLE_BUFFERED);\n\t\t\n\t\tComposite composite_4 = new Composite(sashForm, SWT.BORDER);\n\t\tcomposite_4.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_3 = new SashForm(composite_4, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_3);\n\t\tformToolkit.paintBordersFor(sashForm_3);\n\t\t\n\t\tToolBar toolBar = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.WRAP | SWT.RIGHT);\n\t\ttoolBar.setToolTipText(\"\");\n\t\t\n\t\tToolItem toolItem_6 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_6.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_2.notifyListeners(SWT.Selection,event1);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6253\\u5F00.jpg\"));\n\t\ttoolItem_6.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t\n\t\ttltmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttltmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\ttltmNewItem.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t//关闭\n\t\tToolItem tltmNewItem_4 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttltmNewItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttltmNewItem_4.setText(\"\\u5173\\u95ED\");\n\t\t\n\t\t\n\t\t\n\t\tToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//缩放\n\t\t\n\t\t\n\t\ttltmNewItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u653E\\u5927.jpg\"));\n\t\t\n\t\t//工具栏:放大\n\t\t\n\t\ttltmNewItem_1.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t//工具栏:缩小\n\t\ttltmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\ttltmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F29\\u5C0F.jpg\"));\n\t\ttltmNewItem_2.setText(\"\\u7F29\\u5C0F\");\n\t\tToolItem toolItem_5 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttoolItem_5.setText(\"\\u9000\\u51FA\");\n\t\t\n\t\tToolBar toolBar_1 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\tformToolkit.adapt(toolBar_1);\n\t\tformToolkit.paintBordersFor(toolBar_1);\n\t\t\n\t\tToolItem toolItem_7 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:标题\n\t\ttoolItem_7.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_7.setText(\"\\u6807\\u9898\");\n\t\ttoolItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6807\\u9898.jpg\"));\n\t\t\n\t\tToolItem toolItem_1 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:调整大小\n\t\ttoolItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_1.setText(\"\\u8C03\\u6574\\u5927\\u5C0F\");\n\t\ttoolItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u8C03\\u6574\\u5927\\u5C0F.jpg\"));\n\t\t\n\t\tToolBar toolBar_2 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tformToolkit.adapt(toolBar_2);\n\t\tformToolkit.paintBordersFor(toolBar_2);\n\t\t\n\t\tToolItem toolItem_2 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:裁剪\n\t\ttoolItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_2.setText(\"\\u88C1\\u526A\");\n\t\ttoolItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u88C1\\u526A.jpg\"));\n\t\t\n\t\tToolItem toolItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:剪切\n\t\ttoolItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_3.setText(\"\\u526A\\u5207\");\n\t\ttoolItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u526A\\u5207.jpg\"));\n\t\t\n\t\tToolItem toolItem_4 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\n\t\t//工具栏:粘贴\n\t\ttoolItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tcomposite_3.layout();\n\t\t\t\tFile f=new File(\"src/picture/beauty.jpg\");\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tButton lblNewLabel_3 = null;\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcomposite_3.layout();\n\t\t\t}\n\t\t});\n\t\t//omposite;\n\t\t//\n\t\t\n\t\ttoolItem_4.setText(\"\\u590D\\u5236\");\n\t\ttoolItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u590D\\u5236.jpg\"));\n\t\t\n\t\tToolItem tltmNewItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\ttltmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\ttltmNewItem_3.setText(\"\\u7C98\\u8D34\");\n\t\tsashForm_3.setWeights(new int[] {486, 165, 267});\n\t\t\n\t\tComposite composite_1 = new Composite(sashForm, SWT.NONE);\n\t\tformToolkit.adapt(composite_1);\n\t\tformToolkit.paintBordersFor(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_1 = new SashForm(composite_1, SWT.VERTICAL);\n\t\tformToolkit.adapt(sashForm_1);\n\t\tformToolkit.paintBordersFor(sashForm_1);\n\t\t\n\t\tComposite composite_2 = new Composite(sashForm_1, SWT.NONE);\n\t\tformToolkit.adapt(composite_2);\n\t\tformToolkit.paintBordersFor(composite_2);\n\t\tcomposite_2.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(composite_2, SWT.NONE);\n\t\ttabFolder.setTouchEnabled(true);\n\t\tformToolkit.adapt(tabFolder);\n\t\tformToolkit.paintBordersFor(tabFolder);\n\t\t\n\t\tTabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem.setText(\"\\u65B0\\u5EFA\\u4E00\");\n\t\t\n\t\tTabItem tbtmNewItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_1.setText(\"\\u65B0\\u5EFA\\u4E8C\");\n\t\t\n\t\tTabItem tbtmNewItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_2.setText(\"\\u65B0\\u5EFA\\u4E09\");\n\t\t\n\t\tButton button = new Button(tabFolder, SWT.CHECK);\n\t\tbutton.setText(\"Check Button\");\n\t\t\n\t\tcomposite_3 = new Composite(sashForm_1, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\n\t\tformToolkit.adapt(composite_3);\n\t\tformToolkit.paintBordersFor(composite_3);\n\t\tcomposite_3.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tLabel lblNewLabel_3 = new Label(composite_3, SWT.NONE);\n\t\tformToolkit.adapt(lblNewLabel_3, true, true);\n\t\tlblNewLabel_3.setText(\"\");\n\t\tsashForm_1.setWeights(new int[] {19, 323});\n\t\t\n\t\tComposite composite_5 = new Composite(sashForm, SWT.NONE);\n\t\tcomposite_5.setToolTipText(\"\");\n\t\tcomposite_5.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_2 = new SashForm(composite_5, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_2);\n\t\tformToolkit.paintBordersFor(sashForm_2);\n\t\t\n\t\tLabel lblNewLabel = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel, true, true);\n\t\tlblNewLabel.setText(\"1/1\");\n\t\t\n\t\tLabel lblNewLabel_2 = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_2, true, true);\n\t\tlblNewLabel_2.setText(\"\\u5927\\u5C0F\\uFF1A1366*728\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(sashForm_2, SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_1, true, true);\n\t\tlblNewLabel_1.setText(\"\\u7F29\\u653E\\uFF1A100%\");\n\t\t\n\t\tLabel label = new Label(sashForm_2, SWT.NONE);\n\t\tlabel.setAlignment(SWT.RIGHT);\n\t\tformToolkit.adapt(label, true, true);\n\t\tlabel.setText(\"\\u5494\\u5693\\u5DE5\\u4F5C\\u5BA4\\u7248\\u6743\\u6240\\u6709\");\n\t\tsashForm_2.setWeights(new int[] {127, 141, 161, 490});\n\t\tsashForm.setWeights(new int[] {50, 346, 22});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u65B0\\u5EFA.jpg\"));\n\t\tmntmNewItem.setText(\"\\u65B0\\u5EFA\");\n\t\t\n\t\tmntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\t//Label lblNewLabel_3 = new Label(composite_1, SWT.NONE);\n\t\t\t\t//Canvas c=new Canvas(shlFaststone,SWT.BALLOON);\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u6253\\u5F00.jpg\"));\n\t\tmntmNewItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_1.setText(\"\\u4ECE\\u526A\\u8D34\\u677F\\u5BFC\\u5165\");\n\t\t\n\t\tMenuItem mntmNewItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\tmntmNewItem_3.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t\n\t\t mntmNewItem_5 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t boolean result=MessageDialog.openConfirm(shlFaststone,\"退出\",\"是否确认退出\");\n\t\t\t\t if(result) {\n\t\t\t\t\t System.exit(0);\n\t\t\t\t }\n\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u4FDD\\u5B58.jpg\"));\n\t\tmntmNewItem_5.setText(\"\\u5173\\u95ED\");\n\t\tevent2=new Event();\n\t\tevent2.widget=mntmNewItem_5;\n\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u6355\\u6349\");\n\t\t\n\t\tMenu menu_2 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_2);\n\t\t\n\t\tMenuItem mntmNewItem_6 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_6.setText(\"\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_7 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6355\\u6349\\u7A97\\u53E3\\u6216\\u5BF9\\u8C61.jpg\"));\n\t\tmntmNewItem_7.setText(\"\\u6355\\u6349\\u7A97\\u53E3\\u5BF9\\u8C61\");\n\t\t\n\t\tMenuItem mntmNewItem_8 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_8.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.jpg\"));\n\t\tmntmNewItem_8.setText(\"\\u6355\\u6349\\u77E9\\u5F62\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_9 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_9.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u624B\\u7ED8\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_9.setText(\"\\u6355\\u6349\\u624B\\u7ED8\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_10 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_10.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6574\\u4E2A\\u5C4F\\u5E55.jpg\"));\n\t\tmntmNewItem_10.setText(\"\\u6355\\u6349\\u6574\\u4E2A\\u5C4F\\u5E55\");\n\t\t\n\t\tMenuItem mntmNewItem_11 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_11.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_11.setText(\"\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_12 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_12.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_12.setText(\"\\u6355\\u6349\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349.jpg\"));\n\t\tmenuItem_1.setText(\"\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349\");\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_2.setText(\"\\u7F16\\u8F91\");\n\t\t\n\t\tMenu menu_3 = new Menu(menuItem_2);\n\t\tmenuItem_2.setMenu(menu_3);\n\t\t\n\t\tMenuItem mntmNewItem_14 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_14.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_14.setText(\"\\u64A4\\u9500\");\n\t\t\n\t\tMenuItem mntmNewItem_13 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_13.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_13.setText(\"\\u91CD\\u505A\");\n\t\t\n\t\tMenuItem mntmNewItem_15 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_15.setText(\"\\u9009\\u62E9\\u5168\\u90E8\");\n\t\t\n\t\tMenuItem mntmNewItem_16 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_16.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7F16\\u8F91.\\u88C1\\u526A.jpg\"));\n\t\tmntmNewItem_16.setText(\"\\u88C1\\u526A\");\n\t\t\n\t\tMenuItem mntmNewItem_17 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_17.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u526A\\u5207.jpg\"));\n\t\tmntmNewItem_17.setText(\"\\u526A\\u5207\");\n\t\t\n\t\tMenuItem mntmNewItem_18 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_18.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u590D\\u5236.jpg\"));\n\t\tmntmNewItem_18.setText(\"\\u590D\\u5236\");\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_3, SWT.NONE);\n\t\tmenuItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\tmenuItem_4.setText(\"\\u7C98\\u8D34\");\n\t\t\n\t\tMenuItem mntmNewItem_19 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_19.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_3.setText(\"\\u7279\\u6548\");\n\t\t\n\t\tMenu menu_4 = new Menu(menuItem_3);\n\t\tmenuItem_3.setMenu(menu_4);\n\t\t\n\t\tMenuItem mntmNewItem_20 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_20.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6C34\\u5370.jpg\"));\n\t\tmntmNewItem_20.setText(\"\\u6C34\\u5370\");\n\t\t\n\t\tPanelPic ppn = new PanelPic();\n\t\tMenuItem mntmNewItem_21 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_21.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tflag[0]=true;\n\t\t\t\tflag[1]=false;\n\n\t\t\t}\n\n\t\t});\n\t\t\n\t\tdown.addMouseListener(new MouseAdapter(){\n\t\t\tpublic void mouseDown(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=true;\n\t\t\t\tpt=new Point(e.x,e.y);\n\t\t\t\tif(flag[1])\n\t\t\t\t{\n\t\t\t\t\trect=new Composite(down,SWT.BORDER);\n\t\t\t\t\trect.setLocation(e.x, e.y);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=false;\n\t\t\t\tif(flag[1]&&dirty)\n\t\t\t\t{\n\t\t\t\t\trexx[n-1]=rect.getBounds();\n\t\t\t\t\trect.dispose();\n\t\t\t\t\tdown.redraw();\n\t\t\t\t\tdirty=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdown.addMouseMoveListener(new MouseMoveListener(){\n\t\t\t@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n if(mouseDown)\n {\n \t dirty=true;\n\t\t\t\tif(flag[0])\n\t\t\t {\n \t GC gc=new GC(down);\n gc.drawLine(pt.x, pt.y, e.x, e.y);\n list.add(new int[]{pt.x,pt.y,e.x,e.y});\n pt.x=e.x;pt.y=e.y;\n\t\t\t }\n else if(flag[1])\n {\n \t if(rect!=null)\n \t rect.setSize(rect.getSize().x+e.x-pt.x, rect.getSize().y+e.y-pt.y);\n// \t down.redraw();\n \t pt.x=e.x;pt.y=e.y;\n }\n }\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdown.addPaintListener(new PaintListener(){\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t\t{\n\t\t\t\t\tint a[]=list.get(i);\n\t\t\t\t\te.gc.drawLine(a[0], a[1], a[2], a[3]);\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(rexx[i]!=null)\n\t\t\t\t\t\te.gc.drawRectangle(rexx[i]);\n\t\t\t\t}\n\t\t\t}});\n\n\t\t\n\t\tmntmNewItem_21.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6587\\u5B57.jpg\"));\n\t\tmntmNewItem_21.setText(\"\\u753B\\u7B14\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_1 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_1.setText(\"\\u67E5\\u770B\");\n\t\t\n\t\tMenu menu_5 = new Menu(mntmNewSubmenu_1);\n\t\tmntmNewSubmenu_1.setMenu(menu_5);\n\t\t\n\t\tMenuItem mntmNewItem_24 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_24.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u653E\\u5927.jpg\"));\n\t\tmntmNewItem_24.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tMenuItem mntmNewItem_25 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_25.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u7F29\\u5C0F.jpg\"));\n\t\tmntmNewItem_25.setText(\"\\u7F29\\u5C0F\");\n\t\t\n\t\tMenuItem mntmNewItem_26 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_26.setText(\"\\u5B9E\\u9645\\u5C3A\\u5BF8\\uFF08100%\\uFF09\");\n\t\t\n\t\tMenuItem mntmNewItem_27 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_27.setText(\"\\u9002\\u5408\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_28 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_28.setText(\"100%\");\n\t\t\n\t\tMenuItem mntmNewItem_29 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_29.setText(\"200%\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_2.setText(\"\\u8BBE\\u7F6E\");\n\t\t\n\t\tMenu menu_6 = new Menu(mntmNewSubmenu_2);\n\t\tmntmNewSubmenu_2.setMenu(menu_6);\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_5.setText(\"\\u5E2E\\u52A9\");\n\t\t\n\t\tMenu menu_7 = new Menu(menuItem_5);\n\t\tmenuItem_5.setMenu(menu_7);\n\t\t\n\t\tMenuItem menuItem_6 = new MenuItem(menu_7, SWT.NONE);\n\t\tmenuItem_6.setText(\"\\u7248\\u672C\");\n\t\t\n\t\tMenuItem mntmNewItem_23 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_23.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\t\n\t\tMenuItem mntmNewItem_30 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_30.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\n\t}", "@Override\n\tpublic void update(Design design) {\n\t\tdesignMapper.update(design);\n\t}", "public void afficherPartie() throws SQLException{\n this.partie.maj();\n VBox fp = ((VBox) windows.getRoot());\n fp.getChildren().remove(1);\n fp.getChildren().add(partie);\n }", "void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }", "public void onLayout(boolean z, int i, int i2, int i3, int i4) {\n AppMethodBeat.i(105958);\n super.onLayout(z, i, i2, i3, i4);\n this.lfN = (i3 - i) / 2;\n int i5 = this.lfN;\n if (this.lfP == null || this.lfP.getWidth() != i5) {\n String str = \"MicroMsg.DoubleTabView\";\n String str2 = \"sharp width changed, from %d to %d\";\n Object[] objArr = new Object[2];\n objArr[0] = Integer.valueOf(this.lfP == null ? -1 : this.lfP.getWidth());\n objArr[1] = Integer.valueOf(i5);\n ab.w(str, str2, objArr);\n this.lfP = Bitmap.createBitmap(i5, com.tencent.mm.bz.a.fromDPToPix(getContext(), 3), Config.ARGB_8888);\n new Canvas(this.lfP).drawColor(getResources().getColor(R.color.a61));\n l(this.lfO, 0.0f);\n this.lfR.setImageBitmap(this.lfP);\n }\n setTo(this.lfO);\n AppMethodBeat.o(105958);\n }", "public abstract Design getDesign();", "@Override\n\tpublic void withdraw() {\n\t\t\n\t}", "@Override\n\t\tpublic void insertar() {\n\t\t\tutilitario.getTablaisFocus().insertar();\n\n\t\t}", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "public void inizializza() {\n Navigatore nav;\n Portale portale;\n\n super.inizializza();\n\n try { // prova ad eseguire il codice\n\n Modulo modulo = getModuloRisultati();\n modulo.inizializza();\n// Campo campo = modulo.getCampoChiave();\n// campo.setVisibileVistaDefault(false);\n// campo.setPresenteScheda(false);\n// Vista vista = modulo.getVistaDefault();\n// vista.getElement\n// Campo campo = vista.getCampo(modulo.getCampoChiave());\n\n\n\n /* aggiunge il Portale Navigatore al pannello placeholder */\n nav = this.getNavigatore();\n portale = nav.getPortaleNavigatore();\n this.getPanNavigatore().add(portale);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void m105650a() {\n this.mTitle.setText(getString(R.string.c4j));\n this.mWallPapersRecyclerView.setLayoutManager(new WrapGridLayoutManager((Context) this, 3, 1, false));\n this.mWallPapersRecyclerView.setHasFixedSize(true);\n this.f85042a = new LiveWallPaperAdapter();\n this.f85042a.f84917a = new C32568a() {\n /* renamed from: a */\n public final void mo83851a(LiveWallPaperBean liveWallPaperBean) {\n Intent intent = new Intent(LocalLiveWallPaperActivity.this, LiveWallPaperPreviewActivity.class);\n intent.putExtra(\"live_wall_paper\", liveWallPaperBean);\n LocalLiveWallPaperActivity.this.startActivity(intent);\n }\n };\n this.mWallPapersRecyclerView.mo5525a((C1272h) new AmeDecoration((int) C9738o.m28708b((Context) this, 1.0f)));\n this.mWallPapersRecyclerView.setAdapter(this.f85042a);\n }", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n private void prepare(){\n mPaint = new Paint();\n mMatrix = new Matrix();\n //Only Android.LOLLIPOP and upper level device can use this builder\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n mAnchorInfoBuilder = new CursorAnchorInfo.Builder();\n }\n mPaint.setAntiAlias(true);\n setTextSize(DEFAULT_TEXT_SIZE);\n mColors = new ColorScheme(this);\n mEventHandler = new EventHandler(this);\n mBasicDetector = new GestureDetector(getContext(), mEventHandler);\n mBasicDetector.setOnDoubleTapListener(mEventHandler);\n mScaleDetector = new ScaleGestureDetector(getContext(), mEventHandler);\n mViewRect = new Rect(0, 0, 0, 0);\n mRect = new RectF();\n mInsertHandle = new RectF();\n mLeftHandle = new RectF();\n mRightHandle = new RectF();\n mVerticalScrollBar = new RectF();\n mHorizontalScrollBar = new RectF();\n mDividerMargin = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, Resources.getSystem().getDisplayMetrics());\n mDividerWidth = mDividerMargin;\n mUnderlineWidth = mDividerMargin;\n mInsertSelWidth = mDividerWidth / 2;\n mDpUnit = mInsertSelWidth;\n mLineNumberAlign = Paint.Align.RIGHT;\n mTypefaceLineNumber = Typeface.MONOSPACE;\n mTypefaceText = Typeface.DEFAULT;\n mChars = new char[256];\n mEditable = true;\n mScale = true;\n mDrag = false;\n mWait = false;\n mPaintLabel = true;\n mDisplayLnPanel = true;\n mBlockLineWidth = 2;\n mInputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n mClipboardManager = Clipboard.getClipboard(getContext());\n setUndoEnabled(true);\n mTabWidth = 4;\n mAutoIndent = true;\n mCursorPosition = -1;\n mHighlightCurrentBlock = true;\n setFocusable(true);\n setFocusableInTouchMode(true);\n mConnection = new RoseEditorInputConnection(this);\n mACPanel = new AutoCompletePanel(this);\n mTextActionPanel = new TextComposePanel(this);\n mTextActionPanel.setHeight((int)(mDpUnit * 60));\n mTextActionPanel.setWidth((int)(mDpUnit * 230));\n setEditorLanguage(null);\n setText(null);\n }", "@Override\r\n\tpublic void carDashboar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void autoSeatHeat() {\n\t\t\r\n\t}", "public static void designTextEditor() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "protected abstract MS_LineBuilder prepareContent(MS_LineBuilder lb);", "private FactoryViewPanel buildAdvancedPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n if (myIsImport)\r\n {\r\n addField(panel, myDataSourceModel.getIncludeInTimeline());\r\n }\r\n JPanel refreshPanel = buildRefreshPanel();\r\n panel.addLabelComponent(ControllerFactory.createLabel(myDataSourceModel.getAutoRefresh(), refreshPanel.getComponent(0)),\r\n refreshPanel);\r\n addField(panel, myDataSourceModel.getPointType());\r\n addField(panel, myDataSourceModel.getFeatureAltitude());\r\n addField(panel, myDataSourceModel.getPolygonFill());\r\n addField(panel, myDataSourceModel.getScalingMethod());\r\n addField(panel, myDataSourceModel.getShowLabels());\r\n return panel;\r\n }", "@Override\r\n\tpublic void creerEnchere(String desc, String dl) {\n\t\t\r\n\t}", "public void drawNonEssentialComponents(){\n\t\t\n\t}", "public void a() {\n this.f25458d.a(this.f25457c);\n this.f25457c.a(this);\n Context context = getContext();\n LinearLayout linearLayout = new LinearLayout(context);\n linearLayout.setOrientation(1);\n addView(linearLayout, new ViewGroup.LayoutParams(-1, -2));\n d a2 = ShopAssistantItemView_.a(context);\n a2.a(R.drawable.ic_myproducts, R.string.sp_my_products, 0);\n a2.setTag(\"PRODUCT\");\n a2.setMinimumHeight(this.f25455a);\n linearLayout.addView(a2, new FrameLayout.LayoutParams(-1, -2));\n d a3 = ShopAssistantItemView_.a(context);\n a3.a(R.drawable.ic_mycustomers, R.string.sp_my_customers, 2);\n linearLayout.addView(a3, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a4 = ShopAssistantItemView_.a(context);\n a4.a(R.drawable.ic_shopprofile, R.string.sp_label_shop_profile, 6);\n linearLayout.addView(a4, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a5 = ShopAssistantItemView_.a(context);\n a5.a(R.drawable.img_shopsettings, R.string.sp_shop_settings, 4);\n linearLayout.addView(a5, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a6 = ShopAssistantItemView_.a(context);\n a6.a(R.drawable.ic_categories, R.string.sp_my_shop_categories, 8);\n a6.setSubtitle(this.f25461g.getCategoriesPath());\n linearLayout.addView(a6, new FrameLayout.LayoutParams(-1, this.f25455a));\n View view = new View(context);\n view.setBackgroundColor(b.a(R.color.background));\n linearLayout.addView(view, new FrameLayout.LayoutParams(-1, b.a.k));\n View view2 = new View(context);\n view2.setBackgroundColor(com.garena.android.appkit.tools.b.a(R.color.black06));\n linearLayout.addView(view2, new FrameLayout.LayoutParams(-1, b.a.f7690a));\n View inflate = ((LayoutInflater) context.getSystemService(\"layout_inflater\")).inflate(R.layout.seller_center, (ViewGroup) null);\n ((TextView) inflate.findViewById(R.id.url)).setText(\"http://seller\" + i.f7042e);\n int b2 = com.garena.android.appkit.tools.b.b() - b.a.m;\n w.a(getContext()).a((int) R.drawable.sellercentre_banner).b(b2, (int) (((float) b2) / 1.886f)).e().f().a((ImageView) inflate.findViewById(R.id.banner));\n FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -2);\n inflate.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n g.this.f25459e.V();\n }\n });\n linearLayout.addView(inflate, layoutParams);\n this.f25457c.e();\n this.f25457c.f();\n }", "@Override\n\tpublic void recreo() {\n\n\t}", "private void deplacerBall() {\n\t\tassert(f.getLevel() != null);\n\t\t\n\t\tLevel l = f.getLevel();\n\t\t\n\t\tif(l.getBall() == null ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(l.getType() == Type.AUTOMATIQUE) {\n\t\t\tif( l.getBall().getPosY()<f.getHauteurFenetre()*1/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(false);\n\t\t\t}\n\t\t\tif( l.getBall().getPosY()>f.getHauteurFenetre()*4/5) {//defilement vers le bas\n\t\t\t\tf.defilerEcranY(true);\n\t\t\t}\n\t\t\tif( l.getBall().getPosX()<f.getLargeurFenetre()*1/5) {//defilement vers la gauche\n\t\t\t\tf.defilerEcranX(true);\n\t\t\t}\n\t\t\tif( l.getBall().getPosX()>f.getLargeurFenetre()*4/5) {//defilement vers la droite\n\t\t\t\tf.defilerEcranX(false);\n\t\t\t}\n\t\t}else if(l.getType() == Type.INVERSE){\n\t\t\tif( l.getBall().getPosY()>f.getHauteurFenetre()*3/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(true);\n\t\t\t}\n\t\t}else {\n\t\t\tif( l.getBall().getPosY()<f.getHauteurFenetre()*2/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(false);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(l.getType() == Type.AUTOMATIQUE) {//mode automatique -> deplacement automatique\n\t\t\tl.getBall().deplacer();\n\t\t}else {\n\t\t\tl.getBall().deplacer();\n\t\t\tl.getBall().gravityY(l.gravityY());//la balle tombe selon la gravite\n\t\t}\n\t}", "public Dipendente() {\r\n\t\tsetnMat();\r\n\t}", "@Override\n public void prepare() {\n System.out.println(\"Add Pepporonie!!\");\n }", "Board createLayout();", "public void enterEmpsInInsertMode(){\n EmployeesViewImpl emps=(EmployeesViewImpl)this.getEmployeesView1();\n \n emps.executeEmptyRowSet(); // executeEmpty RowSet in order not to fetch Data.\n \n Row newRow=emps.createRow();\n \n emps.insertRow(newRow);\n \n emps.setCurrentRow(newRow);\n \n }", "@Override\n\tpublic void insertUpdate(DocumentEvent de) {\n\n\t}", "public @Override void insertUpdate(DocumentEvent evt, Shape a, ViewFactory f) {\n if (children == null && getParent() == null) {\n return;\n }\n\n if (useCustomReloadChildren()) {\n customInsertUpdate(evt, a, f);\n } else { // custom insert update\n super.insertUpdate(evt, a, f); // default element-based update\n }\n }", "public void insertSelective(VRpDyHlrforbe record) {\r\n getSqlMapClientTemplate().insert(\"V_RP_DY_HLR_FOR_BE.ibatorgenerated_insertSelective\", record);\r\n }", "public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {\r\r\r\r\r\r\n String currentText = getText(0, getLength());\r\r\r\r\r\r\n String beforeOffset = currentText.substring(0, offs);\r\r\r\r\r\r\n String afterOffset = currentText.substring(offs, currentText.length());\r\r\r\r\r\r\n System.out.println(\"[*********]INSERTSTRING\");\r\r\r\r\r\r\n\r\r\r\r\r\r\n // boolean validate = false;\r\r\r\r\r\r\n boolean check=false;\r\r\r\r\r\r\n // regardons si il s'agit d'une action de validation\r\r\r\r\r\r\n // if (str.equals(DefaultMask.VALIDATE)) \r\r\r\r\r\r\n // validate = true;\r\r\r\r\r\r\n //str = validate ? \"\" : str;\r\r\r\r\r\r\n String proposedResult = beforeOffset + str + afterOffset;\r\r\r\r\r\r\n if(proposedResult.length()<m_longeur_saisie || validate==true){ \r\r\r\r\r\r\n super.insertString(offs,str, a);\r\r\r\r\r\r\n validate=false;\r\r\r\r\r\r\n }\r\r\r\r\r\r\n else{\r\r\r\r\r\r\n if(charger==false){\r\r\r\r\r\r\n m_model.loadData(null,proposedResult);\r\r\r\r\r\r\n m_model.sortByColonne(0,m_parent.getGrp_Table_table());\r\r\r\r\r\r\n \r\r\r\r\r\r\n }\r\r\r\r\r\r\n charger=true;\r\r\r\r\r\r\n if(!m_model.isM_sortAsc())\r\r\r\r\r\r\n m_model.sortByColonne(0,m_parent.getGrp_Table_table());\r\r\r\r\r\r\n if(m_model.getArray()!=null){\r\r\r\r\r\r\n check=search(proposedResult); \r\r\r\r\r\r\n if (check){\r\r\r\r\r\r\n super.insertString(offs,str, a);\r\r\r\r\r\r\n affichePopup(true);\r\r\r\r\r\r\n m_parent.setGoodIcon(true); \r\r\r\r\r\r\n }\r\r\r\r\r\r\n \r\r\r\r\r\r\n else{ \r\r\r\r\r\r\n java.awt.Toolkit.getDefaultToolkit().beep();\r\r\r\r\r\r\n JToolTip toolTip=new JToolTip();\r\r\r\r\r\r\n toolTip.setToolTipText(\"test\");\r\r\r\r\r\r\n toolTip.setComponent(m_parent.getGrp_Table_table());\r\r\r\r\r\r\n toolTip.setVisible(true);\r\r\r\r\r\r\n System.out.println(\"showtooltip\");\r\r\r\r\r\r\n \r\r\r\r\r\r\n }\r\r\r\r\r\r\n }\r\r\r\r\r\r\n else{\r\r\r\r\r\r\n \r\r\r\r\r\r\n \r\r\r\r\r\r\n }\r\r\r\r\r\r\n } \r\r\r\r\r\r\n }", "protected void shoAddNewDataEditor () {\n\t\t\n\t\t\n\t\tinstantiateDataForAddNewTemplate(new AsyncCallback< DATA>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t// ini tidak mungkin gagal\n\t\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onSuccess(final DATA result) {\n\t\t\t\teditorGenerator.instantiatePanel(new ExpensivePanelGenerator<BaseDualControlDataEditor<PK,DATA>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onPanelGenerationComplete(\n\t\t\t\t\t\t\tBaseDualControlDataEditor<PK, DATA> widget) {\n\t\t\t\t\t\tconfigureAndPlaceEditorPanel(widget);\n\t\t\t\t\t\twidget.requestDoubleSubmitToken(null);\n\t\t\t\t\t\twidget.addAndEditNewData(result);\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\t\n\t\t\n\t}", "void computeNewLayout();", "@Override\n\t\t\tpublic void modifier(Catalogue catalogue) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.68928915", "0.61074895", "0.60044056", "0.5662004", "0.560275", "0.5589867", "0.53751796", "0.5364643", "0.5318539", "0.5293806", "0.5281905", "0.52699465", "0.5268235", "0.5265847", "0.5263259", "0.525611", "0.5252247", "0.52518564", "0.524969", "0.5224895", "0.5208332", "0.5198919", "0.51787275", "0.51654357", "0.5162234", "0.5153186", "0.515031", "0.51412463", "0.5133907", "0.51293033", "0.5127041", "0.51259524", "0.512343", "0.5120953", "0.5120192", "0.5111176", "0.5109109", "0.51046854", "0.5102737", "0.5096902", "0.50958985", "0.5076398", "0.5069118", "0.5066264", "0.5064703", "0.50619066", "0.5052319", "0.5052267", "0.50504315", "0.5050383", "0.5047127", "0.50445235", "0.50379056", "0.50344193", "0.5032574", "0.50324094", "0.5025995", "0.50252265", "0.5024683", "0.5020337", "0.5018203", "0.50069076", "0.5005214", "0.5004729", "0.5003927", "0.49997216", "0.49984002", "0.49953678", "0.49943766", "0.4993429", "0.49918666", "0.49900413", "0.49829096", "0.4982395", "0.4981915", "0.49783814", "0.49738804", "0.49735472", "0.49675176", "0.49615744", "0.4959973", "0.49540943", "0.49473256", "0.49471992", "0.49468157", "0.49425524", "0.49406394", "0.4939012", "0.49371246", "0.4937066", "0.4933437", "0.4931341", "0.4931233", "0.4927823", "0.49224243", "0.49215156", "0.49195924", "0.4918351", "0.49169117", "0.49140635", "0.4910173" ]
0.0
-1
GENFIRST:event_jButton2ActionPerformed TODO add your handling code here: register form
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { this.dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void fullNameRegisterActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnRegresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void passwordRegisterActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void registerComponents() \r\n {\r\n grantsByPIForm.jbnRunButton.addActionListener(this);\r\n grantsByPIForm.jbnCloseButton.addActionListener(this);\r\n \r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n nametxt = new javax.swing.JTextField();\n register = new javax.swing.JButton();\n cancel = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n passwordtxt = new javax.swing.JPasswordField();\n cPasswordtxt = new javax.swing.JPasswordField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Register\");\n setPreferredSize(new java.awt.Dimension(800, 600));\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(0, 0, 51));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 0));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Register\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Name\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Password\");\n\n nametxt.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n nametxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nametxtActionPerformed(evt);\n }\n });\n\n register.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n register.setText(\"Register\");\n register.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerActionPerformed(evt);\n }\n });\n\n cancel.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cancel.setText(\"Cancel\");\n cancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Confirm Password\");\n\n passwordtxt.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n\n cPasswordtxt.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(274, 274, 274)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(167, 167, 167)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(nametxt)\n .addComponent(passwordtxt, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE)\n .addComponent(cPasswordtxt)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(224, 224, 224)\n .addComponent(register, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(42, 42, 42)\n .addComponent(cancel, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(146, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jLabel1)\n .addGap(59, 59, 59)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nametxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(passwordtxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(42, 42, 42)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addComponent(cPasswordtxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(register)\n .addComponent(cancel))\n .addGap(40, 40, 40))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew Register();\n\t\t\t\tsetVisible(false);\n\t\t\t}", "void jbRegister_actionPerformed(ActionEvent e) {\n carrierPort = registerCarrierWithMasterServer(jtfCarCode.getText(),\n jtfCarName.getText(), carrierIP);\n logWriter = new LogWriter(\"c\" + carrierPort + \".log\");\n logWriter.writeLog(\"Registered with Master Server: \" + carrierIP + \":\" +\n carrierPort);\n messageListener = new CarrierMessageListener(carrierPort, zAdapt, this);\n\n this.setTitle(\"Carrier Agent at \" +\n new Integer(carrierPort).toString()); //changing title of frame\n jtfCarPort.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); //setting fonts for port number to be bold\n jtfCarPort.setText(new Integer(carrierPort).toString()); //setting port number\n\n jmiExit.setEnabled(true); //now unregister & exit button is active. Default exit is now ainactive\n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); //only unregister & exit menu item can close carrier\n jbRegister.setEnabled(false);\n jtfCarName.setEditable(false);\n jtfCarCode.setEditable(false);\n jtfMasterIP.setEditable(false);\n jtfMasterPort.setEditable(false);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n registerfullname = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n registerusername = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n registerage = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n login_btn = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel8 = new javax.swing.JLabel();\n registeraddress = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n registerpassword = new javax.swing.JPasswordField();\n Register = new javax.swing.JButton();\n jLabelLogin2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n\n jButton1.setText(\"jButton1\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(204, 255, 255));\n jPanel1.setLayout(null);\n\n registerfullname.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerfullnameActionPerformed(evt);\n }\n });\n jPanel1.add(registerfullname);\n registerfullname.setBounds(120, 120, 290, 30);\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel3.setText(\"UserName : \");\n jPanel1.add(jLabel3);\n jLabel3.setBounds(40, 180, 110, 17);\n\n registerusername.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerusernameActionPerformed(evt);\n }\n });\n jPanel1.add(registerusername);\n registerusername.setBounds(120, 170, 290, 30);\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel5.setText(\"Age : \");\n jPanel1.add(jLabel5);\n jLabel5.setBounds(40, 220, 50, 30);\n\n registerage.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerageActionPerformed(evt);\n }\n });\n jPanel1.add(registerage);\n registerage.setBounds(120, 220, 290, 30);\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel6.setText(\"Password : \");\n jPanel1.add(jLabel6);\n jLabel6.setBounds(40, 280, 80, 15);\n\n login_btn.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n login_btn.setText(\"LOGIN\");\n login_btn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n login_btnMouseClicked(evt);\n }\n });\n jPanel1.add(login_btn);\n login_btn.setBounds(280, 410, 50, 20);\n\n jPanel2.setBackground(new java.awt.Color(0, 0, 0));\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 1, 36)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(255, 255, 255));\n jLabel8.setText(\"Registration \");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 369, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(71, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel1.add(jPanel2);\n jPanel2.setBounds(0, 0, 450, 80);\n jPanel1.add(registeraddress);\n registeraddress.setBounds(120, 320, 290, 30);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Address:\");\n jPanel1.add(jLabel1);\n jLabel1.setBounds(40, 320, 70, 30);\n\n registerpassword.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerpasswordActionPerformed(evt);\n }\n });\n jPanel1.add(registerpassword);\n registerpassword.setBounds(120, 270, 290, 30);\n\n Register.setText(\"Register\");\n Register.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n RegisterMouseClicked(evt);\n }\n });\n jPanel1.add(Register);\n Register.setBounds(320, 370, 90, 30);\n\n jLabelLogin2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabelLogin2.setText(\"Have an account already?\");\n jLabelLogin2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelLogin2MouseClicked(evt);\n }\n });\n jPanel1.add(jLabelLogin2);\n jLabelLogin2.setBounds(120, 410, 160, 20);\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel4.setText(\"Full Name : \");\n jPanel1.add(jLabel4);\n jLabel4.setBounds(40, 130, 100, 17);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n t0 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n t2 = new javax.swing.JPasswordField();\n t3 = new javax.swing.JPasswordField();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n t4 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n t1 = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n t5 = new javax.swing.JTextField();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel2.setBackground(new java.awt.Color(191, 254, 222));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), \"Register Now!\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 36))); // NOI18N\n jPanel2.setFont(new java.awt.Font(\"Bookman Old Style\", 1, 11)); // NOI18N\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel3.setText(\"Confirm Password\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel2.setText(\"Password\");\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Full Name\");\n\n t0.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n t0.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n t0ActionPerformed(evt);\n }\n });\n\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jButton1.setText(\"Register\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n t2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n t2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n t2ActionPerformed(evt);\n }\n });\n\n t3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n t3.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n t3KeyPressed(evt);\n }\n });\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oop_project/taxi-finder-logo-01-resized.jpg\"))); // NOI18N\n jLabel4.setText(\"jLabel4\");\n jLabel4.setFocusCycleRoot(true);\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel5.setText(\"Email ID\");\n\n t4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel6.setText(\"User ID\");\n\n t1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel7.setText(\"Phone Number\");\n\n t5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n t5.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n t5KeyTyped(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(224, 224, 224)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(150, 150, 150)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 270, Short.MAX_VALUE))\n .addComponent(jLabel2))\n .addGap(6, 6, 6)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(t5, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)\n .addComponent(t2)\n .addComponent(t4)\n .addComponent(t1)\n .addComponent(t0)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(46, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(233, 233, 233))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(59, 59, 59)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(t0, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(36, 36, 36)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(33, 33, 33)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(33, 33, 33)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(33, 33, 33)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(34, 34, 34)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n jMenuBar1.setFont(new java.awt.Font(\"Bookman Old Style\", 1, 24)); // NOI18N\n\n jMenu1.setText(\"Exit\");\n jMenu1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jMenu1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jMenu1MouseClicked(evt);\n }\n });\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Back to Login\");\n jMenu2.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jMenu2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jMenu2MouseClicked(evt);\n }\n });\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n reg_label = new javax.swing.JLabel();\n reg_panel = new javax.swing.JPanel();\n firstname_lab = new javax.swing.JLabel();\n firstname_txt = new javax.swing.JTextField();\n lastname_lab = new javax.swing.JLabel();\n lastname_txt = new javax.swing.JTextField();\n addr_lab = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n addr_txt = new javax.swing.JTextArea();\n pos_lab = new javax.swing.JLabel();\n pos_combox = new javax.swing.JComboBox<>();\n email_lab = new javax.swing.JLabel();\n email_txt = new javax.swing.JTextField();\n pwd_lab = new javax.swing.JLabel();\n pwd_txt = new javax.swing.JPasswordField();\n crm_pwd_lab = new javax.swing.JLabel();\n crm_pwd_txt = new javax.swing.JPasswordField();\n contact_no = new javax.swing.JLabel();\n contact_no_txt = new javax.swing.JTextField();\n crm_reg_but = new javax.swing.JButton();\n bac_but = new javax.swing.JButton();\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setName(\"Register\"); // NOI18N\n\n reg_label.setFont(new java.awt.Font(\"Times New Roman\", 1, 24)); // NOI18N\n reg_label.setText(\"Register\");\n\n firstname_lab.setText(\"First Name:\");\n\n firstname_txt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n firstname_txtActionPerformed(evt);\n }\n });\n\n lastname_lab.setText(\"Last Name:\");\n\n lastname_txt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n lastname_txtActionPerformed(evt);\n }\n });\n\n addr_lab.setText(\"Address:\");\n\n addr_txt.setColumns(20);\n addr_txt.setRows(5);\n jScrollPane2.setViewportView(addr_txt);\n\n pos_lab.setText(\"Register as:\");\n\n pos_combox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Admin\", \"Customer\" }));\n pos_combox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pos_comboxActionPerformed(evt);\n }\n });\n\n email_lab.setText(\"Email:\");\n\n pwd_lab.setText(\"Password:\");\n\n crm_pwd_lab.setText(\"Confirm Password:\");\n\n contact_no.setText(\"Contact number:\");\n\n contact_no_txt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n contact_no_txtActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout reg_panelLayout = new javax.swing.GroupLayout(reg_panel);\n reg_panel.setLayout(reg_panelLayout);\n reg_panelLayout.setHorizontalGroup(\n reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(reg_panelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(reg_panelLayout.createSequentialGroup()\n .addComponent(pos_lab)\n .addGap(73, 73, 73)\n .addComponent(pos_combox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(reg_panelLayout.createSequentialGroup()\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lastname_lab)\n .addComponent(firstname_lab)\n .addComponent(crm_pwd_lab))\n .addGap(32, 32, 32)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(firstname_txt)\n .addComponent(lastname_txt)\n .addComponent(pwd_txt)\n .addComponent(email_txt)\n .addComponent(crm_pwd_txt, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)))\n .addGroup(reg_panelLayout.createSequentialGroup()\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(email_lab)\n .addComponent(pwd_lab)\n .addComponent(addr_lab)\n .addComponent(contact_no))\n .addGap(47, 47, 47)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(contact_no_txt)\n .addComponent(jScrollPane2))))\n .addContainerGap())\n );\n reg_panelLayout.setVerticalGroup(\n reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(reg_panelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(email_lab)\n .addComponent(email_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pwd_lab)\n .addComponent(pwd_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(crm_pwd_lab)\n .addComponent(crm_pwd_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(firstname_lab)\n .addComponent(firstname_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lastname_lab)\n .addComponent(lastname_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(contact_no)\n .addComponent(contact_no_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(addr_lab)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)\n .addGroup(reg_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pos_combox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pos_lab))\n .addContainerGap())\n );\n\n firstname_lab.getAccessibleContext().setAccessibleName(\"first_name_lab\");\n firstname_txt.getAccessibleContext().setAccessibleName(\"first_name_txt\");\n firstname_txt.getAccessibleContext().setAccessibleDescription(\"\");\n lastname_lab.getAccessibleContext().setAccessibleName(\"last_name_lab\");\n lastname_txt.getAccessibleContext().setAccessibleName(\"last_name_lab\");\n pos_combox.getAccessibleContext().setAccessibleName(\"\");\n crm_pwd_txt.getAccessibleContext().setAccessibleName(\"\");\n\n crm_reg_but.setText(\"Confirm\");\n crm_reg_but.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n crm_reg_butActionPerformed(evt);\n }\n });\n\n bac_but.setText(\"Back\");\n bac_but.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bac_butActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(reg_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(reg_label, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(379, 379, 379))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(crm_reg_but, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(bac_but, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(54, 54, 54))))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(reg_label, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(reg_panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(crm_reg_but, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bac_but, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(50, 50, 50))\n );\n\n reg_label.getAccessibleContext().setAccessibleName(\"Reg_label\");\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n cancel = new javax.swing.JButton();\n jPasswordField1 = new javax.swing.JPasswordField();\n jLabel2 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jTextField1 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Sign Up\");\n setMaximumSize(new java.awt.Dimension(400, 300));\n setMinimumSize(new java.awt.Dimension(400, 300));\n setPreferredSize(new java.awt.Dimension(400, 300));\n getContentPane().setLayout(null);\n\n jPanel1.setMaximumSize(new java.awt.Dimension(400, 300));\n jPanel1.setMinimumSize(new java.awt.Dimension(400, 300));\n jPanel1.setPreferredSize(new java.awt.Dimension(400, 300));\n jPanel1.setLayout(null);\n\n jButton1.setBackground(new java.awt.Color(204, 255, 102));\n jButton1.setText(\"Register\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton1);\n jButton1.setBounds(140, 150, 90, 32);\n\n jLabel1.setBackground(new java.awt.Color(204, 255, 102));\n jLabel1.setText(\"User Name\");\n jPanel1.add(jLabel1);\n jLabel1.setBounds(60, 60, 70, 25);\n\n cancel.setBackground(new java.awt.Color(204, 255, 102));\n cancel.setText(\"Cancel\");\n cancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelActionPerformed(evt);\n }\n });\n jPanel1.add(cancel);\n cancel.setBounds(250, 150, 88, 32);\n\n jPasswordField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jPasswordField1ActionPerformed(evt);\n }\n });\n jPanel1.add(jPasswordField1);\n jPasswordField1.setBounds(140, 110, 200, 32);\n\n jLabel2.setBackground(new java.awt.Color(204, 255, 102));\n jLabel2.setText(\"Password\");\n jPanel1.add(jLabel2);\n jLabel2.setBounds(60, 110, 63, 22);\n\n jButton3.setBackground(new java.awt.Color(204, 255, 102));\n jButton3.setText(\"main\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton3);\n jButton3.setBounds(140, 190, 90, 32);\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n jPanel1.add(jTextField1);\n jTextField1.setBounds(140, 60, 200, 31);\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2013-12-05.jpg\"))); // NOI18N\n jPanel1.add(jLabel4);\n jLabel4.setBounds(0, 0, 400, 310);\n\n getContentPane().add(jPanel1);\n jPanel1.setBounds(0, -5, 400, 310);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n uname = new javax.swing.JLabel();\n upassword = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n registerButton = new javax.swing.JButton();\n loginButton = new javax.swing.JButton();\n name = new javax.swing.JTextField();\n password = new javax.swing.JPasswordField();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jPanel1.setLayout(null);\n\n uname.setFont(new java.awt.Font(\"Batang\", 0, 14)); // NOI18N\n uname.setText(\"Username\");\n jPanel1.add(uname);\n uname.setBounds(90, 60, 77, 26);\n\n upassword.setFont(new java.awt.Font(\"Batang\", 0, 14)); // NOI18N\n upassword.setText(\"Password\");\n jPanel1.add(upassword);\n upassword.setBounds(90, 120, 77, 26);\n\n jLabel3.setFont(new java.awt.Font(\"Batang\", 0, 14)); // NOI18N\n jLabel3.setText(\"Not Registered?\");\n jPanel1.add(jLabel3);\n jLabel3.setBounds(70, 180, 101, 26);\n\n registerButton.setFont(new java.awt.Font(\"Arial\", 0, 12)); // NOI18N\n registerButton.setText(\"Register Here\");\n registerButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerButtonActionPerformed(evt);\n }\n });\n jPanel1.add(registerButton);\n registerButton.setBounds(70, 220, 109, 23);\n\n loginButton.setFont(new java.awt.Font(\"Arial\", 0, 12)); // NOI18N\n loginButton.setText(\"Login \");\n loginButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n loginButtonActionPerformed(evt);\n }\n });\n jPanel1.add(loginButton);\n loginButton.setBounds(280, 220, 67, 23);\n\n name.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nameActionPerformed(evt);\n }\n });\n jPanel1.add(name);\n name.setBounds(240, 60, 140, 20);\n\n password.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n passwordActionPerformed(evt);\n }\n });\n jPanel1.add(password);\n password.setBounds(240, 130, 140, 20);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/ac_media_screen-bayekDesert_ncsa.jpg\"))); // NOI18N\n jLabel1.setText(\"jLabel1\");\n jLabel1.setPreferredSize(new java.awt.Dimension(1080, 1080));\n jPanel1.add(jLabel1);\n jLabel1.setBounds(0, 0, 460, 360);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 359, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n userNameRegister = new javax.swing.JTextField();\n fullNameRegister = new javax.swing.JTextField();\n signUpBtn = new javax.swing.JButton();\n confirmPassRegister = new javax.swing.JPasswordField();\n passwordRegister = new javax.swing.JPasswordField();\n jLabel2 = new javax.swing.JLabel();\n\n jLabel1.setText(\"jLabel1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(183, 215, 255));\n jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n\n jLabel3.setFont(new java.awt.Font(\"72\", 0, 24)); // NOI18N\n jLabel3.setText(\"Full Name:\");\n\n jLabel4.setFont(new java.awt.Font(\"72\", 0, 24)); // NOI18N\n jLabel4.setText(\"Username:\");\n\n jLabel5.setFont(new java.awt.Font(\"72\", 0, 24)); // NOI18N\n jLabel5.setText(\"Confirm Password:\");\n\n jLabel6.setFont(new java.awt.Font(\"72\", 0, 24)); // NOI18N\n jLabel6.setText(\"Password:\");\n\n userNameRegister.setFont(new java.awt.Font(\"72\", 0, 18)); // NOI18N\n userNameRegister.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));\n userNameRegister.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n userNameRegisterActionPerformed(evt);\n }\n });\n\n fullNameRegister.setFont(new java.awt.Font(\"72\", 0, 18)); // NOI18N\n fullNameRegister.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));\n fullNameRegister.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n fullNameRegisterActionPerformed(evt);\n }\n });\n\n signUpBtn.setBackground(new java.awt.Color(127, 208, 255));\n signUpBtn.setFont(new java.awt.Font(\"72\", 0, 18)); // NOI18N\n signUpBtn.setText(\"Sign me up\");\n signUpBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n signUpBtnActionPerformed(evt);\n }\n });\n\n confirmPassRegister.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));\n\n passwordRegister.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));\n passwordRegister.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n passwordRegisterActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel4)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(signUpBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(userNameRegister)\n .addComponent(fullNameRegister, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE)\n .addComponent(confirmPassRegister)\n .addComponent(passwordRegister))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(76, 76, 76)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(fullNameRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(jLabel4))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(userNameRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(21, 21, 21)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(passwordRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(confirmPassRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(32, 32, 32)\n .addComponent(signUpBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(286, Short.MAX_VALUE))\n );\n\n jLabel2.setFont(new java.awt.Font(\"72\", 0, 36)); // NOI18N\n jLabel2.setText(\"Sign Up\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(293, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(281, 281, 281))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(13, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n txtName = new javax.swing.JTextField();\n txtPhone = new javax.swing.JTextField();\n txtAddress = new javax.swing.JTextField();\n txtPassword = new javax.swing.JPasswordField();\n txtRepassword = new javax.swing.JPasswordField();\n btnRegister = new javax.swing.JButton();\n btnBackLogin = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Register\");\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 36)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(204, 0, 51));\n jLabel1.setText(\"Đăng Ký\");\n\n jLabel2.setText(\"Họ Tên\");\n\n jLabel3.setText(\"SĐT\");\n\n jLabel4.setText(\"Địa chỉ\");\n\n jLabel5.setText(\"Mật khẩu\");\n\n jLabel6.setText(\"Nhập lại mật khẩu\");\n\n btnRegister.setText(\"Đăng Ký\");\n btnRegister.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRegisterActionPerformed(evt);\n }\n });\n\n btnBackLogin.setText(\"Trở lại\");\n btnBackLogin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackLoginActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(444, 444, 444)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(btnBackLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtName)\n .addComponent(txtPhone)\n .addComponent(txtAddress)\n .addComponent(txtPassword)\n .addComponent(txtRepassword, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addComponent(jLabel1)))\n .addContainerGap(470, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(104, 104, 104)\n .addComponent(jLabel1)\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(jLabel3))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(jLabel4))\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txtRepassword, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBackLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(237, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n bannerLabel = new javax.swing.JLabel();\n loginLabel = new javax.swing.JLabel();\n firstNameLabel = new javax.swing.JLabel();\n firstNameTField = new javax.swing.JTextField();\n lastNameLabel = new javax.swing.JLabel();\n lastNameTField = new javax.swing.JTextField();\n usernameLabel = new javax.swing.JLabel();\n usernameTField = new javax.swing.JTextField();\n passwordLabel = new javax.swing.JLabel();\n passwordField = new javax.swing.JPasswordField();\n passwordcheckLabel = new javax.swing.JLabel();\n passwordcheckField = new javax.swing.JPasswordField();\n createButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n bannerLabel.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n bannerLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n bannerLabel.setText(\"Create new account\");\n\n loginLabel.setText(\"You already have an account? Click here to log in!\");\n loginLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n loginLabel.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n loginLabelMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n loginLabelMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n loginLabelMouseExited(evt);\n }\n });\n\n firstNameLabel.setText(\"First Name\");\n\n lastNameLabel.setText(\"Last Name\");\n\n usernameLabel.setText(\"Username\");\n\n usernameTField.setText(\"Username\");\n\n passwordLabel.setText(\"Password\");\n\n passwordField.setText(\"Password\");\n\n passwordcheckLabel.setText(\"Re-enter password\");\n\n passwordcheckField.setText(\"password\");\n\n createButton.setText(\"Create account\");\n createButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createButtonActionPerformed(evt);\n }\n });\n\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(110, 110, 110)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(createButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 101, Short.MAX_VALUE)\n .addComponent(cancelButton))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(loginLabel)\n .addGap(5, 5, 5))\n .addComponent(bannerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(firstNameLabel)\n .addComponent(usernameLabel)\n .addComponent(lastNameLabel)\n .addComponent(passwordLabel)\n .addComponent(passwordcheckLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(usernameTField, javax.swing.GroupLayout.DEFAULT_SIZE, 255, Short.MAX_VALUE)\n .addComponent(lastNameTField)\n .addComponent(passwordField)\n .addComponent(passwordcheckField)\n .addComponent(firstNameTField))))\n .addContainerGap(107, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(bannerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(77, 77, 77)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(firstNameLabel)\n .addComponent(firstNameTField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lastNameLabel)\n .addComponent(lastNameTField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(usernameLabel)\n .addComponent(usernameTField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(passwordLabel)\n .addComponent(passwordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(passwordcheckLabel)\n .addComponent(passwordcheckField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(createButton)\n .addComponent(cancelButton))\n .addGap(39, 39, 39)\n .addComponent(loginLabel)\n .addGap(100, 100, 100))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void btn_Login_RegisterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_Login_RegisterActionPerformed\n new frm_PlayerRegistration().setVisible(true);\n this.dispose();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n REGV = new javax.swing.JFrame();\n jLabel4 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n jPasswordField1 = new javax.swing.JPasswordField();\n jPasswordField2 = new javax.swing.JPasswordField();\n jLabel8 = new javax.swing.JLabel();\n jTextField8 = new javax.swing.JTextField();\n jTextField1 = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n jTextField7 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel15 = new javax.swing.JLabel();\n REGN = new javax.swing.JFrame();\n jLabel45 = new javax.swing.JLabel();\n jTextField21 = new javax.swing.JTextField();\n jLabel35 = new javax.swing.JLabel();\n jPasswordField4 = new javax.swing.JPasswordField();\n jTextField14 = new javax.swing.JTextField();\n jLabel46 = new javax.swing.JLabel();\n jLabel36 = new javax.swing.JLabel();\n jPasswordField5 = new javax.swing.JPasswordField();\n jTextField15 = new javax.swing.JTextField();\n jLabel37 = new javax.swing.JLabel();\n jTextField16 = new javax.swing.JTextField();\n jLabel25 = new javax.swing.JLabel();\n jLabel38 = new javax.swing.JLabel();\n jLabel27 = new javax.swing.JLabel();\n jLabel39 = new javax.swing.JLabel();\n jLabel28 = new javax.swing.JLabel();\n jLabel40 = new javax.swing.JLabel();\n jTextField10 = new javax.swing.JTextField();\n jLabel29 = new javax.swing.JLabel();\n jLabel41 = new javax.swing.JLabel();\n jLabel42 = new javax.swing.JLabel();\n jTextField17 = new javax.swing.JTextField();\n jTextField11 = new javax.swing.JTextField();\n jTextField18 = new javax.swing.JTextField();\n jLabel31 = new javax.swing.JLabel();\n jTextField19 = new javax.swing.JTextField();\n jTextField12 = new javax.swing.JTextField();\n jLabel32 = new javax.swing.JLabel();\n jTextField20 = new javax.swing.JTextField();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel43 = new javax.swing.JLabel();\n jLabel33 = new javax.swing.JLabel();\n jLabel44 = new javax.swing.JLabel();\n jLabel34 = new javax.swing.JLabel();\n jTextField13 = new javax.swing.JTextField();\n Login = new javax.swing.JFrame();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jLabel23 = new javax.swing.JLabel();\n jTextField9 = new javax.swing.JTextField();\n jPasswordField3 = new javax.swing.JPasswordField();\n jButton1 = new javax.swing.JButton();\n jLabel24 = new javax.swing.JLabel();\n jButton4 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jButton5 = new javax.swing.JButton();\n\n jLabel4.setText(\"Last Name\");\n\n jLabel16.setText(\"Email Address\");\n\n jLabel5.setText(\"Date of Birth\");\n\n jLabel17.setText(\"Password\");\n\n jLabel6.setText(\"Contact Info\");\n\n jLabel18.setText(\"Confirm Password\");\n\n jPasswordField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jPasswordField1ActionPerformed(evt);\n }\n });\n\n jLabel8.setText(\"Basic Information\");\n\n jButton3.setText(\"SUBMIT\");\n\n jTextField3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField3ActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Address\");\n\n jTextField4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField4ActionPerformed(evt);\n }\n });\n\n jLabel10.setText(\"City\");\n\n jLabel11.setText(\"Pincode\");\n\n jLabel12.setText(\"Contact Number\");\n\n jLabel2.setText(\"Registration Form\");\n\n jLabel14.setText(\"Gender\");\n\n jLabel3.setText(\"First Name\");\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Male\", \"Female\", \"Others\" }));\n\n jLabel15.setText(\"Login Information\");\n\n javax.swing.GroupLayout REGVLayout = new javax.swing.GroupLayout(REGV.getContentPane());\n REGV.getContentPane().setLayout(REGVLayout);\n REGVLayout.setHorizontalGroup(\n REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGVLayout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGVLayout.createSequentialGroup()\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, REGVLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel18)\n .addComponent(jLabel17)\n .addComponent(jLabel16))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField8)\n .addComponent(jPasswordField1)\n .addComponent(jPasswordField2)))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, REGVLayout.createSequentialGroup()\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(71, 71, 71))\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton3)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(REGVLayout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(27, 27, 27)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE))\n .addGroup(REGVLayout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(25, 25, 25)\n .addComponent(jTextField2))\n .addGroup(REGVLayout.createSequentialGroup()\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addGroup(REGVLayout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel14)))\n .addGap(18, 18, 18)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(REGVLayout.createSequentialGroup()\n .addComponent(jLabel11)\n .addGap(40, 40, 40)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(REGVLayout.createSequentialGroup()\n .addComponent(jLabel8)\n .addGap(110, 110, 110)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(REGVLayout.createSequentialGroup()\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(REGVLayout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel10)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabel15))))\n .addGap(47, 47, 47)))\n );\n REGVLayout.setVerticalGroup(\n REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 652, Short.MAX_VALUE)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGVLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGVLayout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, REGVLayout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(32, 32, 32)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(12, 12, 12)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel14)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(29, 29, 29)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16)\n .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(REGVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3)\n .addContainerGap()))\n );\n\n jLabel45.setText(\"Password\");\n\n jLabel35.setText(\"City\");\n\n jLabel46.setText(\"Confirm Password\");\n\n jLabel36.setText(\"Pincode\");\n\n jLabel37.setText(\"Contact Number\");\n\n jLabel25.setText(\"NGO REGISTRATION FORM\");\n\n jLabel38.setText(\"Primary Contact\");\n\n jLabel27.setText(\"About Organiztion\");\n\n jLabel39.setText(\"First Name\");\n\n jLabel28.setText(\"Organiztion Name\");\n\n jLabel40.setText(\"Last Name\");\n\n jLabel29.setText(\"Website\");\n\n jLabel41.setText(\"Title\");\n\n jLabel42.setText(\"Email\");\n\n jLabel31.setText(\"Mission Statement\");\n\n jLabel32.setText(\"Primary Impact Area\");\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Select\", \"Child Welfare\", \"Disability\", \"Education\", \"Elderly People\", \"Environment\", \"Health\", \"Gender\", \"Animal Welfare\", \"Others\" }));\n\n jLabel43.setText(\"Login Information\");\n\n jLabel33.setText(\"Location & Organization\");\n\n jLabel44.setText(\"Email id\");\n\n jLabel34.setText(\"Address\");\n\n javax.swing.GroupLayout REGNLayout = new javax.swing.GroupLayout(REGN.getContentPane());\n REGN.getContentPane().setLayout(REGNLayout);\n REGNLayout.setHorizontalGroup(\n REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGNLayout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(REGNLayout.createSequentialGroup()\n .addComponent(jLabel27)\n .addGap(77, 77, 77)\n .addComponent(jLabel25))\n .addGroup(REGNLayout.createSequentialGroup()\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel28)\n .addComponent(jLabel29)\n .addComponent(jLabel31)\n .addComponent(jLabel32))\n .addGap(54, 54, 54)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(REGNLayout.createSequentialGroup()\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField10)\n .addComponent(jTextField11)\n .addComponent(jTextField12, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE))\n .addGap(4, 4, 4)))))\n .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, REGNLayout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel36))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextField16, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE)\n .addComponent(jTextField15, javax.swing.GroupLayout.Alignment.LEADING)))\n .addGap(29, 29, 29)))\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel37)\n .addComponent(jLabel38)\n .addGroup(REGNLayout.createSequentialGroup()\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel39)\n .addComponent(jLabel40)\n .addComponent(jLabel41))\n .addGap(55, 55, 55)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField19)\n .addGroup(REGNLayout.createSequentialGroup()\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPasswordField4, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)\n .addComponent(jTextField21)\n .addComponent(jTextField18, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField17, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField20, javax.swing.GroupLayout.Alignment.LEADING))\n .addGap(0, 0, Short.MAX_VALUE))))))\n .addGroup(REGNLayout.createSequentialGroup()\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel42)\n .addComponent(jLabel43)\n .addComponent(jLabel44)\n .addComponent(jLabel45)\n .addGroup(REGNLayout.createSequentialGroup()\n .addComponent(jLabel46)\n .addGap(18, 18, 18)\n .addComponent(jPasswordField5, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 6, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(47, 47, 47)))\n );\n REGNLayout.setVerticalGroup(\n REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 911, Short.MAX_VALUE)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGNLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGNLayout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel28)\n .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel29)\n .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(33, 33, 33)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel31)\n .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel32)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(REGNLayout.createSequentialGroup()\n .addComponent(jLabel34)\n .addGap(51, 51, 51)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel36))\n .addGap(34, 34, 34)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel37)\n .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLabel38)\n .addGap(18, 18, 18)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel39)\n .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel40)\n .addComponent(jTextField18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel41)\n .addComponent(jTextField19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel42)\n .addComponent(jTextField20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLabel43)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel44)\n .addComponent(jTextField21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel45)\n .addComponent(jPasswordField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(REGNLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel46)\n .addComponent(jPasswordField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n );\n\n jLabel21.setText(\"Login Page\");\n\n jLabel22.setText(\"Email id\");\n\n jLabel23.setText(\"Password\");\n\n jTextField9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField9ActionPerformed(evt);\n }\n });\n\n jPasswordField3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jPasswordField3ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Sign In\");\n\n jLabel24.setText(\"OR\");\n\n jButton4.setText(\"Sign Up\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout LoginLayout = new javax.swing.GroupLayout(Login.getContentPane());\n Login.getContentPane().setLayout(LoginLayout);\n LoginLayout.setHorizontalGroup(\n LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(LoginLayout.createSequentialGroup()\n .addGroup(LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(LoginLayout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jLabel21))\n .addGroup(LoginLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton1)\n .addGroup(LoginLayout.createSequentialGroup()\n .addGroup(LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel22)\n .addComponent(jLabel23)\n .addComponent(jLabel24))\n .addGap(32, 32, 32)\n .addGroup(LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField9)\n .addComponent(jPasswordField3, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)))))\n .addGroup(LoginLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton4)))\n .addContainerGap(169, Short.MAX_VALUE))\n );\n LoginLayout.setVerticalGroup(\n LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(LoginLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel21)\n .addGap(28, 28, 28)\n .addGroup(LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel22)\n .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(25, 25, 25)\n .addGroup(LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel23)\n .addComponent(jPasswordField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel24)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton4)\n .addGap(17, 17, 17)\n .addComponent(jButton1)\n .addContainerGap(83, Short.MAX_VALUE))\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\" Gracious Givers\");\n\n jButton2.setText(\"Login\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel19.setText(\"Volunteer\");\n\n jLabel20.setText(\"NGO\");\n\n jButton5.setText(\"Login\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(167, 167, 167)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(124, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel19))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel20)\n .addGap(82, 82, 82))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton5)\n .addGap(65, 65, 65))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(5, 5, 5)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel19)\n .addComponent(jLabel20))\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton5))\n .addContainerGap(156, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t String username = t4.getText().toString();\n\t\t\t String Fullname = t.getText().toString();\n\t\t\t String Address = t1.getText().toString();\n\t\t\t String ContactNo = t3.getText().toString();\n\t\t\t String EmailId = t2.getText().toString();\n \t char pass[]= p.getPassword();\n \t String password = new String(pass);\n \t \n \t try\n \t {\n \t \t Class.forName(\"com.mysql.jdbc.Driver\");\n \t \t con = DriverManager.getConnection( \"jdbc:mysql://localhost:3306/RIT\", \"root\", \"\");\n \t stmt = con.createStatement();\n \t stmt.executeUpdate(\"insert into user values('\"+Fullname+\"','\"+Address+\"','\"+EmailId+\"','\"+ContactNo+\"','\"+username+\"','\"+password+\"')\");\n \t JOptionPane.showMessageDialog(f, \"Registered Successfully\");\n \t \n \t }\n \t catch(ClassNotFoundException e1)\n \t {\n \t \t e1.printStackTrace();\n \t } \n \t catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n \t finally\n \t {\n \t \t try {\n\t\t\t\t\t\t\tcon.close();\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n \t }\n\t\t\t\t\n \t\t \n\t\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n uname = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n pno = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n pwd = new javax.swing.JPasswordField();\n jLabel6 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Signup\");\n\n jLabel2.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n jLabel2.setText(\"Username\");\n\n jLabel3.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n jLabel3.setText(\"Password\");\n\n jLabel4.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n jLabel4.setText(\"Phone no\");\n\n pno.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pnoActionPerformed(evt);\n }\n });\n\n jButton1.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n jButton1.setText(\"Signup\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n jLabel5.setText(\"Already have an account.\");\n jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel5MouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(299, 299, 299)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jButton1))))\n .addGroup(layout.createSequentialGroup()\n .addGap(256, 256, 256)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pno, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(72, 72, 72)\n .addComponent(uname, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(77, 77, 77)\n .addComponent(pwd)))))\n .addContainerGap(231, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(jLabel1)\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(uname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(pwd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(pno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(55, 55, 55)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n .addComponent(jLabel5)\n .addGap(26, 26, 26))\n );\n\n pack();\n }", "public form2() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSignIn = new javax.swing.JButton();\n jRegisterButton = new javax.swing.JButton();\n jUserNameField = new javax.swing.JTextField();\n jPasswordLabel = new javax.swing.JLabel();\n jUserNameLabel = new javax.swing.JLabel();\n jPasswordField = new javax.swing.JPasswordField();\n jForgottenPassword = new javax.swing.JLabel();\n jBackground = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n setMinimumSize(new java.awt.Dimension(400, 340));\n\n jSignIn.setBackground(new java.awt.Color(204, 204, 204));\n jSignIn.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jSignIn.setText(\"Ingresar\");\n //jButton1.setBackground(Color.RED);\n jSignIn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jSignInActionPerformed(evt);\n }\n });\n\n jRegisterButton.setBackground(new java.awt.Color(204, 204, 204));\n jRegisterButton.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jRegisterButton.setText(\"Registrar\");\n jRegisterButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRegisterButtonActionPerformed(evt);\n }\n });\n\n jUserNameField.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n\n jPasswordLabel.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jPasswordLabel.setText(\"Contraseña\");\n\n jUserNameLabel.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jUserNameLabel.setText(\"Nombre de Usuario\");\n\n jPasswordField.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jPasswordField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jPasswordFieldKeyPressed(evt);\n }\n });\n\n jForgottenPassword.setBackground(new java.awt.Color(255, 255, 255));\n jForgottenPassword.setForeground(new java.awt.Color(102, 102, 102));\n jForgottenPassword.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jForgottenPassword.setText(\"¿Contraseña olvidada?\");\n jForgottenPassword.setForeground(new Color(54,91,143));\n jForgottenPassword.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jForgottenPasswordMouseClicked(evt);\n }\n });\n\n jBackground.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/my/transcription/blue.png\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(142, 142, 142)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSignIn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jRegisterButton, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE))\n .addGap(142, 142, 142))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(116, 116, 116)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jUserNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jForgottenPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8)))\n .addGroup(layout.createSequentialGroup()\n .addGap(133, 133, 133)\n .addComponent(jUserNameLabel))\n .addGroup(layout.createSequentialGroup()\n .addGap(157, 157, 157)\n .addComponent(jPasswordLabel)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jBackground, javax.swing.GroupLayout.PREFERRED_SIZE, 400, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addComponent(jUserNameLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jUserNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPasswordLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(jSignIn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jRegisterButton)\n .addGap(18, 18, 18)\n .addComponent(jForgottenPassword)\n .addContainerGap(39, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jBackground, javax.swing.GroupLayout.PREFERRED_SIZE, 340, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel6 = new javax.swing.JPanel();\n jLabel28 = new javax.swing.JLabel();\n jLabel29 = new javax.swing.JLabel();\n fUsername = new javax.swing.JTextField();\n fKataSandi = new javax.swing.JPasswordField();\n jButtonRegister4 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jLabel30 = new javax.swing.JLabel();\n fNM = new javax.swing.JTextField();\n jLabel31 = new javax.swing.JLabel();\n fBidang = new javax.swing.JTextField();\n jLabel32 = new javax.swing.JLabel();\n fUlangSandi = new javax.swing.JPasswordField();\n jLabel34 = new javax.swing.JLabel();\n fEmail = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel6.setBackground(new java.awt.Color(0, 204, 204));\n\n jLabel28.setBackground(java.awt.Color.white);\n jLabel28.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel28.setText(\"Username :\");\n\n jLabel29.setBackground(java.awt.Color.white);\n jLabel29.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel29.setText(\"Kata Sandi :\");\n\n fUsername.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n fKataSandi.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n jButtonRegister4.setBackground(new java.awt.Color(34, 167, 240));\n jButtonRegister4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButtonRegister4.setForeground(new java.awt.Color(255, 255, 255));\n jButtonRegister4.setText(\"Register\");\n jButtonRegister4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonRegister4ActionPerformed(evt);\n }\n });\n\n jButton6.setBackground(new java.awt.Color(242, 38, 19));\n jButton6.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton6.setForeground(new java.awt.Color(255, 255, 255));\n jButton6.setText(\"Cancel\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n\n jLabel30.setBackground(java.awt.Color.white);\n jLabel30.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel30.setText(\"Nama :\");\n\n fNM.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n jLabel31.setBackground(java.awt.Color.white);\n jLabel31.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel31.setText(\"Bidang :\");\n\n fBidang.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n jLabel32.setBackground(java.awt.Color.white);\n jLabel32.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel32.setText(\"Ketik Ulang Kata Sandi :\");\n\n fUlangSandi.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n jLabel34.setBackground(java.awt.Color.white);\n jLabel34.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel34.setText(\"E-mail :\");\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel34)\n .addComponent(jLabel31, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel30, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(12, 12, 12)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fBidang, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(fNM, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(fUsername, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(fKataSandi, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(fUlangSandi, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(fEmail))\n .addGap(45, 45, 45))\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addGap(119, 119, 119)\n .addComponent(jButtonRegister4, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 187, Short.MAX_VALUE)\n .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(118, 118, 118))\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fNM, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel30))\n .addGap(18, 18, 18)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fBidang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel31))\n .addGap(24, 24, 24)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel28))\n .addGap(12, 12, 12)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fKataSandi, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel29))\n .addGap(18, 18, 18)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fUlangSandi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel32))\n .addGap(18, 18, 18)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel34)\n .addComponent(fEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(55, 55, 55)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonRegister4, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(70, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);\n new Register();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel3 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n registerBtn = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n passwordTxt = new javax.swing.JPasswordField();\n\n jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n jPanel3.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 640, -1, -1));\n\n jLabel8.setFont(new java.awt.Font(\"SF Pro Rounded\", 1, 18)); // NOI18N\n jLabel8.setText(\"Registro de nuevos usuarios\");\n jPanel3.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 40, -1, -1));\n\n jLabel10.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jLabel10.setText(\"Primer apellido del usuario\");\n jPanel3.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 260, -1, -1));\n\n jLabel11.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jLabel11.setText(\"Correo\");\n jPanel3.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 100, -1, -1));\n\n jTextField1.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jTextField1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanel3.add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 280, 240, 30));\n\n jTextField2.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jTextField2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n jPanel3.add(jTextField2, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 120, 240, 30));\n\n jLabel12.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jLabel12.setText(\"Numero de documento\");\n jPanel3.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 100, -1, -1));\n\n jLabel13.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jLabel13.setText(\"Primer nombre del usuario\");\n jPanel3.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 180, -1, -1));\n\n jTextField3.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jTextField3.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanel3.add(jTextField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 200, 240, 30));\n\n jTextField4.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jTextField4.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jTextField4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField4ActionPerformed(evt);\n }\n });\n jPanel3.add(jTextField4, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 120, 240, 30));\n\n jLabel14.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jLabel14.setText(\"Rol\");\n jPanel3.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 180, -1, -1));\n\n jLabel15.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jLabel15.setText(\"Contraseña\");\n jPanel3.add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 260, -1, -1));\n\n jLabel17.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jLabel17.setText(\"Registrar usuario\");\n jPanel3.add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 430, -1, -1));\n\n registerBtn.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n registerBtn.setForeground(java.awt.Color.darkGray);\n registerBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerBtnActionPerformed(evt);\n }\n });\n jPanel3.add(registerBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 420, 160, 40));\n registerBtn.addMouseListener(escuchaM);\n\n jComboBox1.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Administrador\", \"Gerente\", \"Operador\" }));\n jPanel3.add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 200, 240, 30));\n\n passwordTxt.setFont(new java.awt.Font(\"SF Pro Rounded\", 0, 14)); // NOI18N\n jPanel3.add(passwordTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 280, 240, 30));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 870, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 870, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 670, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 670, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n regName = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n regEmail = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n regPhone = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n regPass = new javax.swing.JTextField();\n saveRegister = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setBackground(new java.awt.Color(0, 0, 0));\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel1.setText(\"Welcome To Online Help Desk\");\n\n jLabel2.setText(\"Name\");\n\n jLabel3.setText(\"Email\");\n\n jLabel4.setText(\"Phone\");\n\n jLabel5.setText(\"Password\");\n\n saveRegister.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n saveRegister.setText(\"REGISTER\");\n saveRegister.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveRegisterActionPerformed(evt);\n }\n });\n\n jButton1.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n jButton1.setText(\"LOGIN\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(62, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(saveRegister, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(regEmail, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)\n .addComponent(regPhone))\n .addComponent(regPass, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(88, 88, 88))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(137, 137, 137)\n .addComponent(regName, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(89, Short.MAX_VALUE)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(regEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(regPhone, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(regPass, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(saveRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(26, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addComponent(regName, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(264, Short.MAX_VALUE)))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n mentorusername = new javax.swing.JTextField();\n mentorpassword = new javax.swing.JPasswordField();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n jPanel1.setLayout(null);\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/studentprogresstracking/newback.button.jpg\"))); // NOI18N\n jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton2);\n jButton2.setBounds(20, 20, 90, 50);\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/studentprogresstracking/mentor_login_label.jpg\"))); // NOI18N\n jPanel1.add(jLabel3);\n jLabel3.setBounds(290, 20, 350, 130);\n\n jPanel2.setBackground(new java.awt.Color(0, 0, 0));\n\n jLabel1.setFont(new java.awt.Font(\"Liberation Sans\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"USERNAME\");\n\n jLabel2.setFont(new java.awt.Font(\"Liberation Sans\", 1, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"PASSWORD\");\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/studentprogresstracking/8212240_orig.png\"))); // NOI18N\n jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(176, 176, 176)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(16, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(mentorusername, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addComponent(mentorpassword, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(14, 14, 14))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(mentorusername, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(35, 35, 35)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(mentorpassword, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n jPanel1.add(jPanel2);\n jPanel2.setBounds(250, 220, 420, 230);\n\n jLabel4.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 12)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"(Your e-mail)\");\n jPanel1.add(jLabel4);\n jLabel4.setBounds(690, 250, 100, 16);\n\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/studentprogresstracking/w5.jpg\"))); // NOI18N\n jPanel1.add(jLabel5);\n jLabel5.setBounds(0, 0, 920, 520);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 900, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public Successful_Registration() {\n initComponents();\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (Data.linkTest()) {\r\n\t\t String btnstring = e.getActionCommand();\r\n\t if (btnstring.equals(\"注册\")) {\r\n\r\n\t String nameString=textField.getText().trim();\r\n\t String pass=String.valueOf(passwordField.getPassword());\r\n\t String repass=String.valueOf(passwordField_1.getPassword());\r\n\t String mailString=textField_5.getText().trim(); \r\n\t \t \r\n\t String query;\t \r\n\t \r\n\t if (!nameString.equals(\"\") && !pass.equals(\"\") && pass.equals(repass) && !mailString.equals(\"\")&&isEmail(mailString)) {\r\n\t System.out.println(\"注册\");\r\n\t if(UserCheck.CheckUsername(nameString)){\r\n\t query=\r\n\t \"insert into user values(\"+\r\n\t \t\t \"null,\"+\r\n\t \"'\"+nameString+\"',\"+\r\n\t \"'\"+pass+\"',\"+\r\n\t \"'\"+mailString+\"',\"+\r\n\t \"''\"+\r\n\t \")\";\r\n\t \r\n\t System.out.println(query);\r\n\t if(Data.modify(query))\t \r\n\t \t JOptionPane.showMessageDialog(null,\"注册成功\",\"提示\",JOptionPane.INFORMATION_MESSAGE);\r\n\t else\r\n\t \t JOptionPane.showMessageDialog(null,\"注册失败请检查网络连接\",\"提示\",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\r\n\t frame.setVisible(false);\r\n\r\n\t } \r\n\t }else \r\n\t {\r\n\t \t JOptionPane.showMessageDialog(null,\"用户名重复\",\"注册失败\",JOptionPane.INFORMATION_MESSAGE);\r\n\t }\r\n\t }\r\n\t\t}else{\r\n\t\t\tJOptionPane.showMessageDialog(null,\"连接服务器失败,请检查网络连接\",\"提示\",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t}", "public RegisterForm() {\n initComponents();\n }", "public RegisterForm() {\n initComponents();\n }", "public RegisterForm() {\n initComponents();\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tFont font = new Font(\"Arial\", Font.PLAIN, 12);\n\t\tdesk = new JDesktopPane();\n\t\tuserTextField = new JTextField();\n\t\tpassTextField = new JPasswordField();\n\n\t\tsetTitle(\"Register\");\n\t\tsetResizable(false);\n\t\tsetVisible(true);\n\t\tsetSize(350, 250);\n\t\tsetAlwaysOnTop(true);\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t\tsetContentPane(desk);\n\t\tdesk.setBackground(Color.white);\n\n\t\tuserLabel = new JLabel(\"USERNAME\");\n\t\tpassLabel = new JLabel(\"PASSWORD\");\n\n\t\tuserTextField\n\t\t\t\t.setToolTipText(\"The username is limited to 10 characters.\");\n\t\tpassTextField.setToolTipText(\"The password must be 4 characters.\");\n\n\t\tuserLabel.setFont(font);\n\t\tpassLabel.setFont(font);\n\n\t\tregister = new JButton(\"register\");\n\t\tregister.setFont(new Font(\"Arial\", Font.PLAIN, 12));\n\n\t\tregister.addActionListener(new ActionListener() {\n\t\t\tprivate boolean uniqueUser;\n\t\t\tprivate boolean invalidUserOrPass;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString userTemp = userTextField.getText();\n\t\t\t\tchar[] passTemp = passTextField.getPassword();\n\n\t\t\t\tuserTextField.setText(null);\n\t\t\t\tpassTextField.setText(null);\n\n\t\t\t\tString username = \"\";\n\t\t\t\tString password = \"\";\n\t\t\t\tint length = userTemp.length();\n\t\t\t\tfor (int i = 0; i < length; i++) {\n\t\t\t\t\tif (!(userTemp.charAt(i) == ' '))\n\t\t\t\t\t\tusername += userTemp.charAt(i);\n\t\t\t\t}\n\t\t\t\tfor (char i : passTemp) {\n\t\t\t\t\tif (!(i == ' '))\n\t\t\t\t\t\tpassword += Character.valueOf(i);\n\t\t\t\t}\n\t\t\t\tfile = new RegisterManager();\n\t\t\t\ttry {\n\t\t\t\t\tfile.createFile();\n\t\t\t\t\tuniqueUser = file.compare(username, password);\n\t\t\t\t\tif (uniqueUser)\n\t\t\t\t\t\tinvalidUserOrPass = file.writeFile(username, password);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (!uniqueUser) {\n\t\t\t\t\tsetAlwaysOnTop(false);\n\t\t\t\t\tint error = JOptionPane.ERROR_MESSAGE;\n\t\t\t\t\tString title = \"Message error\";\n\t\t\t\t\tString message = \"The username already exist.\";\n\t\t\t\t\tJOptionPane.showMessageDialog(null, message, title, error);\n\t\t\t\t} else if (!invalidUserOrPass) {\n\t\t\t\t\tsetAlwaysOnTop(false);\n\t\t\t\t\tint error = JOptionPane.ERROR_MESSAGE;\n\t\t\t\t\tString title = \"Invalid username or password.\\n\\n\";\n\t\t\t\t\tString message = \"The username is limited to 10 characters.\\n\"\n\t\t\t\t\t\t\t+ \"The password must be 4 characters.\";\n\t\t\t\t\tJOptionPane.showMessageDialog(null, message, title, error);\n\t\t\t\t} else {\n\t\t\t\t\tdispose();\n\t\t\t\t\tString message = \"Player is created.\";\n\t\t\t\t\tJOptionPane.showMessageDialog(null, message, \"\",\n\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\t\t}\n\t\t\t\tsetAlwaysOnTop(true);\n\t\t\t}\n\t\t});\n\n\t\tContainer content = getContentPane();\n\t\tcontent.add(userLabel);\n\t\tcontent.add(passLabel);\n\t\tcontent.add(userTextField);\n\t\tcontent.add(passTextField);\n\t\tcontent.add(register);\n\n\t\tinsets = content.getInsets();\n\t\tuserLabel.setBounds(insets.left + 80, insets.top + 51, 80, 20);\n\t\tpassLabel.setBounds(insets.left + 80, insets.top + 91, 80, 20);\n\t\tuserTextField.setBounds(insets.left + 160, insets.top + 50, 100, 25);\n\t\tpassTextField.setBounds(insets.left + 160, insets.top + 90, 100, 25);\n\t\tregister.setBounds(insets.left + 135, insets.top + 140, 85, 25);\n\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t\tMySQLConnect dal = new MySQLConnect();\r\n\t\t\ttry {\r\n\t\t\t\tString name;\r\n\t\t\t\tString date;\r\n\t\t\t\tString desc;\r\n\t\t\t\tString course;\r\n\t\t\t\tString type;\r\n\t\t\t\tString prior;\r\n\t\t\t\tScanner scan = new Scanner(System.in);\r\n\t\t\t\tSystem.out.println(\"Name: \");\r\n\t\t\t\tname = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Due Date(YYYY-MM-DD): \");\r\n\t\t\t\tdate = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Description: \");\r\n\t\t\t\tdesc = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Course: \");\r\n\t\t\t\tcourse = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Type: \");\r\n\t\t\t\ttype = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Priority: \");\r\n\t\t\t\tprior = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"The following form was added to the database:\");\r\n\t\t\t\tString[] check = dal.addForm(name.toString(),\"admin\",date.toString(),desc.toString(),course.toString(),type.toString(),prior.toString());\r\n\t\t\t\tfor(int i=0; i<check.length; i++){\r\n\t\t\t\t\tSystem.out.print(check[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t//test confirmation that button works\r\n\t\t\t\ttextArea.append(\"Form Submitted!\\n\");\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n dateChooserPanel1 = new datechooser.beans.DateChooserPanel();\n dateChooserDialog1 = new datechooser.beans.DateChooserDialog();\n jScrollPane2 = new javax.swing.JScrollPane();\n jEditorPane1 = new javax.swing.JEditorPane();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2Close = new javax.swing.JLabel();\n jLabel3minimise = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jTextField_FN = new javax.swing.JTextField();\n jTextField_LN = new javax.swing.JTextField();\n jTextField_UN = new javax.swing.JTextField();\n jPasswordField_PASS = new javax.swing.JPasswordField();\n jPasswordField_REPASS = new javax.swing.JPasswordField();\n jButton_Register_ = new javax.swing.JButton();\n jButtonCancel = new javax.swing.JButton();\n jLabel2Register = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n jScrollPane2.setViewportView(jEditorPane1);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(238, 238, 0));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 36)); // NOI18N\n jLabel1.setText(\"Register Page\");\n\n jLabel2Close.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel2Close.setText(\"X\");\n jLabel2Close.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabel2Close.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel2CloseMouseClicked(evt);\n }\n });\n\n jLabel3minimise.setFont(new java.awt.Font(\"Tahoma\", 1, 36)); // NOI18N\n jLabel3minimise.setText(\"-\");\n jLabel3minimise.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabel3minimise.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel3minimiseMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)\n .addComponent(jLabel3minimise, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel2Close, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)\n .addComponent(jLabel2Close)\n .addComponent(jLabel3minimise))\n );\n\n jPanel2.setBackground(new java.awt.Color(34, 167, 240));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel4.setText(\"First Name*\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setText(\"Last Name*\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel6.setText(\"Username*\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel7.setText(\"Password*\");\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel8.setText(\"Re-enter*\");\n\n jTextField_UN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField_UNActionPerformed(evt);\n }\n });\n\n jButton_Register_.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton_Register_.setText(\"Register\");\n jButton_Register_.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton_Register_.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_Register_ActionPerformed(evt);\n }\n });\n\n jButtonCancel.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButtonCancel.setText(\"Cancel\");\n jButtonCancel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCancelActionPerformed(evt);\n }\n });\n\n jLabel2Register.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel2Register.setText(\"Click here to Login\");\n jLabel2Register.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabel2Register.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel2RegisterMouseClicked(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setText(\"* are required to be entered!\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel7)\n .addComponent(jLabel8))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPasswordField_REPASS, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)\n .addComponent(jPasswordField_PASS, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField_UN, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField_LN, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField_FN, javax.swing.GroupLayout.Alignment.LEADING))\n .addGap(26, 26, 26)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel2Register, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton_Register_, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(26, 26, 26)\n .addComponent(jButtonCancel)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(10, 10, 10))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField_FN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField_LN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jTextField_UN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jPasswordField_PASS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jPasswordField_REPASS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton_Register_)\n .addComponent(jButtonCancel))\n .addGap(18, 18, 18)\n .addComponent(jLabel2Register)\n .addContainerGap(22, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n tf_user = new javax.swing.JTextField();\n tf_password = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n btn_registro = new javax.swing.JButton();\n btn_cancel = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Ubuntu\", 0, 36)); // NOI18N\n jLabel1.setText(\"Sing in\");\n\n btn_registro.setBackground(new java.awt.Color(254, 254, 254));\n btn_registro.setFont(new java.awt.Font(\"Arimo\", 1, 18)); // NOI18N\n btn_registro.setForeground(new java.awt.Color(0, 55, 255));\n btn_registro.setText(\"Registrarme\");\n btn_registro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_registroActionPerformed(evt);\n }\n });\n\n btn_cancel.setBackground(new java.awt.Color(254, 254, 254));\n btn_cancel.setFont(new java.awt.Font(\"Ubuntu\", 0, 10)); // NOI18N\n btn_cancel.setForeground(new java.awt.Color(0, 34, 255));\n btn_cancel.setText(\"Cancelar\");\n btn_cancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_cancelActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"Usuario\");\n\n jLabel5.setText(\"Contraseña\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(tf_user, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn_registro)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btn_cancel))\n .addComponent(tf_password, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(45, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(164, 164, 164)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tf_user, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(2, 2, 2)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tf_password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27)\n .addComponent(btn_registro)\n .addGap(18, 18, 18)\n .addComponent(btn_cancel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel3.setToolTipText(\"\");\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/public_pkg/fondoappmin.png\"))); // NOI18N\n jLabel4.setText(\"jLabel3\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 594, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 6, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n name = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jPasswordField1 = new javax.swing.JPasswordField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setBackground(new java.awt.Color(0, 0, 0));\n jButton1.setFont(new java.awt.Font(\"Lucida Handwriting\", 1, 18)); // NOI18N\n jButton1.setForeground(new java.awt.Color(173, 55, 0));\n jButton1.setText(\"Click here for a surprise\");\n jButton1.setBorder(null);\n jButton1.setBorderPainted(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n name.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nameActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"your name\");\n\n jPasswordField1.setText(\"jPasswordField1\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(41, 41, 41)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 289, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(70, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(84, 84, 84)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(102, 102, 102))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(40, 40, 40))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jPasswordField1 = new javax.swing.JPasswordField();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel4.setForeground(new java.awt.Color(102, 0, 0));\n jLabel4.setText(\"YOU HAVE SUCCESSFULLY\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 50, -1, -1));\n\n jLabel5.setForeground(new java.awt.Color(102, 0, 0));\n jLabel5.setText(\"REGISTERED FOR\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 80, -1, -1));\n\n jLabel6.setForeground(new java.awt.Color(102, 0, 0));\n jLabel6.setText(\"THE LARGEST AUCTIONING\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, -1, -1));\n\n jLabel7.setForeground(new java.awt.Color(102, 0, 51));\n jLabel7.setText(\"PORTAL\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 100, 50, 20));\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 3, 12)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(0, 102, 102));\n jLabel8.setText(\"USER ID\");\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 160, 60, -1));\n getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 150, 110, -1));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 3, 12)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(0, 102, 51));\n jLabel9.setText(\"PASSWORD\");\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 210, 80, -1));\n getContentPane().add(jPasswordField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 200, 110, 20));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 0, 204));\n jLabel1.setText(\"HOME\");\n jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel1MouseClicked(evt);\n }\n });\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 10, 40, 30));\n\n jButton1.setText(\"LOGIN\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 250, -1, -1));\n\n jButton2.setText(\"EXIT\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 250, -1, -1));\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/auction-image.jpg\"))); // NOI18N\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 350, 290));\n\n pack();\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==clear)\r\n\t\t{\r\n\t\t\ttname.setText(\"\");\r\n\t\t\ttpwd.setText(\"\");\r\n\t\t}\r\n\t\telse if(e.getSource()==registration)\r\n\t\t{\r\n\t\t\tRegist rg=new Regist();\r\n\t\t\t\trg.setVisible(true);\r\n\t\t\t\trg.setSize(500,500);\r\n\t\t\t\trg.setTitle(\"Registration Page\");\r\n\t\t}\r\n\t\telse if(e.getSource()==exit)\r\n\t\t{\r\n\t\t\tthis.setVisible(false);\r\n\t\t}\r\n\t\telse if(e.getSource()==login)\r\n\t\t{\r\n\t\t\tConnection con=null;\r\n\t\t\tStatement stmt=null;\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tString uname=tname.getText();\r\n\t\t\t\tString upwd=tpwd.getText();\r\n\t\t\t\tString sql=\"select *from logininfo where username='\"+uname+\"' and password='\"+upwd+\"'\";\r\n\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\tcon=DBConnection.getConnection();\r\n\t\t\t\tstmt=con.createStatement();\r\n\t\t\t\t\r\n\t\t\t\tResultSet rs=stmt.executeQuery(sql);\r\n\t\t\t\tif(rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//jd.show();\r\n\t\t\t\t\tString msg=\"Login success\";\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, msg);\r\n\t\t\t\t\tthis.setVisible(false);\r\n\t\t\t\t\tInformationSecurity IS=new InformationSecurity();// object created for frame\r\n\t\t\t\t\t\r\n\t\t\t\t\tIS.setVisible(true);\r\n\t\t\t\t\tIS.setSize(500,500);\r\n\t\t\t\t\tIS.setTitle(\"InformationSecurity\");\r\n\t\t\t\t // md.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tString msg=\"Login Unsuccess\";\r\n\t\t\t\t\tJOptionPane.showConfirmDialog(null, msg);\r\n\t\t\t\t\tthis.setVisible(false);\r\n\t\t\t\t\tInfoPiracy login=new InfoPiracy();\r\n\t\t\t\t\tlogin.setVisible(true);\r\n\t\t\t\t\tlogin.setTitle(\"LoginPage\");\r\n\t\t\t\t\tlogin.setSize(1500,1500);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t}\r\n\t\t\tcatch(SQLException ex)\r\n\t\t\t{\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabelClose = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabelMin = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jb = new javax.swing.JTextField();\n jButton_Register_ = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n fname = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n flastname = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n j_ad = new javax.swing.JTextArea();\n j_Birth = new javax.swing.JTextField();\n jshuma = new javax.swing.JTextField();\n jToggleButton1 = new javax.swing.JToggleButton();\n jLabel3 = new javax.swing.JLabel();\n monedha = new javax.swing.JTextField();\n\n jLabel1.setText(\"jLabel1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel1.setBackground(new java.awt.Color(248, 148, 6));\n\n jLabelClose.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabelClose.setForeground(new java.awt.Color(255, 255, 255));\n jLabelClose.setText(\"X\");\n jLabelClose.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabelClose.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelCloseMouseClicked(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Regjistrim Klienti BankaKESH\");\n\n jLabelMin.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabelMin.setForeground(new java.awt.Color(255, 255, 255));\n jLabelMin.setText(\"-\");\n jLabelMin.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabelMin.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelMinMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(423, Short.MAX_VALUE)\n .addComponent(jLabelMin)\n .addGap(18, 18, 18)\n .addComponent(jLabelClose)\n .addGap(21, 21, 21))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jLabel2)\n .addContainerGap(324, Short.MAX_VALUE)))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelMin, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)\n .addComponent(jLabelClose))\n .addContainerGap())\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)\n .addContainerGap()))\n );\n\n jPanel2.setBackground(new java.awt.Color(44, 62, 80));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(236, 240, 241));\n jLabel4.setText(\"Emri i babait:\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(236, 240, 241));\n jLabel5.setText(\"Shuma :\");\n\n jb.setBackground(new java.awt.Color(108, 122, 137));\n jb.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jb.setForeground(new java.awt.Color(228, 241, 254));\n\n jButton_Register_.setBackground(new java.awt.Color(34, 167, 240));\n jButton_Register_.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton_Register_.setForeground(new java.awt.Color(255, 255, 255));\n jButton_Register_.setText(\"Register\");\n jButton_Register_.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_Register_ActionPerformed(evt);\n }\n });\n\n jButton2.setBackground(new java.awt.Color(242, 38, 19));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton2.setForeground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"Cancel\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(236, 240, 241));\n jLabel6.setText(\"First Name:\");\n\n fname.setBackground(new java.awt.Color(108, 122, 137));\n fname.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n fname.setForeground(new java.awt.Color(228, 241, 254));\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(236, 240, 241));\n jLabel7.setText(\"Last Name:\");\n\n flastname.setBackground(new java.awt.Color(108, 122, 137));\n flastname.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n flastname.setForeground(new java.awt.Color(228, 241, 254));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(236, 240, 241));\n jLabel9.setText(\"BirthDate:\");\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(236, 240, 241));\n jLabel10.setText(\"Address:\");\n\n j_ad.setBackground(new java.awt.Color(108, 122, 137));\n j_ad.setColumns(20);\n j_ad.setForeground(new java.awt.Color(228, 241, 254));\n j_ad.setRows(5);\n jScrollPane1.setViewportView(j_ad);\n\n jToggleButton1.setText(\"Shiko Klientet\");\n jToggleButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButton1ActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Monedha:\");\n\n monedha.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n monedhaActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(fname, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(flastname, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(j_Birth, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)\n .addComponent(jshuma)\n .addComponent(jb)\n .addComponent(monedha)))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addComponent(jLabel10)\n .addGap(25, 25, 25)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(25, 25, 25)\n .addComponent(jButton_Register_, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jToggleButton1)))\n .addContainerGap(136, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(51, 51, 51)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(fname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(flastname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jshuma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(monedha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel9)\n .addComponent(j_Birth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton_Register_, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jToggleButton1)\n .addGap(28, 28, 28))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n txtApellido = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtNombre = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n txtTel = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtEmail = new javax.swing.JTextField();\n txtUsername = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n txtPassword = new javax.swing.JPasswordField();\n jLabel7 = new javax.swing.JLabel();\n txtConfirmPassword = new javax.swing.JPasswordField();\n btnRegistrarse = new javax.swing.JButton();\n btnBack = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel1.setBackground(new java.awt.Color(112, 111, 211));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel9.setBackground(new java.awt.Color(255, 255, 255));\n jLabel9.setFont(new java.awt.Font(\"Arial\", 0, 48)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\n jLabel9.setText(\"Registrarse\");\n jPanel1.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 180, -1, -1));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 440, 442));\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n txtApellido.setBackground(new java.awt.Color(255, 255, 255));\n txtApellido.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n txtApellido.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel2.add(txtApellido, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 70, 250, 30));\n\n jLabel3.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(0, 0, 0));\n jLabel3.setText(\"Apellido:\");\n jPanel2.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 210, -1));\n\n txtNombre.setBackground(new java.awt.Color(255, 255, 255));\n txtNombre.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n txtNombre.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel2.add(txtNombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 20, 260, 30));\n\n jLabel2.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(0, 0, 0));\n jLabel2.setText(\"Nombre:\");\n jPanel2.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, -1, -1));\n\n jLabel4.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 0, 0));\n jLabel4.setText(\"Telefono:\");\n jPanel2.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, 230, -1));\n\n txtTel.setBackground(new java.awt.Color(255, 255, 255));\n txtTel.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n txtTel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel2.add(txtTel, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 110, 250, 30));\n\n jLabel5.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(0, 0, 0));\n jLabel5.setText(\"Correo:\");\n jPanel2.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 150, 180, -1));\n\n txtEmail.setBackground(new java.awt.Color(255, 255, 255));\n txtEmail.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n txtEmail.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel2.add(txtEmail, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 150, 260, 30));\n\n txtUsername.setBackground(new java.awt.Color(255, 255, 255));\n txtUsername.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n txtUsername.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel2.add(txtUsername, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 200, 230, 30));\n\n jLabel8.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(0, 0, 0));\n jLabel8.setText(\"Username:\");\n jPanel2.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 200, -1, -1));\n\n jLabel6.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(0, 0, 0));\n jLabel6.setText(\"Contraseña:\");\n jPanel2.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 260, -1, -1));\n\n txtPassword.setBackground(new java.awt.Color(255, 255, 255));\n txtPassword.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n txtPassword.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel2.add(txtPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 260, 220, 30));\n\n jLabel7.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(0, 0, 0));\n jLabel7.setText(\"Confirmar Contraseña:\");\n jPanel2.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 320, -1, -1));\n\n txtConfirmPassword.setBackground(new java.awt.Color(255, 255, 255));\n txtConfirmPassword.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n txtConfirmPassword.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel2.add(txtConfirmPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 320, 210, 30));\n\n btnRegistrarse.setBackground(new java.awt.Color(108, 92, 231));\n btnRegistrarse.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n btnRegistrarse.setForeground(new java.awt.Color(255, 255, 255));\n btnRegistrarse.setText(\"Resgistrarse\");\n btnRegistrarse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRegistrarseActionPerformed(evt);\n }\n });\n jPanel2.add(btnRegistrarse, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 390, -1, -1));\n\n btnBack.setBackground(new java.awt.Color(108, 92, 231));\n btnBack.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n btnBack.setForeground(new java.awt.Color(255, 255, 255));\n btnBack.setText(\"Iniciar Sesion\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n jPanel2.add(btnBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 390, -1, -1));\n\n getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(439, 0, 520, 442));\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jPanel1 = new javax.swing.JPanel();\r\n jPanel2 = new javax.swing.JPanel();\r\n btn_Registrar = new javax.swing.JButton();\r\n btn_cancelar = new javax.swing.JButton();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n jLabel5 = new javax.swing.JLabel();\r\n jLabel6 = new javax.swing.JLabel();\r\n jLabel7 = new javax.swing.JLabel();\r\n jLabel8 = new javax.swing.JLabel();\r\n t_txt_cedulaV = new javax.swing.JTextField();\r\n txt_nombreV = new javax.swing.JTextField();\r\n txt_apellidoV = new javax.swing.JTextField();\r\n txt_tlfV = new javax.swing.JTextField();\r\n btn_Examninar = new javax.swing.JButton();\r\n lbl_fotoV = new javax.swing.JLabel();\r\n fechaNaciV = new com.toedter.calendar.JDateChooser();\r\n jLabel10 = new javax.swing.JLabel();\r\n jpas_vendedor = new javax.swing.JPasswordField();\r\n jLabel11 = new javax.swing.JLabel();\r\n jpasw_vendedor1 = new javax.swing.JPasswordField();\r\n lbl_codigo = new javax.swing.JLabel();\r\n jLabel9 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n txt_CorreoV = new javax.swing.JTextField();\r\n lbl_text1 = new javax.swing.JLabel();\r\n jLabel12 = new javax.swing.JLabel();\r\n\r\n jPanel1.setBackground(new java.awt.Color(151, 28, 28));\r\n\r\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\r\n\r\n btn_Registrar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/iconos/save.png\"))); // NOI18N\r\n btn_Registrar.setText(\"Registrar\");\r\n btn_Registrar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btn_RegistrarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btn_cancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/iconos/borrar.png\"))); // NOI18N\r\n btn_cancelar.setText(\"Cancelar\");\r\n\r\n jLabel2.setText(\"Nombre:\");\r\n\r\n jLabel3.setText(\"Apellido:\");\r\n\r\n jLabel6.setText(\"Telefono:\");\r\n\r\n jLabel7.setText(\"Fecha de Nacimiento:\");\r\n\r\n jLabel8.setText(\"Cédula:\");\r\n\r\n t_txt_cedulaV.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n t_txt_cedulaVActionPerformed(evt);\r\n }\r\n });\r\n\r\n txt_nombreV.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n txt_nombreVActionPerformed(evt);\r\n }\r\n });\r\n\r\n txt_apellidoV.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n txt_apellidoVActionPerformed(evt);\r\n }\r\n });\r\n\r\n btn_Examninar.setText(\"Examinar\");\r\n\r\n lbl_fotoV.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\r\n\r\n jLabel10.setText(\"Contraseña:\");\r\n\r\n jLabel11.setText(\"Confirme Contraseña: \");\r\n\r\n jpasw_vendedor1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jpasw_vendedor1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n lbl_codigo.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\r\n lbl_codigo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n\r\n jLabel9.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\r\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n jLabel9.setText(\"ID:\");\r\n\r\n jLabel4.setText(\"Correo:\");\r\n\r\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\r\n jPanel2.setLayout(jPanel2Layout);\r\n jPanel2Layout.setHorizontalGroup(\r\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGap(25, 25, 25)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jLabel8)\r\n .addComponent(jLabel2)\r\n .addComponent(jLabel3)\r\n .addComponent(jLabel6))\r\n .addGap(32, 32, 32)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(t_txt_cedulaV, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(txt_nombreV, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(txt_apellidoV, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(txt_tlfV, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(0, 83, Short.MAX_VALUE))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel11)\r\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(txt_CorreoV)\r\n .addComponent(jpas_vendedor)\r\n .addComponent(fechaNaciV, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jpasw_vendedor1))))\r\n .addGap(151, 151, 151)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(btn_Examninar)\r\n .addComponent(lbl_fotoV, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jLabel5)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(lbl_codigo, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(50, 50, 50))\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()\r\n .addGap(0, 0, Short.MAX_VALUE)\r\n .addComponent(btn_Registrar)\r\n .addGap(44, 44, 44)\r\n .addComponent(btn_cancelar)\r\n .addGap(71, 71, 71)))\r\n .addGap(40, 40, 40))\r\n );\r\n jPanel2Layout.setVerticalGroup(\r\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGap(76, 76, 76)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel8)\r\n .addComponent(t_txt_cedulaV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(21, 21, 21)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel2)\r\n .addComponent(txt_nombreV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGap(33, 33, 33)\r\n .addComponent(lbl_fotoV, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(btn_Examninar)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(txt_apellidoV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel3)))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(txt_tlfV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel6))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel7)\r\n .addComponent(fechaNaciV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel10)\r\n .addComponent(jpas_vendedor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(32, 32, 32)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel11)\r\n .addComponent(jpasw_vendedor1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(14, 14, 14)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addComponent(jLabel5)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(lbl_codigo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE))\r\n .addGap(129, 129, 129))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(txt_CorreoV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(btn_Registrar)\r\n .addComponent(btn_cancelar))\r\n .addGap(36, 36, 36))))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addComponent(jLabel4)\r\n .addContainerGap(166, Short.MAX_VALUE))))\r\n );\r\n\r\n lbl_text1.setBackground(new java.awt.Color(166, 166, 35));\r\n lbl_text1.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 18)); // NOI18N\r\n lbl_text1.setForeground(new java.awt.Color(255, 255, 255));\r\n lbl_text1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n lbl_text1.setText(\"Registro Vendedor\");\r\n\r\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\r\n jLabel12.setForeground(new java.awt.Color(255, 255, 255));\r\n jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/iconos/iconoGenral.png\"))); // NOI18N\r\n jLabel12.setText(\"EcuCinema\");\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(lbl_text1, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(63, 63, 63)\r\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\r\n .addGap(61, 61, 61)\r\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap(60, Short.MAX_VALUE))\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(21, 21, 21)\r\n .addComponent(lbl_text1))\r\n .addComponent(jLabel12))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n\r\n pack();\r\n }", "private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTUserName = new javax.swing.JTextField();\n jPassword1 = new javax.swing.JPasswordField();\n jPassword2 = new javax.swing.JPasswordField();\n jLUserName = new javax.swing.JLabel();\n jLPassword1 = new javax.swing.JLabel();\n jLPassword2 = new javax.swing.JLabel();\n jBRegister = new javax.swing.JButton();\n jBBack = new javax.swing.JButton();\n jLUserError = new javax.swing.JLabel();\n jLPassword1Error = new javax.swing.JLabel();\n jLPassword2Error = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n\n setBackground(new Color(0,0,0,0));\n setForeground(new java.awt.Color(255, 0, 0));\n\n jTUserName.setText(\"Usuari\");\n jTUserName.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTUserNameMouseClicked(evt);\n }\n });\n\n jPassword1.setText(\"jPasswordField1\");\n jPassword1.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jPassword1FocusGained(evt);\n }\n });\n jPassword1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jPassword1KeyReleased(evt);\n }\n });\n\n jPassword2.setText(\"jPasswordField1\");\n jPassword2.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jPassword2FocusGained(evt);\n }\n });\n jPassword2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jPassword2KeyReleased(evt);\n }\n });\n\n jLUserName.setForeground(new java.awt.Color(255, 255, 255));\n jLUserName.setText(\"Usuari:\");\n\n jLPassword1.setForeground(new java.awt.Color(255, 255, 255));\n jLPassword1.setText(\"Contrasenya:\");\n\n jLPassword2.setForeground(new java.awt.Color(255, 255, 255));\n jLPassword2.setText(\"Repeteix contrasenya:\");\n\n jBRegister.setText(\"OK\");\n jBRegister.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jBRegisterMouseClicked(evt);\n }\n });\n\n jBBack.setText(\"ENRERE\");\n jBBack.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jBBackMouseClicked(evt);\n }\n });\n\n jLUserError.setForeground(new java.awt.Color(255, 0, 0));\n\n jLPassword1Error.setForeground(new java.awt.Color(255, 0, 0));\n\n jLPassword2Error.setForeground(new java.awt.Color(255, 0, 0));\n\n jLabel1.setFont(new java.awt.Font(\"Cantarell\", 1, 36)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"NOU USUARI\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 186, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLUserError, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLPassword1Error, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLPassword2Error, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPassword2, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPassword1, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jBBack)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLPassword1)\n .addComponent(jLPassword2)\n .addComponent(jLUserName)))\n .addGap(186, 186, 186))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(jLabel1)\n .addGap(35, 35, 35)\n .addComponent(jLUserName)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLUserError, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLPassword1)\n .addGap(4, 4, 4)\n .addComponent(jPassword1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLPassword1Error, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLPassword2)\n .addGap(2, 2, 2)\n .addComponent(jPassword2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLPassword2Error, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jBBack, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(81, Short.MAX_VALUE))\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"TARIFAS\");\n\n jButton1.setText(\"Guardar y Regresar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jTextField1.setText(\"jTextField1\");\n jTextField1.setMinimumSize(new java.awt.Dimension(20, 20));\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jTextField2.setText(\"jTextField1\");\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"HORA\");\n\n jLabel3.setText(\"MEDIA HORA\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(26, 26, 26))\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(63, 63, 63))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(38, 38, 38)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 99, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n pack();\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tString fn = tffname.getText();\r\n\t\t\tString ln = tflname.getText();\r\n\t\t\tString eml= tfemail.getText();\r\n\t\t\tString phn = tfphone.getText();\r\n\t\t\tString user = tfusername.getText();\r\n\t\t\tString pass = tfpasswrd.getText();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tstatement.executeUpdate(\"INSERT INTO register VALUES('\"+fn+\"','\"+ln+\"','\"+eml+\"','\"+phn+\"','\"+user+\"','\"+pass+\"')\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Panel1Login = new javax.swing.JPanel();\n Panel2Login = new javax.swing.JPanel();\n lblUsuario = new javax.swing.JLabel();\n lblContrasena = new javax.swing.JLabel();\n btnIngresar = new javax.swing.JButton();\n txtCedulaLogin = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n jSeparator2 = new javax.swing.JSeparator();\n txtContrasenaLogin = new javax.swing.JPasswordField();\n jLabel4 = new javax.swing.JLabel();\n btnRegistrarse = new javax.swing.JButton();\n btnModoNocturno = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Panel1Login.setBackground(new java.awt.Color(102, 0, 51));\n\n Panel2Login.setBackground(new java.awt.Color(204, 0, 51));\n Panel2Login.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblUsuario.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n lblUsuario.setForeground(new java.awt.Color(255, 255, 255));\n lblUsuario.setText(\"Nombre Usuario:\");\n Panel2Login.add(lblUsuario, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 90, -1, -1));\n\n lblContrasena.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n lblContrasena.setForeground(new java.awt.Color(255, 255, 255));\n lblContrasena.setText(\"Contraseña:\");\n Panel2Login.add(lblContrasena, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 160, -1, -1));\n\n btnIngresar.setBackground(new java.awt.Color(255, 0, 51));\n btnIngresar.setForeground(new java.awt.Color(255, 255, 255));\n btnIngresar.setText(\"Ingresar\");\n btnIngresar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnIngresarActionPerformed(evt);\n }\n });\n Panel2Login.add(btnIngresar, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 190, -1, -1));\n\n txtCedulaLogin.setBackground(new java.awt.Color(204, 0, 51));\n txtCedulaLogin.setForeground(new java.awt.Color(255, 255, 255));\n txtCedulaLogin.setBorder(null);\n Panel2Login.add(txtCedulaLogin, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 80, 240, 30));\n\n jSeparator1.setForeground(new java.awt.Color(255, 255, 255));\n Panel2Login.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 180, 230, 20));\n\n jSeparator2.setForeground(new java.awt.Color(255, 255, 255));\n Panel2Login.add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 110, 230, 20));\n\n txtContrasenaLogin.setBackground(new java.awt.Color(204, 0, 51));\n txtContrasenaLogin.setForeground(new java.awt.Color(255, 255, 255));\n txtContrasenaLogin.setBorder(null);\n txtContrasenaLogin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtContrasenaLoginActionPerformed(evt);\n }\n });\n Panel2Login.add(txtContrasenaLogin, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 150, 230, 30));\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Vista/Iconos/icons8-usuario-masculino-en-círculo-45.png\"))); // NOI18N\n Panel2Login.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 20, -1, -1));\n\n btnRegistrarse.setBackground(new java.awt.Color(255, 0, 51));\n btnRegistrarse.setForeground(new java.awt.Color(255, 255, 255));\n btnRegistrarse.setText(\"Registrarse\");\n Panel2Login.add(btnRegistrarse, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 230, -1, -1));\n\n btnModoNocturno.setText(\"Modo Nocturno\");\n\n javax.swing.GroupLayout Panel1LoginLayout = new javax.swing.GroupLayout(Panel1Login);\n Panel1Login.setLayout(Panel1LoginLayout);\n Panel1LoginLayout.setHorizontalGroup(\n Panel1LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel1LoginLayout.createSequentialGroup()\n .addGap(177, 177, 177)\n .addComponent(Panel2Login, javax.swing.GroupLayout.PREFERRED_SIZE, 498, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(150, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Panel1LoginLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnModoNocturno)\n .addGap(36, 36, 36))\n );\n Panel1LoginLayout.setVerticalGroup(\n Panel1LoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel1LoginLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(btnModoNocturno)\n .addGap(45, 45, 45)\n .addComponent(Panel2Login, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(106, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Panel1Login, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Panel1Login, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getActionCommand().equals(\"注册\")) {\n try {\n register();\n } catch (IOException e1) {\n e1.printStackTrace();\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n } else if (e.getActionCommand().equals(\"重置\")) {\n clear();\n }\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jtxtNombre = new javax.swing.JTextField();\n jtxtApellido = new javax.swing.JTextField();\n jtxtUsuario = new javax.swing.JTextField();\n jtxtContrasenia = new javax.swing.JTextField();\n jbRegistrar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Nombre:\");\n\n jLabel2.setText(\"Apellido:\");\n\n jLabel3.setText(\"Usuario:\");\n\n jLabel4.setText(\"Contraseña:\");\n\n jbRegistrar.setText(\"Registrar\");\n jbRegistrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbRegistrarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(361, 361, 361)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addGap(54, 54, 54)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jtxtNombre)\n .addComponent(jtxtApellido)\n .addComponent(jtxtUsuario)\n .addComponent(jtxtContrasenia, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(438, 438, 438)\n .addComponent(jbRegistrar)))\n .addContainerGap(441, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(105, 105, 105)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jtxtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jtxtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jtxtUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jtxtContrasenia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(39, 39, 39)\n .addComponent(jbRegistrar)\n .addContainerGap(382, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n txtusername = new javax.swing.JTextField();\n jpassword = new javax.swing.JPasswordField();\n btnlogin = new javax.swing.JButton();\n btnreg = new javax.swing.JButton();\n btnexit = new javax.swing.JButton();\n lbusername = new javax.swing.JLabel();\n lbpassword = new javax.swing.JLabel();\n lbcpassword = new javax.swing.JLabel();\n jcpassword = new javax.swing.JPasswordField();\n lbeno = new javax.swing.JLabel();\n txteno = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(665, 385));\n setPreferredSize(new java.awt.Dimension(665, 385));\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(240, 87, 2));\n jPanel1.setLayout(null);\n\n jPanel2.setBackground(new java.awt.Color(240, 159, 37));\n jPanel2.setPreferredSize(new java.awt.Dimension(670, 340));\n jPanel2.setLayout(null);\n jPanel2.add(txtusername);\n txtusername.setBounds(290, 60, 200, 30);\n jPanel2.add(jpassword);\n jpassword.setBounds(290, 100, 200, 30);\n\n btnlogin.setBackground(new java.awt.Color(102, 255, 102));\n btnlogin.setFont(new java.awt.Font(\"Wide Latin\", 0, 14)); // NOI18N\n btnlogin.setText(\"LOGIN\");\n jPanel2.add(btnlogin);\n btnlogin.setBounds(170, 200, 140, 40);\n\n btnreg.setBackground(new java.awt.Color(102, 255, 204));\n btnreg.setFont(new java.awt.Font(\"Wide Latin\", 0, 14)); // NOI18N\n btnreg.setText(\"REGISTER\");\n btnreg.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnregActionPerformed(evt);\n }\n });\n jPanel2.add(btnreg);\n btnreg.setBounds(330, 200, 210, 40);\n\n btnexit.setBackground(new java.awt.Color(255, 255, 255));\n btnexit.setFont(new java.awt.Font(\"Wide Latin\", 0, 14)); // NOI18N\n btnexit.setForeground(new java.awt.Color(0, 51, 204));\n btnexit.setText(\"EXIT\");\n btnexit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnexitActionPerformed(evt);\n }\n });\n jPanel2.add(btnexit);\n btnexit.setBounds(490, 250, 160, 30);\n\n lbusername.setFont(new java.awt.Font(\"Wide Latin\", 0, 12)); // NOI18N\n lbusername.setText(\"USERNAME\");\n jPanel2.add(lbusername);\n lbusername.setBounds(140, 70, 150, 13);\n\n lbpassword.setFont(new java.awt.Font(\"Wide Latin\", 0, 12)); // NOI18N\n lbpassword.setText(\"PASSWORD\");\n jPanel2.add(lbpassword);\n lbpassword.setBounds(140, 110, 140, 13);\n\n lbcpassword.setFont(new java.awt.Font(\"Wide Latin\", 0, 10)); // NOI18N\n lbcpassword.setText(\"CONFIRM PASSWORD\");\n jPanel2.add(lbcpassword);\n lbcpassword.setBounds(70, 140, 270, 20);\n jPanel2.add(jcpassword);\n jcpassword.setBounds(290, 140, 200, 30);\n\n lbeno.setFont(new java.awt.Font(\"Wide Latin\", 0, 10)); // NOI18N\n lbeno.setText(\"EMPLOYEMENT NO\");\n jPanel2.add(lbeno);\n lbeno.setBounds(90, 30, 200, 20);\n jPanel2.add(txteno);\n txteno.setBounds(290, 20, 200, 30);\n jPanel2.add(jLabel2);\n jLabel2.setBounds(190, 20, 280, 290);\n\n jPanel1.add(jPanel2);\n jPanel2.setBounds(0, 60, 670, 340);\n\n jLabel1.setFont(new java.awt.Font(\"Wide Latin\", 0, 14)); // NOI18N\n jLabel1.setText(\"LUXURY HOTEL LOGIN/ACCOUNT CREATION \");\n jPanel1.add(jLabel1);\n jLabel1.setBounds(10, 20, 640, 30);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 671, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void cnpjFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n bxNama = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n bxUser = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n tblRegis = new javax.swing.JButton();\n bxPas = new javax.swing.JPasswordField();\n jLabel5 = new javax.swing.JLabel();\n bxPaslang = new javax.swing.JPasswordField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Rgistrasi\");\n\n jLabel2.setText(\"Masukkan Nama\");\n\n bxNama.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bxNamaActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Masukkan Username\");\n\n jLabel4.setText(\"Masukkan Password\");\n\n tblRegis.setText(\"Register\");\n tblRegis.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tblRegisActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Masukkan Ulang Password\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(228, 228, 228)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(tblRegis))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addGap(140, 140, 140)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(bxNama)\n .addComponent(bxUser)\n .addComponent(bxPas)\n .addComponent(bxPaslang, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE))))\n .addContainerGap(149, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bxNama, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(bxUser, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)\n .addGap(3, 3, 3)))\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(bxPas, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(4, 4, 4)))\n .addGap(18, 18, 18)\n .addComponent(bxPaslang, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)\n .addComponent(tblRegis)\n .addContainerGap())\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Log_btn = new javax.swing.JButton();\n reg_btn = new javax.swing.JButton();\n pack_btn = new javax.swing.JButton();\n exit = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Kazi Gym Desk\");\n setBounds(new java.awt.Rectangle(300, 150, 700, 500));\n setPreferredSize(new java.awt.Dimension(700, 500));\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Log_btn.setBackground(new java.awt.Color(0, 0, 0));\n Log_btn.setFont(new java.awt.Font(\"Niagara Engraved\", 1, 48)); // NOI18N\n Log_btn.setForeground(new java.awt.Color(255, 0, 0));\n Log_btn.setText(\"Login\");\n Log_btn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n Log_btnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n Log_btnMouseExited(evt);\n }\n });\n Log_btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Log_btnActionPerformed(evt);\n }\n });\n getContentPane().add(Log_btn, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 60, 220, 70));\n\n reg_btn.setBackground(new java.awt.Color(0, 0, 0));\n reg_btn.setFont(new java.awt.Font(\"Niagara Engraved\", 1, 48)); // NOI18N\n reg_btn.setForeground(new java.awt.Color(255, 0, 0));\n reg_btn.setText(\"Register\");\n reg_btn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n reg_btnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n reg_btnMouseExited(evt);\n }\n });\n reg_btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n reg_btnActionPerformed(evt);\n }\n });\n getContentPane().add(reg_btn, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 170, 220, 70));\n\n pack_btn.setBackground(new java.awt.Color(0, 0, 0));\n pack_btn.setFont(new java.awt.Font(\"Niagara Engraved\", 1, 48)); // NOI18N\n pack_btn.setForeground(new java.awt.Color(255, 0, 0));\n pack_btn.setText(\"Package\");\n pack_btn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n pack_btnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n pack_btnMouseExited(evt);\n }\n });\n pack_btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pack_btnActionPerformed(evt);\n }\n });\n getContentPane().add(pack_btn, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 280, 220, 70));\n\n exit.setBackground(new java.awt.Color(0, 0, 0));\n exit.setFont(new java.awt.Font(\"Niagara Engraved\", 1, 36)); // NOI18N\n exit.setForeground(new java.awt.Color(255, 0, 0));\n exit.setText(\"Exit\");\n exit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n exitMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n exitMouseExited(evt);\n }\n });\n exit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exitActionPerformed(evt);\n }\n });\n getContentPane().add(exit, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 410, 120, 40));\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/project_trial/Pic/bg2.png\"))); // NOI18N\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(-6, 0, 710, 500));\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n r0 = new javax.swing.JTextField();\n r1 = new javax.swing.JTextField();\n r2 = new javax.swing.JTextField();\n r3 = new javax.swing.JTextField();\n r4 = new javax.swing.JTextField();\n r5 = new javax.swing.JTextField();\n r6 = new javax.swing.JTextField();\n r7 = new javax.swing.JTextField();\n r8 = new javax.swing.JTextField();\n r9 = new javax.swing.JTextField();\n r0label = new javax.swing.JLabel();\n r1label = new javax.swing.JLabel();\n r2label = new javax.swing.JLabel();\n r3label = new javax.swing.JLabel();\n r4label = new javax.swing.JLabel();\n r5label = new javax.swing.JLabel();\n r6label = new javax.swing.JLabel();\n r7label = new javax.swing.JLabel();\n r8label = new javax.swing.JLabel();\n r9label = new javax.swing.JLabel();\n stack = new javax.swing.JTextField();\n stackLabel = new javax.swing.JLabel();\n cmprLabel = new javax.swing.JLabel();\n cmpr = new javax.swing.JTextField();\n pcLabel = new javax.swing.JLabel();\n pc = new javax.swing.JTextField();\n\n r0.setToolTipText(\"Register\");\n r0.setActionCommand(\"<Not Set>\");\n r0.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r0ActionPerformed(evt);\n }\n });\n\n r1.setToolTipText(\"Register\");\n r1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r1ActionPerformed(evt);\n }\n });\n\n r2.setToolTipText(\"Register\");\n r2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r2ActionPerformed(evt);\n }\n });\n\n r3.setToolTipText(\"Register\");\n r3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r3ActionPerformed(evt);\n }\n });\n\n r4.setToolTipText(\"Register\");\n r4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r4ActionPerformed(evt);\n }\n });\n\n r5.setToolTipText(\"Register\");\n r5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r5ActionPerformed(evt);\n }\n });\n\n r6.setToolTipText(\"Register\");\n r6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r6ActionPerformed(evt);\n }\n });\n\n r7.setToolTipText(\"Register\");\n r7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r7ActionPerformed(evt);\n }\n });\n\n r8.setToolTipText(\"Register\");\n r8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r8ActionPerformed(evt);\n }\n });\n\n r9.setToolTipText(\"Register\");\n r9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n r9ActionPerformed(evt);\n }\n });\n\n r0label.setText(\"r0:\");\n r0label.setToolTipText(\"Register\");\n\n r1label.setText(\"r1:\");\n r1label.setToolTipText(\"Register\");\n\n r2label.setText(\"r2:\");\n r2label.setToolTipText(\"Register\");\n\n r3label.setText(\"r3:\");\n r3label.setToolTipText(\"Register\");\n\n r4label.setText(\"r4:\");\n r4label.setToolTipText(\"Register\");\n\n r5label.setText(\"r5:\");\n r5label.setToolTipText(\"Register\");\n\n r6label.setText(\"r6:\");\n r6label.setToolTipText(\"Register\");\n\n r7label.setText(\"r7:\");\n r7label.setToolTipText(\"Register\");\n\n r8label.setText(\"r8:\");\n r8label.setToolTipText(\"Register\");\n\n r9label.setText(\"r9:\");\n r9label.setToolTipText(\"Register\");\n\n stack.setToolTipText(\"Stack Register: 0 - OK, 1 - FULL, 2 - EMPTY\");\n stack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n stackActionPerformed(evt);\n }\n });\n\n stackLabel.setText(\"Stack:\");\n stackLabel.setToolTipText(\"Stack Register: 0 - OK, 1 - FULL, 2 - EMPTY\");\n\n cmprLabel.setText(\"Cmpr:\");\n cmprLabel.setToolTipText(\"Compare Register\");\n\n cmpr.setToolTipText(\"Compare Register\");\n cmpr.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cmprActionPerformed(evt);\n }\n });\n\n pcLabel.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n pcLabel.setText(\"PC:\");\n pcLabel.setToolTipText(\"Program Counter\");\n\n pc.setToolTipText(\"Program Counter\");\n pc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pcActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(1, 1, 1)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(stackLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(stack))\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(pcLabel)\n .add(r1label)\n .add(r2label)\n .add(r3label)\n .add(r9label)\n .add(r4label)\n .add(r5label)\n .add(r6label)\n .add(r7label)\n .add(r8label)\n .add(r0label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(pc)\n .add(r0)\n .add(r1)\n .add(r2)\n .add(r3)\n .add(r4)\n .add(r5)\n .add(r6)\n .add(r7)\n .add(r8)\n .add(r9))))\n .add(1, 1, 1))\n .add(layout.createSequentialGroup()\n .add(cmprLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(cmpr, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(1, 1, 1)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(pc, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(pcLabel))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r0, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r0label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r1label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r2label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r3label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r4label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r5label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r6label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r7label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r8label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(r9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(r9label))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(stack, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(stackLabel))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(cmpr, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(cmprLabel))\n .addContainerGap())\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPasswordField1 = new javax.swing.JPasswordField();\n txtEmpNo = new javax.swing.JTextField();\n txtEmpSal = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtEmpName = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n jPasswordField2 = new javax.swing.JPasswordField();\n jPasswordField3 = new javax.swing.JPasswordField();\n jBtnBack = new javax.swing.JButton();\n jBtnAddEmp = new javax.swing.JButton();\n lblUsername = new javax.swing.JLabel();\n LblLogOut4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n\n jPasswordField1.setText(\"jPasswordField1\");\n\n txtEmpNo.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n txtEmpNo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtEmpNoActionPerformed(evt);\n }\n });\n\n txtEmpSal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtEmpSalActionPerformed(evt);\n }\n });\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(0, 102, 102));\n\n jLabel1.setBackground(new java.awt.Color(0, 0, 0));\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 36)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"REGISTER CASHIER \");\n\n jPanel2.setBackground(new java.awt.Color(0, 102, 102));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)), \"Set Employee Details\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Times New Roman\", 1, 18), new java.awt.Color(255, 255, 255))); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"EmpId\");\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"UserId\");\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Retype Password\");\n\n jComboBox1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Password\");\n\n jPasswordField2.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n\n jPasswordField3.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n\n jBtnBack.setBackground(new java.awt.Color(0, 102, 102));\n jBtnBack.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jBtnBack.setForeground(new java.awt.Color(255, 255, 255));\n jBtnBack.setText(\"Back\");\n jBtnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBtnBackActionPerformed(evt);\n }\n });\n\n jBtnAddEmp.setBackground(new java.awt.Color(0, 102, 102));\n jBtnAddEmp.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jBtnAddEmp.setForeground(new java.awt.Color(255, 255, 255));\n jBtnAddEmp.setText(\"Register\");\n jBtnAddEmp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBtnAddEmpActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(0, 0, 0)\n .addComponent(jLabel2)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtEmpName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(77, 77, 77)\n .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addComponent(jPasswordField3, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(50, 50, 50))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jBtnAddEmp, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBtnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(42, 42, 42))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(35, 35, 35)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtEmpName, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(41, 41, 41)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(38, 38, 38)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jPasswordField3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 57, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBtnAddEmp)\n .addComponent(jBtnBack))\n .addGap(0, 51, Short.MAX_VALUE))\n );\n\n lblUsername.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n lblUsername.setForeground(new java.awt.Color(255, 255, 255));\n lblUsername.setText(\"lblUsername\");\n\n LblLogOut4.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n LblLogOut4.setForeground(new java.awt.Color(255, 255, 255));\n LblLogOut4.setText(\"LogOut\");\n LblLogOut4.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n LblLogOut4MouseClicked(evt);\n }\n });\n\n jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/planetfood/gui/cashier register.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 430, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(85, 85, 85))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(lblUsername, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 813, Short.MAX_VALUE)\n .addComponent(LblLogOut4, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(19, 19, 19))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(308, 308, 308)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblUsername))\n .addComponent(LblLogOut4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(45, 45, 45)\n .addComponent(jLabel1)\n .addGap(91, 91, 91)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 391, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(50, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n title2 = new javax.swing.JLabel();\n name = new javax.swing.JButton();\n address = new javax.swing.JButton();\n contact = new javax.swing.JButton();\n gmail = new javax.swing.JButton();\n password = new javax.swing.JButton();\n enteringName = new javax.swing.JTextField();\n enteringAddress = new javax.swing.JTextField();\n enteringContact = new javax.swing.JTextField();\n enteringGmail = new javax.swing.JTextField();\n enteringpassword = new javax.swing.JPasswordField();\n resister = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n title2.setFont(new java.awt.Font(\"Arial Black\", 1, 18)); // NOI18N\n title2.setForeground(new java.awt.Color(0, 153, 102));\n title2.setText(\" Online Train Tickets Management System\");\n title2.setPreferredSize(new java.awt.Dimension(1229, 26));\n getContentPane().add(title2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 44));\n\n name.setBackground(new java.awt.Color(153, 153, 153));\n name.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n name.setText(\"Name:\");\n name.setToolTipText(\"\");\n name.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));\n name.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nameActionPerformed(evt);\n }\n });\n getContentPane().add(name, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 170, 157, -1));\n\n address.setBackground(new java.awt.Color(153, 153, 153));\n address.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n address.setText(\"Address:\");\n address.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));\n getContentPane().add(address, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 240, 157, -1));\n\n contact.setBackground(new java.awt.Color(153, 153, 153));\n contact.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n contact.setText(\"Contact No:\");\n contact.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));\n getContentPane().add(contact, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 310, -1, 36));\n\n gmail.setBackground(new java.awt.Color(153, 153, 153));\n gmail.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n gmail.setText(\"Gmail ID:\");\n gmail.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));\n getContentPane().add(gmail, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 380, 157, 34));\n\n password.setBackground(new java.awt.Color(153, 153, 153));\n password.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n password.setText(\"Password:\");\n password.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));\n getContentPane().add(password, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 450, 157, 40));\n\n enteringName.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, null, new java.awt.Color(204, 204, 204), null, null));\n enteringName.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n enteringNameActionPerformed(evt);\n }\n });\n getContentPane().add(enteringName, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 170, 350, 39));\n\n enteringAddress.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n enteringAddressActionPerformed(evt);\n }\n });\n getContentPane().add(enteringAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 240, 350, 39));\n getContentPane().add(enteringContact, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 310, 350, 36));\n\n enteringGmail.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n getContentPane().add(enteringGmail, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 380, 350, -1));\n\n enteringpassword.setFont(new java.awt.Font(\"Sitka Small\", 1, 18)); // NOI18N\n getContentPane().add(enteringpassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 450, 350, 40));\n\n resister.setBackground(new java.awt.Color(0, 0, 0));\n resister.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n resister.setForeground(new java.awt.Color(0, 102, 102));\n resister.setText(\" Resister\");\n getContentPane().add(resister, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 40, 313, 62));\n\n jButton1.setBackground(new java.awt.Color(102, 102, 102));\n jButton1.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n jButton1.setForeground(new java.awt.Color(51, 0, 102));\n jButton1.setText(\" Back\");\n jButton1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 530, 160, 40));\n\n jButton2.setBackground(new java.awt.Color(102, 102, 102));\n jButton2.setFont(new java.awt.Font(\"Sitka Small\", 1, 24)); // NOI18N\n jButton2.setForeground(new java.awt.Color(51, 0, 102));\n jButton2.setText(\" Sign in\");\n jButton2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 520, 170, 40));\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panel = new javax.swing.JPanel();\n labelNombre = new javax.swing.JLabel();\n labelDireccion = new javax.swing.JLabel();\n fieldNombre = new javax.swing.JTextField();\n fieldDireccion = new javax.swing.JTextField();\n fieldTelefono = new javax.swing.JTextField();\n labelTelefono = new javax.swing.JLabel();\n btnRegistro = new javax.swing.JButton();\n btnAtras = new javax.swing.JButton();\n labelRegistro = new javax.swing.JLabel();\n fieldUsuario = new javax.swing.JTextField();\n labelUsuario = new javax.swing.JLabel();\n labelNombre2 = new javax.swing.JLabel();\n fieldContrasena = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Registro\");\n setResizable(false);\n\n panel.setBackground(new java.awt.Color(255, 255, 255));\n\n labelNombre.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelNombre.setText(\"Nombre\");\n\n labelDireccion.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelDireccion.setText(\"Dirección\");\n\n fieldNombre.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n fieldDireccion.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n fieldTelefono.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n labelTelefono.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelTelefono.setText(\"Teléfono\");\n\n btnRegistro.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 12)); // NOI18N\n btnRegistro.setText(\"Registrarse\");\n btnRegistro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRegistroActionPerformed(evt);\n }\n });\n\n btnAtras.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 12)); // NOI18N\n btnAtras.setText(\"Atras\");\n btnAtras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAtrasActionPerformed(evt);\n }\n });\n\n labelRegistro.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/iconos/registro.png\"))); // NOI18N\n\n fieldUsuario.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n labelUsuario.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelUsuario.setText(\"Usuario\");\n\n labelNombre2.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelNombre2.setText(\"Contraseña\");\n\n fieldContrasena.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);\n panel.setLayout(panelLayout);\n panelLayout.setHorizontalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(btnAtras))\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(labelDireccion)\n .addComponent(labelNombre)\n .addComponent(labelTelefono))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fieldDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(panelLayout.createSequentialGroup()\n .addComponent(labelUsuario)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(fieldUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addComponent(btnRegistro)))\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(126, 126, 126)\n .addComponent(labelRegistro, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(labelNombre2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(fieldContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(22, Short.MAX_VALUE))\n );\n panelLayout.setVerticalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(labelRegistro)\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelNombre)\n .addComponent(fieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelUsuario)\n .addComponent(fieldUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelNombre2)\n .addComponent(fieldContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelDireccion)\n .addComponent(fieldDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelTelefono))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnRegistro)\n .addComponent(btnAtras))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public jFrame2() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.JPanel jPanel1 = new javax.swing.JPanel();\n javax.swing.JLabel loginLabel = new javax.swing.JLabel();\n javax.swing.JLabel passwordLabel = new javax.swing.JLabel();\n loginField = new javax.swing.JTextField();\n passwordField = new javax.swing.JPasswordField();\n javax.swing.JButton enterButton = new javax.swing.JButton();\n javax.swing.JButton registerButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n loginLabel.setText(\"Login\");\n\n passwordLabel.setText(\"Password\");\n\n enterButton.setText(\"Enter\");\n enterButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n enterButtonActionPerformed(evt);\n }\n });\n\n registerButton.setText(\"Register\");\n registerButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(passwordLabel)\n .addComponent(loginLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(loginField)\n .addComponent(passwordField)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(enterButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(registerButton)\n .addGap(0, 198, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(loginLabel)\n .addComponent(loginField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(passwordLabel)\n .addComponent(passwordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(enterButton)\n .addComponent(registerButton))\n .addContainerGap(207, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == btnNewButton) {\r\n\t\t\tString name = textField.getText();\r\n\t\t\tString password = passwordField.getText();\r\n\t\t\t\r\n\t\t\tif(connect(name, password)) {\r\n\t\t\t\tJOptionPane.showMessageDialog(btnNewButton, \"로그인 성공\");\r\n\t\t\t\tSelectUI selectUI = new SelectUI();\r\n\t\t\t\tselectUI.setVisible(true);\r\n\t\t\t\tsetVisible(false);\r\n\t\t\t}else {\r\n\t\t\t\tJOptionPane.showMessageDialog(btnNewButton, \"로그인 실패\");\r\n\t\t\t}\t\t\t\r\n\t\t} \r\n\t\t\r\n\t\tif (e.getSource() == btnNewButton_1) {\r\n\t\t\tWorkerUI workerUI = new WorkerUI();\r\n\t\t\tworkerUI.setVisible(true);\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jPanel1 = new javax.swing.JPanel();\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n jLabel5 = new javax.swing.JLabel();\r\n usuario = new javax.swing.JTextField();\r\n nombre = new javax.swing.JTextField();\r\n email = new javax.swing.JTextField();\r\n jButton1 = new javax.swing.JButton();\r\n jButton2 = new javax.swing.JButton();\r\n passw1 = new javax.swing.JPasswordField();\r\n passw2 = new javax.swing.JPasswordField();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\r\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.MatteBorder(null), \"Registro\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 3, 24))); // NOI18N\r\n\r\n jLabel1.setText(\"Usuario\");\r\n\r\n jLabel2.setText(\"Nombre\");\r\n\r\n jLabel3.setText(\"E-mail\");\r\n\r\n jLabel4.setText(\"Contraseña: \");\r\n\r\n jLabel5.setText(\"Confirmar contraseña:\");\r\n\r\n jButton1.setText(\"ATRAS\");\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jButton2.setText(\"GUARDAR\");\r\n jButton2.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton2ActionPerformed(evt);\r\n }\r\n });\r\n\r\n passw1.setText(\"jPasswordField1\");\r\n\r\n passw2.setText(\"jPasswordField2\");\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jLabel3)\r\n .addComponent(jLabel4)\r\n .addComponent(jLabel5)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel1)\r\n .addComponent(jLabel2)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(usuario, javax.swing.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE)\r\n .addComponent(nombre)\r\n .addComponent(email)\r\n .addComponent(passw1)\r\n .addComponent(passw2)))\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(85, 85, 85)\r\n .addComponent(jButton1)\r\n .addGap(59, 59, 59)\r\n .addComponent(jButton2)))\r\n .addContainerGap(60, Short.MAX_VALUE))\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(19, 19, 19)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel1)\r\n .addComponent(usuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel2)\r\n .addComponent(nombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(20, 20, 20)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel3)\r\n .addComponent(email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel4)\r\n .addComponent(passw1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel5)\r\n .addComponent(passw2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jButton1)\r\n .addComponent(jButton2))\r\n .addContainerGap(30, Short.MAX_VALUE))\r\n );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n\r\n pack();\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabelClose = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabelMin = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jTextField_Email = new javax.swing.JTextField();\n jPasswordField_PASSWORD = new javax.swing.JPasswordField();\n jButton_Register_ = new javax.swing.JButton();\n jLabelLogin = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField_Name = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jPasswordField_PasswordRetype = new javax.swing.JPasswordField();\n jButton_Cancel = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel1.setBackground(new java.awt.Color(190, 144, 212));\n\n jLabelClose.setFont(new java.awt.Font(\"Maiandra GD\", 1, 18)); // NOI18N\n jLabelClose.setForeground(new java.awt.Color(0, 0, 0));\n jLabelClose.setText(\"X\");\n jLabelClose.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabelClose.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelCloseMouseClicked(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Maiandra GD\", 1, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(0, 0, 0));\n jLabel2.setText(\"Create An Account\");\n\n jLabelMin.setFont(new java.awt.Font(\"Malgun Gothic\", 1, 18)); // NOI18N\n jLabelMin.setForeground(new java.awt.Color(0, 0, 0));\n jLabelMin.setText(\"_\");\n jLabelMin.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabelMin.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelMinMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(16, 16, 16)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabelMin)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabelClose)\n .addGap(15, 15, 15))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelClose)\n .addComponent(jLabel2))\n .addGap(14, 14, 14))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelMin)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel2.setBackground(new java.awt.Color(34, 49, 63));\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Email:\");\n\n jLabel5.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Password:\");\n\n jTextField_Email.setFont(new java.awt.Font(\"Dialog\", 0, 18)); // NOI18N\n\n jPasswordField_PASSWORD.setFont(new java.awt.Font(\"Dialog\", 0, 18)); // NOI18N\n\n jButton_Register_.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jButton_Register_.setText(\"Register\");\n jButton_Register_.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_Register_ActionPerformed(evt);\n }\n });\n\n jLabelLogin.setForeground(new java.awt.Color(77, 19, 209));\n jLabelLogin.setText(\"Back to login page\");\n jLabelLogin.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabelLogin.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelLoginMouseClicked(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Fill in your following details below\");\n\n jLabel6.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Name:\");\n\n jTextField_Name.setFont(new java.awt.Font(\"Dialog\", 0, 18)); // NOI18N\n\n jLabel7.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\"Retype password:\");\n\n jPasswordField_PasswordRetype.setFont(new java.awt.Font(\"Dialog\", 0, 18)); // NOI18N\n\n jButton_Cancel.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jButton_Cancel.setText(\"Cancel\");\n jButton_Cancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_CancelActionPerformed(evt);\n }\n });\n\n jLabel3.setForeground(new java.awt.Color(153, 153, 153));\n jLabel3.setText(\"*Password must be at least 8 characters long\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jButton_Cancel, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(43, 43, 43)\n .addComponent(jButton_Register_, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n .addComponent(jPasswordField_PasswordRetype, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addComponent(jLabel6)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel3))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPasswordField_PASSWORD)\n .addComponent(jTextField_Email)\n .addComponent(jTextField_Name, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addContainerGap(43, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabelLogin)\n .addGap(146, 146, 146))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addGap(85, 85, 85))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField_Name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField_Email, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jPasswordField_PASSWORD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(9, 9, 9)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jPasswordField_PasswordRetype, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton_Register_, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton_Cancel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabelLogin)\n .addContainerGap(39, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jBtn_patronGirisi = new javax.swing.JButton();\n jBtn_garsonGirisi = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 153));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3), \"BAŞLANGIÇ\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.ABOVE_TOP, new java.awt.Font(\"Tahoma\", 1, 24))); // NOI18N\n\n jBtn_patronGirisi.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jBtn_patronGirisi.setText(\"PATRON GİRİŞİ\");\n\n jBtn_garsonGirisi.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jBtn_garsonGirisi.setText(\"GARSON GİRİŞİ\");\n jBtn_garsonGirisi.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBtn_garsonGirisiActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(158, 158, 158)\n .addComponent(jBtn_patronGirisi, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(140, 140, 140)\n .addComponent(jBtn_garsonGirisi, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(170, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBtn_patronGirisi, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jBtn_garsonGirisi, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(285, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(80, 80, 80))\n );\n\n pack();\n }", "public AddFriend() {\n initComponents();\n jButton1.addActionListener(this);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField4 = new javax.swing.JTextField();\n registerIndividual = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n idTextField = new javax.swing.JTextField();\n firstNameTxtField = new javax.swing.JTextField();\n lastNameTxtField = new javax.swing.JTextField();\n ssnTxtField = new javax.swing.JTextField();\n sexTxtField = new javax.swing.JTextField();\n registerButton = new javax.swing.JButton();\n backButton = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n dateOfBirth = new org.jdesktop.swingx.JXDatePicker();\n\n jTextField4.setText(\"jTextField1\");\n\n setBackground(new java.awt.Color(120, 168, 252));\n\n registerIndividual.setFont(new java.awt.Font(\"Segoe UI\", 1, 22)); // NOI18N\n registerIndividual.setForeground(new java.awt.Color(255, 255, 255));\n registerIndividual.setText(\"Register Individuals\");\n registerIndividual.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n registerIndividualMouseClicked(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Segoe UI\", 1, 16)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"HID\");\n\n jLabel2.setFont(new java.awt.Font(\"Segoe UI\", 1, 16)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"First Name\");\n\n jLabel3.setFont(new java.awt.Font(\"Segoe UI\", 1, 16)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"SSN\");\n\n jLabel4.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n\n jLabel5.setFont(new java.awt.Font(\"Segoe UI\", 1, 16)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Last Name\");\n\n jLabel6.setFont(new java.awt.Font(\"Segoe UI\", 1, 16)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Sex\");\n\n idTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n idTextFieldActionPerformed(evt);\n }\n });\n\n firstNameTxtField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n firstNameTxtFieldActionPerformed(evt);\n }\n });\n\n registerButton.setFont(new java.awt.Font(\"Segoe UI\", 1, 16)); // NOI18N\n registerButton.setText(\"REGISTER\");\n registerButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registerButtonActionPerformed(evt);\n }\n });\n\n backButton.setFont(new java.awt.Font(\"Segoe UI\", 1, 16)); // NOI18N\n backButton.setText(\"BACK\");\n backButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backButtonActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Segoe UI\", 1, 16)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\"Date of Birth\");\n\n dateOfBirth.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n dateOfBirthActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(registerIndividual))\n .addGroup(layout.createSequentialGroup()\n .addGap(62, 62, 62)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(idTextField))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lastNameTxtField))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(firstNameTxtField))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dateOfBirth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(ssnTxtField)\n .addComponent(sexTxtField, javax.swing.GroupLayout.Alignment.TRAILING)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(backButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(registerButton)))))\n .addContainerGap(318, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(registerIndividual)\n .addGap(53, 53, 53)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(idTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(firstNameTxtField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(lastNameTxtField)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(ssnTxtField)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1))\n .addComponent(dateOfBirth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(sexTxtField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(registerButton)\n .addComponent(backButton))\n .addGap(49, 49, 49))\n );\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getSource() == jb1){\r\n\t\t\tString name,password,telephone,idNum;\r\n\t\t\tname = jf2.getText();\r\n\t\t\tpassword = jf5.getText();\r\n\t\t\ttelephone = jf6.getText();\r\n\t\t\tidNum = jf7.getText();\r\n\r\n\t if(judgeName(name) && judge(password) && judgeTelephone(telephone) && judgeIdnum(idNum)) {\r\n\t\t\tConnection ct = null;\r\n\t\t\tPreparedStatement pstmt = null;\r\n\t\t\tResultSet rs = null;\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\t//1.加载驱动\r\n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\t System.out.println(\"加载成功\");\r\n\t\t\t //2.连接数据库\r\n\t\t\t ct = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/bank\", \"root\", \"root\");\r\n\r\n\t\t\t //与编译语句对象\r\n\r\n\t\t\t String strsql = \"insert into customer1 values(?,?,?,?,?,?,?,?,?)\";\r\n\t\t\t pstmt = ct.prepareStatement(strsql);\r\n\t\t\t \r\n\t\t\t //给对象赋值\r\n\t\t\t pstmt.setString(1,getCardNumber());\r\n\t\t\t pstmt.setString(2,jf2.getText());\r\n\t\t\t pstmt.setString(3,\"0\");\r\n\t\t\t pstmt.setString(4,\"0\");\r\n\t\t\t pstmt.setString(5,jf5.getText());\r\n\t\t\t pstmt.setString(6,jf6.getText());\r\n\t\t\t pstmt.setString(7,jf7.getText());\r\n\t\t\t pstmt.setString(8,\"0\");\r\n\t\t\t pstmt.setString(9,\"0\");\r\n\r\n\t\t\t pstmt.executeUpdate();\r\n\t\t\t JOptionPane.showMessageDialog(null, \"添加账户成功!\", \"提示信息\",\r\n\t\t\t JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t this.dispose();//关闭学生对话框\r\n\r\n\t\t\t }catch(Exception arg1){\r\n\t\t\t\t arg1.printStackTrace();\r\n\t\t\t }finally{\r\n\t\t\t\t try{\r\n\t\t\t\t\t if(rs!=null){\r\n\t\t\t\t\t\t rs.close();\r\n\t\t\t\t\t\t rs = null;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t if(pstmt != null){\r\n\t\t\t\t\t\t pstmt.close();\r\n\t\t\t\t\t\t pstmt = null;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t if(ct != null){\r\n\t\t\t\t\t\t ct.close();\r\n\t\t\t\t\t\t ct = null;\r\n\t\t\t\t\t }\r\n\t\t\t\t }catch(Exception arg2){\r\n\t\t\t\t\t arg2.printStackTrace();\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t}}\r\n\t\t\r\n\t\telse if(arg0.getSource() == jb2){\r\n\t\t\tSystem.out.println(\"你选择了取消\");\r\n\t\t\tthis.dispose();//关闭添加对话框\r\n\t\t}\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n label4 = new java.awt.Label();\n label5 = new java.awt.Label();\n label6 = new java.awt.Label();\n label2 = new java.awt.Label();\n label3 = new java.awt.Label();\n password = new javax.swing.JPasswordField();\n username = new java.awt.TextField();\n notlp = new java.awt.TextField();\n alamat = new java.awt.TextField();\n nama = new java.awt.TextField();\n kembali = new java.awt.Button();\n Registrasi = new java.awt.Button();\n jLabel1 = new javax.swing.JLabel();\n txID = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Registrasi\"));\n\n label4.setText(\"Nama\");\n\n label5.setText(\"Alamat\");\n\n label6.setText(\"No. Tlp\");\n\n label2.setText(\"Username\");\n\n label3.setText(\"Password\");\n\n kembali.setActionCommand(\"Kembali\");\n kembali.setLabel(\"Back\");\n kembali.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n kembaliActionPerformed(evt);\n }\n });\n\n Registrasi.setLabel(\"Registrasi\");\n Registrasi.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RegistrasiActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"ID\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(username, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(kembali, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(24, 24, 24)\n .addComponent(Registrasi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(notlp, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(31, 31, 31)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(alamat, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(nama, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txID))))\n .addGap(102, 102, 102))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nama, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(alamat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(notlp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(username, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Registrasi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(kembali, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==btNewUser) {\n\t\t\tnew RegistrationFrame();\n\t\t\tthis.dispose();\n\t\t}\n\t\telse if(e.getSource() == btLogin) {\n\t\t\tSystem.out.println(\"you can successfully log in\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"clear\");\n\t\t}\n\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\", \"deprecation\" })\r\n\tprotected void btnCreateactionPerformed() {\n\t\tif ((confirmpasswordcreatejTextField.getText()).equals(passwordcreatejPasswordField.getText()))\r\n\t\t{\r\n\t\t\tjava.sql.Connection conObj = JdbcConnect.createConnection();\r\n\t\t\tjava.sql.ResultSet rs = null;\r\n\t\t\ttry {\r\n\t\t\t\trs = JdbcSelectUname.selectRecordFromTable(conObj,usrname);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"Internal Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif (rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\t\tString role = (String) rolecreatejComboBox.getSelectedItem();\r\n\t\r\n\t\t\t\t\t\tjava.util.Vector add_rows = new java.util.Vector();\r\n\t\t\t\t\t\t//adding new user details to the Vector_add_rows\r\n\t\t\t\t\t\tadd_rows.add(unamecreatejTextField.getText());\r\n\t\t\t\t\t\tadd_rows.add(passwordcreatejPasswordField.getText());\r\n\t\t\t\t\t\tadd_rows.add(passHintTextField.getText());\r\n\t\t\t\t\t\tadd_rows.add(role);\r\n\t\r\n\t\t\t\t\t\tint i = JdbcCreateUser.insertRecords(conObj,add_rows);\r\n\t\r\n\t\t\t\t\t\tif (i!=1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"User@\"+unamecreatejTextField.getText()+\" not created\\nPlease try again...\", \"User@\"+unamecreatejTextField.getText()+\" error\", javax.swing.JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"User@\"+unamecreatejTextField.getText()+\" added to the system\", \"User@\"+unamecreatejTextField.getText()+\" success message\", javax.swing.JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}//rs.next() if statement;\r\n\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Access denied! User@\"+usrname+\" not granted to create new users\", \"User@\"+usrname+\" authentication error\", javax.swing.JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t} catch (HeadlessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\telse {\r\n\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Access Denied! The given password do not match\", \"Mismatch error\", javax.swing.JOptionPane.ERROR_MESSAGE);\t\t\t\t\t\t\r\n\t\t}\t\t\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jPasswordField1 = new javax.swing.JPasswordField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n jButton1.setText(\"Sign In\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Sign Up\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"User Name\");\n\n jLabel2.setText(\"Pass word\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(55, 55, 55)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jTextField1))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(91, 91, 91)\n .addComponent(jButton2))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(21, 21, 21)\n .addComponent(jPasswordField1)))\n .addContainerGap(88, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton5 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jPasswordField1 = new javax.swing.JPasswordField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton5.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jButton5.setText(\"EXCLUIR INSTRUTOR\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jLabel1.setText(\"Instrutor\");\n\n jComboBox1.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Nenhum\" }));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jLabel2.setText(\"Nome do instrutor:\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jLabel4.setText(\"Senha:\");\n\n jTextField1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jTextField1.setEnabled(false);\n jTextField1.setFocusTraversalPolicyProvider(true);\n\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jButton3.setText(\"SALVAR\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jButton4.setText(\"CANCELAR\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jPasswordField1.setEnabled(false);\n jPasswordField1.setMinimumSize(new java.awt.Dimension(6, 23));\n jPasswordField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jPasswordField1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 77, Short.MAX_VALUE)\n .addComponent(jButton5)\n .addGap(69, 69, 69)\n .addComponent(jButton4)\n .addGap(47, 47, 47))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(59, 59, 59)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38)\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 222, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton3)\n .addComponent(jButton4)\n .addComponent(jButton5))\n .addGap(47, 47, 47))\n );\n\n jLabel2.getAccessibleContext().setAccessibleName(\"Nome do instrutor::\");\n jLabel4.getAccessibleContext().setAccessibleName(\"Repeticoes\");\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n User = new javax.swing.JTextField();\n Pass = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jComboBox1 = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Malgun Gothic\", 0, 36)); // NOI18N\n jLabel1.setText(\"Sign Up\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(299, 39, 140, 50);\n\n jLabel2.setFont(new java.awt.Font(\"Nirmala UI\", 0, 18)); // NOI18N\n jLabel2.setText(\"UserName\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(126, 142, 90, 25);\n\n jLabel3.setFont(new java.awt.Font(\"Nirmala UI\", 0, 18)); // NOI18N\n jLabel3.setText(\"Password\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(126, 204, 90, 25);\n\n jLabel4.setFont(new java.awt.Font(\"Nirmala UI\", 0, 18)); // NOI18N\n jLabel4.setText(\"Re-enter Password\");\n getContentPane().add(jLabel4);\n jLabel4.setBounds(126, 280, 150, 25);\n\n jLabel5.setFont(new java.awt.Font(\"Nirmala UI\", 0, 18)); // NOI18N\n jLabel5.setText(\"Choose Role\");\n getContentPane().add(jLabel5);\n jLabel5.setBounds(126, 354, 120, 25);\n getContentPane().add(User);\n User.setBounds(451, 142, 89, 20);\n getContentPane().add(Pass);\n Pass.setBounds(451, 206, 89, 20);\n getContentPane().add(jTextField3);\n jTextField3.setBounds(451, 280, 89, 20);\n\n jComboBox1.setFont(new java.awt.Font(\"Nirmala UI\", 0, 14)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Admin\", \"Fan\", \"Spectator\" }));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n getContentPane().add(jComboBox1);\n jComboBox1.setBounds(451, 351, 89, 26);\n\n jButton1.setFont(new java.awt.Font(\"Nirmala UI\", 0, 14)); // NOI18N\n jButton1.setText(\"Sign Up!\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1);\n jButton1.setBounds(339, 439, 85, 29);\n\n jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/resources/bg4.jpg\"))); // NOI18N\n jLabel6.setText(\"jLabel6\");\n getContentPane().add(jLabel6);\n jLabel6.setBounds(-6, 0, 810, 590);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jSeparator1 = new javax.swing.JSeparator();\n jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jTextField6 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jFormattedTextField1 = new javax.swing.JFormattedTextField();\n jComboBox1 = new javax.swing.JComboBox<>();\n jPanel2 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel8 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n\n jCheckBoxMenuItem1.setSelected(true);\n jCheckBoxMenuItem1.setText(\"jCheckBoxMenuItem1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Student Registration Form\");\n setAlwaysOnTop(true);\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n setLocation(new java.awt.Point(600, 250));\n setResizable(false);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED), \"Personal Details\\n \"));\n\n jLabel1.setText(\"Name :\");\n\n jLabel2.setText(\"Programme :\");\n\n jLabel3.setText(\"Date of Birth :\");\n\n jLabel4.setText(\"Blood Group :\");\n\n jLabel5.setText(\"Contact Number :\");\n\n jLabel6.setText(\"Grender :\");\n\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(jRadioButton1);\n jRadioButton1.setText(\"Male\");\n\n buttonGroup1.add(jRadioButton2);\n jRadioButton2.setText(\"Female\");\n\n jFormattedTextField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT))));\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"A+\", \"A-\", \"B+\", \"B-\", \"O+\", \"O-\", \"AB+\", \"AB-\" }));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addGap(18, 18, 18)\n .addComponent(jRadioButton2))\n .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(109, 109, 109))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel6)\n .addComponent(jLabel3)\n .addComponent(jLabel5))\n .addGap(83, 83, 83)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\n .addComponent(jTextField6, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))\n .addContainerGap(71, Short.MAX_VALUE)))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(85, 85, 85)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addContainerGap(66, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addGap(36, 36, 36)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(39, Short.MAX_VALUE)))\n );\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED), \"Courses Details\"));\n\n jLabel7.setText(\"Select Semester : \");\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Semester 1\", \"Semester 2\", \"Semester 3\", \"Semester 4\", \"Semester 5\", \"Semester 6\", \"Semester 7\", \"Semester 8\" }));\n\n jLabel8.setText(\"Select Courses :\");\n\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jScrollPane1.setViewportView(jList1);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jLabel8))\n .addGap(149, 149, 149)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(102, Short.MAX_VALUE)))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 172, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap()))\n );\n\n jButton1.setText(\"Save Details\");\n\n jButton2.setText(\"Add Another Student\");\n\n jButton3.setText(\"Exit\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(85, 85, 85)\n .addComponent(jButton1)\n .addGap(47, 47, 47)\n .addComponent(jButton2)\n .addGap(42, 42, 42)\n .addComponent(jButton3)))\n .addContainerGap(39, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap(18, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSplitPane1 = new javax.swing.JSplitPane();\n jPanel1 = new javax.swing.JPanel();\n jLabelClose = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabelMin = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jPasswordField1 = new javax.swing.JPasswordField();\n jButton2 = new javax.swing.JButton();\n jLabelRegister = new javax.swing.JLabel();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));\n filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel1.setBackground(new java.awt.Color(210, 240, 179));\n\n jLabelClose.setFont(new java.awt.Font(\"Bauhaus 93\", 1, 28)); // NOI18N\n jLabelClose.setForeground(new java.awt.Color(255, 153, 102));\n jLabelClose.setText(\"X\");\n jLabelClose.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabelClose.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelCloseMouseClicked(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Berlin Sans FB Demi\", 1, 30)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 153, 102));\n jLabel2.setText(\"Login\");\n\n jLabelMin.setFont(new java.awt.Font(\"Bauhaus 93\", 1, 32)); // NOI18N\n jLabelMin.setForeground(new java.awt.Color(255, 153, 102));\n jLabelMin.setText(\"-\");\n jLabelMin.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabelMin.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelMinMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabelMin)\n .addGap(18, 18, 18)\n .addComponent(jLabelClose, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabelMin, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabelClose))\n );\n\n jPanel2.setBackground(new java.awt.Color(214, 242, 184));\n jPanel2.setLayout(null);\n\n jLabel4.setFont(new java.awt.Font(\"Gadugi\", 1, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 153, 102));\n jLabel4.setText(\"Password :\");\n jPanel2.add(jLabel4);\n jLabel4.setBounds(110, 250, 100, 20);\n\n jLabel5.setFont(new java.awt.Font(\"Gadugi\", 1, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 153, 102));\n jLabel5.setText(\"Username :\");\n jPanel2.add(jLabel5);\n jLabel5.setBounds(110, 180, 100, 20);\n\n jTextField2.setBackground(new java.awt.Color(213, 219, 219));\n jTextField2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jPanel2.add(jTextField2);\n jTextField2.setBounds(240, 180, 290, 30);\n\n jPasswordField1.setBackground(new java.awt.Color(213, 219, 219));\n jPasswordField1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jPanel2.add(jPasswordField1);\n jPasswordField1.setBounds(240, 250, 290, 30);\n\n jButton2.setBackground(new java.awt.Color(255, 153, 0));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton2.setForeground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"Login\");\n jPanel2.add(jButton2);\n jButton2.setBounds(430, 320, 100, 40);\n\n jLabelRegister.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabelRegister.setForeground(new java.awt.Color(51, 51, 51));\n jLabelRegister.setText(\"click here to create a new account \");\n jLabelRegister.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabelRegister.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelRegisterMouseClicked(evt);\n }\n });\n jPanel2.add(jLabelRegister);\n jLabelRegister.setBounds(320, 390, 220, 17);\n jPanel2.add(filler1);\n filler1.setBounds(0, 10, 0, 0);\n jPanel2.add(filler2);\n filler2.setBounds(180, 40, 0, 0);\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/kok.png\"))); // NOI18N\n jLabel3.setText(\"jLabel3\");\n jPanel2.add(jLabel3);\n jLabel3.setBounds(140, 30, 420, 120);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 743, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n botonGoogle = new javax.swing.JButton();\n botonFb = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n textFieldEmail = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n passwordField = new javax.swing.JPasswordField();\n botonEntrar = new javax.swing.JButton();\n\n jLabel2.setText(\"jLabel2\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setAutoRequestFocus(false);\n setBackground(new java.awt.Color(244, 247, 247));\n setPreferredSize(new java.awt.Dimension(250, 355));\n setResizable(false);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n botonGoogle.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/inicia_google.png\"))); // NOI18N\n botonGoogle.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonGoogleActionPerformed(evt);\n }\n });\n getContentPane().add(botonGoogle, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 286, 200, 30));\n\n botonFb.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/inicia_fb.png\"))); // NOI18N\n botonFb.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonFbActionPerformed(evt);\n }\n });\n getContentPane().add(botonFb, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 246, 200, 30));\n\n jLabel1.setFont(new java.awt.Font(\"Sawasdee\", 1, 15)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(1, 1, 1));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"- O REGÍSTRATE AQUÍ -\");\n jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel1MouseClicked(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabel1MouseExited(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jLabel1MouseEntered(evt);\n }\n });\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 320, 200, -1));\n\n jPanel1.setBackground(new java.awt.Color(192, 237, 228));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/flecha30x30.png\"))); // NOI18N\n jLabel3.setToolTipText(\"Atrás\");\n jLabel3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel3MouseClicked(evt);\n }\n });\n jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));\n\n jLabel4.setFont(new java.awt.Font(\"Sawasdee\", 1, 24)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(100, 104, 105));\n jLabel4.setText(\"INICIA SESIÓN\");\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 10, -1, 30));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 250, 50));\n\n textFieldEmail.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n textFieldEmailActionPerformed(evt);\n }\n });\n getContentPane().add(textFieldEmail, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 100, 200, 30));\n\n jLabel5.setFont(new java.awt.Font(\"Sawasdee\", 1, 15)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"CONTRASEÑA\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 130, 120, 30));\n\n jLabel6.setFont(new java.awt.Font(\"Sawasdee\", 1, 15)); // NOI18N\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel6.setText(\"E-MAIL:\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 67, 70, 40));\n\n passwordField.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n passwordFieldMouseEntered(evt);\n }\n });\n passwordField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n passwordFieldActionPerformed(evt);\n }\n });\n passwordField.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n passwordFieldPropertyChange(evt);\n }\n });\n getContentPane().add(passwordField, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 160, 200, 30));\n\n botonEntrar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/inicia_correo.png\"))); // NOI18N\n botonEntrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonEntrarActionPerformed(evt);\n }\n });\n getContentPane().add(botonEntrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 210, 200, 30));\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n RegistrarR = new javax.swing.JButton();\n RegistrarH = new javax.swing.JButton();\n Atras = new javax.swing.JButton();\n registrarCliente = new javax.swing.JButton();\n cancelarR = new javax.swing.JButton();\n reservSalon = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Bienvenido\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 40, 245, 27));\n\n RegistrarR.setText(\"Registrar Reserva Hospedaje\");\n RegistrarR.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RegistrarRActionPerformed(evt);\n }\n });\n getContentPane().add(RegistrarR, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 90, -1, -1));\n\n RegistrarH.setText(\"Registrar Hospedaje\");\n RegistrarH.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RegistrarHActionPerformed(evt);\n }\n });\n getContentPane().add(RegistrarH, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 90, -1, -1));\n\n Atras.setText(\"Atras\");\n Atras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n AtrasActionPerformed(evt);\n }\n });\n getContentPane().add(Atras, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n registrarCliente.setText(\"Registrar Cliente\");\n registrarCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registrarClienteActionPerformed(evt);\n }\n });\n getContentPane().add(registrarCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 90, -1, -1));\n\n cancelarR.setText(\"Cancelar Reserva\");\n cancelarR.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelarRActionPerformed(evt);\n }\n });\n getContentPane().add(cancelarR, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 130, 120, -1));\n\n reservSalon.setText(\"Registrar Reserva Salón\");\n reservSalon.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n reservSalonActionPerformed(evt);\n }\n });\n getContentPane().add(reservSalon, new org.netbeans.lib.awtextra.AbsoluteConstraints(77, 131, -1, -1));\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/vista/fondoPequeño.jpg\"))); // NOI18N\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1, -6, 500, 180));\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jPasswordField1 = new javax.swing.JPasswordField();\n jTextField4 = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextPane1 = new javax.swing.JTextPane();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(23, 23, 23));\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(228, 228, 228)));\n\n jComboBox1.setBackground(new java.awt.Color(135, 132, 132));\n jComboBox1.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jComboBox1.setForeground(new java.awt.Color(16, 14, 14));\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Staff\", \"Chef\", \"Manager\" }));\n jComboBox1.setBorder(null);\n\n jLabel1.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(253, 243, 243));\n jLabel1.setText(\"Register As\");\n\n jLabel2.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(253, 243, 243));\n jLabel2.setText(\"Full Name\");\n\n jLabel3.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(253, 243, 243));\n jLabel3.setText(\"Password\");\n\n jLabel4.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(253, 243, 243));\n jLabel4.setText(\"User Name\");\n\n jLabel5.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(253, 243, 243));\n jLabel5.setText(\"Email ID\");\n\n jLabel6.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(253, 243, 243));\n jLabel6.setText(\"Phone No.\");\n\n jTextField1.setBackground(new java.awt.Color(83, 83, 83));\n jTextField1.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jTextField1.setForeground(new java.awt.Color(241, 234, 234));\n jTextField1.setBorder(null);\n jTextField1.setCaretColor(new java.awt.Color(245, 235, 235));\n\n jTextField2.setBackground(new java.awt.Color(83, 83, 83));\n jTextField2.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jTextField2.setForeground(new java.awt.Color(241, 234, 234));\n jTextField2.setBorder(null);\n jTextField2.setCaretColor(new java.awt.Color(245, 235, 235));\n\n jTextField3.setBackground(new java.awt.Color(83, 83, 83));\n jTextField3.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jTextField3.setForeground(new java.awt.Color(241, 234, 234));\n jTextField3.setBorder(null);\n jTextField3.setCaretColor(new java.awt.Color(245, 235, 235));\n\n jPasswordField1.setBackground(new java.awt.Color(83, 83, 83));\n jPasswordField1.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jPasswordField1.setForeground(new java.awt.Color(246, 234, 234));\n jPasswordField1.setBorder(null);\n jPasswordField1.setCaretColor(new java.awt.Color(245, 243, 243));\n\n jTextField4.setBackground(new java.awt.Color(83, 83, 83));\n jTextField4.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jTextField4.setForeground(new java.awt.Color(241, 234, 234));\n jTextField4.setBorder(null);\n jTextField4.setCaretColor(new java.awt.Color(245, 235, 235));\n\n jLabel7.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(253, 243, 243));\n jLabel7.setText(\"Address\");\n\n jTextPane1.setBackground(new java.awt.Color(92, 90, 90));\n jTextPane1.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jTextPane1.setForeground(new java.awt.Color(241, 234, 234));\n jScrollPane1.setViewportView(jTextPane1);\n\n jLabel10.setBackground(new java.awt.Color(119, 119, 119));\n jLabel10.setFont(new java.awt.Font(\"Ubuntu\", 1, 14)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(246, 238, 238));\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel10.setText(\"Close\");\n jLabel10.setBorder(null);\n jLabel10.setOpaque(true);\n jLabel10.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel10MouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jLabel10MouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabel10MouseExited(evt);\n }\n });\n\n jLabel11.setBackground(new java.awt.Color(119, 119, 119));\n jLabel11.setFont(new java.awt.Font(\"Ubuntu\", 1, 14)); // NOI18N\n jLabel11.setForeground(new java.awt.Color(246, 238, 238));\n jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel11.setText(\"Register\");\n jLabel11.setBorder(null);\n jLabel11.setOpaque(true);\n jLabel11.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel11MouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jLabel11MouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabel11MouseExited(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 18)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(250, 243, 243));\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel8.setText(\"Add New Employee\");\n\n jLabel12.setBackground(new java.awt.Color(119, 119, 119));\n jLabel12.setFont(new java.awt.Font(\"Ubuntu\", 1, 14)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(246, 238, 238));\n jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel12.setText(\"Add Pic\");\n jLabel12.setBorder(null);\n jLabel12.setOpaque(true);\n jLabel12.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel12MouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jLabel12MouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabel12MouseExited(evt);\n }\n });\n\n jTextField5.setBackground(new java.awt.Color(83, 83, 83));\n jTextField5.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jTextField5.setForeground(new java.awt.Color(241, 234, 234));\n jTextField5.setBorder(null);\n jTextField5.setCaretColor(new java.awt.Color(245, 235, 235));\n\n jLabel9.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 13)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(253, 243, 243));\n jLabel9.setText(\"Salary($)\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)\n .addComponent(jTextField4))\n .addContainerGap(34, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(103, 103, 103)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel4)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel9)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(36, 36, 36))\n );\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n buttonGroup1 = new javax.swing.ButtonGroup();\r\n jPanel1 = new javax.swing.JPanel();\r\n jPanel3 = new javax.swing.JPanel();\r\n jLabel4 = new javax.swing.JLabel();\r\n userNameTF = new javax.swing.JTextField();\r\n jLabel5 = new javax.swing.JLabel();\r\n jLabel6 = new javax.swing.JLabel();\r\n emailTF = new javax.swing.JTextField();\r\n jLabel7 = new javax.swing.JLabel();\r\n ageTF = new javax.swing.JTextField();\r\n registerBtn = new javax.swing.JButton();\r\n jLabel1 = new javax.swing.JLabel();\r\n maleRBtn = new javax.swing.JRadioButton();\r\n femaleRBtn = new javax.swing.JRadioButton();\r\n passwordTF = new javax.swing.JPasswordField();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n\r\n jPanel3.setBackground(new java.awt.Color(249, 171, 220));\r\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Registration\"));\r\n\r\n jLabel4.setText(\"User Name\");\r\n\r\n jLabel5.setText(\"Password\");\r\n\r\n jLabel6.setText(\"Email\");\r\n\r\n jLabel7.setText(\"Age\");\r\n\r\n registerBtn.setText(\"Register\");\r\n registerBtn.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n registerBtnActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel1.setText(\"Gender\");\r\n\r\n buttonGroup1.add(maleRBtn);\r\n maleRBtn.setText(\"Male\");\r\n\r\n buttonGroup1.add(femaleRBtn);\r\n femaleRBtn.setText(\"Female\");\r\n\r\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\r\n jPanel3.setLayout(jPanel3Layout);\r\n jPanel3Layout.setHorizontalGroup(\r\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addGap(54, 54, 54)\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel4)\r\n .addComponent(jLabel5))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(userNameTF, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)\r\n .addComponent(passwordTF)))\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel7)\r\n .addComponent(jLabel6)\r\n .addComponent(jLabel1))\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addGap(39, 39, 39)\r\n .addComponent(maleRBtn)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(femaleRBtn))\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addGap(115, 115, 115)\r\n .addComponent(registerBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addGap(41, 41, 41)\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(ageTF, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(emailTF, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE))))))\r\n .addContainerGap(105, Short.MAX_VALUE))\r\n );\r\n jPanel3Layout.setVerticalGroup(\r\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addGap(29, 29, 29)\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel4)\r\n .addComponent(userNameTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(29, 29, 29)\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel5)\r\n .addComponent(passwordTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(29, 29, 29)\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel6)\r\n .addComponent(emailTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(34, 34, 34)\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel7)\r\n .addComponent(ageTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(maleRBtn)\r\n .addComponent(femaleRBtn)\r\n .addComponent(jLabel1))\r\n .addGap(32, 32, 32)\r\n .addComponent(registerBtn)\r\n .addContainerGap(61, Short.MAX_VALUE))\r\n );\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n\r\n pack();\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jButtonRegistrar = new javax.swing.JButton();\n jButtonVoltar = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jScrollPane3 = new javax.swing.JScrollPane();\n jListStatus = new javax.swing.JList();\n jComboBoxColetor = new javax.swing.JComboBox<String>();\n jLabel5 = new javax.swing.JLabel();\n jComboBoxBairro = new javax.swing.JComboBox<String>();\n jButtonMostrar = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jListLixeira = new javax.swing.JList<String>();\n jLabel6 = new javax.swing.JLabel();\n jTextFieldSOAtual = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Registra SO\");\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setText(\"Alteração de Situação Operacional\");\n jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 20, 210, 20));\n\n jButtonRegistrar.setText(\"Cadastrar\");\n jButtonRegistrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonRegistrarActionPerformed(evt);\n }\n });\n jPanel1.add(jButtonRegistrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 310, -1, -1));\n\n jButtonVoltar.setText(\"Voltar\");\n jButtonVoltar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonVoltarActionPerformed(evt);\n }\n });\n jPanel1.add(jButtonVoltar, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 310, -1, -1));\n\n jLabel2.setText(\"Selecionar Coletor\");\n jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 60, -1, -1));\n\n jLabel3.setText(\"Selecione a Lixeira\");\n jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 180, -1, -1));\n\n jLabel4.setText(\"Selecione o Novo Status\");\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 180, 150, -1));\n\n jScrollPane3.setViewportView(jListStatus);\n\n jPanel1.add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 200, 130, 100));\n\n jComboBoxColetor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxColetorActionPerformed(evt);\n }\n });\n jPanel1.add(jComboBoxColetor, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 60, 190, -1));\n\n jLabel5.setText(\"Selecionar Bairro\");\n jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 90, -1, -1));\n\n jPanel1.add(jComboBoxBairro, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 90, 190, -1));\n\n jButtonMostrar.setText(\"Mostrar Lixeiras\");\n jButtonMostrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonMostrarActionPerformed(evt);\n }\n });\n jPanel1.add(jButtonMostrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 130, -1, -1));\n\n jListLixeira.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n jListLixeiraValueChanged(evt);\n }\n });\n jScrollPane1.setViewportView(jListLixeira);\n\n jPanel1.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 200, 90, 100));\n\n jLabel6.setText(\"Status Atual\");\n jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 240, -1, -1));\n\n jTextFieldSOAtual.setEditable(false);\n jTextFieldSOAtual.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.add(jTextFieldSOAtual, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 260, 140, 40));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 440, 370));\n\n setSize(new java.awt.Dimension(457, 406));\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabelGEEK = new javax.swing.JLabel();\n jLabelPassword1 = new javax.swing.JLabel();\n jTextFieldUsuario = new javax.swing.JTextField();\n jLabelPassword2 = new javax.swing.JLabel();\n jLabelUser = new javax.swing.JLabel();\n jTextFieldPassword = new javax.swing.JTextField();\n jTextFieldNombre = new javax.swing.JTextField();\n jLabelPassword = new javax.swing.JLabel();\n jButtonSignUp = new javax.swing.JButton();\n jButtonRegresar = new javax.swing.JButton();\n labelLogo = new javax.swing.JLabel();\n jLabelMETRIK = new javax.swing.JLabel();\n jTextFieldMail = new javax.swing.JTextField();\n jButtonImagen = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabelGEEK.setFont(new java.awt.Font(\"Segoe UI\", 1, 48)); // NOI18N\n jLabelGEEK.setForeground(new java.awt.Color(104, 164, 255));\n jLabelGEEK.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabelGEEK.setText(\"Geek\");\n jLabelGEEK.setToolTipText(\"\");\n\n jLabelPassword1.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n jLabelPassword1.setForeground(new java.awt.Color(255, 255, 255));\n jLabelPassword1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabelPassword1.setText(\"eMail\");\n jLabelPassword1.setToolTipText(\"ff\");\n\n jTextFieldUsuario.setBackground(new java.awt.Color(91, 91, 91));\n jTextFieldUsuario.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n jTextFieldUsuario.setForeground(new java.awt.Color(255, 255, 255));\n jTextFieldUsuario.setToolTipText(\"\");\n jTextFieldUsuario.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3));\n jTextFieldUsuario.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldUsuarioActionPerformed(evt);\n }\n });\n\n jLabelPassword2.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n jLabelPassword2.setForeground(new java.awt.Color(255, 255, 255));\n jLabelPassword2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabelPassword2.setText(\"Password\");\n jLabelPassword2.setToolTipText(\"ff\");\n\n jLabelUser.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n jLabelUser.setForeground(new java.awt.Color(255, 255, 255));\n jLabelUser.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabelUser.setText(\"Username\");\n\n jTextFieldPassword.setBackground(new java.awt.Color(91, 91, 91));\n jTextFieldPassword.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n jTextFieldPassword.setForeground(new java.awt.Color(255, 255, 255));\n jTextFieldPassword.setToolTipText(\"\");\n jTextFieldPassword.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3));\n jTextFieldPassword.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldPasswordActionPerformed(evt);\n }\n });\n\n jTextFieldNombre.setBackground(new java.awt.Color(91, 91, 91));\n jTextFieldNombre.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n jTextFieldNombre.setForeground(new java.awt.Color(255, 255, 255));\n jTextFieldNombre.setToolTipText(\"\");\n jTextFieldNombre.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3));\n jTextFieldNombre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldNombreActionPerformed(evt);\n }\n });\n\n jLabelPassword.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n jLabelPassword.setForeground(new java.awt.Color(255, 255, 255));\n jLabelPassword.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabelPassword.setText(\"Nombre\");\n jLabelPassword.setToolTipText(\"ff\");\n\n jButtonSignUp.setBackground(new java.awt.Color(186, 126, 255));\n jButtonSignUp.setFont(new java.awt.Font(\"Segoe UI\", 0, 18)); // NOI18N\n jButtonSignUp.setForeground(new java.awt.Color(255, 255, 255));\n jButtonSignUp.setText(\"signup\");\n jButtonSignUp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSignUpActionPerformed(evt);\n }\n });\n\n jButtonRegresar.setBackground(new java.awt.Color(104, 164, 255));\n jButtonRegresar.setFont(new java.awt.Font(\"Segoe UI\", 0, 18)); // NOI18N\n jButtonRegresar.setForeground(new java.awt.Color(255, 255, 255));\n jButtonRegresar.setText(\"regresar\");\n jButtonRegresar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonRegresarActionPerformed(evt);\n }\n });\n\n jLabelMETRIK.setFont(new java.awt.Font(\"Segoe UI\", 1, 48)); // NOI18N\n jLabelMETRIK.setForeground(new java.awt.Color(186, 126, 255));\n jLabelMETRIK.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabelMETRIK.setText(\"Metrik\");\n jLabelMETRIK.setToolTipText(\"\");\n\n jTextFieldMail.setBackground(new java.awt.Color(91, 91, 91));\n jTextFieldMail.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n jTextFieldMail.setForeground(new java.awt.Color(255, 255, 255));\n jTextFieldMail.setToolTipText(\"\");\n jTextFieldMail.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3));\n jTextFieldMail.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldMailActionPerformed(evt);\n }\n });\n\n jButtonImagen.setBackground(new java.awt.Color(186, 126, 255));\n jButtonImagen.setFont(new java.awt.Font(\"Segoe UI\", 0, 18)); // NOI18N\n jButtonImagen.setForeground(new java.awt.Color(255, 255, 255));\n jButtonImagen.setLabel(\"Cargar imagen\");\n jButtonImagen.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonImagenActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(58, 58, 58)\n .addComponent(jLabelPassword))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelUser, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabelGEEK))\n .addComponent(jLabelMETRIK))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldNombre, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldUsuario, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabelPassword2, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButtonImagen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextFieldPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(74, 74, 74)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButtonRegresar, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButtonSignUp, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabelPassword1)\n .addGap(18, 18, 18)\n .addComponent(jTextFieldMail, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(190, 190, 190)\n .addComponent(labelLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(69, 69, 69))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addComponent(labelLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabelGEEK, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jLabelMETRIK, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabelUser, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelPassword1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldMail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelPassword2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonImagen)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonRegresar)\n .addComponent(jButtonSignUp))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Name\");\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"ID\");\n\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"jButton1\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(121, 121, 121)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE))\n .addGap(55, 55, 55)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE)\n .addComponent(jTextField2))\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(122, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(69, 69, 69)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(72, 72, 72)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(107, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void senhaLFEActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jToolBar1 = new javax.swing.JToolBar();\n jPanel1 = new javax.swing.JPanel();\n jTextField1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jTextField2 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jPasswordField1 = new javax.swing.JPasswordField();\n jButton3 = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n\n jToolBar1.setRollover(true);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"New Account\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Apple SD Gothic Neo\", 1, 18), java.awt.Color.orange)); // NOI18N\n\n jLabel3.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel3.setText(\"Password\");\n\n jButton2.setIcon(new javax.swing.ImageIcon(\"/Users/sena/Downloads/02.png\")); // NOI18N\n jButton2.setText(\"Back\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel4.setText(\"Security Question\");\n\n jLabel2.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel2.setText(\"Username\");\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"What is your first animal's name?\", \"What is your favorite color?\", \"What is your first Childhood friend?\", \"What is your school name?\" }));\n\n jLabel1.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel1.setText(\"Name\");\n\n jButton1.setIcon(new javax.swing.ImageIcon(\"/Users/sena/Downloads/00.png\")); // NOI18N\n jButton1.setText(\"Create\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel5.setText(\"Answer\");\n\n jLabel6.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel6.setText(\"E-mail\");\n\n jButton3.setText(\"Attach\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jLabel7.setBackground(new java.awt.Color(204, 204, 255));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(85, 85, 85))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(80, 80, 80)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel6)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(39, 39, 39))))\n .addContainerGap(136, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33)\n .addComponent(jButton3)))\n .addGap(53, 53, 53)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jComboBox1, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(63, 63, 63)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton2)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(49, 49, 49))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnOK = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n lblIdBursa = new javax.swing.JLabel();\n lblNume = new javax.swing.JLabel();\n lblCUI = new javax.swing.JLabel();\n lblRegComert = new javax.swing.JLabel();\n lblAdresa = new javax.swing.JLabel();\n txtIdBursa = new javax.swing.JTextField();\n txtNume = new javax.swing.JTextField();\n txtCUI = new javax.swing.JTextField();\n txtRegComert = new javax.swing.JTextField();\n txtAdresa = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n btnOK.setText(\"OK\");\n btnOK.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnOKActionPerformed(evt);\n }\n });\n\n btnCancel.setText(\"Cancel\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n lblIdBursa.setText(\"ID Bursa\");\n\n lblNume.setText(\"Nume\");\n\n lblCUI.setText(\"CUI\");\n\n lblRegComert.setText(\"Reg Comert\");\n\n lblAdresa.setText(\"Adresa\");\n\n txtRegComert.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtRegComertActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 240, Short.MAX_VALUE)\n .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(lblRegComert, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblCUI, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblNume, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblIdBursa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblAdresa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(74, 74, 74)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtIdBursa)\n .addComponent(txtNume)\n .addComponent(txtCUI)\n .addComponent(txtRegComert)\n .addComponent(txtAdresa, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblIdBursa)\n .addComponent(txtIdBursa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblNume)\n .addComponent(txtNume, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblCUI)\n .addComponent(txtCUI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblRegComert)\n .addComponent(txtRegComert, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblAdresa)\n .addComponent(txtAdresa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 131, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnOK)\n .addComponent(btnCancel))\n .addContainerGap())\n );\n\n pack();\n }", "private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel4 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jPanel6 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n setMinimumSize(new java.awt.Dimension(766, 516));\n setPreferredSize(new java.awt.Dimension(766, 516));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel3.setBackground(new java.awt.Color(51, 51, 51));\n jPanel3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n jPanel3MousePressed(evt);\n }\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jPanel3MouseReleased(evt);\n }\n });\n jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"REGISTER\");\n jPanel3.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 430, -1, -1));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"REGISTER\");\n jPanel3.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 20, -1, -1));\n\n getContentPane().add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 440, 180, 60));\n\n jPanel1.setBackground(new java.awt.Color(51, 51, 51));\n jPanel1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n jPanel1MousePressed(evt);\n }\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jPanel1MouseReleased(evt);\n }\n });\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"LOGIN\");\n jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(68, 19, -1, 20));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 440, 180, 60));\n\n jPanel6.setBackground(new java.awt.Color(51, 51, 51));\n jPanel6.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n jPanel6MousePressed(evt);\n }\n });\n jPanel6.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"X\");\n jPanel6.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 47, 30, 30));\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"X\");\n jPanel6.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, -10, 20, 60));\n\n getContentPane().add(jPanel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 0, 50, 40));\n\n jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/background/[email protected]\"))); // NOI18N\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 760, -1));\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n userLogin_btn = new javax.swing.JButton();\n AuthLogin_btn = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n create_btn = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n AuthorityLogin_btn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Welcome to CityBus E-ticketing\");\n setName(\"welcome_frame\"); // NOI18N\n setResizable(false);\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel1.setBackground(new java.awt.Color(102, 0, 153));\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/photo/bus-icon-17.png\"))); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Calibri\", 1, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"City Bus E-ticketing\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(102, 102, 102)\n .addComponent(jLabel3))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 288, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(88, 88, 88)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n userLogin_btn.setBackground(new java.awt.Color(255, 255, 255));\n userLogin_btn.setText(\"User\");\n userLogin_btn.setToolTipText(\"\");\n userLogin_btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n userLogin_btnActionPerformed(evt);\n }\n });\n\n AuthLogin_btn.setBackground(new java.awt.Color(255, 255, 255));\n AuthLogin_btn.setText(\"Employee\");\n AuthLogin_btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n AuthLogin_btnActionPerformed(evt);\n }\n });\n\n jLabel4.setBackground(new java.awt.Color(255, 255, 255));\n jLabel4.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(153, 0, 204));\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"Login As..\");\n\n create_btn.setBackground(new java.awt.Color(255, 255, 255));\n create_btn.setText(\"Create Account\");\n create_btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n create_btnActionPerformed(evt);\n }\n });\n\n jLabel5.setBackground(new java.awt.Color(255, 255, 255));\n jLabel5.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(153, 0, 204));\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"New User?..\");\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/photo/profile-icon-29.png\"))); // NOI18N\n\n jButton1.setBackground(new java.awt.Color(102, 0, 153));\n jButton1.setForeground(new java.awt.Color(255, 255, 255));\n jButton1.setText(\"About \");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setBackground(new java.awt.Color(102, 0, 153));\n jButton2.setForeground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"Help\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton6.setBackground(new java.awt.Color(102, 0, 153));\n jButton6.setForeground(new java.awt.Color(255, 255, 255));\n jButton6.setText(\"Contact\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n\n jButton8.setBackground(new java.awt.Color(102, 0, 153));\n jButton8.setForeground(new java.awt.Color(255, 255, 255));\n jButton8.setText(\"Close\");\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n\n AuthorityLogin_btn.setBackground(new java.awt.Color(255, 255, 255));\n AuthorityLogin_btn.setText(\"Authority\");\n AuthorityLogin_btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n AuthorityLogin_btnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(10, 10, 10)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(jButton6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(82, 82, 82)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(create_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(80, 80, 80)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(userLogin_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(AuthLogin_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(AuthorityLogin_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(42, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(100, 100, 100)\n .addComponent(jLabel1)\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addComponent(create_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(userLogin_btn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(AuthLogin_btn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(AuthorityLogin_btn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton6)\n .addComponent(jButton8))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == buttonRegister) {\n\t\t\tthis.dispose();\n\t\t\tnew Register(userVec, db);\n\t\t\t\n\t\t}else if(e.getSource() == buttonLogin) {\n\t\t\tString name = texNama.getText();\n\t\t\tString password = String.valueOf(texPass.getPassword());\n\t\t\t\n\t\t\tif(passwordValidator(name, password) != -1) {\n\t\t\t\tJOptionPane.showMessageDialog(this, name+\" berhasil login!\");\n\t\t\t\tthis.dispose();\n\t\t\t\tnew Home(userVec, userVec.get(passwordValidator(name, password)), db);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox();\n jComboBox2 = new javax.swing.JComboBox();\n jComboBox3 = new javax.swing.JComboBox();\n jLabel7 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(236, 239, 244));\n setMaximumSize(new java.awt.Dimension(1150, 590));\n setMinimumSize(new java.awt.Dimension(1150, 590));\n setPreferredSize(new java.awt.Dimension(1150, 590));\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 0, 20)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 51));\n jLabel1.setText(\"Account registration\");\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 16)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(102, 102, 102));\n jLabel2.setText(\"Basic Informations\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel3.setText(\"Drug Name\");\n\n jTextField1.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jTextField1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField1KeyReleased(evt);\n }\n });\n\n jTextField2.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jTextField2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField2KeyReleased(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"Generic Name\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel5.setText(\"Brand\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel6.setText(\"Minimum Stock\");\n\n jTextField4.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jTextField4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n jTextField4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField4ActionPerformed(evt);\n }\n });\n jTextField4.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField4KeyReleased(evt);\n }\n });\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel10.setText(\"Category\");\n\n jButton2.setText(\"Add Drug\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n jButton2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jButton2KeyPressed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \" \" }));\n jComboBox1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \" \" }));\n jComboBox2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\" }));\n jComboBox3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel7.setText(\"Location\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(961, 961, 961))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 480, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel10)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox3, 0, 498, Short.MAX_VALUE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel3)\n .addGap(4, 4, 4)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel7)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(4, 4, 4)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(175, Short.MAX_VALUE))\n );\n\n jLabel11.setText(\"Add Account\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel11)))\n .addContainerGap(74, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel11))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(25, Short.MAX_VALUE))\n );\n }", "private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {\n }" ]
[ "0.7314661", "0.72085303", "0.7191521", "0.7172441", "0.7166643", "0.7134459", "0.70401394", "0.702018", "0.69614947", "0.6911413", "0.68762577", "0.6843687", "0.6801158", "0.67420805", "0.67420805", "0.67420805", "0.67420805", "0.6727474", "0.6711301", "0.6668336", "0.666686", "0.66605276", "0.66469795", "0.6622279", "0.6615083", "0.6610503", "0.659768", "0.6596372", "0.6590645", "0.6582278", "0.65784705", "0.6559313", "0.65490925", "0.6525219", "0.6525219", "0.6525219", "0.6520692", "0.6520692", "0.6520692", "0.65166235", "0.65121245", "0.6492526", "0.648941", "0.6486772", "0.64831823", "0.647783", "0.6475883", "0.6466833", "0.6460935", "0.64594454", "0.6459327", "0.6458617", "0.6455471", "0.6452538", "0.64505893", "0.6449809", "0.64471716", "0.64437973", "0.64354163", "0.64338636", "0.64275974", "0.64205956", "0.6419874", "0.64192104", "0.64134026", "0.6408054", "0.6403258", "0.6403124", "0.64025974", "0.63987875", "0.6390758", "0.6388516", "0.6387805", "0.63864607", "0.6385821", "0.63789415", "0.6376272", "0.637457", "0.6373935", "0.63703877", "0.6363513", "0.6359324", "0.6359324", "0.635774", "0.63532877", "0.6349228", "0.63477004", "0.63352543", "0.6335249", "0.6333814", "0.6326921", "0.6323811", "0.63199407", "0.63067085", "0.63051915", "0.63007545", "0.63005453", "0.62979656", "0.62956184", "0.6281466", "0.6278246" ]
0.0
-1
/ Find all of the candidate phone numbers. Order the list by Primary phone = "Y" as first number listed.
public List findCandidatePhones(Serializable candidateId) { Criteria criteria = HibernateUtil.getSessionFactory() .getCurrentSession().createCriteria(Phone.class); Object candidate = HibernateUtil.getCurrentSession().load(Candidate.class, candidateId); criteria.add(Restrictions.eq("candidate", candidate)); criteria = addOrder(criteria, "primary", ORDER_DESC); return criteria.list(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getUniquePhoneNo();", "public void getPhoneNumbers() {\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.forEach(System.out::println);\n\t}", "java.util.List<com.demo.springprotobuff.Demoproto.Student.PhoneNumber> getPhoneList();", "java.util.List<cb.Careerbuilder.Company.PhoneNumber> \n getPhoneList();", "public Set<String> getPhoneNumbers() {\n\t\t\tSet<String> tempPhoneNumbers = new HashSet<String>();\n\t\t\ttempPhoneNumbers.addAll(phoneNumbers); \n\t\t\treturn tempPhoneNumbers;\n\t\t}", "public void numberLookup() {\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getNumber() == entryNumber)\n\t\t\t.forEach(n -> System.out.println(\"This is the number of \" + n.getName()));\n\t}", "public static List<String> radixSortLSD(List<String> phoneNumbers) {\n if(phoneNumbers == null) throw new NullPointerException();\n\n if(phoneNumbers.isEmpty()) return new ArrayList<>();\n\n return sort(phoneNumbers, 9);\n }", "public java.util.List<cb.Careerbuilder.Company.PhoneNumber> getPhoneList() {\n return phone_;\n }", "@Override\n\tpublic Phone[] phoneList() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Phone[] phoneList() {\n\t\treturn null;\n\t}", "public java.util.List<com.demo.springprotobuff.Demoproto.Student.PhoneNumber> getPhoneList() {\n\t\t\treturn phone_;\n\t\t}", "@Override\n\tpublic List<PersonTelInfo> findByPhone(String phone) {\n\t\treturn getSqlSession().selectList(getIbatisMapperNameSpace() + \".findByPhone\", phone);\t \n\t}", "public LinkedList<String> getList(){\n return phoneNums;\n }", "public APIlistAvailablePhoneNumbersRequest listAvailablePhoneNumbers() throws ApiException {\n return new APIlistAvailablePhoneNumbersRequest();\n }", "public void chekcAllPhoneNumbers() {\n\t\t\n\t\tif(remaining!=-9999999 && remaining!=0)\n\t\t{\n\t\t\tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\t\tcon);\n\t \n\t\t\t\t\t// create alert dialog\n\t\t \t\t\talertDialog = alertDialogBuilder.setTitle(\"Please wait\")\n\t\t\t\t\t\t.setMessage(\"Already an update is going on.\")\n\t\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t\t.setPositiveButton(\"Ok.\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t\talertDialog.dismiss();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }).create();\n\t \n\t\t\t\t\t// show it\n\t\t\t\t\talertDialog.show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tUri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n\t\t\tString[] projection = new String[] {ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,\n\t\t\t ContactsContract.CommonDataKinds.Phone.NUMBER};\n\n\t\t\tCursor people = getContentResolver().query(uri, projection, null, null, null);\n\n\t\t\tint indexName = people.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);\n\t\t\tint indexNumber = people.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);\n\n\t\t\tint total_size = people.getCount();\n\t\t\tif(total_size<=0)\n\t\t\t{\n\t\t\t\tsetSupportProgressBarIndeterminateVisibility(false);\n\t\t\t\tToast.makeText(con, \"No contacts found.\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpeople.moveToFirst();\n\t\t\t\tdo {\n\t\t\t\t\t String name = people.getString(indexName);\n\t\t\t\t\t String number = people.getString(indexNumber);\n\t\t\t\t\t number = (new To_international(con)).change_to_international(number);\n\t\t\t\t\t if(number!=null)\n\t\t\t\t\t {\n\t\t\t\t\t \tvalid_name.add(name);\n\t\t\t\t\t \tvalid_number.add(number);\n\t\t\t\t\t }\n\t\t\t\t} while (people.moveToNext());\n\t\t\t\t\n\t\t\t\tLog.d(\"size\", \"\"+valid_name.size());\n\t\t\t\t\n\t\t\t\tif(valid_name.size()>0)\n\t\t\t\t{\n\t\t\t\t\tif(valid_name.size()>10)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = valid_name.size();\n\t\t\t\t\t\tremaining = valid_name.size();\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tfor(int i=0;i<valid_name.size();i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparse_phone_number_query();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = valid_name.size();\n\t\t\t\t\t\tremaining = valid_name.size();\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tfor(int i=0;i<valid_name.size();i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparse_phone_number_query();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsetSupportProgressBarIndeterminateVisibility(false);\n\t\t\t\t\tToast.makeText(con, \"No friends found in contacts.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\t\t\t\n\t}", "@Override\n\tpublic CelPhone[] celPhoneList() {\n\t\treturn null;\n\t}", "List<MobilePhone> getMobilePhonesFromOwner(Owner owner);", "public List<Phonenumber> getPhonenumbers() {\r\n\r\n if (this.phonenumbers == null) {\r\n\r\n this.phonenumbers = new ArrayList<Phonenumber>();\r\n\r\n }\r\n\r\n return this.phonenumbers;\r\n\r\n }", "private String populateContacts() {\n // fetch the additional information (currently phone numbers)\n Map<Integer, List<Pair<String, Integer>>> numberCache = getAdditionalInformation();\n\n Cursor cursor = mContentResolver.query(\n ContactsContract.Contacts.CONTENT_URI, QUERY_PROJECTION_CONTACT, null, null, QUERY_ORDERING_CONTACT);\n\n int idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n int nameIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY);\n int hasNumberIndex = cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER);\n\n StringBuilder concatList = new StringBuilder();\n\n // First thing we need to do is sanitize the queryString and split into tokens. One\n // important purpose of doing this is to verify if we truly have tokens to apply to a\n // search process. If we are left with an empty query, then we can simply return the\n // entire contact list. The way the algorithm logic flows, there must be at least one\n // query token in the list, even if a blank placeholder.\n ArrayList<String> sanitizedQueryTokens = new ArrayList<String>();\n if (mQueryString != null) {\n // split up the query string into tokens, based on whitespace and asterisks\n String[] queryTokens = mQueryString.trim().split(\"[\\\\*\\\\s]+\");\n // get rid of any empty string references\n for (String currentString : queryTokens) {\n if (!currentString.equals(\"\")) {\n sanitizedQueryTokens.add(currentString);\n }\n }\n // if the ArrayList is empty, then we assume match everything\n if (sanitizedQueryTokens.size() == 0) {\n mQueryString = null;\n }\n }\n\n // Now perform the search. If the queryString is null, then the search reduces\n // to a dump of all contacts\n if ( mQueryString == null) {\n // The search algorithm is designed to work without search criteria (reduction to\n // entire list dumped). However we need at least one query token to enter the main\n // search loop.\n sanitizedQueryTokens.add(\"\");\n }\n\n StringBuilder concatListMatches = new StringBuilder();\n int numMatches = 0;\n\n while (cursor.moveToNext()) {\n String currentName = cursor.getString(nameIndex);\n\n if (currentName != null && !currentName.isEmpty()) {\n // If we are not actually performing a search, we still need to enter this loop\n // once (hence why we added a blank term above).\n for (String currentString : sanitizedQueryTokens) {\n // Add this contact to the list if we are either not performing a search\n // or if the current search criteria (token) matches\n if (mQueryString == null || currentName.toLowerCase().contains(\n currentString.toLowerCase())) {\n\n concatListMatches.append(currentName).append(\"\\n\");\n\n // If this contact has phone number(s), display them\n if (cursor.getInt(hasNumberIndex) > 0) {\n // grab the number(s) from the phat cache\n List<Pair<String, Integer>> phNums;\n if ((phNums = numberCache.get(cursor.getInt(idIndex))) != null) {\n // Pair<Phone Number, Type of Number>\n for (Pair<String, Integer> phNum : phNums) {\n concatListMatches.append(\"\\t\").append(phNum.first);\n switch(phNum.second) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n concatListMatches.append(\" [HOME]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n concatListMatches.append(\" [MOBILE]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n concatListMatches.append(\" [WORK]\");\n break;\n }\n concatListMatches.append(\"\\n\");\n }\n } else {\n // This should not happen. Means that there is a contact in which a\n // phone number is associated but yet no such number actually can\n // be found in the DB\n concatList.append(\"\\t<Phone number referenced, but not found>\\n\");\n }\n }\n\n ++numMatches;\n break;\n }\n }\n }\n }\n concatList.append(numMatches).append(\" Contacts Found\\n\\n\").append(concatListMatches);\n\n Log.d(\"populate contact list \",\"str \"+concatList.toString());\n return concatList.toString();\n }", "public String[] getAllnumbers() {\r\n\t\tif(morenumbers==null)\r\n\t\t\treturn null;\r\n\t\tArrayList<String> al =new ArrayList<String>();\r\n\t\t al.add(phoneNum);\r\n\t\t for(String s:morenumbers){\r\n\t\t\t al.add(s);\r\n\t\t }\r\n\t\t String[] array = al.toArray(new String[0]);\r\n\t\treturn array;\r\n\t}", "public java.util.List<cb.Careerbuilder.Company.PhoneNumber> getPhoneList() {\n if (phoneBuilder_ == null) {\n return java.util.Collections.unmodifiableList(phone_);\n } else {\n return phoneBuilder_.getMessageList();\n }\n }", "@Test\n public void testProcessPhoneNumbers() {\n StdInputPhoneNumberProcessor processor = new StdInputPhoneNumberProcessor(scanner, matcher);\n processor.processPhoneNumbers();\n }", "public List<String> getPhoneNumbers() {\n return phoneNumbers;\n }", "private List<PhoneNumber> generatePhoneNumbers(Driver driver, int amount){\n\t\tList<PhoneNumber> phoneNumbers = new ArrayList<PhoneNumber>();\n\t\tfor(int i=0; i < amount; i++){ \n\t\t\tphoneNumbers.add(new PhoneNumber());\n\t\t\tphoneNumbers.get(i).setCountryCode(\"USA\");\n\t\t\tphoneNumbers.get(i).setAreaCode(\"513\");\n\t\t\tphoneNumbers.get(i).setNumber(\"554-2930\");\t\t\n\t\t\tphoneNumbers.get(i).setType(lookupCacheService.getPhoneNumberTypes().get(0));\t\n\t\t\tphoneNumbers.get(i).setPreferredInd(i == 0 ? \"Y\" : \"N\");\n\t\t\tphoneNumbers.get(i).setDriver(driver);\t\n\t\t}\n\t\treturn phoneNumbers;\n\t}", "private String getPrimaryNumber(long _id) {\n String primaryNumber = null;\n try {\n Cursor cursor = getContentResolver().query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.TYPE},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = \"+ _id, // We need to add more selection for phone type\n null,\n null);\n if(cursor != null) {\n while(cursor.moveToNext()){\n switch(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE))){\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_OTHER :\n }\n if(primaryNumber != null)\n break;\n }\n }\n } catch (Exception e) {\n Log.i(\"test\", \"Exception \" + e.toString());\n } finally {\n if(cursor != null) {\n cursor.deactivate();\n cursor.close();\n }\n }\n return primaryNumber;\n }", "public java.util.List<com.demo.springprotobuff.Demoproto.Student.PhoneNumber> getPhoneList() {\n\t\t\t\tif (phoneBuilder_ == null) {\n\t\t\t\t\treturn java.util.Collections.unmodifiableList(phone_);\n\t\t\t\t} else {\n\t\t\t\t\treturn phoneBuilder_.getMessageList();\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic CelPhone[] celphoneList() {\n\t\treturn null;\n\t}", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "public List<HashMap<String,String>> contacts() {\n final Uri uriContact = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n ContentResolver cr = getActivity().getContentResolver();\n Cursor cur = cr.query(uriContact, null, null, null, null);\n\n List<HashMap<String,String>> contacts=new ArrayList<>();\n if (cur.getCount() > 0) {\n while (cur.moveToNext()) {\n String id = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String name = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n\n String has_phone = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n HashMap<String,String> contact=new HashMap();\n if(!has_phone.endsWith(\"0\"))\n {\n contact.put(\"name\", name);\n String phoneNumber = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contact.put(\"number\",phoneNumber);\n contacts.add(contact);\n }\n }\n }\n this.contacts_phone=contacts;\n contacts=filter_to_app(contacts);\n return contacts;\n }", "public List<String> getPhone()\r\n {\r\n return phoneList;\r\n }", "public java.util.List<? extends com.demo.springprotobuff.Demoproto.Student.PhoneNumberOrBuilder> getPhoneOrBuilderList() {\n\t\t\treturn phone_;\n\t\t}", "public List<PrimeNr> getAllPrimeNrs(){\n Cursor cursor = database.query(PrimeNrBaseHelper.TABLE,null, null, null, null\n , null, PrimeNrBaseHelper.PRIME_NR);\n\n List<PrimeNr> primeNrList = new ArrayList<>();\n\n try {\n cursor.moveToFirst();\n while(!cursor.isAfterLast()){\n Long pnr = cursor.getLong(cursor.getColumnIndex(PrimeNrBaseHelper.PRIME_NR));\n String foundOn = cursor.getString(cursor.getColumnIndex(PrimeNrBaseHelper.FOUND_ON));\n primeNrList.add(new PrimeNr(pnr, foundOn));\n cursor.moveToNext();\n }\n } finally {\n cursor.close();\n }\n\n return primeNrList;\n }", "com.demo.springprotobuff.Demoproto.Student.PhoneNumber getPhone(int index);", "Collection<Phone> findAllPhonesForPerson(int personId);", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "public java.util.List<? extends cb.Careerbuilder.Company.PhoneNumberOrBuilder> \n getPhoneOrBuilderList() {\n return phone_;\n }", "public Set<DBMSPhoneNumber> getPhoneNumbers() {\r\n return phoneNumbers;\r\n }", "private ArrayList<ArrayList<Integer>> sortValidPartners(Matching data, int validPartnersNo, ArrayList<ArrayList<Integer>> validPartners) {\n for (int resident = 0; resident < validPartners.get(0).size(); resident++) {\n\n for (int partner = 1; partner < validPartnersNo; partner++) {\n int partnerRank = data.getResidentPreference().get(resident).indexOf(validPartners.get(partner).get(resident));\n int partnerValue = validPartners.get(partner).get(resident);\n if (partnerRank == -1)\n partnerRank = 999999;\n int partnerToCompare = partner - 1;\n\n int partnerToCompareRank = data.getResidentPreference().get(resident).indexOf(validPartners.get(partnerToCompare).get(resident));\n if (partnerToCompareRank == -1)\n partnerToCompareRank = 999999;\n while (partnerToCompareRank > partnerRank) {\n validPartners.get(partnerToCompare + 1).set(resident, validPartners.get(partnerToCompare).get(resident));\n partnerToCompare--;\n if (partnerToCompare < 0)\n break;\n partnerToCompareRank = data.getResidentPreference().get(resident).indexOf(validPartners.get(partnerToCompare).get(resident));\n if (partnerToCompareRank == -1)\n partnerToCompareRank = 999999;\n }\n\n validPartners.get(partnerToCompare + 1).set(resident, partnerValue);\n }\n }\n return validPartners;\n }", "public void checkNumberPhone(){\n PhoneBook phoneBook = new PhoneBook();\n System.out.println(\"Mời nhập số điện thoại mới \");\n String newnumberPhone;\n do {\n newnumberPhone = sc.next();\n if(!checknumberPhoneSake( newnumberPhone))\n System.out.println(\"Số điên thoai đã tồn tại mời nhập lai\");\n }while (!checknumberPhoneSake( newnumberPhone));\n phoneBook.setNumberphone(newnumberPhone);\n }", "void sortNumber()\r\n\t{\r\n\t\tCollections.sort(this, this.ContactNumber);\r\n\t}", "cb.Careerbuilder.Company.PhoneNumber getPhone(int index);", "List<SdkPhone> selectByExample(SdkPhoneExample example);", "private void getContactDataBefore() {\n int i = 0;\n List<String> list = new ArrayList<>();\n\n Cursor c1 = getContentResolver()\n .query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n if ((c1 != null) && c1.moveToFirst()) {\n\n // add contact id's to the mIDs list\n do {\n String id = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n String name = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n // query all contact numbers corresponding to current id\n Cursor c2 = getContentResolver()\n .query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=?\",\n new String[]{id}, null);\n\n if (c2 != null && c2.moveToFirst()) {\n // Log.d(\"DEBUG\",\"name =\" + name);\n list = new ArrayList<>();\n\n if (idsHash.containsKey(name)) {\n list = idsHash.get(name);\n } else {\n mIDs.add(id);\n mNames.add(name);\n mNumbers.add(c2.getString(c2\n .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER)));\n }\n\n list.add(id);\n idsHash.put(name, list);\n\n c2.close();\n } else {\n c2.close();\n }\n\n i++;\n } while (c1.moveToNext() && i < c1.getCount());\n\n c1.close();\n }\n }", "@Override\n public void onActivityResult(int reqCode, int resultCode, Intent data){\n super.onActivityResult(reqCode, resultCode, data);\n\n switch(reqCode){\n case (PICK_CONTACT):\n if (resultCode == Activity.RESULT_OK){\n Uri contactData = data.getData();\n //Getting contact data through cursor\n Cursor c = getContentResolver().query(contactData, null, null, null, null);\n if (c.moveToFirst()) {\n\n String name = c.getString(c.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n String id = c.getString(c.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n\n String hasPhone = c.getString(c.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER));\n\n String cNumber = \"\";\n\n List<String> allNumbers = new ArrayList<String>();\n\n int phoneIdx = 0;\n\n if (hasPhone.equalsIgnoreCase(\"1\")) {\n Cursor phones = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null);\n phoneIdx = phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DATA);\n //phones.moveToFirst();\n\n int ans = 0;\n if (phones.moveToFirst()) {\n while (!phones.isAfterLast()) {\n cNumber = phones.getString(phoneIdx);\n Toast.makeText(getBaseContext(),cNumber,Toast.LENGTH_SHORT).show();\n allNumbers.add(cNumber);\n ans++;\n phones.moveToNext();\n }\n }\n\n final CharSequence[] items = allNumbers.toArray(new String[allNumbers.size()]);\n\n //String cNumber = phones.getString(phones.getColumnIndex(\"data1\"));\n //String Number = cNumber.replaceAll(\" \", \"\");\n\n DBAdapterSms db = new DBAdapterSms(this);\n\n db.open();\n //db.insertContact(name, id, Number);\n for(int i = 0; i < ans; i++) {\n String selectedNumber = items[i].toString();\n selectedNumber = selectedNumber.replace(\"-\", \"\");\n selectedNumber = selectedNumber.replace(\" \", \"\");\n db.insertContact(name, id + \"a\" + i, selectedNumber);\n }\n db.close();\n\n Intent intent = new Intent(SendMessage.this,SendMessage.class);\n startActivity(intent);\n }\n }\n }\n }\n }", "java.lang.String getPhonenumber();", "public java.util.List<? extends com.demo.springprotobuff.Demoproto.Student.PhoneNumberOrBuilder> getPhoneOrBuilderList() {\n\t\t\t\tif (phoneBuilder_ != null) {\n\t\t\t\t\treturn phoneBuilder_.getMessageOrBuilderList();\n\t\t\t\t} else {\n\t\t\t\t\treturn java.util.Collections.unmodifiableList(phone_);\n\t\t\t\t}\n\t\t\t}", "protected void lookForNumber(String searchString) {\n\t\tif(rdbtnExactMatch.isSelected()) {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().equals(searchString.toLowerCase()))\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].equals(searchString))\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\t\r\n\t\t}\r\n\t\t\r\n\t\t// Look for a name starting with searchString\r\n\t\telse if(rdbtnStartsWith.isSelected()) {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().startsWith(searchString.toLowerCase())) {\r\n\t\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].startsWith(searchString)) {\r\n\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Look for a name ending with searchString\r\n\t\telse {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().endsWith(searchString.toLowerCase())) {\r\n\t\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].endsWith(searchString)) {\r\n\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "private String generatePhone() {\n\t\tString ret = \"\";\n\t\tString[] areaCode = { \"051\", \"055\", \"045\", \"043\", \"053\" };\n\n\t\t// Gets an area code\n\t\tret = areaCode[(new Random()).nextInt(5)];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint n = (new Random()).nextInt(9);\n\n\t\t\t// Checks if the first number is 0\n\t\t\tif (i == 0 && n == 0) {\n\t\t\t\ti -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tret += n;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "java.lang.String getUserPhone();", "public java.util.List<? extends cb.Careerbuilder.Company.PhoneNumberOrBuilder> \n getPhoneOrBuilderList() {\n if (phoneBuilder_ != null) {\n return phoneBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(phone_);\n }\n }", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "public Phone[] getControlledPhones(LDAPProvider lp, String beginsWith) {\r\n HashMap matchRules = new HashMap();\r\n matchRules.put(\"ciscoatProfileOwner\", this.userId);\r\n String[] searchCtrls = {\"ciscoCCNatControlDevices\"};\r\n Vector answer = lp.sendRequest(\"ou=profiles, ou=CCN\", matchRules, true, searchCtrls);\r\n Vector matchingPhones = new Vector();\r\n if (answer != null) {\r\n Vector phones = (Vector)((HashMap)answer.get(0)).get(\"ciscoCCNatControlDevices\");\r\n if (phones != null) {\r\n for (int i = 0; i < phones.size(); i++) {\r\n if (beginsWith == null)\r\n beginsWith = \"\";\r\n String phone = (String) phones.get(i);\r\n if (phone.startsWith(beginsWith)) {\r\n matchingPhones.add(phone);\r\n }\r\n }\r\n }\r\n }\r\n Phone[] phoneArray = new Phone[matchingPhones.size()];\r\n for (int i = 0; i < matchingPhones.size(); i++) {\r\n boolean excluded = false;\r\n phoneArray[i] = Phone.getPhone((String)matchingPhones.get(i));\r\n }\r\n return phoneArray;\r\n }", "public void getPhoneNumber(ArrayList<String> document) {\r\n String line = \"\";\r\n for(int i = 0; i < document.size(); i++)\r\n {\r\n if(document.get(i).contains(\"Fax:\"))\r\n {\r\n continue;\r\n }\r\n if(document.get(i).contains(\"(\") || document.get(i).contains(\"-\"))\r\n {\r\n line = document.get(i);\r\n break;\r\n }\r\n }\r\n number = line.replaceAll(\"[^\\\\d]\", \"\");\r\n }", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "public void getContactByCity() {\n System.out.println(\"enter a name of city to fetch contact details:--\");\n String city = scanner.next();\n\n Iterator itrs = list.iterator();\n while (itrs.hasNext()) {\n Contact person = (Contact) itrs.next();\n\n if (city.equals(person.getCity())) {\n List streamList = list.stream().map(n -> n.getPhoneNo()).collect(Collectors.toList());\n System.out.println(streamList);\n }\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tLetterComboPhone obj = new LetterComboPhone();\n\t\tString digits = \"23\";\n\t\tint flag = 1;\n\t\tSystem.out.println(obj.getList(\"23\"));\n\t\tLinkedList<String> st = new LinkedList<>();\n\t\tString finalDigit[] = dict[Integer.parseInt(digits.charAt(0)+\"\")];\n\t\tString []nextDigit;\n\t\tString result[];\n\t\tfor(int k = 1; k < digits.length(); k++) {\n\t\t\t\n\t\t\tnextDigit= dict[Integer.parseInt(digits.charAt(k)+\"\")];\n\t\t\tresult = new String[finalDigit.length*nextDigit.length];\n\t\t\tint idx = 0;\n\t\t\tfor(int i = 0; i < finalDigit.length; i++) {\n\t\t\t\t\n\t\t\t\tfor(int j = 0; j< nextDigit.length; j++) {\n\t\t\t\t\tresult[idx++] = finalDigit[i] + nextDigit[j];\n\t\t\t\t\tSystem.out.println(\"debug\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t \n\t\t\t}\n\t\t\tfinalDigit = result;\n\t\t}\n\t\tSystem.out.println(Arrays.toString(finalDigit));\n\n\t}", "public static void searchPhone(Contact[] myContacts, String find)\n {\n int counter = 0;\n System.out.println(\"Find results: \");\n for(int i = 0; i<myContacts.length; i++)\n {\n if(myContacts[i].getPhone().equals(find))\n {\n System.out.println(myContacts[i]);\n counter++;\n }\n }\n if(counter == 0)\n {\n System.out.println(\"There are no listings for \"+find);\n }\n else if(counter == 1)\n {\n System.out.println(\"There was \"+counter+\" listing for \"+find);\n }\n else\n {\n System.out.println(\"There were \"+counter+\" listings for \"+find);\n }\n }", "public Address getPrimaryContactParsed();", "cb.Careerbuilder.Company.PhoneNumberOrBuilder getPhoneOrBuilder(\n int index);", "public List<PurchasedPhoneNumber> getPhoneNumbers() {\n return this.phoneNumbers;\n }", "@Override\n\tpublic Iphone[] iphoneList() {\n\t\treturn null;\n\t}", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "public ArrayList<String[]> searchField(String phone)\n\t{\n\t\tArrayList<Customer> customers = CustomerContainer.getInstance().getCustomers();\t\n\t\tArrayList<String[]> data = new ArrayList<>();\n\t\tif (customers == null)\n\t\t{\n\t\t\treturn data;\n\t\t}\n\t\tfor (Customer customer : customers)\n\t\t{\n\t\t\tif (Integer.toString(customer.getPhone()).contains(phone))\n\t\t\t{\n\t\t\t\tdata.add(customer.tableFill());\n\t\t\t}\n\t\t}\n\t\treturn data;\n\t}", "public List<Customer> findByPhone(String p) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE phone = ?\");\n ppst.setString(1, p);\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "public ArrayList<String> getPhone(){\r\n\t\treturn phone;\t\t\r\n\t}", "@SuppressWarnings({\"unchecked\"})\n List<Integer> findPrimaryIdPersonsByFirstLast(String first, String last, String indSealed);", "java.util.List<? extends cb.Careerbuilder.Company.PhoneNumberOrBuilder> \n getPhoneOrBuilderList();", "java.lang.String getPhone();", "public String checkPhone() {\n String phone = \"\"; // Create phone\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n phone = checkEmpty(\"Phone\"); // Call method to check input of phone\n String phoneRegex = \"\\\\d{10,11}\"; // Pattern for phone number\n boolean isContinue = true; // Condition loop\n\n while (isContinue) {\n // If pattern not match, the print out error\n if (!Pattern.matches(phoneRegex, phone)) {\n System.out.println(\"Phone number must be 10 or 11 number!\");\n System.out.print(\"Try anthor phone: \");\n phone = checkEmpty(\"Phone\");\n } else {\n isContinue = false;\n }\n }\n\n boolean isExist = false; // Check exist phone\n for (Account acc : accounts) {\n if (phone.equals(acc.getPhone())) {\n // Check phone if exist print out error\n System.out.println(\"This phone has already existed!\");\n System.out.print(\"Try another phone: \");\n isExist = true;\n }\n }\n\n // If phone not exist then return phone\n if (!isExist) {\n return phone;\n }\n }\n return phone; // Return phone\n }", "public void collectPhoneNumbers1(Map<String,Object> VerifiedParents) {\n for (Map.Entry<String, Object> entry : VerifiedParents.entrySet()){\n\n //Get user map\n Map singleUser = (Map) entry.getValue();\n //Get phone field and append to list\n phoneNumbers.add((String) singleUser.get(\"email\"));\n }\n// Toast.makeText(getApplicationContext(), \"It is running\",\n// Toast.LENGTH_SHORT).show();\n\n }", "private List getContactNames() {\n List<Contact> contacts = new ArrayList<>();\n // Get the ContentResolver\n ContentResolver cr = getContentResolver();\n // Get the Cursor of all the contacts\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n while (cursor.moveToNext()) {\n\n\n //Sjekker om kontakt har et tlf nummer\n String hasNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n String contactName = \"\";\n if (hasNumber.equals(\"1\")) {\n contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n Contact contact = new Contact(contactName);\n contacts.add(contact);\n\n\n }\n }\n cursor.close();\n return contacts;\n }", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "public com.demo.springprotobuff.Demoproto.Student.PhoneNumber getPhone(int index) {\n\t\t\treturn phone_.get(index);\n\t\t}", "private Place getPlaceWithTelephoneNumber() {\n\n // finds nearby place according the slot value\n List<Place> places = PlaceFinder.findNearbyPlace(GeoCoder.getLatLng(deviceAddress), slotBankNameValue);\n\n // check the list of places for one with opening hours\n return PlaceFinder.findTelephoneNumberPlace(places, slotBankNameValue);\n }", "List<Person> getAllPersonsWithMobile();", "public static int phoneSequence() throws FileNotFoundException {\n\t\t\n\t\tint contract;\n\t\t\n\t\tcontract = JOptionPane.showOptionDialog(null, \"Do you need a contract?\", \"Nolan's Phone Store\",\n\t\t\t\tJOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\n\t\tif (contract == 0)\n\t\t{\n\t\t\treturn withContract();\n\t\t}\n\t\telse if (contract == 1)\n\t\t{\n\t\t\treturn withoutContract();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn cancel();\n\t\t}\n\t}", "public Contact findContactByNumber(String number){\n SQLiteDatabase db = this.getReadableDatabase();\n\n // prevent for prefix number\n String number2 = number;\n String number3 = \"+\" + number;\n String number4 = number;\n if(number.length()>=3){\n number4 = \"0\" + number.substring(2);\n if(number.contains(\"+\")){\n number2 = \"0\" + number.substring(3);\n }\n }\n\n Log.d(\"db\", number2);\n\n Cursor cur;\n cur = db.rawQuery(\n \"SELECT DISTINCT c.* FROM \"\n + TABLE_CONTACTS + \" c,\"\n + TABLE_NUMBERS + \" n \"\n + \"WHERE c.\" + _ID + \" = n.\" + C_ID\n + \" AND ( n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? )\", new String[]{number, number2, number3, number4 });\n List<Contact> ctxs = getContactObjct(db, cur, number);\n Contact c ;\n if(ctxs.size()>0){\n c = ctxs.get(0);\n }else{\n c = new Contact(-1, null, number);\n }\n\n db.close();\n return c;\n }", "private void createAllApnList() {\n allApns = new ArrayList<ApnSetting>();\n String operator = phone.mSIMRecords.getSIMOperatorNumeric();\n\n if (operator != null) {\n String selection = \"numeric = '\" + operator + \"'\";\n\n Cursor cursor = phone.getContext().getContentResolver().query(\n Telephony.Carriers.CONTENT_URI, null, selection, null, null);\n\n if (cursor != null) {\n if (cursor.getCount() > 0) {\n allApns = createApnList(cursor);\n // TODO: Figure out where this fits in. This basically just \n // writes the pap-secrets file. No longer tied to PdpConnection\n // object. Not used on current platform (no ppp).\n //PdpConnection pdp = pdpList.get(pdp_name);\n //if (pdp != null && pdp.dataLink != null) {\n // pdp.dataLink.setPasswordInfo(cursor);\n //}\n }\n cursor.close();\n }\n }\n\n if (allApns.isEmpty()) {\n if (DBG) log(\"No APN found for carrier: \" + operator);\n notifyNoData(PdpConnection.PdpFailCause.BAD_APN);\n }\n }", "public ArrayList<DetailModel> getPhonesFromFavorite(){\n\n return null;\n }", "public ArrayList<AddressEntry> searchByPhoneNumber(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getPhoneNumber().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "int getPhone();", "private String getRandomContactPhoneNumber() {\n \t\treturn contactPhoneNumbers.get(randy.nextInt(contactPhoneNumbers.size()));\n \t}", "List<Integer> findPrimaryIdPersonsByFirstLastMiddle(String first, String last, String middle, String indSealed);", "Optional<String> prefixByPhoneNumber(String phoneNumber);", "private void populatePhone() {\n dataBaseHelper = new DataBaseHelper(this);\n List<String> lables = dataBaseHelper.getPN();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, lables);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n phoneNum.setAdapter(dataAdapter);\n\n }", "public String getPhonenumber() {\n return phonenumber;\n }", "private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }", "public List<PhoneNumber> _queryPerson_PhoneNumberList(Long person_id) {\n synchronized (this) {\n if (person_PhoneNumberListQuery == null) {\n QueryBuilder<PhoneNumber> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.Person_id.eq(null));\n person_PhoneNumberListQuery = queryBuilder.build();\n }\n }\n Query<PhoneNumber> query = person_PhoneNumberListQuery.forCurrentThread();\n query.setParameter(0, person_id);\n return query.list();\n }", "public cb.Careerbuilder.Company.PhoneNumber getPhone(int index) {\n return phone_.get(index);\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tScanner keyboard= new Scanner(System.in);\n\t\t\n\t\t//creation of variables to manage user input\n\t\tboolean loop=true;\n\t\tchar operation;\n\t\tString first, last, phone;\n\t\tint position, amtLookups=0, amtReverseLookups=0;\n\t\tPhonebook[] phonebook= new Phonebook[100];\n\t\tint size = 0;\n\t\ttry {\n\t\t\tsize = open(phonebook);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\twhile(loop) \n\t\t{\n\t\t\tSystem.out.println(\"lookup, reverse-lookup, quit?(l/r/q/)\");\n\t\t\toperation=keyboard.next().charAt(0); //returns the char at string's O\n\t\t\tswitch(operation)\n\t\t\t{\n\t\t\tcase 'L':\n\t\t\tcase 'l':\n\t\t\t\tSystem.out.println(\"last name?\");\n\t\t\t\tlast=keyboard.next();\n\t\t\t\tSystem.out.println(\"first name?\");\n\t\t\t\tfirst=keyboard.next();\n\t\t\t\tposition=lookup(first,last,phonebook,size);\n\t\t\t\tif(position!=-1) {\n\t\t\t\t\tSystem.out.println(phonebook[position].getName()+\"\\'s phone number is \"+phonebook[position].getPhone());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"-- Name not found\");\n\t\t\t\t}\n\t\t\t\tamtLookups++;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'R':\n\t\t\tcase 'r':\n\t\t\t\tSystem.out.println(\"phone number (nnn-nnn-nnnn)?\");\n\t\t\t\tphone=keyboard.next();\n\t\t\t\tposition=reverseLookup(phone,phonebook,size);\n\t\t\t\tif(position!=-1) {\n\t\t\t\t\tSystem.out.println(phonebook[position].getPhone()+\" belongs to \"+phonebook[position].getName());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"-- Phone number not found\");\n\t\t\t\t}\n\t\t\t\tamtReverseLookups++;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'Q':\n\t\t\tcase 'q':\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(amtLookups+\" lookups performed\");\n\t\t\t\tSystem.out.println(amtReverseLookups+\" reverse lookups performed\");\n\t\t\t\tloop=false;// ends the loop, allows program to stop running.\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//catch invalid input\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Error 404: Wrong input detected.\");\n\t\t\t\tSystem.out.println(operation+ \" is Invalid Input.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tkeyboard.close();\t\n}" ]
[ "0.58856976", "0.58350915", "0.5775883", "0.5741385", "0.54806566", "0.54541653", "0.54449916", "0.5426991", "0.54164916", "0.54164916", "0.5414466", "0.53270096", "0.53117496", "0.52855456", "0.52697766", "0.52475935", "0.52023774", "0.5186696", "0.51857173", "0.51842344", "0.51560885", "0.51442176", "0.51417", "0.5138821", "0.5137127", "0.5127097", "0.51162547", "0.5101804", "0.5098459", "0.50972265", "0.50705373", "0.50681055", "0.49994928", "0.49975565", "0.4953477", "0.49332973", "0.49285892", "0.49163198", "0.4915357", "0.49120522", "0.49041095", "0.4895658", "0.4870705", "0.48524815", "0.4846331", "0.48290527", "0.48284653", "0.48244652", "0.48162553", "0.48036352", "0.47981042", "0.47937343", "0.47937343", "0.47937343", "0.47937343", "0.47752514", "0.47749603", "0.47585684", "0.47585684", "0.47585684", "0.47585684", "0.4746482", "0.47444516", "0.4737155", "0.47335526", "0.47244272", "0.47225073", "0.47172064", "0.47142306", "0.4712702", "0.46941495", "0.46874762", "0.46728823", "0.46726406", "0.46717218", "0.46500778", "0.46449435", "0.46436742", "0.4639424", "0.4633617", "0.4633617", "0.4633617", "0.4628176", "0.46201545", "0.46162596", "0.46109965", "0.46012005", "0.46006668", "0.45959786", "0.4594487", "0.45839778", "0.45834795", "0.4581703", "0.45772138", "0.45717427", "0.4569524", "0.4565251", "0.45636702", "0.45540047", "0.4551945" ]
0.5972772
0
Sort from high demand to low demand
@Override public int compareTo(UnconstrainedBidElement o) { return Double.compare(o.demandWatt, demandWatt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sort( int low, int high)\n {\n if (low > high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(low, high);\n\n // Recursively sort elements before\n // partition and after partition\n sort( low, pi-1);\n sort( pi+1, high);\n }\n }", "public void sortHighscores(){\n Collections.sort(highscores);\n Collections.reverse(highscores);\n }", "public void sortByFuelConsumption(){\n for (int d = carPark.getCars().size() / 2; d >= 1; d /= 2)\n for (int i = d; i < carPark.getCars().size(); i++)\n for (int j = i; j >= d && carPark.getCars().get(j-d).getFuelConsumption() > carPark.getCars().get(j).getFuelConsumption(); j -= d) {\n Car temp = carPark.getCars().get(j);\n carPark.getCars().remove(j);\n carPark.getCars().add(j - 1, temp);\n }\n }", "public void sortSubstrateSwitchByResource() {\n\t\tCollections.sort(this.listNode, new Comparator<SubstrateSwitch>() {\n\t\t\t@Override\n\t\t\tpublic int compare(SubstrateSwitch o1, SubstrateSwitch o2) {\n\n\t\t\t\tif (o1.getCpu() < o2.getCpu()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\tif (o1.getCpu() > o2.getCpu()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}", "public void sortHighScores(){\n for(int i=0; i<MAX_SCORES;i++){\n long score = highScores[i];\n String name= names[i];\n int j;\n for(j = i-1; j>= 0 && highScores[j] < score; j--){\n highScores[j+1] = highScores[j];\n names[j+1] = names[j];\n }\n highScores[j+1] = score;\n names[j+1] = name;\n }\n }", "private void sortByDateOpen() {\n //selection sort\n for (int i = 0; i < size - 1; i++) {\n int earliestDateIndex = i;\n for (int j = i + 1; j < size; j++)\n if (accounts[j].getDateOpen().compareTo(accounts[earliestDateIndex].getDateOpen()) < 0) {\n earliestDateIndex = j;\n }\n Account acc = accounts[earliestDateIndex];\n accounts[earliestDateIndex] = accounts[i];\n accounts[i] = acc;\n }\n }", "static void sort(int vec[], int low, int high) {\n\t\tif (low < high) {\n\t\t\t/* pi esta particionando indices, arr[pi] is now at right place */\n\t\t\tint pi = particion(vec, low, high);\n\t\t\t// Recursivamente ordena elementos antes de\n\t\t\t// la partición y despues de la partición\n\t\t\tsort(vec, low, pi - 1);\n\t\t\tsort(vec, pi + 1, high);\n\t\t}\n\t}", "void sort(int arr[], int low, int high) {\n\t\tif (low < high) {\n\t\t\t/*\n\t\t\t * pi is partitioning index, arr[pi] is now at right place\n\t\t\t */\n\t\t\tint pi = partition(arr, low, high);\n\n\t\t\t// Recursively sort elements before\n\t\t\t// partition and after partition\n\t\t\tsort(arr, low, pi - 1);\n\t\t\tsort(arr, pi + 1, high);\n\t\t}\n\t}", "public void SortByPrice() {\n for (int i = 1; i < LastIndex; i++) {\n int x = i;\n while (x >= 1) {\n if (ForChild[x - 1].getPrice() > ForChild[x].getPrice()) {\n Confectionery sweets = ForChild[x - 1];\n ForChild[x - 1] = ForChild[x];\n ForChild[x] = sweets;\n\n }\n x -= 1;\n }\n }\n }", "public void sortSubstrateSwitch() {\n\t\tCollections.sort(this.listNode, new Comparator<SubstrateSwitch>() {\n\t\t\t@Override\n\t\t\tpublic int compare(SubstrateSwitch o1, SubstrateSwitch o2) {\n\n\t\t\t\tif (o1.getType() > o2.getType())\n\t\t\t\t\treturn -1;\n\t\t\t\tif (o1.getType() < o2.getType())\n\t\t\t\t\treturn 1;\n\t\t\t\tif (o1.getType() == o2.getType()) {\n\t\t\t\t\tif (o1.getCpu() < o2.getCpu()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (o1.getCpu() > o2.getCpu()) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}", "public List<Equipment> sortByEquipmentWeight(){\n List<Equipment> sortedEquipment = equipment;\n Collections.sort(sortedEquipment);\n return sortedEquipment;\n }", "public void sort()\n {\n\tstrack.sort((Node n1, Node n2) ->\n\t{\n\t if (n1.getCost() < n2.getCost()) return -1;\n\t if (n1.getCost() > n2.getCost()) return 1;\n\t return 0;\n\t});\n }", "private void sortByWeight()\n\t{\n\t\tfor(int i=1; i<circles.size(); i++)\n\t\t{\n\t\t\tPVCircle temp = circles.get(i);\n\t\t\tint thisWeight = circles.get(i).getWeight();\n\t\t\tint j;\n\t\t\tfor(j=i-1; j>=0; j--)\n\t\t\t{\n\t\t\t\tint compWeight = circles.get(j).getWeight();\n\t\t\t\tif(thisWeight < compWeight)\n\t\t\t\t\tbreak;\n\t\t\t\telse\n\t\t\t\t\tcircles.set(j+1, circles.get(j));\n\t\t\t}\n\t\t\tcircles.set(j+1, temp);\n\t\t}\n\t\t\n\t}", "private void sortByDateOpen() {\r\n\t\tfor ( int i = 0; i < size-1; i++ ) {\r\n\t\t\tint minIndex = i; \r\n\t\t\tfor ( int j = i + 1; j < size; j++) { \r\n\t\t\t\t//returns -1 if the date is less than\r\n\t\t\t\tif ( accounts[j].getDateOpen().compareTo(accounts[minIndex].getDateOpen()) == -1 ) {\r\n\t\t\t\t\tminIndex = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tAccount temp = accounts[minIndex];\r\n\t\t\taccounts[minIndex] = accounts[i];\r\n\t\t\taccounts[i] = temp;\r\n\t\t}\r\n\t\treturn;\r\n\t}", "public void setSortOnCPUTime() {\n this.sortedJobList = new TreeSet<Job>(new Comparator<Job>() {\n @Override\n public int compare(Job a, Job b) {\n\n int aCPUUsed = 0;\n int bCPUUsed = 0;\n\n try {\n aCPUUsed = a.getCPUUsed();\n bCPUUsed = b.getCPUUsed();\n } catch (AS400SecurityException e) {\n e.printStackTrace();\n } catch (ErrorCompletingRequestException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ObjectDoesNotExistException e) {\n e.printStackTrace();\n }\n\n if (aCPUUsed == bCPUUsed) return 0;\n else return bCPUUsed - aCPUUsed;\n }\n });\n }", "public void sortGivenArray_popularity() { \n int i, j, k; \n for(i = movieList.size()/2; i > 0; i /= 2) {\n for(j = i; j < movieList.size(); j++) {\n Movie key = movieList.get(j);\n for(k = j; k >= i; k -= i) {\n if(key.rents > movieList.get(k-i).rents) {\n movieList.set(k, movieList.get(k-i));\n } else {\n break; \n }\n }\n movieList.set(k, key);\n }\n } \n }", "public void sortScoresDescendently(){\n this.langsScores.sort((LangScoreBankUnit o1, LangScoreBankUnit o2) -> {\n return Double.compare(o2.getScore(),o1.getScore());\n });\n }", "private void sort(int arr1[], int arr2[], int low, int high) {\n if (low < high) {\n /* index is partitioning index, arr[index] is\n now at right place */\n int index = partition(arr1, arr2, low, high);\n // Recursively sort elements before partition and after partition\n sort(arr1, arr2, low, index-1);\n sort(arr1, arr2, index+1, high);\n }\n }", "public void sortBasedPendingJobs();", "public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}", "private void sort() {\n Collections.sort(mEntries, new Comparator<BarEntry>() {\n @Override\n public int compare(BarEntry o1, BarEntry o2) {\n return o1.getX() > o2.getX() ? 1 : o1.getX() < o2.getX() ? -1 : 0;\n }\n });\n }", "private void sortByDateOpen() { // sort in ascending order\n\t\tint numAccounts = size;\n\t\tDate firstDateOpen;\n\t\tDate secondDateOpen;\n\t\t\n\t\tfor (int i = 0; i < numAccounts-1; i++) {\n\t\t\t\n\t\t\t\n\t\t\tint min_idx = i;\n\t\t\t\n\t\t\t\n\t\t\tfor (int j = i+1; j < numAccounts; j++) {\n\t\t\t\t\n\t\t\t\t// Retrieve last name of two that you are comparing\n\t\t\t\tfirstDateOpen = accounts[j].getDateOpen();\n\t\t\t\tsecondDateOpen = accounts[min_idx].getDateOpen();\n\t\t\t\t\n\t\t\t\tif (firstDateOpen.compareTo(secondDateOpen) < 0) {\n\t\t\t\t\tmin_idx = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAccount temp = accounts[min_idx];\n\t\t\taccounts[min_idx] = accounts[i];\n\t\t\taccounts[i] = temp;\n\t\t}\n\t\t\n\t}", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "@Override\r\n\t\tpublic int compare(Monom monom1, Monom monom2) {\r\n\t\t\t if(monom1.get_power() < monom2.get_power())\r\n\t\t\t\treturn -1;\r\n\t\t\t else if(monom1.get_power() > monom2.get_power())\r\n\t\t\t\treturn 1;\r\n\t\t\t\r\n\t\t\treturn 0;\r\n\t\t}", "public void sortPassing(){\n\t\tpassing.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "public void sort(){\n listOperation.sort(Comparator.comparingInt(Operation::getiStartTime));\n }", "public void sortCompetitors(){\n\t\t}", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "public static void sortByFitlvl() {\n Collections.sort(Population);\n if (debug) {\n debugLog(\"\\nSorted: \");\n printPopulation();\n }\n }", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "public void shuttlesort(int from[], int to[], int low, int high) {\n if (high - low < 2) {\n return;\n }\n int middle = (low + high) / 2;\n shuttlesort(to, from, low, middle);\n shuttlesort(to, from, middle, high);\n int p = low;\n int q = middle;\n if (high - low >= 4 && compare(from[middle - 1], from[middle]) <= 0) {\n for (int i = low; i < high; i++) {\n to[i] = from[i];\n }\n return;\n }\n for (int i = low; i < high; i++) {\n if (q >= high || (p < middle && compare(from[p], from[q]) <= 0)) {\n to[i] = from[p++];\n } else {\n to[i] = from[q++];\n }\n }\n }", "public static void sort(int[] ds){\n\t\tfor(int i = 0, maxi = ds.length - 1; i < maxi; i++){\n\t\t\tint min = i;\n\t\t\tfor(int j = i + 1, maxj = ds.length; j < maxj; j++){\n\t\t\t\tif(ds[min] > ds[j]){\n\t\t\t\t\tmin = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint t = ds[min];\n\t\t\tds[min] = ds[i];\n\t\t\tds[i] = t;\n\t\t}\n\t}", "void quick_sort(int intArray[], int low, int high)\n {\n if (low < high)\n {\n // partition the array around pi=>partitioning index and return pi\n int pi = partition(intArray, low, high);\n // sort each partition recursively\n quick_sort(intArray, low, pi - 1);\n quick_sort(intArray, pi + 1, high);\n }\n }", "void order() {\n for (int i = 0; i < numVertices; i++) {\n if (simp[i][numParams] < simp[best][numParams]) {\n best = i;\n }\n if (simp[i][numParams] > simp[worst][numParams]) {\n worst = i;\n }\n }\n nextWorst = best;\n for (int i = 0; i < numVertices; i++) {\n if (i != worst) {\n if (simp[i][numParams] > simp[nextWorst][numParams]) {\n nextWorst = i;\n }\n }\n }\n }", "public static void dimension_sort() { // sort the dimensions according to their effect to GCP\n\t\tfor (int i = 0;i < dims-1;i++) {\n\t\t\tdimension[i] = (byte) i;\n\t\t}\n\t\tboolean swapped = true;\n\t\tint i=0;\n\t\tbyte temp;\n\t\twhile (swapped) {\n\t\t\tswapped = false;\n\t\t\ti++;\n\t\t\tfor (int j = 0; j < dimension.length-i;j++) { // smaller range, put it the front\n\t\t\t\tif (cardinalities[dimension[j]] > cardinalities[dimension[j+1]]) {\n\t\t\t\t\ttemp = dimension[j];\n\t\t\t\t\tdimension[j] = dimension[j+1];\n\t\t\t\t\tdimension[j+1] = temp;\n\t\t\t\t\tswapped = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void sortEScores() {\n LinkedHashMap<String, Double> sorted = eScores\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n eScores = sorted;\n }", "private List<Order> sortReadyOrders() throws SQLException {\n\t\tList<Order> nonFastFoodOrders = new LinkedList<Order>();\n\t\tList<Order> fastFoodOrders = new LinkedList<Order>();\n\t\tList<Order> sortedOrders = new LinkedList<Order>();\n\n\t\tfor (int i = 0; i < getReadyOrders().size(); i++) {\n\t\t\tfor (int j = 0; j < getReadyOrders().get(i).getOrderL().size(); j++) {\n\t\t\t\tif (getReadyOrders().get(i).getOrderL().get(j).getFood().getType().equalsIgnoreCase(\"fast food\")) {\n\t\t\t\t\tfastFoodOrders.add(getReadyOrders().get(i));\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tnonFastFoodOrders.add(getReadyOrders().get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsortedOrders.addAll(fastFoodOrders);\n\t\tsortedOrders.addAll(nonFastFoodOrders);\n\t\treturn sortedOrders;\n\t}", "public void sort(Element[] array, int low, int high, int digit) {\n for (int i = low; i <= high; i++) {\n for (int j = i; j > low && less(array[j].value, array[j - 1].value, digit); j--) {\n ArrayUtil.exchange(array, j, j - 1);\n }\n }\n }", "public static void main(String[] args) {\n\t\tList<Product> prodList = new ArrayList<>();\n\t\tprodList.add(new Product(12, \"Refrigerator\", \"Whirlpool\", 43000.00f));\n\t\tprodList.add(new Product(16, \"Mobile\", \"Samsung\", 18000.00f));\n\t\tprodList.add(new Product(11, \"Laptop\", \"Lenovo\", 28300.00f));\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList);\n\t\t\n\t\tSystem.out.println(\"After Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tProductNameComparator pnc = new ProductNameComparator();\n\t\tCollections.sort(prodList, pnc);\n\t\t\n\t\tSystem.out.println(\"After Sorting as per name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder());\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc id\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder(pnc));\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()>p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per price\");\n\t\tprodList.forEach(p->System.out.println(p));\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()<p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per desc price\");\n\t\tprodList.forEach(System.out::println);\n\t\t\n\t}", "public void sort(Item[] items, int low, int high) {\n if (outOfRange(items, low, high)) {\n throw new IllegalArgumentException();\n }\n if (high <= low) return;\n int p = partition(items, low, high);\n sort(items, low, p - 1);\n sort(items, p + 1, high);\n }", "private void sortMedApts(List<MedicationAppointment> medApts2) {\n \t}", "public static void main(String[] args) {\n\t\tList<StatetostateDetail> list = new ArrayList<StatetostateDetail>();\n\t\tfor(int i = 1; i < 16; i++){\n\t\t\tStatetostateDetail s = new StatetostateDetail();\n\t\t\ts.setId(i);\n\t\t\ts.setStatue(0);\n\t\t\ts.setTime(System.currentTimeMillis() + (i + i * 100));\n\t\t\tlist.add(s);\n\t\t}\n\t\tlist.get(3).setStatue(1);\n\t\tlist.get(5).setStatue(1);\n\t\tlist.get(10).setStatue(1);\n\t\tlist.get(14).setStatue(1);\n\t\tlist.get(7).setStatue(2);\n\t\tlist.get(9).setStatue(2);\n\t\tSystem.out.println(\"list:\" + list);\n\t\n\t\t\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \tLong t1 = null;\n \tLong t2 = null;\n \ttry{\n \t\tt1 = s1.getTime();\n\t \tt2 = s2.getTime();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}\n \n return t2.compareTo(t1);\n }\n });\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \treturn s1.getStatue()>s2.getStatue()?1:(s1.getStatue()==s2.getStatue()?0:(s2.getTime()>s1.getTime()?-1:0));\n }\n });\n\t\t\n\t\tSystem.out.println(\"list:\" + list);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private Comparator<Machine> makeDecreasingMachineComparator() {\n return new Comparator<Machine>() {\n public int compare(Machine m0, Machine m1) {\n BigInteger diff = m1.getCPU().subtract(m0.getCPU());\n if (diff.equals(BigInteger.ZERO)) {\n diff = m1.getMemory().subtract(m0.getMemory());\n }\n return diff.intValue();\n }\n };\n }", "PriorityQueue<Ride> orderRidesByPriceAscending(Set<Ride> rides){\n return new PriorityQueue<>(rides);\n }", "PriorityQueue<Ride> orderRidesByPriceAscending(Map<String, Ride> rides){\n return new PriorityQueue<>(rides.values());\n }", "protected void sort() {\n\n\t\tCollections.sort(this.myRRList);\n\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tif(o1.getValue()>o2.getValue()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.getValue()<o2.getValue()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "public void reorder(int low, int high) {\n if (low < high) {\n // Select pivot position and put all the elements smaller\n // than pivot on left and greater than pivot on right\n int pi = partition(low, high);\n\n // Sort the elements on the left of pivot\n reorder(low, pi - 1);\n\n // Sort the elements on the right of pivot\n reorder(pi + 1, high);\n }\n }", "public void sort() {\n\n // Fill in the blank here.\n\tfor(int i = 0; i < size; i++){\n\t\tint currentLowest, cLIndex, temp;\n\t\tcurrentLowest = elements[i];\n\t\tcLIndex = i; \n\t\tfor(int c = i+1; c < size; c++){\n\t\t\tif(currentLowest > elements[c]){\n\t\t\t\tcurrentLowest = elements[c];\n\t\t\t\tcLIndex = c;\n\t\t\t} \n\t\t}\n\t\ttemp = elements[i];\n\t\telements[i] = elements[cLIndex];\n\t\telements[cLIndex] = temp;\n\t\t\n\t}\n System.out.println(\"Sorting...\");\n }", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void sort() {\n Collections.sort(tasks);\n }", "public void sort(){\n startTime = System.nanoTime();\n int smallest = array[0]; \n int smallestIndex = 0;\n\n for (int i = 0; i < array.length - 1; i++){\n smallest = array[i];\n smallestIndex = i;\n //find smallest number \n for (int j = i; j < array.length; j++){\n if (array[j] < smallest) {\n smallest = array[j];\n smallestIndex = j;\n }\n }\n //swap smallest to the front\n swap(array, i, smallestIndex);\n }\n endTime = System.nanoTime();\n }", "public void sortKnowledgeBase()\n {\n int i;\n Random random;\n String aPredicate;\n StringTokenizer tokenizer;\n //------------\n random = new Random();\n i = 0;\n while (i < knowledgeBase.size())\n {\n aPredicate = knowledgeBase.get(i).commitments.get(0).predicate;\n tokenizer = new StringTokenizer(aPredicate,\"(), \");\n if(tokenizer.nextToken().equals(\"secuencia\"))\n knowledgeBase.get(i).priority = random.nextInt(100);\n //end if\n else\n knowledgeBase.get(i).priority = random.nextInt(10000);\n //end else\n i = i + 1;\n }//end while\n Collections.sort(knowledgeBase);\n }", "public void sortIncreasing()\n {\n int min;\n \n for (int i = 0; i < list.length - 1; i++)\n {\n min = i; \n for(int j = i+1; j < list.length; j++)\n {\n if(list[j] < list[min])\n min = j; \n }\n if(i != min && list[min] < list.length)\n {\n int temp = list[min];\n list[min] = list[i];\n list[i] = temp; \n }\n }\n }", "public void sortHand(){\n\t\thand.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "private static List<MoneyLoss> sortLosses(Collection<MoneyLoss> unsortedLosses)\n {\n //Sort budget items first on frequency and then alphabetically\n ArrayList<MoneyLoss> oneTimeItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> dailyItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> weeklyItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> biweeklyItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> monthlyItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> yearlyItems = new ArrayList<MoneyLoss>();\n\n for (MoneyLoss loss : unsortedLosses)\n {\n switch (loss.lossFrequency())\n {\n case oneTime:\n {\n oneTimeItems.add(loss);\n break;\n }\n case daily:\n {\n dailyItems.add(loss);\n break;\n }\n case weekly:\n {\n weeklyItems.add(loss);\n break;\n }\n case biWeekly:\n {\n biweeklyItems.add(loss);\n break;\n }\n case monthly:\n {\n monthlyItems.add(loss);\n break;\n }\n case yearly:\n {\n yearlyItems.add(loss);\n break;\n }\n }\n }\n\n Comparator<MoneyLoss> comparator = new Comparator<MoneyLoss>() {\n @Override\n public int compare(MoneyLoss lhs, MoneyLoss rhs) {\n return lhs.expenseDescription().compareTo(rhs.expenseDescription());\n }\n };\n\n Collections.sort(oneTimeItems, comparator);\n Collections.sort(dailyItems, comparator);\n Collections.sort(weeklyItems, comparator);\n Collections.sort(biweeklyItems, comparator);\n Collections.sort(monthlyItems, comparator);\n Collections.sort(yearlyItems, comparator);\n\n ArrayList<MoneyLoss> sortedItems = new ArrayList<MoneyLoss>();\n BadBudgetApplication.appendItems(sortedItems, oneTimeItems);\n BadBudgetApplication.appendItems(sortedItems, dailyItems);\n BadBudgetApplication.appendItems(sortedItems, weeklyItems);\n BadBudgetApplication.appendItems(sortedItems, biweeklyItems);\n BadBudgetApplication.appendItems(sortedItems, monthlyItems);\n BadBudgetApplication.appendItems(sortedItems, yearlyItems);\n\n return sortedItems;\n }", "public void sort() {\r\n for (int i = 0; i < namesOfApp.length && i < runTimeOfApp.length; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (runTimeOfApp[j] < runTimeOfApp[i]) {\r\n String tempName = namesOfApp[i];\r\n long tempRunTime = runTimeOfApp[i];\r\n namesOfApp[i] = namesOfApp[j];\r\n runTimeOfApp[i] = runTimeOfApp[j];\r\n namesOfApp[j] = tempName;\r\n runTimeOfApp[j] = tempRunTime;\r\n }\r\n }\r\n }\r\n\r\n }", "void sort();", "void sort();", "@Override\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// luon duoc sap xep theo thoi gian thuc hien con lai\n\t\t\tpublic int compare(Integer o1, Integer o2) {\t\t\t\t\t\t // tu be den lon sau moi lan add them gia tri vao \n\t\t\t\tif (burstTimeArr[o1] > burstTimeArr[o2]) return 1;\n\t\t\t\tif (burstTimeArr[o1] < burstTimeArr[o2]) return -1;\n\t\t\t\treturn 0;\n\t\t\t}", "protected Comparator<PhysicalMachine> makeDecreasingPhysicalMachineComparator() {\n return new Comparator<PhysicalMachine>() {\n Comparator<Machine> cap_comp = makeDecreasingMachineComparator();\n public int compare(PhysicalMachine m0, PhysicalMachine m1) {\n int diff = cap_comp.compare(m0, m1);\n if (diff == 0) {\n diff = m0.getID() - m1.getID();\n }\n return diff;\n }\n };\n }", "public void sortChart() {\n\t\tPassengerTrain temp;\n\t\tGoodsTrain temp1;\n\n\t\tfor (int index = 0; index < TrainDetails.passengerList.size(); index++) {\n\t\t\tfor (int i = 0; i < TrainDetails.passengerList.size(); i++) {\n\t\t\t\tdouble totalTime1 = ((TrainDetails.passengerList).get(index).duration);\n\t\t\t\tdouble totalTime2 = (TrainDetails.passengerList.get(i).duration);\n\t\t\t\tif (totalTime1 < totalTime2) {\n\t\t\t\t\ttemp = TrainDetails.passengerList.get(index);\n\t\t\t\t\tTrainDetails.passengerList.set(index,\n\t\t\t\t\t\t\tTrainDetails.passengerList.get(i));\n\t\t\t\t\tTrainDetails.passengerList.set(i, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int index = 0; index < TrainDetails.goodsList.size(); index++) {\n\t\t\tfor (int i = 0; i < TrainDetails.goodsList.size(); i++) {\n\t\t\t\tdouble totalTime1 = ((TrainDetails.goodsList).get(index).duration);\n\t\t\t\tdouble totalTime2 = (TrainDetails.goodsList.get(i).duration);\n\t\t\t\tif (totalTime1 < totalTime2) {\n\t\t\t\t\ttemp1 = TrainDetails.goodsList.get(index);\n\t\t\t\t\tTrainDetails.goodsList.set(index,\n\t\t\t\t\t\t\tTrainDetails.goodsList.get(i));\n\t\t\t\t\tTrainDetails.goodsList.set(i, temp1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public static void sort(Vector features, int sortStrand, boolean byLow) {\n int setSize = features.size();\n\n if (setSize == 0) {\n return;\n }\n\n int[] coord = new int[setSize];\n RangeI[] obj = new RangeI[setSize];\n\n for (int i=0; i < setSize; i++) {\n RangeI sf = (RangeI) features.elementAt(i);\n if (byLow) {\n coord[i] = sf.getLow();\n } else {\n coord[i] = sf.getStart();\n }\n obj [i] = sf;\n }\n\n QuickSort.sort(coord,obj);\n\n // Used to be sortStrand == 1 but it seemed wrong to sort 0 stranded features backwards\n if (sortStrand != -1) {\n for (int i=0; i < setSize;i++) {\n features.setElementAt(obj[i], i);\n }\n }\n else {\n for (int i=0; i < setSize;i++) {\n features.setElementAt(obj[i], (setSize - i - 1));\n }\n }\n }", "@Override\n\t\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\t\tInteger x= (Integer)P[a];\n\t\t\t\t\tInteger y= (Integer)P[b];\n\t\t\t\t\treturn x.compareTo(y);\n\t\t\t\t}", "@Override\n\tpublic int compare(Monom o1, Monom o2) {\n\t\tif(o1.get_power() > o2.get_power()) {\n\t\t\treturn -1;\n\t\t}\n\t\telse if (o1.get_power() < o2.get_power()) {\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t\telse{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "private static void sortingArrayList() {\n Collections.sort(allMapData, new Comparator<MapDataModel>() {\n public int compare(MapDataModel d1, MapDataModel d2) {\n return valueOf(d1.getDateTime().compareTo(d2.getDateTime()));\n }\n });\n }", "private void sort(int[] array, int start, int end){\n //base condition\n if(start >= end)\n return;\n int boundary = partition(array, start, end);\n sort(array, start, boundary - 1);\n sort(array, boundary + 1, end);\n }", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\treturn -(int) (o1.getValue().compareTo(o2.getValue()));\n\t\t\t}", "public boolean verifyProductByOrderHighToLowFilter(WebDriver driver) {\n\n\t\tString order = \"Sort by price: high to low\";\n\t\tList<String> productPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"original list :\"+productPriceList);\n\t\tshoppage.selectOrderOfProduct(driver, order);\n\n\t\tList<String> actualSortedPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"actual sorted high to low :\"+actualSortedPriceList);\n\t\tList<String> expectedSortedPriceList = productPriceList;\n\t\tCollections.sort(expectedSortedPriceList, Collections.reverseOrder());\n\t\tSystem.out.println(\"expected sorted high to low :\"+expectedSortedPriceList);\n\n\t\treturn expectedSortedPriceList.equals(actualSortedPriceList);\n\t}", "private void heapSort() {\n\n\t\tint queueSize = priorityQueue.size();\n\n\t\tfor (int j = 0; j < queueSize; j++) {\n\n\t\t\theapified[j] = binaryHeap.top(priorityQueue);\n\t\t\tbinaryHeap.outHeap(priorityQueue);\n\n\t\t}\n\n\t}", "private void sortVector(String key, boolean ascending, int low, int high)\n\t{\n\t\tint lowIndex = low;\n\t\tint highIndex = high;\n\n\t\tWModelObject mid = null;\n\n\t\tif (high > low)\n\t\t{\n\t\t\tmid = elementAt((low + high) / 2);\n\n\t\t\twhile (lowIndex <= highIndex)\n\t\t\t{\n\t\t\t\tif (ascending)\n\t\t\t\t{\n\t\t\t\t\twhile ((lowIndex < high) && elementAt(lowIndex).compareTo(mid, key) < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t++lowIndex;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ((highIndex > low) && elementAt(highIndex).compareTo(mid, key) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t--highIndex;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twhile ((lowIndex < high) && elementAt(lowIndex).compareTo(mid, key) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t++lowIndex;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ((highIndex > low) && elementAt(highIndex).compareTo(mid, key) < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t--highIndex;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\tif (lowIndex <= highIndex)\n\t\t\t\t{\n\t \t\t\t\tObject temp = m_elements.elementAt(lowIndex);\n\t\t\t\t\tm_elements.setElementAt(m_elements.elementAt(highIndex), lowIndex);\n\t\t\t\t\tm_elements.setElementAt(temp, highIndex);\n\n\t\t\t\t\t++lowIndex;\n\t\t\t\t\t--highIndex;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(low < highIndex)\n\t\t\t\tsortVector(key, ascending, low, highIndex);\n\n\t\t\tif(lowIndex < high)\n\t\t\t\tsortVector(key, ascending, lowIndex, high);\n\t\t}\n\t}", "public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }", "public void sortByValue() {\n\t\tArrayList<Card> newHand = new ArrayList<Card>();\n\t\twhile (this.cardsInhand.size() > 0) {\n\t\t\tint pos = 0; // Position of minimal card.\n\t\t\tCard c = this.cardsInhand.get(0); // Minimal card.\n\t\t\tfor (int i = 1; i < this.cardsInhand.size(); i++) {\n\t\t\t\tCard c1 = this.cardsInhand.get(i);\n\t\t\t\tif (c1.getValue() < c.getValue() || (c1.getValue() == c.getValue() && c1.getSuit() < c.getSuit())) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\tc = c1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.cardsInhand.remove(pos);\n\t\t\tnewHand.add(c);\n\t\t}\n\t\tthis.cardsInhand = newHand;\n\t}", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\tif ((o1.getValue()-o2.getValue())>0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if ((o1.getValue()-o2.getValue())<0) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic int compare(List<Integer> o1, List<Integer> o2) {\n\t\t\t\tif(o1.get(0)< o2.get(0)){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.get(0) > o2.get(0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "public void sort() {\n }", "public boolean verifyProductByOrderLowToHighFilter(WebDriver driver) {\n\n\t\tString order = \"Sort by price: low to high\";\n\t\tList<String> productPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"original list :\"+productPriceList);\n\n\t\tshoppage.selectOrderOfProduct(driver, order);\n\n\t\tList<String> actualSortedPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"actual sorted high to low :\"+actualSortedPriceList);\n\t\tList<String> expectedSortedPriceList = productPriceList;\n\t\tCollections.sort(expectedSortedPriceList);\n\t\tSystem.out.println(\"expected sorted high to low :\"+expectedSortedPriceList);\n\n\t\treturn expectedSortedPriceList.equals(actualSortedPriceList);\n\t}", "private static void sort2(int[] a) {\n for(int i=0; i<a.length; i++){\n //find smallest from i to end \n int minIndex=i;\n for(int j=i ; j<a.length; j++)\n if(a[j]<a[minIndex])\n minIndex=j;\n //swap\n int t = a[i];\n a[i] = a[minIndex];\n a[minIndex] = t;\n }\n }", "private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "private void merge_sort( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int high ){\n\t\tif((high-low)>switchOff){\n\t\t\tint middle=low+((high-low)/2);\n\t\t\tmerge_sort(array,auxillary,low,middle);\n\t\t\tmerge_sort(array,auxillary,middle+1,high);\n\t\t\tcombine(array,auxillary,low,middle,high);\n\t\t}else{\n\t\t\tSort_Utils.insertion_sort(array, low, high);\n\t\t}\n\t}", "private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }", "private synchronized void freshSort(){\n Process[] newQueue = new Process[pros.proSize()];\n for(int i = 0; i <queue.length; i++){\n if(pros.isInList(queue[i])){\n newQueue[i] = queue[i];\n }\n }\n queue = new Process[pros.proSize()];\n queue = newQueue;\n }", "public void sortTasks() {\n tasks.sort(null);\n }", "private static void sort(long[] list) {\n\t\tint start = 0, limit = list.length;\n\t\t\n\t\tlong temp;\n\t\tint current;\n\t\tint lowestindex;\n\n\t\twhile (start < limit) {\n\t\t\tlowestindex = start;\n\t\t\tfor (current = start; current < limit; current++)\n\t\t\t\tif (list[current] < list[lowestindex])\n\t\t\t\t\tlowestindex = current;\n\t\t\t//swap\n\t\t\ttemp = list[start];\n\t\t\tlist[start] = list[lowestindex];\n\t\t\tlist[lowestindex] = temp;\n\t\t\tstart++;\n\t\t}\n\t}", "public void sort() {\n Card.arraySort(this.cards, this.topCard);\n }", "public void sort() {\n\t\tdivider(0, array.size() - 1);\n\t}", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "@Override\n\t\tpublic int compare(Object a, Object b) {\n\t\t\tif(hm.get(a)>hm.get(b))\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t}", "public void sortHub(List<Page> result) {\n\t\tCollections.sort(result, new Comparator<Page>() {\n\t\t\tpublic int compare(Page p1, Page p2) {\n\t\t\t\t// Sorts by 'TimeStarted' property\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}\n\n\t\t\t// If 'TimeStarted' property is equal sorts by 'TimeEnded' property\n\t\t\tpublic int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}\n\t\t});\n\t}", "private void quickSort(Node<T> low, Node<T> high) {\n if (!Objects.isNull(high) &&\n low != high && low != high.getNext()) {\n\n Node<T> pivot = partition(low, high);\n quickSort(low, pivot.getPrev());\n quickSort(pivot.getNext(), high);\n }\n }", "private void sortByPrice()\n {\n Collections.sort(foodList, new Comparator<FoodItem>() {\n @Override\n public int compare(FoodItem o1, FoodItem o2) {\n return o1.getItemPrice().compareTo(o2.getItemPrice());\n }\n });\n foodListAdapter.notifyDataSetChanged();\n }", "void sort() {\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) { // if the first term is larger\n\t\t\t\t\t\t\t\t\t\t\t\t// than the last term, then the\n\t\t\t\t\t\t\t\t\t\t\t\t// temp holds the previous term\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];// swaps places within the array\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "private int twoCitySchedCostSorting(int[][] costs) {\n Comparator<int[]> comparator = Comparator.comparingInt(o -> (o[0] - o[1]));\n Arrays.sort(costs, comparator);\n int sum = 0;\n for (int i = 0; i < costs.length / 2; i++) {\n sum += costs[i][0];\n sum += costs[costs.length / 2 + i][1];\n }\n return sum;\n }", "public int compare(Page p1, Page p2) {\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}", "public int compare(Page p1, Page p2) {\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}", "private static void sortingMemo() {\n\t\t\n\t}", "private static void sortHelperMSD(String[] asciis, int start, int end, int index) {\n // Optional MSD helper method for optional MSD radix sort\n return;\n }" ]
[ "0.62841624", "0.62690663", "0.6238046", "0.62040514", "0.6069258", "0.6007396", "0.5986883", "0.59765947", "0.59445536", "0.5885657", "0.58325905", "0.581992", "0.5818587", "0.5804627", "0.5786931", "0.5782492", "0.57639664", "0.57603335", "0.57556015", "0.57553744", "0.5739377", "0.57350945", "0.5733497", "0.5708725", "0.57063", "0.56854284", "0.5684917", "0.56846917", "0.5626085", "0.5614782", "0.56101966", "0.56024265", "0.5595678", "0.55871385", "0.55682826", "0.5564144", "0.55401623", "0.5540088", "0.5523717", "0.55191714", "0.55147475", "0.5502186", "0.54985356", "0.5491372", "0.54892004", "0.54839104", "0.5480742", "0.547442", "0.5466682", "0.54527324", "0.54349566", "0.54318935", "0.5431266", "0.5429943", "0.5423503", "0.5415644", "0.5411258", "0.54088116", "0.54017866", "0.54017866", "0.53957915", "0.5395416", "0.5390707", "0.5389584", "0.5386021", "0.53788495", "0.53745663", "0.53684634", "0.53656155", "0.5359056", "0.5353948", "0.5353642", "0.53463995", "0.5344684", "0.53417665", "0.5331561", "0.53305805", "0.5324806", "0.5324546", "0.5318832", "0.5315557", "0.5313736", "0.53054065", "0.5301521", "0.53004813", "0.5296022", "0.5294874", "0.5294851", "0.5280082", "0.52752995", "0.52647465", "0.5259012", "0.52553475", "0.5248018", "0.52436405", "0.5239739", "0.5230936", "0.5230936", "0.52273023", "0.52254224" ]
0.55629003
36
Creates a simple UnconstrainedBid if you provide one running mode and demand value.
public UnconstrainedBid(UnconstrainedBidElement element, MarketBasis marketBasis) { this(Collections.<UnconstrainedBidElement> singleton(element), marketBasis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n double minPriority = 0.0;\n double maxPriority = 1.0;\n\n // First make the ideal, continuous bid, that does not care about discrete running modes.\n rawBid = Bid.create(marketBasis)\n .add(priceOf(minPriority), maxDemand)\n .add(priceOf(maxPriority), minDemand)\n .build();\n\n // Now construct actual bid\n double[] rawDemand = rawBid.getDemand();\n newBid = new UnconstrainedBidElement[rawDemand.length];\n for (int i = 0; i < rawDemand.length; i++) {\n newBid[i] = getClosest(rawDemand[i]);\n }\n }", "public @NotNull Bidder newBidder();", "public Bid toBid() {\n double[] demand = new double[newBid.length];\n for (int i = 0; i < newBid.length; i++) {\n demand[i] = newBid[i].demandWatt;\n }\n return new Bid(marketBasis, demand);\n }", "public void testNewBid(){\n\n Thing thing = new Thing(new User());\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing, borrower, 800);\n }catch(Exception e){\n fail();\n }\n assertEquals(800, bid.getAmount());\n assertEquals(Bid.Per.FLAT, bid.getPer());\n assertEquals(\"8.00\", bid.valueOf());\n assertEquals(\"$8.00\", bid.toString());\n\n }", "public abstract Bid chooseOpeningBid();", "@Override\n\tpublic Bid createBid(Auction auction, RegisteredUser user, float price)\n\t\t\tthrows DTException {\n\t\tBid bid = new BidImpl(auction, user, price);\n\t\treturn bid;\n\t}", "public UnconstrainedBid(Collection<UnconstrainedBidElement> elements, MarketBasis marketBasis) {\n if (elements == null || elements.isEmpty()) {\n throw new IllegalStateException(\"Cannot construct an empty UnconstrainedBid\");\n }\n this.elements = new TreeSet<UnconstrainedBidElement>();\n this.elements.addAll(elements);\n this.marketBasis = marketBasis;\n constructBid();\n }", "public static FrequentFlyer withInitialBalanceOf(int b) {\n\t\tFrequentFlyer f = new FrequentFlyer();\n\t\tf.balance = b;\n\t\tif(f.balance < 10000) f.status = \"Bronze\";\n\t\telse if(f.balance >= 10000) f.status = \"Silver\";\n\t\treturn f;\n\t}", "public abstract Bid chooseFirstCounterBid();", "public void testZeroBid(){\n\n Bid bid = null;\n try {\n bid = new Bid(new Thing(new User()), new User(), 0);\n } catch (Exception e){\n fail();\n }\n assertEquals(0, bid.getAmount());\n assertEquals(\"0.00\", bid.valueOf());\n assertEquals(\"$0.00\", bid.toString());\n }", "public Builder setBid(int value) {\n copyOnWrite();\n instance.setBid(value);\n return this;\n }", "public abstract Bid chooseCounterBid();", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "public static void bid(int amount) {\n\t}", "BidGenerator(\n\t\t\t\tlong startBid,\n\t\t\t\tlong endBid,\n\t\t\t\tlong minAuctionId,\n\t\t\t\tlong minPersonId) {\n\t\t\tthis.startBid = startBid;\n\t\t\tthis.endBid = endBid;\n\t\t\tthis.minPersonId = minPersonId;\n\t\t\tthis.minAuctionId = minAuctionId;\n\t\t}", "public UnconstrainedBidElement runningModeForPrice(Price price) {\n return newBid[price.getPriceIndex()];\n }", "@Test(expected = BidAmountException.class)\n public void testLowballingTheInitialBid() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n knownUsers.login(bidder.userName(), bidder.password());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(bidder, startingPrice - 5, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n }", "private void setBid(int value) {\n \n bid_ = value;\n }", "public Bid() {}", "@Override\n public int getBidId()\n {\n return 0;\n }", "com.google.openrtb.OpenRtb.BidRequestOrBuilder getBidrequestOrBuilder();", "public Builder setBidrequest(com.google.openrtb.OpenRtb.BidRequest value) {\n if (bidrequestBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n bidrequest_ = value;\n onChanged();\n } else {\n bidrequestBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "@Override\r\n public BidDetails determineNextBid() {\r\n\r\n double time = negotiationSession.getTime();\r\n\r\n // for the first 20% of the time, offer the bid which gives max utility\r\n if(time < Offer_Max_Util_Time){\r\n BidDetails maxBid = null;\r\n try {\r\n maxBid = this.outcomespace.getMaxBidPossible();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Exception: cannot generate max utility bid\");\r\n }\r\n return maxBid;\r\n\r\n }else {\r\n //compute the target utility based on time\r\n double utilityGoal = p(time);\r\n // if there is no opponent model available\r\n if (opponentModel instanceof NoModel) {\r\n // generate a Bid near the Utility we wish to have\r\n nextBid = negotiationSession.getOutcomeSpace().getBidNearUtility(utilityGoal);\r\n } else {\r\n // get the best Bid for the Opponent among a list of similarly preferred bids for our Agent\r\n // Then, make an offer with that bid\r\n nextBid = omStrategy.getBid(outcomespace, utilityGoal);\r\n }\r\n }\r\n return nextBid;\r\n }", "@Override\r\n\tpublic BMW createBMW() {\n\t\treturn new BMW320();\r\n\t}", "public Bid assembleBid(BidDTO bidDTO) {\r\n AuctionPersistenceHelper.validateNotNull(bidDTO, \"bidDTO\");\r\n\r\n CustomBid bid = new CustomBid(bidDTO.getBidderId(), bidDTO.getImageId(), bidDTO.getMaxAmount(),\r\n bidDTO.getTimestamp());\r\n\r\n if (bidDTO.getEffectiveAmount() != null) {\r\n bid.setEffectiveAmount(bidDTO.getEffectiveAmount().intValue());\r\n }\r\n\r\n if (bidDTO.getId() != null) {\r\n bid.setId(bidDTO.getId().longValue());\r\n }\r\n\r\n return bid;\r\n }", "private void bid() {\n\t\t\t\n\t\t}", "public static BII createEntity() {\n BII bII = new BII()\n .name(DEFAULT_NAME)\n .type(DEFAULT_TYPE)\n .biiId(DEFAULT_BII_ID)\n .detectionTimestamp(DEFAULT_DETECTION_TIMESTAMP)\n .sourceId(DEFAULT_SOURCE_ID)\n .detectionSystemName(DEFAULT_DETECTION_SYSTEM_NAME)\n .detectedValue(DEFAULT_DETECTED_VALUE)\n .detectionContext(DEFAULT_DETECTION_CONTEXT)\n .etc(DEFAULT_ETC)\n .etcetc(DEFAULT_ETCETC);\n return bII;\n }", "public void testNegativeBid(){\n try {\n Bid bid = new Bid(new Thing(new User()), new User(), -20);\n fail();\n } catch (BidNegativeException e){\n // ok!\n } catch (Exception e){\n //ok\n }\n\n }", "public void setBid(String bid) {\r\n this.bid = bid;\r\n }", "public void testBidDeclineNotification(){\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\n try {\n thing1.placeBid(bid);\n } catch (ThingUnavailableException e) {\n fail();\n }\n\n // owner.declineBid(thing1, bid);\n //assertTrue(borrower.notifiedOfDeclinedBid(bid));\n\n assertTrue(false);\n }", "public Bid winningBid(final String itemId);", "@Test(expected = BidAmountException.class)\n public void bidIsLessThanHighestBidIsRejected() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n knownUsers.login(bidder.userName(), bidder.password());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(bidder, startingPrice, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n\n testAuction.submitBid(firstBid);\n\n\n }", "@Test\n public void noFrozenBalance() {\n UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getContractForBandwidth(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), UnfreezeBalanceActuatorTest.dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n try {\n actuator.validate();\n actuator.execute(ret);\n TestCase.fail(\"cannot run here.\");\n } catch (ContractValidateException e) {\n Assert.assertTrue((e instanceof ContractValidateException));\n Assert.assertEquals(\"no frozenBalance(BANDWIDTH)\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse((e instanceof ContractExeException));\n }\n }", "BType createBType();", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "public void createAuctionTest(){\n\t\tAuction auc = new Auction(new User(),\"Test Auction Description\",1000l);\n\n\t}", "int getBid();", "B createB();", "public Builder clearBid() {\n copyOnWrite();\n instance.clearBid();\n return this;\n }", "public abstract boolean isAcceptable(Bid plannedBid);", "public Builder setBidid(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n bidid_ = value;\n onChanged();\n return this;\n }", "public Builder setBididBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n bidid_ = value;\n onChanged();\n return this;\n }", "@Test(timeout = 500)\n public void dynamicTest2b() {\n int[] hourlyVolume = {10, 12, 6, 40, 120, 130, 100, 50, 42, 10, 80};\n int[] fullServiceCapacity = {100,100,80,60,60,50,40,30,20,10};\n int[] regularServiceCapacity = {80,50,40,30,20,10};\n int[] minorServiceCapacity = {50,50,40,40};\n int expectedResult = 178;\n Assert.assertEquals(expectedResult, Dynamic.optimalLossDynamic(hourlyVolume, fullServiceCapacity, regularServiceCapacity, minorServiceCapacity));\n }", "com.google.openrtb.OpenRtb.BidRequest getRequest();", "public Bag(String name, int weightCapacity, int lowerFit, int upperFit) {\n\t\tthis.name = name;\n\t\tthis.weightCapacity = weightCapacity;\n\t\tthis.lowerFit = lowerFit;\n\t\tthis.upperFit = upperFit;\n\t}", "public @NotNull Bidder newBidder(@NotNull final Name name, @NotNull final Address billingAddress,\r\n\t\t\t@NotNull final Address shippingAddress);", "public Bid newBid(Item item, User buyer, Money amount)\n {\n return auctionManager.newBid(item, buyer, amount);\n }", "public void newBidPostedByMe(U1467085Bid bid) {\n try {\n JavaSpace05 js = SpaceUtils.getSpace();\n if (EventRegistration != null) {\n EventRegistration.getLease().cancel();\n }\n if (allPossibleConfirmations.stream().noneMatch((o) -> o.adId == bid.adId)) {\n U1467085BidConfirmation newTemplate = new U1467085BidConfirmation();\n newTemplate.adId = bid.adId;\n allPossibleConfirmations.add(newTemplate);\n EventRegistration = js.registerForAvailabilityEvent(allPossibleConfirmations, null, false, Listener, SpaceUtils.LONGLEASE, null);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public com.google.openrtb.OpenRtb.BidRequest.Builder getBidrequestBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getBidrequestFieldBuilder().getBuilder();\n }", "public Builder clearBidrequest() {\n if (bidrequestBuilder_ == null) {\n bidrequest_ = com.google.openrtb.OpenRtb.BidRequest.getDefaultInstance();\n onChanged();\n } else {\n bidrequestBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "public Builder setBidrequest(\n com.google.openrtb.OpenRtb.BidRequest.Builder builderForValue) {\n if (bidrequestBuilder_ == null) {\n bidrequest_ = builderForValue.build();\n onChanged();\n } else {\n bidrequestBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "@Override\r\n\tpublic Battery createBattery(double initialEnergy, int weight)\r\n\t{\r\n\t\treturn new Battery(initialEnergy, weight);\r\n\t}", "Bid getNewBidWithUtil(double ourUtility, BidSpace bs) {\n\t\tBidPoint bestbid = null;\n\t\tdouble bestbidutil = 0;\n\t\tfor (BidPoint p : bs.bidPoints) {\n\t\t\tif (Math.abs(\n\t\t\t\t\tourUtility - p.getUtilityA()) < ALLOWED_UTILITY_DEVIATION\n\t\t\t\t\t&& p.getUtilityB() > bestbidutil\n\t\t\t\t\t&& !myPreviousBids.contains(p.getBid())) {\n\t\t\t\tbestbid = p;\n\t\t\t\tbestbidutil = p.getUtilityB();\n\t\t\t}\n\t\t}\n\t\tif (bestbid == null)\n\t\t\treturn null;\n\t\treturn bestbid.getBid();\n\t}", "com.google.openrtb.OpenRtb.BidRequestOrBuilder getRequestOrBuilder();", "public BPPType createBPPart(String id, String value) {\n\t\tBPPType bpp = mappingFactory.createBPPType();\n\t\tbpp.setId(id);\n\t\tbpp.setValue(value);\n\t\treturn bpp;\n\t}", "@Override\n\tpublic B makeB(Map<String, String> attributes, Div divObj) {\n\t\treturn new B( attributes, divObj );\n\t}", "public Builder setRequest(com.google.openrtb.OpenRtb.BidRequest value) {\n if (requestBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n request_ = value;\n onChanged();\n } else {\n requestBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "boolean hasBidrequest();", "com.google.openrtb.OpenRtb.BidResponse getBidresponse();", "BOp createBOp();", "public BLabel()\n {\n this((String) null, WEST);\n }", "Pair<Double, Integer> bid();", "public String getBid() {\r\n return bid;\r\n }", "public boolean isBancrupt(){\r\n \treturn _budget <= 0;\r\n }", "public Bedroom(int number, int capacity , TypesOfBedrooms type, int nightlyrate) {\n super(capacity);\n this.number = number;\n this.type = type;\n this.nightlyrate = nightlyrate;\n this.guests = new ArrayList<Guest>();\n }", "public CSGEnvironmentBSP(\r\n\t) {\r\n\t\tthis( false );\r\n\t}", "public BookRecord(Integer id, Integer availableqty, Integer pendingqty, String name, Integer medium, Integer grade, String authorname, Integer noofpages, Integer status, BigDecimal price) {\n super(Book.BOOK);\n\n set(0, id);\n set(1, availableqty);\n set(2, pendingqty);\n set(3, name);\n set(4, medium);\n set(5, grade);\n set(6, authorname);\n set(7, noofpages);\n set(8, status);\n set(9, price);\n }", "public boolean hasBidid() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public static <T> BDEQueue<T> createBoundedDoubleEndedQueue(int capacity) {\n \t\treturn new BDEQueue<T>(capacity);\n \t}", "public BPPType createBPPart(String id, String value, TypeType type) {\n\t\tBPPType bpp = mappingFactory.createBPPType();\n\t\tbpp.setId(id);\n\t\tbpp.setValue(value);\n\t\tbpp.setType(type);\n\t\treturn bpp;\n\t}", "public ProductionPower(){\n this(0, new NumberOfResources(), new NumberOfResources(), 0, 0);\n }", "public boolean hasBidid() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public int getBid() {\n return bid_;\n }", "public String getBid() {\n return bid;\n }", "public UnbalanceDetailWithBusPlatformExample() {\r\n oredCriteria = new ArrayList();\r\n }", "public Balance() {\r\n value = BigDecimal.ZERO;\r\n }", "public static Bounty createEntity() {\n Bounty bounty = new Bounty()\n// .status(DEFAULT_STATUS)\n// .issueUrl(DEFAULT_URL)\n .amount(DEFAULT_AMOUNT)\n// .experience(DEFAULT_EXPERIENCE)\n// .commitment(DEFAULT_COMMITMENT)\n// .type(DEFAULT_TYPE)\n// .category(DEFAULT_CATEGORY)\n// .keywords(DEFAULT_KEYWORDS)\n .permission(DEFAULT_PERMISSION)\n .expiryDate(DEFAULT_EXPIRES);\n return bounty;\n }", "public Cut<C> b(BoundType boundType, DiscreteDomain<C> discreteDomain) {\n switch (boundType) {\n case CLOSED:\n return this;\n case OPEN:\n Comparable next = discreteDomain.next(this.a);\n return next == null ? Cut.e() : b(next);\n default:\n throw new AssertionError();\n }\n }", "private void processLowValue(Bid bid) {\n\t}", "public Builder setB(int value) {\n bitField0_ |= 0x00000001;\n b_ = value;\n onChanged();\n return this;\n }", "@Override\n public void enableDisableDiscrete() {\n // empty bc mock\n }", "public ArmPayPlanConfigBootStrap() {\n }", "public void testBidNotification() {\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\n try {\n thing1.placeBid(bid);\n } catch (ThingUnavailableException e) {\n fail();\n }\n\n //assertTrue(owner.notifiedOfBid(bid));\n\n assertTrue(false);\n }", "public Builder clearBidid() {\n bitField0_ = (bitField0_ & ~0x00000002);\n bidid_ = getDefaultInstance().getBidid();\n onChanged();\n return this;\n }", "public double getBid(double v) {\n double[] weights = {\n 0.6601863864966815,\n -0.44050297744775085,\n -0.3288461116450685,\n 0.7354115471274265,\n 0.6528564967694372,\n -0.021270821816517627,\n -0.751090383677677\n };\n if (roundsLeft == 0) {\n return Math.min(v * weights[0], cash);\n }\n if (roundsLeft / totalRounds < weights[1] * 333) {\n if (v > avrgBids[avrgBids.length - 1]) {\n return Math.min(v * weights[2], cash);\n } else if (v > avrgBids[avrgBids.length - 2]) {\n return Math.min(avrgBids[avrgBids.length - 2] - 1, cash);\n } else if (v > avrgBids[0] && v < avrgBids[1]) {\n return Math.min(v * weights[3], cash);\n }\n }\n return Math.min(v * weights[4], cash);\n }", "public static QuadricRobustEstimator create() {\n return create(DEFAULT_ROBUST_METHOD);\n }", "public LesserDemandDetail() {\n //For serialization.\n }", "public static APIPolicy createDefaultAPIPolicyWithBandwidthLimit() {\n BandwidthLimit bandwidthLimit = new BandwidthLimit(TIME_UNIT_MONTH, 1, 1000, PolicyConstants.MB);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(PolicyConstants.BANDWIDTH_TYPE);\n defaultQuotaPolicy.setLimit(bandwidthLimit);\n //set default API Policy\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n return apiPolicy;\n }", "public IResourceDepot createResourceDepot() {\n\n /*\n * Defining a ResourceDepot \"JackTruckDepot\" that can store DeliverGood and PickupGood.\n *\n */\n\n // We can store a maximum of 10 DeliverGood on our track (assuming that no other load is\n // present)\n // Further, we start with an initial load of 5 DeliverGoods.\n ILoadCapacity deliverGoodCapacity = new SimpleLoadCapacity(\"DeliverGood\", 10, 5);\n\n // We can store a maximum of 5 PickupGood on our track (assuming that no other load is present)\n ILoadCapacity pickupGoodCapacity = new SimpleLoadCapacity(\"PickupGood\", 5, 0);\n\n // Our depot can store a maximum of 10 total items. For example, 7 DeliverGoods\n // and 3 PickupGoods.\n IResourceDepot depot = new SimpleResourceDepot(\"JackTruckDepot\", 10);\n\n // Adding the capacities to our depot\n depot.add(deliverGoodCapacity);\n depot.add(pickupGoodCapacity);\n\n return depot;\n }", "public AuctionItem(long auctionID, String name, String des, double minValue, double maxValue, ClientInterface client){\n\t\tID = auctionID;\n\t\titem_name = name;\n\t\titem_description = des;\n\t\tstart_price = minValue;\n\t\treserve_price = maxValue;\n\t\towner = client;\n\t\tstatus = \"open\";\n\t\tbids = new Hashtable<>();\n\t}", "@Order(14)\n\t@Test\n\tpublic void Attempt_OfferBid()\n\t{\n\t\tBigDecimal BuyOut = new BigDecimal(405);\n\t\tItem testItem = new Item(0,\"Changed ItemName\",\"Changed Description\",new BigDecimal(505),new BigDecimal(404),\"NoOne\");\n\t\tint Expected = -1, actual = os.offerBid(BuyOut, testItem, \"NoOne\");\n\t\tassertTrue(actual > Expected);\n\t}", "public com.google.openrtb.OpenRtb.BidRequestOrBuilder getBidrequestOrBuilder() {\n return bidrequest_;\n }", "private Bid standardBidding(int turn) {\r\n\t\tboolean[] bidding = new boolean[players.length];//used to tell how many players are still bidding\r\n\t\tfor(int i = 0; i < bidding.length; i++) {//all players are bidding\r\n\t\t\tbidding[i] = true;\r\n\t\t}\r\n\r\n\t\tint highestBid = 0;\r\n\t\tint highestBidder = turn;\r\n\t\t//while there is more than 1 player bidding\r\n\t\tint stillBidding = players.length;//used for checking how many players are bidding\r\n\t\tfor(int biddingTurn = (turn+1)%players.length; stillBidding > 1; biddingTurn = (biddingTurn+1)%players.length) {\r\n\t\t\t//skip people who are no longer in\r\n\t\t\tif(!bidding[biddingTurn]) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t//get the price a player is willing to pay\r\n\t\t\tOGS.stillBidding = Arrays.copyOf(bidding, bidding.length);//reset this so players can mess with it if they want\r\n\t\t\tint bid = players[biddingTurn].getBid(highestBid);\r\n\t\t\tif(bid==-1 || bid <= highestBid) {\r\n\t\t\t\tbidding[biddingTurn] = false;\r\n\t\t\t} else {\r\n\t\t\t\thighestBid = bid;\r\n\t\t\t\thighestBidder = biddingTurn;\r\n\t\t\t}\r\n\r\n\t\t\t//checks for winner\r\n\t\t\tstillBidding = 0;\r\n\t\t\tfor(int b = 0; b < bidding.length; b++) {\r\n\t\t\t\tif(bidding[b]) {\r\n\t\t\t\t\tstillBidding++;\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.print(bidding[b] + \" \");//debug\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn new Bid(highestBidder,highestBid);\r\n\t}", "public Boat(String name, double lengthOverAll, double beam, double weightCapacity) {\n this.name = name;\n this.lengthOverAll = lengthOverAll;\n this.beam = beam;\n this.weightCapacity = weightCapacity;\n }", "public PriceBreakdown() {\n }", "public com.vodafone.global.er.decoupling.binding.request.BalanceImpactFullType createBalanceImpactFullType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BalanceImpactFullTypeImpl();\n }", "public com.vodafone.global.er.decoupling.binding.request.ResourceBalanceFullType createResourceBalanceFullType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ResourceBalanceFullTypeImpl();\n }", "@Test\n public void anAuctionThatIsNotStartedWillRejectBids() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n knownUsers.login(bidder.userName(), bidder.password());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n\n\n Bid firstBid = new Bid(bidder, startingPrice, startTime.plusMinutes(2));\n\n try {\n testAuction.submitBid(firstBid);\n fail(\"I expected an exception because the auction was not started.\");\n }catch (AuctionStatusException e){\n //This is expected.\n }\n assertNull(testAuction.highestBid());\n\n// testAuction.onStart();\n//\n// testAuction.submitBid(firstBid);\n//\n// testAuction.onClose();// This would be the only way to get to CLOSED.\n//\n// Bid higherBid = new Bid(bidder,firstBid.amount+0.01,firstBid.time.plusSeconds(3));\n// try {\n// testAuction.submitBid(higherBid);\n// }catch(Exception e){\n//\n// }\n\n\n\n\n }", "public BbsOperation (java.lang.Integer id) {\r\n\t\tsuper(id);\r\n\t}", "public Cut<C> b(BoundType boundType, DiscreteDomain<C> discreteDomain) {\n switch (boundType) {\n case CLOSED:\n Comparable previous = discreteDomain.previous(this.a);\n return previous == null ? Cut.e() : new AboveValue<>(previous);\n case OPEN:\n return this;\n default:\n throw new AssertionError();\n }\n }" ]
[ "0.76920813", "0.59855026", "0.596352", "0.58749586", "0.57178414", "0.57161486", "0.557406", "0.5518618", "0.54898", "0.54768914", "0.54565346", "0.5419265", "0.5371085", "0.53300375", "0.52542186", "0.52293134", "0.51701003", "0.5165727", "0.51514685", "0.5062406", "0.50565493", "0.5030068", "0.49994963", "0.4975961", "0.49748445", "0.49607012", "0.49373934", "0.49331754", "0.48844746", "0.4876181", "0.48588714", "0.485675", "0.48495463", "0.48486045", "0.48482844", "0.4842069", "0.48316726", "0.48287302", "0.4820149", "0.48095945", "0.4803265", "0.4797575", "0.4770138", "0.4765234", "0.47502705", "0.47446266", "0.47283152", "0.47045875", "0.4702987", "0.4700411", "0.4690995", "0.4688621", "0.4683045", "0.46782085", "0.46704376", "0.46663994", "0.46603468", "0.46372667", "0.46295822", "0.46079996", "0.4602972", "0.4593216", "0.45819837", "0.45813003", "0.45700502", "0.45691177", "0.45677188", "0.45538008", "0.45484623", "0.45392138", "0.4538915", "0.4535169", "0.4529699", "0.45295313", "0.45194465", "0.45058843", "0.45014256", "0.44825837", "0.44792917", "0.44762594", "0.44689196", "0.4464226", "0.44630405", "0.4461966", "0.4445494", "0.44452384", "0.4444674", "0.44443443", "0.4441019", "0.44405496", "0.44393662", "0.44380257", "0.44298586", "0.44244975", "0.4424184", "0.4415344", "0.4414363", "0.4407182", "0.44041803", "0.4400274" ]
0.57613367
4
Creates a simple UnconstrainedBid from a collection of bid elements and the market basis.
public UnconstrainedBid(Collection<UnconstrainedBidElement> elements, MarketBasis marketBasis) { if (elements == null || elements.isEmpty()) { throw new IllegalStateException("Cannot construct an empty UnconstrainedBid"); } this.elements = new TreeSet<UnconstrainedBidElement>(); this.elements.addAll(elements); this.marketBasis = marketBasis; constructBid(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n double minPriority = 0.0;\n double maxPriority = 1.0;\n\n // First make the ideal, continuous bid, that does not care about discrete running modes.\n rawBid = Bid.create(marketBasis)\n .add(priceOf(minPriority), maxDemand)\n .add(priceOf(maxPriority), minDemand)\n .build();\n\n // Now construct actual bid\n double[] rawDemand = rawBid.getDemand();\n newBid = new UnconstrainedBidElement[rawDemand.length];\n for (int i = 0; i < rawDemand.length; i++) {\n newBid[i] = getClosest(rawDemand[i]);\n }\n }", "public UnconstrainedBid(UnconstrainedBidElement element, MarketBasis marketBasis) {\n this(Collections.<UnconstrainedBidElement> singleton(element), marketBasis);\n }", "public Bid toBid() {\n double[] demand = new double[newBid.length];\n for (int i = 0; i < newBid.length; i++) {\n demand[i] = newBid[i].demandWatt;\n }\n return new Bid(marketBasis, demand);\n }", "BSet createBSet();", "public @NotNull Bidder newBidder();", "public void testNewBid(){\n\n Thing thing = new Thing(new User());\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing, borrower, 800);\n }catch(Exception e){\n fail();\n }\n assertEquals(800, bid.getAmount());\n assertEquals(Bid.Per.FLAT, bid.getPer());\n assertEquals(\"8.00\", bid.valueOf());\n assertEquals(\"$8.00\", bid.toString());\n\n }", "BElementStructure createBElementStructure();", "public Market(ArrayList<G> goods, ArrayList<B> bidders) throws MarketCreationException{\n // Create immutable goods list.\n if(goods == null || goods.size() == 0){\n throw new MarketCreationException(\"A market must contain at least one good.\");\n }\n ImmutableList.Builder<G> goodsBuilder = ImmutableList.builder();\n goodsBuilder.addAll(goods);\n this.goods = goodsBuilder.build();\n // Sets bidders\n this.setBidders(bidders);\n }", "public Bid getfinalBid(List<Bid> bids) {\n\t\t\r\n\t\tBid myBid=null;\r\n\t\tdouble lower=0,upper=0,total=0;\r\n\t\t//briskw meso oro\r\n\t for(int i=0;i<bids.size();i++)\r\n\t {\r\n\t \ttotal=total+US.getUtility(bids.get(i));\t \t\r\n\t }\t\t\r\n\t\tlower=total/bids.size();\r\n\t\tupper=lower;\r\n\t\t\r\n\t\t//anoigo ta oria ean den iparxei bid konta ston meso oro \r\n\t\twhile(myBid==null) {\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<bids.size();i++) {\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdouble util = US.getUtility(bids.get(i));\r\n\t\t\t\t\tif (util >= lower && util <= upper) {\r\n\t\t\t\t\t\tmyBid=bids.get(i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(lower>=0.025 && upper<=0.974) {\r\n\t\t\t\tlower=lower-0.025;\r\n\t\t\t\tupper=upper+0.025;\r\n\t\t\t}\r\n\t\t\telse if (upper>0.974) {\r\n\t\t\t\tlower=lower-0.025;\r\n\t\t\t\tupper=1;\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\treturn myBid;\r\n\t}", "BElement createBElement();", "@Override\n\tpublic Bid createBid(Auction auction, RegisteredUser user, float price)\n\t\t\tthrows DTException {\n\t\tBid bid = new BidImpl(auction, user, price);\n\t\treturn bid;\n\t}", "private void setBidders(ArrayList<B> bidders) throws MarketCreationException {\n // Create immutable bidders list.\n if (bidders == null || bidders.size() == 0) {\n throw new MarketCreationException(\"A market must contain at least one bidder\");\n }\n ImmutableList.Builder<B> biddersBuilder = ImmutableList.builder();\n biddersBuilder.addAll(bidders);\n this.bidders = biddersBuilder.build();\n }", "Bid getNewBidWithUtil(double ourUtility, BidSpace bs) {\n\t\tBidPoint bestbid = null;\n\t\tdouble bestbidutil = 0;\n\t\tfor (BidPoint p : bs.bidPoints) {\n\t\t\tif (Math.abs(\n\t\t\t\t\tourUtility - p.getUtilityA()) < ALLOWED_UTILITY_DEVIATION\n\t\t\t\t\t&& p.getUtilityB() > bestbidutil\n\t\t\t\t\t&& !myPreviousBids.contains(p.getBid())) {\n\t\t\t\tbestbid = p;\n\t\t\t\tbestbidutil = p.getUtilityB();\n\t\t\t}\n\t\t}\n\t\tif (bestbid == null)\n\t\t\treturn null;\n\t\treturn bestbid.getBid();\n\t}", "com.google.openrtb.OpenRtb.BidRequestOrBuilder getBidrequestOrBuilder();", "public Bid newBid(Item item, User buyer, Money amount)\n {\n return auctionManager.newBid(item, buyer, amount);\n }", "private List<Bid> getProperBid(double lower, double upper) {\r\n\r\n\t\tList<Bid> bids = new ArrayList<Bid>();\r\n\t\tBidIterator myBidIterator = new BidIterator(US.getDomain());\r\n\t\t\r\n\t\twhile (myBidIterator.hasNext()) {\r\n\t\t\tBid b = myBidIterator.next();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tdouble util = US.getUtility(b);\r\n\t\t\t\tif (util >= lower && util <= upper) {\r\n\t\t\t\t\tbids.add(b);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bids;\r\n\t}", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "private void parseBid(String parse[], Auction auction)\n {\n boolean bWinner = false; /* Boolean to indicate for winner */\n boolean bError = false; /* Boolean to indicate the error */\n User bidder = null; /* Bidder of auction */\n int money = 0; /* Bid price */ \n Date dateBid = null; /* The bid date */\n\n UserManager userManager = UserManager.getSingletonInstance();\n /* Loop through each tag and then get the data */\n for (int i = 0; i < tagBid.length && !bError; i++)\n {\n String[] fields = parse[i].split(\" \", 2);\n String tag = fields[0].trim();\n String text = fields[1].trim();\n \n /* Get bidder */\n if (tag.equals(tagBid[0]) || tag.equals(tagWinner))\n {\n bidder = userManager.findUserByUsername(text);\n if (bidder == null)\n {\n bError = true;\n break;\n }\n if (tag.equals(tagWinner))\n bWinner = true;\n }\n\n /* Check bid money */\n else if (tag.equals(tagBid[1]) && IOUtils.validateInteger(text))\n {\n money = Integer.parseInt(text);\n if (money < 0)\n {\n bError = true;\n break;\n }\n }\n\n /* Check bid date */\n else if (tag.equals(tagBid[2]) && DateUtils.validateDateTimeStr(text))\n dateBid = DateUtils.strToDateTime(text);\n else\n {\n bError = true;\n break;\n }\n }\n \n /* If don't have any error occur, create bid and add to auction */\n if (bError == false)\n {\n Bid bid = new Bid(bidder, money);\n bid.setDate(dateBid);\n auction.addBid(bid);\n if (bWinner == true)\n auction.setWinner(bid);\n bid.getBidder().addBid(auction); /* Add auction bid to user */\n }\n return;\n }", "public Auction assembleAuction(AuctionDTO auctionDTO) {\r\n AuctionPersistenceHelper.validateNotNull(auctionDTO, \"auctionDTO\");\r\n\r\n BidDTO[] bidDTOs = auctionDTO.getBids();\r\n Bid[] bids = new Bid[bidDTOs.length];\r\n\r\n for (int i = 0; i < bidDTOs.length; i++) {\r\n bids[i] = assembleBid(bidDTOs[i]);\r\n }\r\n\r\n return new AuctionImpl(auctionDTO.getId(), auctionDTO.getSummary(), auctionDTO.getDescription(),\r\n auctionDTO.getItemCount(), auctionDTO.getMinimumBid(), auctionDTO.getStartDate(), auctionDTO.getEndDate(),\r\n bids);\r\n }", "public Bids[] populateBids() {\r\n\t\tint bidsLength = bids.size();\r\n\t\tint index = 0;\r\n\t\t\r\n\t\tBids[] auctionBids = new Bids[bidsLength];\r\n\t\tfor(Map.Entry<Integer, Bids> auctions: bids.entrySet()) {\r\n\t\t\tauctionBids[index] = auctions.getValue();\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn auctionBids;\r\n\t\r\n\t}", "BidGenerator(\n\t\t\t\tlong startBid,\n\t\t\t\tlong endBid,\n\t\t\t\tlong minAuctionId,\n\t\t\t\tlong minPersonId) {\n\t\t\tthis.startBid = startBid;\n\t\t\tthis.endBid = endBid;\n\t\t\tthis.minPersonId = minPersonId;\n\t\t\tthis.minAuctionId = minAuctionId;\n\t\t}", "public Builder setBididBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n bidid_ = value;\n onChanged();\n return this;\n }", "public static void bid(int amount) {\n\t}", "public abstract Bid chooseFirstCounterBid();", "public abstract Bid chooseOpeningBid();", "public abstract Bid chooseCounterBid();", "public Bag(String name, int weightCapacity, int lowerFit, int upperFit) {\n\t\tthis.name = name;\n\t\tthis.weightCapacity = weightCapacity;\n\t\tthis.lowerFit = lowerFit;\n\t\tthis.upperFit = upperFit;\n\t}", "@Test(expected = BidAmountException.class)\n public void testLowballingTheInitialBid() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n knownUsers.login(bidder.userName(), bidder.password());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(bidder, startingPrice - 5, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n }", "public Builder clearBid() {\n copyOnWrite();\n instance.clearBid();\n return this;\n }", "public void testZeroBid(){\n\n Bid bid = null;\n try {\n bid = new Bid(new Thing(new User()), new User(), 0);\n } catch (Exception e){\n fail();\n }\n assertEquals(0, bid.getAmount());\n assertEquals(\"0.00\", bid.valueOf());\n assertEquals(\"$0.00\", bid.toString());\n }", "public void setBid(String bid) {\r\n this.bid = bid;\r\n }", "BType createBType();", "@Override\n public int getBidId()\n {\n return 0;\n }", "com.google.openrtb.OpenRtb.BidRequestOrBuilder getRequestOrBuilder();", "public Bid winningBid(final String itemId);", "private static List<BoughtItem> initBoughtItems(ResultSet rs) throws SQLException {\n List<BoughtItem> boughtItemsList = new ArrayList<BoughtItem>();\n while (rs.next()) {\n BoughtItem item = new BoughtItem();\n item.setId(rs.getLong(1));\n item.setItemPrice(rs.getBigDecimal(2));\n item.setBoughtDate(rs.getDate(3));\n item.setSharedBasketId(rs.getLong(4));\n item.setProduct(getBoughtProductDomain(rs.getLong(5)));\n boughtItemsList.add(item);\n }\n\n return boughtItemsList;\n }", "public static BII createEntity() {\n BII bII = new BII()\n .name(DEFAULT_NAME)\n .type(DEFAULT_TYPE)\n .biiId(DEFAULT_BII_ID)\n .detectionTimestamp(DEFAULT_DETECTION_TIMESTAMP)\n .sourceId(DEFAULT_SOURCE_ID)\n .detectionSystemName(DEFAULT_DETECTION_SYSTEM_NAME)\n .detectedValue(DEFAULT_DETECTED_VALUE)\n .detectionContext(DEFAULT_DETECTION_CONTEXT)\n .etc(DEFAULT_ETC)\n .etcetc(DEFAULT_ETCETC);\n return bII;\n }", "Pair<Double, Integer> bid();", "public Iterable<Bid> bidsForItem(final String itemId);", "public Builder setBid(int value) {\n copyOnWrite();\n instance.setBid(value);\n return this;\n }", "public Bid assembleBid(BidDTO bidDTO) {\r\n AuctionPersistenceHelper.validateNotNull(bidDTO, \"bidDTO\");\r\n\r\n CustomBid bid = new CustomBid(bidDTO.getBidderId(), bidDTO.getImageId(), bidDTO.getMaxAmount(),\r\n bidDTO.getTimestamp());\r\n\r\n if (bidDTO.getEffectiveAmount() != null) {\r\n bid.setEffectiveAmount(bidDTO.getEffectiveAmount().intValue());\r\n }\r\n\r\n if (bidDTO.getId() != null) {\r\n bid.setId(bidDTO.getId().longValue());\r\n }\r\n\r\n return bid;\r\n }", "public Bid() {}", "public AuctionItem(long auctionID, String name, String des, double minValue, double maxValue, ClientInterface client){\n\t\tID = auctionID;\n\t\titem_name = name;\n\t\titem_description = des;\n\t\tstart_price = minValue;\n\t\treserve_price = maxValue;\n\t\towner = client;\n\t\tstatus = \"open\";\n\t\tbids = new Hashtable<>();\n\t}", "private void bid() {\n\t\t\t\n\t\t}", "private static MarketDataSet createTestMarketData() {\n final MarketDataSet dataSet = MarketDataSet.empty();\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"AUDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.8);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"NZDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 2.2);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBPUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.5);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBP1Y\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)),\n ImmutableLocalDateDoubleTimeSeries.builder()\n .putAll(new LocalDate[] {LocalDate.of(2016, 1, 1), LocalDate.of(2016, 1, 2)}, new double[] {0.01, 0.02}).build());\n return dataSet;\n }", "public void testConstructorB2() throws Exception {\r\n Element element =\r\n TestsHelper.createHandlerElement(\"BidUpdateHandler\", new String[] {\"auction_id_param_key\",\r\n \"max_amount_param_key\",\r\n \"bid_id_param_key\"}, new String[] {\" \", \"maxAmount\", \"bidId\"});\r\n try {\r\n new BidUpdateHandler(element);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // do nothing\r\n }\r\n }", "public int makeBid(AuctionItem item, int secretKey){\n Bid oldBid = item.getBid();\n oldBid.setSecretKey(secretKey);\n item.setBid(oldBid);\n Message<AuctionItem> message = new Message<>(Message.MessageIdentifier.\n MAKE_BID,item);\n Message<String> reply = sendMSG(message);\n switch( reply.getMessageIdentifier() ) {\n case BID_REJECTED_INADEQUATE:\n return 0;\n case BID_REJECTED_NSF:\n return 1;\n case BID_ACCEPTED:\n return 2;\n case CASE_NOT_FOUND:\n default:\n return -1;\n }\n }", "public BnB(ObjectiveType objectiveType, double c0, double[] c, double[][] a, Sign[] signs, double[] b, int[] freeVars, int[] intVars) {\n this(objectiveType, c0, c, a, signs, b, freeVars, intVars, Maths.EMPTY_INT_ARRAY);\n }", "public void initialize(Collection<Bookshelf> basis)\n\t throws IllegalArgumentException {\n\n\tif (null == basis)\n\t throw new IllegalArgumentException(\"input cannot be null.\");\n\n\tIterator<Bookshelf> shelfs = basis.iterator();\n\n\tBookshelf masterShelf = BookshelfOperations.union(basis);\n\n\tidPairs = identifyInputs(masterShelf); // tag | property -> neuron #\n\tthis.numShelfs = basis.size();\n\tint numBooks = masterShelf.size();\n\n\tint i = 0;\n\tdouble[][] inputValues = new double[numBooks][numTags];\n\n\twhile (shelfs.hasNext()) {\n\n\t Bookshelf shelf = shelfs.next();\n\t Iterator<Book> books = shelf.iterator();\n\n\t // System.out.println(\"numShelfs: \" + String.valueOf(numShelfs));\n\n\t while (books.hasNext()) {\n\n\t\tBook book = books.next();\n\t\tIterator<Map.Entry<String, Integer>> tags = book\n\t\t\t.enumerateTags().iterator();\n\n\t\twhile (tags.hasNext()) {\n\n\t\t Map.Entry<String, Integer> tag = tags.next();\n\t\t int index = idPairs.get(tag.getKey());\n\n\t\t if (index > numTags) {\n\t\t\tSystem.out.println(\"ERROR: INDEX OUT OF BOUNDS!\");\n\t\t\tSystem.out.println(\"name: \" + tag.getKey() + \" index: \"\n\t\t\t\t+ index);\n\t\t\tSystem.out.println(\"numTags: \" + numTags);\n\n\t\t } else if (index == numTags) {\n\t\t\t// System.out.println(\"__OTHER__ detected!\");\n\t\t\tinputValues[i][index] += ((double) tag.getValue() / (double) maxTagMag);\n\t\t } else {\n\t\t\tinputValues[i][index] = ((double) tag.getValue() / (double) maxTagMag);\n\t\t }\n\t\t}\n\t\t++i;\n\t }\n\t}\n\n\tNeuralDataSet data = new BasicNeuralDataSet(inputValues, null);\n\n\tbrain = generateBrain(numTags, numShelfs);\n\ttrain(data);\n\n\tflatShelfs = new HashMap<Integer, FlatShelf>();\n\n\tfor (Bookshelf s : basis) {\n\t FlatShelf fs = new FlatShelf(s);\n\t flatShelfs.put(checkBook(fs), fs);\n\t}\n\n\tcurrentWeights = new ButlerWeights(brain.getStructure().getSynapses()\n\t\t.get(0).getMatrix(), numTags, flatShelfs, idPairs);\n\t// initialized = true;\n }", "public void makeBid(auctionsystemInterface ai) throws RemoteException\n {\n System.out.println(\"Please type in the id of the auction and the your bid separated\" +\n \"by space as integer numbers(example: 3 500 , where 3 is id and 500 the bid\");\n Scanner sc = new Scanner(System.in);\n String[] inputArray = sc.nextLine().split(\" \");\n\n try{\n// ai.buyerBid(Integer.parseInt(inputArray[0]), Integer.parseInt(inputArray[1]), curBuyerName);\n String output = ai.auctionBid(Integer.parseInt(inputArray[1]), Integer.parseInt(inputArray[0]), curBuyerName);\n System.out.println(output);\n }\n catch (NumberFormatException ex)\n {\n System.out.println(\"You can input only integers for the two values.\");\n }\n catch (NullPointerException nullex)\n {\n System.out.println(\"There is no auction with this id.\");\n }\n catch (ArrayIndexOutOfBoundsException aex)\n {\n System.out.println(\"You need to input both the id and the price of bid\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic BMW createBMW() {\n\t\treturn new BMW320();\r\n\t}", "@Override\n\tpublic B makeB(Map<String, String> attributes, Div divObj) {\n\t\treturn new B( attributes, divObj );\n\t}", "public SemanticWebType(int agentId, List<Integer> sellersIDd, double value, List<Double> costs, \r\n\t\t\t List<Integer> minNumberOfRecordsFromSellers, List<Integer> maxNumberOfRecordsFromSellers, \r\n\t\t\t int minNumberOfRecordsForBuyer, int maxNumberOfRecordsForBuyer) \r\n\t{\r\n\t\tsuper(agentId, sellersIDd, value);\r\n\t\t\r\n\t\tif( (minNumberOfRecordsFromSellers.size() != maxNumberOfRecordsFromSellers.size()) || (minNumberOfRecordsFromSellers.size() != costs.size()))\r\n\t\t\tthrow new RuntimeException(\"The numbers of tuples provided by sellers should coinside with the number of marginal costs of sellers\");\r\n\t\t\r\n\t\tsetCosts(costs);\r\n\t\t_minNumberOfRecordsFromSellers = minNumberOfRecordsFromSellers;\r\n\t\t_maxNumberOfRecordsFromSellers = maxNumberOfRecordsFromSellers;\r\n\t\t_minNumberOfRecordsForBuyer = minNumberOfRecordsForBuyer;\r\n\t\t_maxNumberOfRecordsForBuyer = maxNumberOfRecordsForBuyer;\r\n\t\t_actuallyAllocatedTuples = new LinkedList<Integer>();\r\n\t\t_expectedCosts = new LinkedList<Double>();\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<BidItem> getBidItems(AuctionSearchBean auctionSearchBean) {\n\n\t\tQuery query = getEntityManager().createQuery(\" from BidItem as bidItem , BidSequence bidSeq \"\n\t\t\t\t+ \"where bidSeq.auction.auctionId = :auctionId and bidSeq.bidItemId = bidItem.bidItemId\");\n\t\tquery.setParameter(\"auctionId\", auctionSearchBean.getAuctionId());\t\n\t\tList<Object[]> objectsList = query.getResultList();\n\t\tList<BidItem> bidItemsList = new ArrayList<BidItem>();\n\n\t\tfor (Object[] objects : objectsList) {\n\t\t\tBidItem bidItem = (BidItem)objects[0];\n\t\t\tBidSequence bidSequence = (BidSequence)objects[1];\n\n\t\t\tbidItem.setSeqId(bidSequence.getSequenceId());\n\t\t\tbidItem.setBidSpan(bidSequence.getBidspan());\n\n\t\t\tif(!bidItemsList.contains(bidItem)) {\n\t\t\t\tbidItemsList.add(bidItem);\n\t\t\t}\n\t\t}\n\t\treturn bidItemsList;\n\t}", "public Builder clearBidid() {\n bitField0_ = (bitField0_ & ~0x00000002);\n bidid_ = getDefaultInstance().getBidid();\n onChanged();\n return this;\n }", "public Auction(PropertySquare property, List<Player> players, Bank bank) {\n this.property = property;\n this.players = players;\n this.bank = bank;\n this.bids = new HashMap<>();\n\n for(Player player : players){\n this.bids.put(player, null);\n }\n }", "public InbreedingCoeff(){\n super((Set<String>) null);\n }", "com.google.openrtb.OpenRtb.BidRequest getRequest();", "@Override\r\n\tpublic AbstractBagGift createBagGift() {\n\t\treturn new MerchantCollection();\r\n\t}", "public void testNegativeBid(){\n try {\n Bid bid = new Bid(new Thing(new User()), new User(), -20);\n fail();\n } catch (BidNegativeException e){\n // ok!\n } catch (Exception e){\n //ok\n }\n\n }", "public void testConstructorB4() throws Exception {\r\n Element element =\r\n TestsHelper.createHandlerElement(\"BidUpdateHandler\", new String[] {\"auction_id_param_key\",\r\n \"max_amount_param_key\",\r\n \"bid_id_param_key\"}, new String[] {\"auctionId\", \"maxAmount\", \" \"});\r\n try {\r\n new BidUpdateHandler(element);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public BidListModel getBidByBidListId(int bidListId) {\n return bidListRep.findByBidListId(bidListId);\n }", "public Builder clearBidrequest() {\n if (bidrequestBuilder_ == null) {\n bidrequest_ = com.google.openrtb.OpenRtb.BidRequest.getDefaultInstance();\n onChanged();\n } else {\n bidrequestBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "B createB();", "public MarketOrderBookImpl(\n String marketId, List<MarketOrder> sellOrders, List<MarketOrder> buyOrders) {\n this.marketId = marketId;\n this.sellOrders = sellOrders;\n this.buyOrders = buyOrders;\n }", "com.google.openrtb.OpenRtb.BidResponse getBidresponse();", "public Saving elementsOfFreeAmounts(List<Amount> elementsOfFreeAmounts) {\n this.elementsOfFreeAmounts = elementsOfFreeAmounts;\n return this;\n }", "private void buildBoats(final List<String> subNames) {\n boats = subNames.stream()\n .map(boatName -> new ShipId(boatName, side))\n .map(this::buildBoat)\n .filter(Optional::isPresent)\n .map(Optional::get)\n .collect(Collectors.toList());\n }", "public com.vodafone.global.er.decoupling.binding.request.GetBasePricesRequest createGetBasePricesRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetBasePricesRequestImpl();\n }", "public static Ticker adaptTicker(\n IndependentReserveTicker independentReserveTicker, CurrencyPair currencyPair) {\n\n BigDecimal last = independentReserveTicker.getLast();\n BigDecimal bid = independentReserveTicker.getBid();\n BigDecimal ask = independentReserveTicker.getAsk();\n BigDecimal high = independentReserveTicker.getHigh();\n BigDecimal low = independentReserveTicker.getLow();\n BigDecimal vwap = independentReserveTicker.getVwap();\n BigDecimal volume = independentReserveTicker.getVolume();\n Date timestamp = independentReserveTicker.getTimestamp();\n\n return new Ticker.Builder()\n .currencyPair(currencyPair)\n .last(last)\n .bid(bid)\n .ask(ask)\n .high(high)\n .low(low)\n .vwap(vwap)\n .volume(volume)\n .timestamp(timestamp)\n .build();\n }", "private static BigInteger[] getBids() throws Exception {\n\t\tInputStream stream;\r\n\t\tBigInteger bids[] = new BigInteger[3];\r\n\t\tbyte[][] signatures = new byte[3][];\r\n\t\tbyte[] signature;\r\n\t\tboolean[] bidAccepted = new boolean[3];\r\n\t\t//for each bidder\r\n\t\tfor (int i=0; i < bidders.size(); i++) {\r\n\t\t\tstream=(bidders.get(i)).getInputStream();\r\n\t\t\t//get their bid\r\n\t\t\tbids[i] = cryptoMessaging.recvBigInteger(stream);\r\n\t\t\t//get their signature\r\n\t\t\tsignature = cryptoMessaging.recvByteArr(stream);\r\n\t\t\t\r\n\t\t\tbidAccepted[i] = false;\r\n\t\t\t// if bid is from the person\r\n\t\t\tif (verify(bids[i], biddersigs[i], signature)) {\r\n\t\t\t\t// and the bid is higher than the asking price...\r\n\t\t\t\tif (bids[i].compareTo(askingPrice) >= 0) {\r\n\t\t\t\t\tbidAccepted[i] = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Bid below the asking price\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Bid signature did not match source\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// evaluateBids(bids, bidAccepted); //possible better framework for bid eval than what we got, I was on autopilot and made it\r\n\t\t\r\n\t\treturn bids;\t\r\n\t}", "public @NotNull Set<Bid> findAllBids(@NotNull final Bidder bidder) throws BazaarException;", "@Test(expected = BidAmountException.class)\n public void bidIsLessThanHighestBidIsRejected() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n knownUsers.login(bidder.userName(), bidder.password());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(bidder, startingPrice, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n\n testAuction.submitBid(firstBid);\n\n\n }", "ImmutableBag<T> toImmutable();", "public Market() {\n }", "BUnion createBUnion();", "public void newBidPostedByMe(U1467085Bid bid) {\n try {\n JavaSpace05 js = SpaceUtils.getSpace();\n if (EventRegistration != null) {\n EventRegistration.getLease().cancel();\n }\n if (allPossibleConfirmations.stream().noneMatch((o) -> o.adId == bid.adId)) {\n U1467085BidConfirmation newTemplate = new U1467085BidConfirmation();\n newTemplate.adId = bid.adId;\n allPossibleConfirmations.add(newTemplate);\n EventRegistration = js.registerForAvailabilityEvent(allPossibleConfirmations, null, false, Listener, SpaceUtils.LONGLEASE, null);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public SitbMoneyCollection create(long money_collection_id);", "public com.vodafone.global.er.decoupling.binding.request.GetBasePricesRequestType createGetBasePricesRequestType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetBasePricesRequestTypeImpl();\n }", "public void createAuctionTest(){\n\t\tAuction auc = new Auction(new User(),\"Test Auction Description\",1000l);\n\n\t}", "public Builder setBidid(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n bidid_ = value;\n onChanged();\n return this;\n }", "BTable createBTable();", "public ArrayList<Bid> getBids(){\n\t\tArrayList<Bid> bids = new ArrayList<Bid>();\n\t\tcreateFile(bidsFile);\n\t\ttry {\n\t\t\tString[] data;\n\t\t\treader = new BufferedReader(new FileReader(bidsFile));\n\t\t\t\n\t\t\tString strLine;\n\t\t\twhile((strLine = getLine()) != null){\n\t\t\t\tdata = strLine.split(\",\");\n\n\t\t\t\tBid bid = new Bid(data[0], Integer.parseInt(data[1]),Integer.parseInt(data[2]));\n\t\t\t\tbids.add(bid);\n\n\t\t\t}\n\t\t}catch (IOException e){\n\t\t\t//TODO auto generated catch block\n\t\tSystem.err.println(e);\n\t\t}\n\t\t\n\t\treturn bids;\n\t}", "public CreateAuctionInput(String language, String title, String shortDescription, String description, Integer adVisibility, String price, String offerPrice, Integer categoryId, Integer createdUserId, String addressInfo,\n String contactInfo, Integer conditionId, Integer locationsId, Integer shippingPackageId, String mainCat, String length, String breadth, String weight, String width, String auctionFromDateTime, String auctionToDateTime, String isHomePageLive, String lowerLimit, String priceLimit, String reservePrice) {\n super();\n this.language = language;\n this.title = title;\n this.shortDescription = shortDescription;\n this.description = description;\n this.adVisibility = adVisibility;\n this.price = price;\n this.offerPrice = offerPrice;\n this.categoryId = categoryId;\n this.createdUserId = createdUserId;\n this.addressInfo = addressInfo;\n this.contactInfo = contactInfo;\n this.conditionId = conditionId;\n this.locationsId = locationsId;\n this.shippingPackageId = shippingPackageId;\n this.mainCat = mainCat;\n this.length = length;\n this.breadth = breadth;\n this.weight = weight;\n this.width = width;\n this.auctionFromDateTime = auctionFromDateTime;\n this.auctionToDateTime = auctionToDateTime;\n this.isHomePageLive = isHomePageLive;\n this.lowerLimit = lowerLimit;\n this.priceLimit = priceLimit;\n this.reservePrice = reservePrice;\n }", "public Bag(String name, int weightCapacity) {\n\t\tthis.name = name;\n\t\tthis.weightCapacity = weightCapacity;\n\t}", "public com.google.openrtb.OpenRtb.BidRequestOrBuilder getBidrequestOrBuilder() {\n return bidrequest_;\n }", "public SmartBin() {\n items = new ItemType[7];\n curWeight = 0;\n curArrayIndex = 0;\n binNumber = \"SM\" + generateBinNumber();\n }", "@Override\n protected final OrderQueue<Integer,StopBuyOrder> createStopBuyOrderQueue(\n final BiPredicate<Integer, StopBuyOrder> filter) {\n /*********************************************************************\n * This needs to be an instance of your OrderQueue and Comparator. *\n *********************************************************************/\n final Comparator<StopBuyOrder> ascending = ...\n return new SimpleOrderQueue<>(0, filter, ascending);\n }", "public Auction(LocalDate theAuctionDate, LocalDate theCreateDate, Integer theMaxItemsPerBidder, \n\t\t\tInteger theMaxItemsSold, Organization theOrganization) {\n\t\tauctionDate = theAuctionDate;\n\t\tcreateDate = theCreateDate;\n\t\t// Max items per bidder- either use number user gives, or default\n\t\tif (theMaxItemsPerBidder == 0) \n\t\t\tmaxItemsPerBidder = DEFAULT_MAX_ITEMS_PER_BIDDER;\n\t\telse maxItemsPerBidder = theMaxItemsPerBidder;\n\t\t// Max items sold- either use number user gives, or default\n\t\tif (theMaxItemsSold == 0) \n\t\t\tmaxItemsSold = DEFAULT_MAX_ITEMS_SOLD;\n\t\telse maxItemsSold = theMaxItemsSold;\n\t\tforOrganization = theOrganization;\t\n\t\tHashMap<Item, ArrayList<Bidder>> inventory = new HashMap<Item, ArrayList<Bidder>>();\n\t}", "public void packBags() {\r\n GroceryBag[] packedBags = new GroceryBag[numItems];\r\n int bagCount = 0;\r\n\r\n GroceryBag currentBag = new GroceryBag();\r\n for (int i=0; i<numItems; i++) {\r\n GroceryItem item = (GroceryItem) cart[i];\r\n if (item.getWeight() <= GroceryBag.MAX_WEIGHT) {\r\n if (!currentBag.canHold(item)) {\r\n packedBags[bagCount++] = currentBag;\r\n currentBag = new GroceryBag();\r\n }\r\n currentBag.addItem(item);\r\n removeItem(item);\r\n i--;\r\n }\r\n }\r\n // Check this in case there were no bagged items\r\n if (currentBag.getWeight() > 0)\r\n packedBags[bagCount++] = currentBag;\r\n\r\n // Now create a new bag array which is just the right size\r\n pBags = new GroceryBag[bagCount];\r\n for (int i=0; i<bagCount; i++) {\r\n pBags[i] = packedBags[i];\r\n }\r\n\r\n // Add all grocery bags bag into cart\r\n for (int i = 0; i < bagCount; i++) {\r\n addItem(pBags[i]);\r\n }\r\n }", "private void clearBid() {\n \n bid_ = 0;\n }", "public void testConstructorB3() throws Exception {\r\n Element element =\r\n TestsHelper.createHandlerElement(\"BidUpdateHandler\", new String[] {\"auction_id_param_key\",\r\n \"max_amount_param_key\",\r\n \"bid_id_param_key\"}, new String[] {\"auctionId\", \" \", \"bidId\"});\r\n try {\r\n new BidUpdateHandler(element);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "private List<BulkLoadElementTO> populateBulkLoadElementTO( int numElements ) {\n List<BulkLoadElementTO> lTOList = new ArrayList<BulkLoadElementTO>();\n\n for ( int i = 0; i < numElements; i++ ) {\n lTOList.add( new BulkLoadElementTO( i, WAREHOUSE_STOCK_LEVEL, QUEUED, \"\", C0, C1, C2 ) );\n }\n\n return lTOList;\n\n }", "public static CollectionLikeType construct(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT)\n/* */ {\n/* 53 */ return new CollectionLikeType(rawType, bindings, superClass, superInts, elemT, null, null, false);\n/* */ }", "com.google.openrtb.OpenRtb.BidResponseOrBuilder getBidresponseOrBuilder();", "public CXLContract(double cededPremiumFixed, double attachmentPoint, double limit, double aggregateDeductible,\n double aggregateLimit, IStabilizationStrategy stabilization,\n List<Double> reinstatementPremiumFactors, IRIPremiumSplitStrategy riPremiumSplit,\n IBoundaryIndexStrategy boundaryIndex, List<FactorsPacket> factors, IPeriodCounter periodCounter) {\n super(cededPremiumFixed, attachmentPoint, limit, aggregateDeductible, aggregateLimit, stabilization,\n reinstatementPremiumFactors, riPremiumSplit, boundaryIndex, factors, periodCounter);\n }", "public Board(Piece[][] bd) {\n\t\tb = new Piece[8][8];\n\t\t\n\t\tfor (byte r = 0; r < b.length; r++) {\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tif (bd[r][c] instanceof Pawn) {\n\t\t\t\t\tb[r][c] = new Pawn(bd[r][c].getSide(), r, c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (bd[r][c] instanceof Knight) {\n\t\t\t\t\tb[r][c] = new Knight(bd[r][c].getSide(), r, c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (bd[r][c] instanceof Bishop) {\n\t\t\t\t\tb[r][c] = new Bishop(bd[r][c].getSide(), r, c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (bd[r][c] instanceof Rook) {\n\t\t\t\t\tb[r][c] = new Rook(bd[r][c].getSide(), r, c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (bd[r][c] instanceof Queen) {\n\t\t\t\t\tb[r][c] = new Queen(bd[r][c].getSide(), r, c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (bd[r][c] instanceof King) {\n\t\t\t\t\tb[r][c] = new King(bd[r][c].getSide(), r, c, ((King) bd[r][c]).getCKS(), ((King) bd[r][c]).getCQS());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\tb[r][c] = new Null(r, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public ImmutableList<B> getBidders() {\n return this.bidders;\n }", "public void initializeDemandVector() {\r\n\t\tdouble marketSplit = Parameters.marketSplit / 100.0;\r\n\t\tfor (int i = 0; i < demandVector.length; i++) {\r\n\t\t\t\r\n\t\t\tdouble r = RandomHelper.nextDoubleFromTo(0, 1);\r\n\t\t\t\r\n\t\t\tdemandVector[i] = r < marketSplit ? 1 : 0;\r\n\t\t}\r\n\t}", "public ChangeMakerImpl_Beneski(Set<Integer> denominations) {\n assert !denominations.contains(null) : \"Denomination List Can't Contain Null\";\n\n\n denominationList = new ArrayList<>();\n\n denominationList.addAll(denominations);\n\n //Ensure the values are sorted greatest to least.\n Collections.sort(denominationList);\n Collections.reverse(denominationList);\n }" ]
[ "0.74819213", "0.71448606", "0.6430575", "0.5834654", "0.55380297", "0.55266076", "0.5513123", "0.55058116", "0.54745364", "0.537799", "0.53383464", "0.52154994", "0.5212431", "0.51200014", "0.5091742", "0.503911", "0.50350875", "0.4986684", "0.49617475", "0.4920207", "0.49112874", "0.49091434", "0.4908647", "0.49069685", "0.48511377", "0.48382738", "0.4836335", "0.48181129", "0.481195", "0.4791086", "0.4778937", "0.4765555", "0.4763693", "0.4758783", "0.47441545", "0.4736572", "0.4729286", "0.46782818", "0.46657142", "0.4650475", "0.46366268", "0.46241242", "0.45903847", "0.45861974", "0.45761564", "0.45725033", "0.45678914", "0.45549408", "0.45367277", "0.45345256", "0.45301616", "0.452928", "0.4521414", "0.45204633", "0.45186", "0.45137012", "0.45015702", "0.45003295", "0.44727483", "0.44690505", "0.4467993", "0.44643545", "0.44600016", "0.444928", "0.44431886", "0.44243482", "0.44234967", "0.4415178", "0.44132197", "0.44120753", "0.44017434", "0.44013554", "0.4396122", "0.43908846", "0.4390718", "0.43807885", "0.4371565", "0.4370824", "0.4370285", "0.43602204", "0.43470296", "0.4338747", "0.43277046", "0.4321275", "0.43134114", "0.4304523", "0.43012023", "0.43009773", "0.4299933", "0.42995724", "0.42951277", "0.42927736", "0.4290252", "0.42809024", "0.42780772", "0.4275975", "0.42728415", "0.42701477", "0.42689508", "0.42650396" ]
0.8150931
0
Prepares the Power Matcher bid.
private void constructBid() { Bid rawBid; double maxDemand = elements.first().demandWatt; // Minimum demand is also Max Production. double minDemand = elements.last().demandWatt; double minPriority = 0.0; double maxPriority = 1.0; // First make the ideal, continuous bid, that does not care about discrete running modes. rawBid = Bid.create(marketBasis) .add(priceOf(minPriority), maxDemand) .add(priceOf(maxPriority), minDemand) .build(); // Now construct actual bid double[] rawDemand = rawBid.getDemand(); newBid = new UnconstrainedBidElement[rawDemand.length]; for (int i = 0; i < rawDemand.length; i++) { newBid[i] = getClosest(rawDemand[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Before\n\tpublic void prepare() {\n\t\tbomb = new Special(SpecialType.NUKE);\n\t\tcom = new Commander(0, 0, 0, 1);\n\t\tbaseHP = com.getHealth();\n\t}", "public void prepare() {\r\n\t\tmyPreviousBet = 0;\r\n\t\tmyCurrentBet = 0;\r\n\t\tstage = 0;\r\n\t\tposition = -1;\r\n\t\tintel.reset();\r\n\t\tfor (int i = 0; i < boards.length; i++)\r\n\t\t\tboards[i] = \"UNKNOWN\";\r\n\t}", "private void prepare()\n {\n\n MapButton mapButton = new MapButton(which);\n addObject(mapButton,58,57);\n Note note = new Note();\n addObject(note,1200,400);\n\n DropDownSuspects dropDownSuspects = new DropDownSuspects();\n addObject(dropDownSuspects,150,150);\n\n DropDownClues dropDownClues = new DropDownClues();\n addObject(dropDownClues,330,150);\n\n TestimonyFrame testimonyFrame = new TestimonyFrame();\n addObject(testimonyFrame,506,548);\n }", "private void prepare()\n { \n ClickToStart start = new ClickToStart();\n addObject(start, 641, 534); \n }", "@SneakyThrows\n @Override\n public void prepare() {\n final String orderId = order.getId();\n final BlockingQueue<Order> queue = new LinkedBlockingDeque<>();\n if (preparedOrderMap.containsKey(orderId)) {\n throw new SimulatorException(\"Encounter repeated order id!\");\n }\n preparedOrderMap.put(orderId, queue);\n\n Thread.sleep(order.getPrepTime() * SCALE_MILLI_SECOND);\n order.setOrderPreparedTime(new Date());\n preparedOrderMap.get(orderId).put(order);\n log.info(String.format(\"Order prepared: %s\", order.getId()));\n }", "private void prepareCoinRacks() {\n\t\t\n\t}", "private void prepareDeal(){\n\t\tdeck.shuffle();\n\t\tplayers.clear(); //Remove any possible rubbish\n\t\tfor(Player p : seatPlayers){\n\t\t\tif(p != null){\n\t\t\t\tList<BlackjackHand> hands = new ArrayList<>();\n\t\t\t\tBlackjackHand hand = new BlackjackHandPlayer();\n\t\t\t\thands.add(hand);\n\t\t\t\thistoricalActions.put(hand, new ArrayList<>());\n\t\t\t\tplayers.put(p, hands);\n\t\t\t}\n\t\t}\n\t\tdealerHand = new BlackjackHandDealer();\n\t}", "public void prepareBloque(){\n\t\tBloque b= game.getBloque();\n\t\timage = b.getImage();\n\t\ttemporal = image.getImage().getScaledInstance(b.getAncho(), b.getAlto(), Image.SCALE_SMOOTH);\n\t\tb.setImage(new ImageIcon(temporal));\n\t}", "public void prepareRematch() {\r\n\t\tgame.prepareRematch();\r\n\t}", "private void bid() {\n\t\t\t\n\t\t}", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\t\n\t\t\tif (name.equals(\"Action\"))\n\t\t\t\tp_Action = para[i].getParameterAsString();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tp_Hospitalization_ID=getRecord_ID();\n\t}", "public void prepare()\n {\n // First, we assign the payload a new UUID if it does not already have one\n if(getId() == null)\n setId(UUID.randomUUID());\n \n // Set the submission date to now\n setSubmissionDate(new Date());\n }", "private void prepare()\n {\n Label winningMsg = new Label(\"Thank you, \\nfor saving \\none's life. \", 60);\n addObject(winningMsg,310,320);\n \n creditBtn = new instructionButton();\n addObject(creditBtn,50,470);\n }", "public void prepare() {\n\t}", "public RequirementPrepaidCard(TicketDBGateway cardMapper, HistoryDBGateway historyMapper) {\n\t\tthis.cardGateWay = cardMapper;\n\t\tthis.historyGW = historyMapper;\n\t}", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\t}", "public void prepare() {\n long millis, nanos;\n TestCaseImpl tc = _testCase;\n \n nanos = Util.currentTimeNanos();\n prepare(tc);\n nanos = Util.currentTimeNanos() - nanos;\n tc.setDoubleParam(Constants.ACTUAL_PREPARE_TIME, \n Util.nanosToMillis(nanos));\n }", "public void prepare() {\n this.shifts = new ArrayList<>();\n this.rates = new ArrayList<>();\n // bootstrap shifts and rates\n this.prepareShifts();\n this.prepareRates();\n }", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null)\n\t\t\t\t;\n\t\t\telse if (name.equals(\"M_Requisition_ID\"))\n\t\t\t\tp_M_RequisitionFrom_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "protected void prepare()\n\t{\n\t\tlog.info(\"\");\n\t\tm_ctx = Env.getCtx();\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"C_BankStatementLoader_ID\"))\n\t\t\t\tm_C_BankStmtLoader_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse if (name.equals(\"FileName\"))\n\t\t\t\tfileName = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tm_AD_Client_ID = Env.getAD_Client_ID(m_ctx);\n\t\tlog.info(\"AD_Client_ID=\" + m_AD_Client_ID);\n\t\tm_AD_Org_ID = Env.getAD_Org_ID(m_ctx);\n\t\tlog.info(\"AD_Org_ID=\" + m_AD_Org_ID);\n\t\tlog.info(\"C_BankStatementLoader_ID=\" + m_C_BankStmtLoader_ID);\n\t}", "public void preparePlayer2()\n {\n Player2 p2 = new Player2();\n addObject(p2, 878, 600);\n }", "public void presetABCD() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n pollOptions.add(\"D\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }", "@Override\n protected void initialCardGeneration() {\n Intent intent = getIntent();\n if(intent != null)\n {\n if(intent.getBooleanExtra(\"cardPoolIntent\", false))\n {\n // Store card pools loaded in from elsewhere.\n Bundle bundle = intent.getExtras();\n openedCardPool = bundle.getParcelableArrayList(\"openedCardPool\");\n selectedCardPool = bundle.getParcelableArrayList(\"selectedCardPool\");\n\n // Gets the deck ID and stores it in case this was passed from MyDeckActivity.\n deckId = bundle.getInt(\"deckId\");\n\n // Update card counter button according to passed in selected card pool (deck).\n btnCardsInDeck.setText(selectedCardPool.size() + SEALED_DECK_NUM);\n }\n else\n {\n // Generate new cards according to Sealed rules, using the database. (6 boosters.)\n generateNewCards();\n }\n }\n else\n {\n // Generate new cards according to Sealed rules, using the database. (6 boosters.)\n generateNewCards();\n }\n }", "protected void initialize() {\n \tstartTime = System.currentTimeMillis();\n \tintake.setLeftPower(power);\n \tintake.setRightPower(power);\n }", "private void prepare()\n {\n BrickPowerUp powerUp = new BrickPowerUp();\n addObject(powerUp,554,237);\n powerUp.setLocation(542,236);\n powerUp.setLocation(542,236);\n removeObject(powerUp);\n Timer timer = new Timer();\n addObject(timer,943,30);\n Player1 player1 = new Player1();\n addObject(player1,23,312);\n Player2 player2 = new Player2();\n addObject(player2,976,308);\n BrickPowerUp powerUp2 = new BrickPowerUp();\n addObject(powerUp2,512,78);\n BrickPowerUp powerUp3 = new BrickPowerUp();\n addObject(powerUp3,512,132);\n BrickPowerUp powerUp4 = new BrickPowerUp();\n addObject(powerUp4,511,184);\n powerUp4.setLocation(511,188);\n BrickPowerUp powerUp5 = new BrickPowerUp();\n addObject(powerUp5,512,237);\n BrickPowerUp powerUp6 = new BrickPowerUp();\n addObject(powerUp6,514,356);\n BrickPowerUp powerUp7 = new BrickPowerUp();\n addObject(powerUp7,515,412);\n BrickPowerUp powerUp8 = new BrickPowerUp();\n addObject(powerUp8,516,468);\n BrickPowerUp powerUp9 = new BrickPowerUp();\n addObject(powerUp9,516,524);\n BrickPowerUp powerUp10 = new BrickPowerUp();\n addObject(powerUp10,548,27);\n BrickPowerUp powerUp11 = new BrickPowerUp();\n addObject(powerUp11,548,78);\n BrickPowerUp powerUp12 = new BrickPowerUp();\n addObject(powerUp12,548,132);\n BrickPowerUp powerUp13 = new BrickPowerUp();\n addObject(powerUp13,548,185);\n BrickPowerUp powerUp14 = new BrickPowerUp();\n addObject(powerUp14,548,240);\n BrickPowerUp powerUp15 = new BrickPowerUp();\n addObject(powerUp15,550,356);\n BrickPowerUp powerUp16 = new BrickPowerUp();\n addObject(powerUp16,548,298);\n BrickPowerUp powerUp17 = new BrickPowerUp();\n addObject(powerUp17,550,413);\n BrickPowerUp powerUp18 = new BrickPowerUp();\n addObject(powerUp18,549,469);\n BrickPowerUp powerUp19 = new BrickPowerUp();\n addObject(powerUp19,548,524);\n BrickPowerUp powerUp20 = new BrickPowerUp();\n addObject(powerUp20,548,586);\n BrickPowerUp powerUp21 = new BrickPowerUp();\n addObject(powerUp21,476,27);\n BrickPowerUp powerUp22 = new BrickPowerUp();\n addObject(powerUp22,476,80);\n BrickPowerUp powerUp23 = new BrickPowerUp();\n addObject(powerUp23,476,133);\n BrickPowerUp powerUp24 = new BrickPowerUp();\n addObject(powerUp24,476,188);\n BrickPowerUp powerUp25 = new BrickPowerUp();\n addObject(powerUp25,476,242);\n BrickPowerUp powerUp26 = new BrickPowerUp();\n addObject(powerUp26,476,298);\n BrickPowerUp powerUp27 = new BrickPowerUp();\n addObject(powerUp27,476,355);\n BrickPowerUp powerUp28 = new BrickPowerUp();\n addObject(powerUp28,476,411);\n BrickPowerUp powerUp29 = new BrickPowerUp();\n addObject(powerUp29,476,468);\n BrickPowerUp powerUp30 = new BrickPowerUp();\n addObject(powerUp30,476,523);\n BrickPowerUp powerUp31 = new BrickPowerUp();\n addObject(powerUp31,476,584);\n Brick brick = new Brick();\n addObject(brick,442,28);\n Brick brick2 = new Brick();\n addObject(brick2,443,76);\n Brick brick3 = new Brick();\n addObject(brick3,444,125);\n Brick brick4 = new Brick();\n addObject(brick4,444,174);\n Brick brick5 = new Brick();\n addObject(brick5,444,223);\n Brick brick6 = new Brick();\n addObject(brick6,444,274);\n Brick brick7 = new Brick();\n addObject(brick7,444,324);\n Brick brick8 = new Brick();\n addObject(brick8,444,373);\n Brick brick9 = new Brick();\n addObject(brick9,444,422);\n Brick brick10 = new Brick();\n addObject(brick10,444,472);\n Brick brick11 = new Brick();\n addObject(brick11,444,523);\n Brick brick12 = new Brick();\n addObject(brick12,444,574);\n Brick brick22 = new Brick();\n addObject(brick22,583,28);\n Brick brick23 = new Brick();\n addObject(brick23,583,80);\n Brick brick24 = new Brick();\n addObject(brick24,582,133);\n Brick brick25 = new Brick();\n addObject(brick25,583,186);\n Brick brick26 = new Brick();\n addObject(brick26,583,241);\n Brick brick27 = new Brick();\n addObject(brick27,584,298);\n brick27.setLocation(583,290);\n Brick brick28 = new Brick();\n addObject(brick28,584,345);\n Brick brick29 = new Brick();\n addObject(brick29,584,398);\n Brick brick210 = new Brick();\n addObject(brick210,584,451);\n Brick brick211 = new Brick();\n addObject(brick211,584,504);\n Brick brick212 = new Brick();\n addObject(brick212,584,556);\n Brick brick213 = new Brick();\n addObject(brick213,585,604);\n brick213.setLocation(588,604);\n Brick brick13 = new Brick();\n addObject(brick13,444,623);\n Ball ball = new Ball(false);\n addObject(ball,812,308);\n Ball ball2 = new Ball(true);\n addObject(ball2,140,306);\n brick213.setLocation(580,604);\n brick213.setLocation(591,595);\n brick.setLocation(450,32);\n brick2.setLocation(443,65);\n brick3.setLocation(442,96);\n brick4.setLocation(445,152);\n brick5.setLocation(442,218);\n brick6.setLocation(445,248);\n brick7.setLocation(442,301);\n brick8.setLocation(439,360);\n brick9.setLocation(438,402);\n brick10.setLocation(446,448);\n brick11.setLocation(440,509);\n brick12.setLocation(444,543);\n brick13.setLocation(442,602);\n brick213.setLocation(586,598);\n removeObject(brick213);\n brick.setLocation(444,21);\n brick2.setLocation(440,87);\n brick2.setLocation(440,130);\n brick2.setLocation(441,86);\n brick3.setLocation(428,226);\n brick3.setLocation(443,136);\n brick5.setLocation(444,181);\n brick4.setLocation(439,375);\n brick4.setLocation(444,244);\n brick7.setLocation(436,293);\n brick8.setLocation(441,339);\n brick6.setLocation(427,477);\n brick6.setLocation(442,400);\n brick10.setLocation(440,435);\n brick9.setLocation(437,497);\n removeObject(brick9);\n brick12.setLocation(437,565);\n removeObject(brick13);\n brick7.setLocation(437,283);\n removeObject(brick10);\n removeObject(brick12);\n removeObject(brick11);\n removeObject(brick6);\n removeObject(brick8);\n removeObject(brick7);\n brick2.setLocation(447,84);\n brick.setLocation(442,21);\n brick2.setLocation(440,68);\n brick5.setLocation(438,177);\n brick4.setLocation(436,228);\n brick4.setLocation(428,297);\n removeObject(brick4);\n removeObject(brick5);\n removeObject(brick3);\n brick2.setLocation(444,84);\n brick.setLocation(447,34);\n brick2.setLocation(439,73);\n removeObject(brick2);\n brick.setLocation(443,27);\n Brick brick14 = new Brick();\n addObject(brick14,443,81);\n Brick brick15 = new Brick();\n addObject(brick15,444,135);\n Brick brick16 = new Brick();\n addObject(brick16,444,188);\n Brick brick17 = new Brick();\n addObject(brick17,444,243);\n Brick brick18 = new Brick();\n addObject(brick18,444,296);\n Brick brick19 = new Brick();\n addObject(brick19,445,350);\n Brick brick20 = new Brick();\n addObject(brick20,445,403);\n Brick brick21 = new Brick();\n addObject(brick21,445,455);\n Brick brick30 = new Brick();\n addObject(brick30,445,504);\n Brick brick31 = new Brick();\n addObject(brick31,445,556);\n Brick brick32 = new Brick();\n addObject(brick32,444,609);\n brick32.setLocation(448,611);\n Brick brick214 = new Brick();\n addObject(brick214,584,610);\n brick32.setLocation(444,606);\n brick32.setLocation(439,605);\n brick32.setLocation(437,604);\n brick32.setLocation(449,608);\n brick32.setLocation(444,606);\n timer.setLocation(958,21);\n Portal portal = new Portal();\n addObject(portal,512,298);\n Portal2 portal2 = new Portal2();\n addObject(portal2,513,30);\n Portal3 portal3 = new Portal3();\n addObject(portal3,516,588);\n Brick brick38 = new Brick();\n addObject(brick38,415,25);\n brick38.setLocation(415,21);\n Brick brick39 = new Brick();\n addObject(brick39,415,81);\n Brick brick40 = new Brick();\n addObject(brick40,416,135);\n Brick brick41 = new Brick();\n addObject(brick41,416,188);\n Brick brick42 = new Brick();\n addObject(brick42,416,245);\n brick42.setLocation(419,243);\n Brick brick43 = new Brick();\n addObject(brick43,416,300);\n Brick brick44 = new Brick();\n addObject(brick44,416,350);\n Brick brick45 = new Brick();\n addObject(brick45,416,403);\n Brick brick46 = new Brick();\n addObject(brick46,415,456);\n Brick brick47 = new Brick();\n addObject(brick47,416,504);\n brick46.setLocation(416,459);\n Brick brick48 = new Brick();\n addObject(brick48,416,556);\n Brick brick49 = new Brick();\n addObject(brick49,415,602);\n brick49.setLocation(411,602);\n brick43.setLocation(411,302);\n brick49.setLocation(411,603);\n brick43.setLocation(411,303);\n brick46.setLocation(411,455);\n brick42.setLocation(411,247);\n brick46.setLocation(422,458);\n brick49.setLocation(417,596);\n brick43.setLocation(413,303);\n brick42.setLocation(418,236);\n brick38.setLocation(417,30);\n brick38.setLocation(419,14);\n brick38.setLocation(413,30);\n brick38.setLocation(419,24);\n brick38.setLocation(408,30);\n brick43.setLocation(410,294);\n brick42.setLocation(409,237);\n powerUp7.setLocation(505,415);\n powerUp8.setLocation(510,465);\n powerUp9.setLocation(507,523);\n portal3.setLocation(508,582);\n removeObject(brick38);\n removeObject(brick42);\n removeObject(brick43);\n removeObject(brick46);\n removeObject(brick49);\n Brick brick50 = new Brick();\n addObject(brick50,415,26);\n brick50.setLocation(414,27);\n Brick brick51 = new Brick();\n addObject(brick51,416,243);\n Brick brick52 = new Brick();\n addObject(brick52,415,296);\n Brick brick53 = new Brick();\n addObject(brick53,415,454);\n Brick brick54 = new Brick();\n addObject(brick54,414,605);\n brick54.setLocation(416,606);\n Brick brick55 = new Brick();\n addObject(brick55,384,27);\n Brick brick56 = new Brick();\n addObject(brick56,386,81);\n brick56.setLocation(384,81);\n Brick brick57 = new Brick();\n addObject(brick57,385,135);\n Brick brick58 = new Brick();\n addObject(brick58,385,189);\n brick58.setLocation(385,188);\n Brick brick59 = new Brick();\n addObject(brick59,385,244);\n brick59.setLocation(385,243);\n Brick brick60 = new Brick();\n addObject(brick60,384,295);\n brick60.setLocation(385,296);\n Brick brick61 = new Brick();\n addObject(brick61,386,350);\n brick61.setLocation(385,350);\n Brick brick62 = new Brick();\n addObject(brick62,386,404);\n brick62.setLocation(385,403);\n Brick brick63 = new Brick();\n addObject(brick63,386,456);\n brick63.setLocation(385,455);\n Brick brick64 = new Brick();\n addObject(brick64,385,505);\n Brick brick65 = new Brick();\n addObject(brick65,386,556);\n brick65.setLocation(385,555);\n Brick brick66 = new Brick();\n addObject(brick66,385,606);\n Brick brick67 = new Brick();\n addObject(brick67,355,27);\n Brick brick68 = new Brick();\n addObject(brick68,355,80);\n brick68.setLocation(355,81);\n Brick brick69 = new Brick();\n addObject(brick69,356,135);\n brick69.setLocation(355,135);\n Brick brick70 = new Brick();\n addObject(brick70,355,188);\n Brick brick71 = new Brick();\n addObject(brick71,354,244);\n brick71.setLocation(345,252);\n brick71.setLocation(355,242);\n Brick brick72 = new Brick();\n addObject(brick72,355,296);\n Brick brick73 = new Brick();\n addObject(brick73,355,351);\n brick73.setLocation(355,350);\n Brick brick74 = new Brick();\n addObject(brick74,355,404);\n brick74.setLocation(355,404);\n Brick brick75 = new Brick();\n addObject(brick75,356,455);\n brick75.setLocation(355,455);\n Brick brick76 = new Brick();\n addObject(brick76,355,506);\n brick76.setLocation(355,506);\n Brick brick77 = new Brick();\n addObject(brick77,355,557);\n brick77.setLocation(355,555);\n Brick brick78 = new Brick();\n addObject(brick78,355,609);\n brick78.setLocation(355,607);\n portal3.setLocation(510,585);\n powerUp31.setLocation(476,580);\n powerUp31.setLocation(473,590);\n powerUp9.setLocation(510,530);\n powerUp8.setLocation(510,457);\n powerUp7.setLocation(510,417);\n powerUp6.setLocation(510,354);\n powerUp8.setLocation(510,466);\n powerUp9.setLocation(510,529);\n powerUp31.setLocation(480,573);\n powerUp20.setLocation(550,573);\n powerUp31.setLocation(476,582);\n powerUp20.setLocation(548,580);\n Brick brick79 = new Brick();\n addObject(brick79,614,28);\n Brick brick80 = new Brick();\n addObject(brick80,644,28);\n Brick brick81 = new Brick();\n addObject(brick81,674,28);\n Brick brick82 = new Brick();\n addObject(brick82,615,80);\n Brick brick83 = new Brick();\n addObject(brick83,646,80);\n Brick brick84 = new Brick();\n addObject(brick84,675,80);\n Brick brick85 = new Brick();\n addObject(brick85,615,133);\n Brick brick86 = new Brick();\n addObject(brick86,647,133);\n Brick brick87 = new Brick();\n addObject(brick87,675,133);\n Brick brick88 = new Brick();\n addObject(brick88,615,185);\n brick88.setLocation(615,185);\n Brick brick89 = new Brick();\n addObject(brick89,647,185);\n Brick brick90 = new Brick();\n addObject(brick90,677,185);\n Brick brick91 = new Brick();\n addObject(brick91,615,241);\n Brick brick92 = new Brick();\n addObject(brick92,648,240);\n Brick brick93 = new Brick();\n addObject(brick93,677,239);\n brick93.setLocation(678,241);\n brick93.setLocation(679,243);\n brick93.setLocation(678,241);\n Brick brick94 = new Brick();\n addObject(brick94,614,291);\n Brick brick95 = new Brick();\n addObject(brick95,648,291);\n Brick brick96 = new Brick();\n addObject(brick96,678,291);\n Brick brick97 = new Brick();\n addObject(brick97,614,345);\n Brick brick98 = new Brick();\n addObject(brick98,647,345);\n Brick brick99 = new Brick();\n addObject(brick99,678,345);\n Brick brick100 = new Brick();\n addObject(brick100,615,398);\n Brick brick101 = new Brick();\n addObject(brick101,648,398);\n Brick brick102 = new Brick();\n addObject(brick102,679,398);\n Brick brick103 = new Brick();\n addObject(brick103,618,452);\n brick103.setLocation(618,458);\n Brick brick104 = new Brick();\n addObject(brick104,648,450);\n brick103.setLocation(610,446);\n Brick brick105 = new Brick();\n addObject(brick105,680,451);\n removeObject(brick103);\n Brick brick106 = new Brick();\n addObject(brick106,616,450);\n Brick brick107 = new Brick();\n addObject(brick107,617,504);\n Brick brick108 = new Brick();\n addObject(brick108,648,504);\n Brick brick109 = new Brick();\n addObject(brick109,680,504);\n Brick brick110 = new Brick();\n addObject(brick110,616,556);\n Brick brick111 = new Brick();\n addObject(brick111,649,556);\n Brick brick112 = new Brick();\n addObject(brick112,681,556);\n Brick brick113 = new Brick();\n addObject(brick113,616,610);\n Brick brick114 = new Brick();\n addObject(brick114,649,609);\n Brick brick115 = new Brick();\n addObject(brick115,680,610);\n brick115.setLocation(682,605);\n brick115.setLocation(680,608);\n portal3.setLocation(514,586);\n powerUp9.setLocation(513,525);\n powerUp8.setLocation(511,470);\n powerUp8.setLocation(512,470);\n powerUp7.setLocation(512,412);\n powerUp6.setLocation(512,356);\n powerUp5.setLocation(513,243);\n powerUp4.setLocation(513,187);\n powerUp31.setLocation(477,580);\n portal3.setLocation(512,584);\n brick57.setLocation(255,225);\n brick64.setLocation(305,476);\n portal.setLocation(509,301);\n removeObject(brick57);\n removeObject(brick64);\n removeObject(brick108);\n removeObject(brick86);\n Portal portal4 = new Portal();\n addObject(portal4,645,134);\n Portal portal5 = new Portal();\n addObject(portal5,649,501);\n Portal portal6 = new Portal();\n addObject(portal6,384,135);\n Portal portal7 = new Portal();\n addObject(portal7,384,504);\n portal3.setLocation(792,434);\n Portal2 portal22 = new Portal2();\n addObject(portal22,513,579);\n portal3.setLocation(514,411);\n Portal3 portal32 = new Portal3();\n addObject(portal32,509,190);\n portal3.setLocation(517,412);\n portal32.setLocation(519,192);\n portal.setLocation(518,297);\n portal5.setLocation(650,511);\n portal32.setLocation(510,198);\n portal.setLocation(511,300);\n portal3.setLocation(509,405);\n brick51.setLocation(283,220);\n brick100.setLocation(767,379);\n removeObject(brick51);\n removeObject(brick100);\n\n removeObject(portal32);\n removeObject(portal3);\n Portal3 portal33 = new Portal3();\n addObject(portal33,616,397);\n Portal3 portal34 = new Portal3();\n addObject(portal34,414,241);\n portal5.setLocation(644,503);\n portal7.setLocation(382,506);\n portal34.setLocation(417,245);\n portal6.setLocation(381,132);\n portal2.setLocation(511,34);\n portal.setLocation(516,300);\n }", "public void prepare()\n\t{\n\t\tSystem.out.println(getClass().getName()+\" is preparing to go outside.\");\n\t}", "public final void prepareForSaving() {\r\n\t\tbi_image.pack();\r\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "private void prepare() {\n Menu menu = new Menu();\n addObject(menu, 523, 518);\n }", "protected void prepare()\r\n\t{\r\n\t\tProcessInfoParameter[] para = getParameter();\r\n\t\tfor (int i = 0; i < para.length; i++)\r\n\t\t{\r\n\t\t\tString name = para[i].getParameterName();\r\n\t\t\tif (name.equals(\"DeleteOldImported\"))\r\n\t\t\t\tp_deleteOldImported = \"Y\".equals(para[i].getParameter());\r\n\t\t\telse if (name.equals(\"IsValidateOnly\"))\r\n\t\t\t\tp_IsValidateOnly = para[i].getParameterAsBoolean();\r\n\t\t\telse\r\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\r\n\t\t}\r\n\r\n\t\tm_AD_Client_ID = getProcessInfo().getAD_Client_ID();\r\n\r\n\t}", "protected void bInit()\n {\n \tb_expect_seqnum=1;\n //\tMessage m=new Message(String.valueOf(new char[20]));\n //\tb_sndpkt=make_pkt(0,m,0);//make a package\n }", "@Override\n\tpublic void prepare() {\n\t}", "@Override\n\tpublic void prepare() {\n\t\t\n\t}", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null)\n\t\t\t\t;\n\t\t\telse if (name.equals(\"SRI_Authorization_ID\"))\n\t\t\t\tp_SRI_Authorization_ID = para[i].getParameterAsInt();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\t\n\t\tm_AD_Client_ID = getAD_Client_ID();\n\t\t\n\t\tif (p_SRI_Authorization_ID == 0)\n\t\t\tp_SRI_Authorization_ID = getRecord_ID();\n\n\t}", "private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }", "private void prepare()\r\n {\r\n MenuButton menubutton = new MenuButton();\r\n addObject(menubutton, 268, 406);\r\n Tittle tittle2 = new Tittle();\r\n addObject(tittle2, 544, 422);\r\n Exit exit2 = new Exit();\r\n addObject(exit2, 863, 427);\r\n tittle2.setLocation(545, 401);\r\n exit2.setLocation(848, 414);\r\n tittle2.setLocation(545, 411);\r\n }", "protected void bInit()\r\n {\r\n \tSystem.out.println(\"|bInit| : expected_seq_num is: \"+expected_seq_num+\".\"); \r\n \tfor(int i=0;i<5;i++)\r\n \t\t{\r\n \t\t\tisAckedWindow[i] =ACK_NAKed;\r\n \t\t}\r\n \texpected_seq_num = FirstSeqNo;\r\n \tint check = makeCheckSum(FirstSeqNo,ACK_ACKed,DATA_EMPTY);\r\n \tpacketBuffer = new Packet (-1,ACK_ACKed,check,DATA_EMPTY);\r\n \tSystem.out.println(\"|bInit| : packet with seq number:\"+Integer.toString(packetBuffer.getSeqnum())+\" is stored in Buffer\"); \r\n \t//\tstate_receiver = STATE_WAIT_FOR_0_FROM_BELOW;\r\n }", "private RecipeBuilder() {\n Comparator<PreparedProduct> comparator =\n Comparator.comparing(component -> component.getProduct().getCalorificValue());\n components = new TreeMap<>(comparator);\n }", "protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"AD_Client_ID\"))\n\t\t\t\tm_AD_Client_ID = 1000000;\n\t\t\telse if (name.equals(\"AD_Org_ID\"))\n\t\t\t\tm_AD_Org_ID = 1000000;\n\t\t\telse if (name.equals(\"DeleteOldImported\"))\n\t\t\t;//\tm_deleteOldImported = \"Y\".equals(para[i].getParameter());\n\t\t\telse if (name.equals(\"DocAction\"))\n\t\t;//\t\tm_docAction = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t}", "public void initialize() {\n this.loadBidDetails();\n }", "public void grab() {\n\t\tif (climbMode == false) {\n\t\t\tif (bumperL) {\n\t\t\t\tmotorGL.set(-1);\n\t\t\t\tmotorGR.set(1);\n\t\t\t} \n\t\t\telse if (bumperR) {\n\t\t\t\tmotorGL.set(1);\n\t\t\t\tmotorGR.set(-1);\n\t\t\t}\t\n\t\t\telse {\n\t\t\t\tmotorGL.set(0);\n\t\t\t\tmotorGR.set(0);\n\t\t\t}\n\t\t}\n\t}", "public final void mo12625b() {\n if (mo9140c() != null) {\n PkState pkState = (PkState) LinkCrossRoomDataHolder.m13782a().get(\"data_pk_state\");\n if (!this.f13397e && pkState == PkState.PENAL) {\n this.f13396d.f11684v = true;\n this.f13396d.f11680r = 0;\n this.f13397e = true;\n this.f13398f = true;\n ((C3245ad) ((LinkPKApi) C9178j.m27302j().mo22373b().mo10440a(LinkPKApi.class)).battleInvite(this.f13396d.f11665c).mo19297a((C7494t<T, ? extends R>) mo13033u())).mo10183a(new C4708ga(this), new C4709gb(this));\n }\n }\n }", "public void presetABC() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }", "@Override\n\tprotected void prepare() {\n\t\tOrder_ID = getRecord_ID();\n\t\tEventType = getParameterAsString(\"EventType\");\n\t\t\n\t}", "pb4server.SetMainHeroRewardAskReq getSetMainHeroRewardAskReq();", "@Before\n public void setUp() {\n boiler1 = Boiler1.getUniqueInstance();\n boiler1.boiled = false;\n boiler1.empty = true;\n }", "private PBPoker(Builder builder) {\n super(builder);\n }", "public BareMetalMachinePowerOffParameters() {\n }", "public void newHand() {\n if(player.getSecondHand().size() > 0){\n player.emptySecondHand(deck);\n shuffle();\n }\n player.resetBet();\n dealer.resetBet();\n errorFlag = false;\n userMessage = \"Place your Bet\";\n againDisabled = true;\n dealDisabled = false;\n hitDisabled = true;\n splitDisabled = true;\n standDisabled = true;\n doubleDisabled = true;\n bettingDisabled = false;\n emptyHands();\n }", "private void prepKeyBindings() { \r\n prepNumberKeys();\r\n prepOperatorKeys();\r\n prepSupplementalKeys();\r\n }", "public void autonomousInit() { //Problems here when power is not cycled between matches.\n \tauto.autonomousInit();\n }", "public void prepare() {\r\n\t\tsuper.prepare();\r\n\t\tSystem.out.println(\" - Gather the grains\");\r\n\t\tSystem.out.println(\" - Shape into circles\");\r\n\t\tSystem.out.println(\" - Randomly color circles\");\r\n\t\tSystem.out.println(\" - Let circles dry\");\r\n\t}", "public void confirmPrepared() {\n getCurrentOrder().setPrepared(true);\n getRestaurant().getOrderSystem().preparedOrder(getCurrentOrder());\n EventLogger.log(\"Order #\" + getCurrentOrder().getOrderNum() + \" has been prepared by chef \" + this.getName());\n doneWithOrder();\n }", "@Test\n void grab() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n Square s = new Square(0, 4, false, true, false, true, false, 'b');\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(s);\n p.getPh().getPowerupDeck().getPowerups().clear();\n p.setTurn(true);\n AmmoTile a = new AmmoTile();\n PowerupDeck pud = new PowerupDeck();\n int[] cubes = new int[3];\n cubes[0] = 2;\n cubes[2] = 1;\n char[] c1 = {'b', 'b', 'b'};\n char[] c2 = {'r', 'r', 'r'};\n char[] c3 = {'y', 'y', 'y'};\n p.getPb().payAmmo(c1);\n p.getPb().payAmmo(c2);\n p.getPb().payAmmo(c3);\n a.setCubes(cubes);\n a.setPowerup(false);\n s.setAmmo(a);\n try{\n p.grab(p.getPlayerPosition(), pud);\n }catch (WrongSquareException e){}\n }", "public void grab() {\r\n\t\tString item = mapContents[currentPlayer.getCurrentRoom()];\r\n\t\tif (item == null) return;\r\n\t\t\r\n\t\t// If artifact, make sure has room or backpack\r\n\t\tif (item.startsWith(\"Artifact\")) {\r\n\t\t\tif (currentPlayer.count(\"Artifact\") <= currentPlayer.count(\"Backpack\")) {\r\n\t\t\t\tcurrentPlayer.pickup(item);\r\n\t\t\t\tattackLevel++;\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` picked up an Artifact **\"+item.substring(8)+\"** :star:\",true);\r\n\t\t\t\taddHistory(\"ARTIFACT \"+item.substring(8));\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = null;\r\n\t\t\t}\r\n\t\t// If monkey idol, make sure didn't already pick one up this turn\r\n\t\t} else if (item.startsWith(\"MonkeyIdol\") && !currentPlayer.getAlreadyPickedUpMonkeyIdol()) {\r\n\t\t\tcurrentPlayer.pickup(item);\r\n\t\t\tcurrentPlayer.setAlreadyPickedUpMonkeyIdol(true);\r\n\t\t\tint num = Integer.parseInt(item.substring(10));\r\n\t\t\tnum--;\r\n\t\t\tif (num == 0) {\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = null;\r\n\t\t\t} else {\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = \"MonkeyIdol\"+num;\r\n\t\t\t}\r\n\t\t\taddEvent(\"``\"+currentName+\"`` picked up a Monkey Idol **5** :star:\",true);\r\n\t\t\taddHistory(\"IDOL \"+item.substring(8));\r\n\t\t}\r\n\t\tupdateReactionsInfo();\r\n\t\tupdatePlayArea(currentPlayer, false);\r\n\t\tupdateMarketAndTreasures(false);\r\n\t\ttry {\r\n\t\t\tupdateBoard();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private PowerSubsystem() {\n mPdp = new PowerDistributionPanel(0);\n addChild(\"PowerDistributionPanel\",mPdp);\n }", "public void prepare() {\n\t\tSystem.out.println(\"NYStyleCheesePizza prepared!!\");\r\n\t}", "void PrepareRun() {\n }", "protected abstract void initializeBartender();", "private void prepareBoard(){\n gameBoard.arrangeShips();\n }", "private void prepareScanner() {\r\n\t\tbcLocator = new BCLocator();\r\n\t\tbcGenerator = new BCGenerator();\r\n\t}", "@Override\n\tpublic void makeDecision() {\n\t\tint powerMax = (int)(initPower) / 100;\n\t\tint powerMin = (int)(initPower * 0.3) / 100;\n\n\t\t// The value is calculated randomly from 0 to 10% of the initial power\n\t\tRandom rand = new Random();\n\t\tint actualPower = rand.nextInt((powerMax - powerMin) + 1) + powerMin;\n\t\tanswer.setConsumption(actualPower);\n\t}", "public void presetABCDE() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n pollOptions.add(\"D\");\n pollOptions.add(\"E\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }", "@Test(expected = BidAmountException.class)\n public void testLowballingTheInitialBid() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n knownUsers.login(bidder.userName(), bidder.password());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(bidder, startingPrice - 5, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n }", "@Inject(method = \"getPickStack\", at = @At(\"RETURN\"))\n private void putBppPatternsInPickStack(CallbackInfoReturnable<ItemStack> info) {\n ItemStack stack = info.getReturnValue();\n ListTag tag = ((Internal)this).bannerpp_getLoomPatternTag();\n if(tag != null) {\n stack.getOrCreateSubTag(\"BlockEntityTag\")\n .put(NBT_KEY, tag);\n }\n }", "public void prepareWhenBIP70() {\n if (isBIP70) {\n if (prepareTransaction()) {\n log.debug(\"BIP70 prepareTransaction was successful, moving to SEND_CONFIRM_AMOUNT\");\n this.state = SEND_CONFIRM_AMOUNT;\n } else {\n // Transaction did not prepare correctly\n log.debug(\"BIP70 prepareTransaction was NOT successful, moving to SEND_REPORT\");\n this.state = SEND_REPORT;\n\n // TODO disable navigation to SendBIP70InfoViewPanel as transaction was not sent\n }\n } else {\n log.debug(\"No payment request available, moving to SEND_REPORT\");\n this.state = SEND_REPORT;\n }\n }", "private void specialPowersPhase() {\n \tSpecialCharacter tmpPiece = null;\n \tTerrain theHex = null;\n\n for (Player p : playerList) {\n pause();\n this.player = p;\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n \n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Game.getRackGui().setOwner(player);\n }\n });\n /*\n * Loops through all of the hexes that the player has pieces on.\n * If one of the pieces is either Master Thief or Assassin Primus, perform their\n * special ability.\n */\n for (Terrain hex : player.getHexesWithPiece()) {\n for (Piece pc : hex.getContents(player.getName()).getStack()) {\n if (pc.getName().equals(\"Master Thief\") || pc.getName().equals(\"Assassin Primus\")) { \n ((Performable)pc).specialAbility();\n if (MasterThief.isReturnPiece() || AssassinPrimus.isReturnPiece()) {\n \ttmpPiece = (SpecialCharacter)pc;\n \ttheHex = hex;\n \ttmpPiece.returnToBank(theHex);\n \tbreak;\n }\n }\n }\n }\n player.flipAllDown();\n }\n ClickObserver.getInstance().setPlayerFlag(\"\");\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n DiceGUI.getInstance().setFaceValue(0);\n DiceGUI.getInstance().cover();\n }\n });\n }", "public void prepare() {\n this.taskHandler.run(this::inlinePrepare);\n }", "public abstract void prepare();", "public void prepare() {\n System.out.println(\"Preparing: \" + name);\n System.out.println(\"Tossing dough: \" + dough);\n System.out.println(\"Adding sauce: \" + sauce);\n System.out.print(\"Adding Toppings: \");\n toppings.forEach(topping -> System.out.print(topping + \" \"));\n System.out.println();\n }", "private void placeBid() {\r\n System.out.println(\"Would you like to place a bid? (Y/N)\");\r\n bidMenu();\r\n }", "public void preparePlayer1()\n {\n Player1 p1 = new Player1();\n addObject(p1, 200, 600);\n }", "public void initiateRespawnBlindness() {\n this.respawnBlindnessEndTick = CommonUtil.getServerTicks() + 5;\n }", "protected void initBoatMap() {}", "@Deprecated(\n since = \"forever\",\n forRemoval = false\n )\n public static void initStates() {\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16014, \"power=0\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16015, \"power=1\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16016, \"power=2\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16017, \"power=3\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16018, \"power=4\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16019, \"power=5\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16020, \"power=6\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16021, \"power=7\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16022, \"power=8\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16023, \"power=9\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16024, \"power=10\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16025, \"power=11\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16026, \"power=12\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16027, \"power=13\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16028, \"power=14\"));\n Block.TARGET.addBlockAlternative(new BlockAlternative((short) 16029, \"power=15\"));\n }", "@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}", "public void atBattleStartPreDraw() {\n\n this.flash();\n ArrayList<Integer> orbs = new ArrayList();\n orbs.add(1);\n orbs.add(2);\n orbs.add(3);\n orbs.add(4);\n\n for (int i = 0; i < 2; i++) {\n\n Integer o = orbs.get(AbstractDungeon.cardRng.random(orbs.size() - 1));\n\n switch (o) {\n case 1:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new AttackSlime(), false, true));\n break;\n case 2:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new ShieldSlime(), false, true));\n break;\n case 3:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new SlimingSlime(), false, true));\n break;\n case 4:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new PoisonSlime(), false, true));\n break;\n }\n }\n\n com.megacrit.cardcrawl.dungeons.AbstractDungeon.actionManager.addToBottom(new com.megacrit.cardcrawl.actions.defect.IncreaseMaxOrbAction(1));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new PotencyPower(AbstractDungeon.player, AbstractDungeon.player, 1), 1));\n\n\n }", "protected void prepareUninstallation() {\n\t\t//\n\t}", "public abstract Bid chooseOpeningBid();", "protected boolean processBSetupMode(boolean entered){return false;}", "public void prepareForSpeciation() {\n\t\tfor (Species s : speciesList) {\r\n\t\t\ts.assignRep();\r\n\t\t}\r\n\r\n\t\t// clear the old species list\r\n\t\tfor (Species s : speciesList) {\r\n\t\t\ts.clearMembers();\r\n\t\t}\r\n\t}", "public void fixup09x() {\n try {\n if (hasAbility(Ability.AUTO_PRODUCTION)) {\n if (!hasAbility(Ability.AVOID_EXCESS_PRODUCTION)) {\n // old-style auto-production\n Ability ability = new Ability(Ability.AVOID_EXCESS_PRODUCTION);\n addAbility(ability);\n getFeatureContainer().removeModifiers(\"model.goods.horses\");\n float value = (\"model.building.country\".equals(getId()))\n ? 50 : 25;\n Modifier modifier = new Modifier(\"model.modifier.breedingDivisor\",\n this, value,\n Modifier.Type.ADDITIVE);\n addModifier(modifier);\n getSpecification().addModifier(modifier);\n modifier = new Modifier(\"model.modifier.breedingFactor\",\n this, 2, Modifier.Type.ADDITIVE);\n addModifier(modifier);\n getSpecification().addModifier(modifier);\n }\n if (getModifierSet(\"model.modifier.consumeOnlySurplusProduction\").isEmpty()) {\n Modifier modifier = new Modifier(\"model.modifier.consumeOnlySurplusProduction\",\n this, 0.5f, Modifier.Type.MULTIPLICATIVE);\n addModifier(modifier);\n getSpecification().addModifier(modifier);\n }\n }\n } catch(Exception e) {\n // no such ability, we don't care\n }\n }", "@Override\n public void prepare() {\n System.out.println(\"Add Pepporonie!!\");\n }", "private void prepareForNewVehicle() {\n\t\tbtnActVehUpdate.setVisibility(View.INVISIBLE);\n\t\tbtnActVehCreate.setVisibility(View.VISIBLE);\n\t\ttxtActVehAutonumberId.setText(getResources().getString(R.string.act_vehicle_id) + \": *\");\n\t\teTxtActVehLicenseplate.setText(\"\");\n\t\tautComplActVehCountry.setText(\"\");\n\t\teTxtActVehNoOfPassengers.setText(\"\");\n\t\tautComplActVehBrand.setText(\"\");\n\t\teTxtActVehVehicleType.setText(\"\");\n\t\tbtnActVehUpdate.setText(CREATE);\n\t\tvh = null;\n\t}", "@Override\r\n\tpublic boolean readyInit(GameEngine engine, int playerID) {\r\n\t\tsuper.readyInit(engine, playerID);\r\n\t\tengine.blockColors = BLOCK_COLORS;\r\n\t\tengine.numColors = 4;\r\n\t\tdropPattern[playerID] = DROP_PATTERNS[dropSet[playerID]][dropMap[playerID]];\r\n\t\tattackMultiplier[playerID] = getAttackMultiplier(dropSet[playerID], dropMap[playerID]);\r\n\t\tdefendMultiplier[playerID] = getDefendMultiplier(dropSet[playerID], dropMap[playerID]);\r\n\t\treturn false;\r\n\t}", "public void prepareDEBreeder(EvolutionState state)\r\n {\r\n }", "private void prepare()\n {\n addObject(player,185,196);\n player.setLocation(71,271);\n Ground ground = new Ground();\n addObject(ground,300,360);\n invent invent = new invent();\n addObject(invent,300,375);\n }", "@Setup(Level.Invocation)\n public void doSetup() {\n pos = \"\" + (1_000_000 + ThreadLocalRandom.current().nextInt(9_000_000));\n posWithPlus = \"+\" + pos;\n neg = \"-\" + pos;\n }", "public Pump(double price, int pumpNumber){\n\t\tpriceOfFuel = price;\n\t\tthis.pumpNumber = pumpNumber;\n\t\tunitSpaceAvailable = 3;\n\t\tqueue = new ArrayList<Driver>();\n\t}", "protected void initialize() {\n \tbrakeFactor = 0.0;\n }", "@Override\n public void prepare() {\n if (prepared) return;\n ApplicationId applicationId = session.getApplicationId();\n try (ActionTimer timer = applicationRepository.timerFor(applicationId, \"deployment.prepareMillis\")) {\n TimeoutBudget timeoutBudget = new TimeoutBudget(clock, timeout);\n\n PrepareParams.Builder params = new PrepareParams.Builder().applicationId(applicationId)\n .timeoutBudget(timeoutBudget)\n .ignoreValidationErrors(!validate)\n .vespaVersion(version.toString())\n .isBootstrap(isBootstrap);\n dockerImageRepository.ifPresent(params::dockerImageRepository);\n athenzDomain.ifPresent(params::athenzDomain);\n Optional<ApplicationSet> activeApplicationSet = applicationRepository.getCurrentActiveApplicationSet(tenant, applicationId);\n tenant.getSessionRepository().prepareLocalSession(session, logger, params.build(), activeApplicationSet,\n tenant.getPath(), clock.instant());\n this.prepared = true;\n }\n }", "protected void initialize() {\n\t\televator.zeroEncoder();\n\t}", "public P copy(){\n AssetLoader l = GDefence.getInstance().assetLoader;\n P p = new P(chance.get(), duration.get(), bonusDmg.get(), g);\n p.gemBoost[0] = new BoostInteger(p.bonusDmg, g.bonusDmgUp, l.getWord(\"bashGrade3\"),\n true, BoostInteger.IntegerGradeFieldType.NONE);\n p.gemBoost[1] = new BoostFloat(p.duration, g.durationUp, l.getWord(\"bashGrade2\"),\n true, BoostFloat.FloatGradeFieldType.TIME);\n p.gemBoost[2] = new BoostFloat(p.chance, g.chanceUp, l.getWord(\"bashGrade1\"),\n true, BoostFloat.FloatGradeFieldType.PERCENT);\n p.s = new S(chance.get(), duration.get(), bonusDmg.get());\n return p;\n }", "public static void initializeBronzeItems(Player player) {\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 146, 93,\n\t\t\t\tBRONZE_ITEMS[0]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 147, 93,\n\t\t\t\tBRONZE_ITEMS[1]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 148, 93,\n\t\t\t\tBRONZE_ITEMS[2]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 149, 93,\n\t\t\t\tBRONZE_ITEMS[3]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 150, 93,\n\t\t\t\tBRONZE_ITEMS[4]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 151, 93,\n\t\t\t\tBRONZE_ITEMS[5]);\n\t}", "@Before\n\tpublic void setUp() {\n\t\tprocessor = new ParseBigDecimal();\n\t\tprocessor2 = new ParseBigDecimal(ENGLISH_SYMBOLS);\n\t\tprocessor3 = new ParseBigDecimal(GERMAN_SYMBOLS);\n\t\tprocessorChain = new ParseBigDecimal(new IdentityTransform());\n\t\tprocessorChain2 = new ParseBigDecimal(ENGLISH_SYMBOLS, new IdentityTransform());\n\t\tprocessorChain3 = new ParseBigDecimal(GERMAN_SYMBOLS, new IdentityTransform());\n\t}", "protected void initialize() {\n\t\tstate = 0;\n\t\t\n\t\tString gameData = DriverStation.getInstance().getGameSpecificMessage();\n\t\tscaleSide = gameData.substring(1, 2).contentEquals(\"R\");\n\t\tswitchSide = gameData.substring(0, 1).contentEquals(\"R\");\n\t\t\n\t\tdelay.start();\n\t\t\n\t\tif(delay.get() < Variables.autoDelay) {\n\t\t\t\n\t\t}\n\t}", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\n\t\tojTreeNode_prepare();\n\t\tmenu_prepare();\n\t}", "private void prepare()\n {\n AmbulanceToLeft ambulanceToLeft = new AmbulanceToLeft();\n addObject(ambulanceToLeft,717,579);\n Car2ToLeft car2ToLeft = new Car2ToLeft();\n addObject(car2ToLeft,291,579);\n Car3 car3 = new Car3();\n addObject(car3,45,502);\n CarToLeft carToLeft = new CarToLeft();\n addObject(carToLeft,710,262);\n Car car = new Car();\n addObject(car,37,190);\n AmbulanceToLeft ambulanceToLeft2 = new AmbulanceToLeft();\n addObject(ambulanceToLeft2,161,264);\n }" ]
[ "0.5933246", "0.55425286", "0.54956645", "0.5392484", "0.536264", "0.5306825", "0.52789414", "0.5231887", "0.5221546", "0.52158344", "0.52153856", "0.5208622", "0.51798415", "0.5147247", "0.5131622", "0.51027083", "0.50827134", "0.5063159", "0.50400406", "0.4976501", "0.48838723", "0.48643976", "0.48615825", "0.48420173", "0.48412576", "0.48380178", "0.48185843", "0.48169", "0.48058772", "0.4803224", "0.4771113", "0.47680822", "0.47646758", "0.4759962", "0.47513276", "0.47338802", "0.47036245", "0.4697043", "0.46805567", "0.46745992", "0.46721444", "0.46669737", "0.46527433", "0.4651664", "0.46440837", "0.4597784", "0.45929185", "0.45912656", "0.4583431", "0.4579054", "0.45723215", "0.45561993", "0.45559642", "0.4530275", "0.45221666", "0.45157784", "0.4510513", "0.45057133", "0.44975945", "0.44872406", "0.44864613", "0.4484904", "0.44800347", "0.44672298", "0.44668534", "0.44657683", "0.44651702", "0.4461301", "0.44584236", "0.4452452", "0.44471085", "0.44469836", "0.4445606", "0.44417244", "0.4440226", "0.44398433", "0.4439619", "0.44331837", "0.44170827", "0.44116884", "0.44110703", "0.44105744", "0.44081295", "0.4402438", "0.43988955", "0.439794", "0.4394601", "0.4386792", "0.438627", "0.43822977", "0.4378212", "0.43754423", "0.4373093", "0.43628433", "0.43625402", "0.43578577", "0.4355102", "0.4353084", "0.4353012", "0.43528393" ]
0.5369541
4
Returns the bid element closest to the demand value given as input.
private UnconstrainedBidElement getClosest(double demandWatt) { UnconstrainedBidElement best = null; double bestDistance = Double.MAX_VALUE; for (UnconstrainedBidElement e : elements) { double distance = Math.abs(demandWatt - e.demandWatt); if (best == null || distance < bestDistance) { best = e; bestDistance = distance; } } return best; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Coordinates closestPointB() {\n return closestPointB;\n }", "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n double minPriority = 0.0;\n double maxPriority = 1.0;\n\n // First make the ideal, continuous bid, that does not care about discrete running modes.\n rawBid = Bid.create(marketBasis)\n .add(priceOf(minPriority), maxDemand)\n .add(priceOf(maxPriority), minDemand)\n .build();\n\n // Now construct actual bid\n double[] rawDemand = rawBid.getDemand();\n newBid = new UnconstrainedBidElement[rawDemand.length];\n for (int i = 0; i < rawDemand.length; i++) {\n newBid[i] = getClosest(rawDemand[i]);\n }\n }", "public Balloon acquireTarget() {\r\n\r\n\t\tBalloon closest = null;\r\n\t\tfloat closestDistance = 1000;\r\n\t\tif (balloons != null) {\r\n\t\t\tfor (Balloon balloons : balloons) {\r\n\t\t\t\tif (isInRange(balloons) && findDistance(balloons) < closestDistance && balloons.getHiddenHealth() > 0) {\r\n\t\t\t\t\tclosestDistance = findDistance(balloons);\r\n\t\t\t\t\tclosest = balloons;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (closest != null) {\r\n\t\t\t\ttargeted = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closest;\r\n\r\n\t}", "private <T extends Element> T getNearestElement(Element element, Class<T> klass) {\n List elements = element.nearestDescendants(klass);\n if (elements == null || elements.isEmpty()) {\n return null;\n }\n\n return (T) elements.get(0);\n }", "java.math.BigDecimal getSingleBetMinimum();", "java.math.BigDecimal getWagerMinimum();", "private static Node auctionRound(Node bidder, Graph solution, Graph reference) {\n\t\tNode matchedNode = null;\n\t\tFloat bestValue = 0F;\n\n\t\tfor (Node seller : reference.getNodeListY()) {\n\t\t\tEdge edge = reference.getEdge(bidder.GetIndex(), seller.GetIndex()); // find edge\n\t\t\tFloat value = edge.GetWeight() - seller.getPrice();\n\n\t\t\tif (value > bestValue) {\n\t\t\t\tmatchedNode = seller;\n\t\t\t\tbestValue = value;\n\t\t\t}\n\t\t}\n\n\t\treturn matchedNode;\n\t}", "public Point2D nearest(Point2D p) {\n \n if (p == null)\n throw new IllegalArgumentException(\"Got null object in nearest()\");\n \n double rmin = 2.;\n Point2D pmin = null;\n \n for (Point2D q : point2DSET) {\n \n double r = q.distanceTo(p);\n if (r < rmin) {\n \n rmin = r;\n pmin = q;\n }\n }\n return pmin;\n }", "private Node find(Order ord){\n\t\tNode position=head;\n\t\tOrder ItemPosition;\n\t\twhile (position!=null){\n\t\t\tItemPosition = position.ord;\n\t\t\tif(ItemPosition.equals(ord)) {\n\t\t\t\tposition=bestBid;\n\t\t\t\treturn position;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public T getBestElement() {\n\t\tT bestElement = null;\n\t\tdouble bestProb = -1;\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\tdouble thisProb = itemProbs_.get(element);\n\t\t\tif (thisProb > bestProb) {\n\t\t\t\tbestProb = thisProb;\n\t\t\t\tbestElement = element;\n\t\t\t}\n\t\t}\n\t\treturn bestElement;\n\t}", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "public List<Double> getLowestAskAndHighestBid(String asset) {\n\n Optional<List<Offer>> offerList = offerRepository.findOffersByAsset_Name(asset);\n\n if (offerList.isPresent()) {\n\n double lowestAsk = Double.MAX_VALUE;\n double highestBid = -1;\n for (Offer offer : offerList.get()) {\n if (offer.getType().equals(OfferType.SELL)) {\n if (offer.getPrice() < lowestAsk) {\n lowestAsk = offer.getPrice();\n }\n\n } else if (offer.getType().equals(OfferType.BUY)) {\n if (offer.getPrice() > highestBid) {\n highestBid = offer.getPrice();\n }\n\n }\n }\n\n if (lowestAsk == Double.MAX_VALUE) {\n lowestAsk = -1;\n }\n return Arrays.asList(lowestAsk, highestBid);\n }\n throw new NotFoundException(\"No current offers for this asset\");\n\n }", "@Override\n public int compareTo(UnconstrainedBidElement o) {\n return Double.compare(o.demandWatt, demandWatt);\n }", "Execution getClosestDistance();", "public static double findNearestElement(double[] values, double item) {\n\n //defining some variables to use.\n double nearestElement = 0;\n double differenceLowest = 300;\n\n // Loop invariant is: 0 <= i < values.length.\n for (int i = 0; i < values.length; i++){\n\n /* Gets the absolute value for the difference between the input item\n * and the current value in the array.\n */\n double difference = java.lang.Math.abs(item - values[i]);\n\n /* Checks whether the current difference is less than the lowest distance.\n * if this is the case, the value of the new lowest difference is assigned\n * to the differenceLowest variable.\n */\n if (difference < differenceLowest){\n differenceLowest = difference;\n // Assigns the value of the current array element to the nearestElement variable.\n nearestElement = values[i];\n }\n } \n return nearestElement;\n }", "java.math.BigDecimal getMultipleBetMinimum();", "Object getMinimumValue(Object elementID) throws Exception;", "public Node closestPrecedingNode(int id);", "Bid getNewBidWithUtil(double ourUtility, BidSpace bs) {\n\t\tBidPoint bestbid = null;\n\t\tdouble bestbidutil = 0;\n\t\tfor (BidPoint p : bs.bidPoints) {\n\t\t\tif (Math.abs(\n\t\t\t\t\tourUtility - p.getUtilityA()) < ALLOWED_UTILITY_DEVIATION\n\t\t\t\t\t&& p.getUtilityB() > bestbidutil\n\t\t\t\t\t&& !myPreviousBids.contains(p.getBid())) {\n\t\t\t\tbestbid = p;\n\t\t\t\tbestbidutil = p.getUtilityB();\n\t\t\t}\n\t\t}\n\t\tif (bestbid == null)\n\t\t\treturn null;\n\t\treturn bestbid.getBid();\n\t}", "private Exemplar nearestExemplar(Instance inst, double c){\n\n if (m_ExemplarsByClass[(int) c] == null)\n return null;\n Exemplar cur = m_ExemplarsByClass[(int) c], nearest = m_ExemplarsByClass[(int) c];\n double dist, smallestDist = cur.squaredDistance(inst);\n while (cur.nextWithClass != null){\n cur = cur.nextWithClass;\n dist = cur.squaredDistance(inst);\n if (dist < smallestDist){\n\tsmallestDist = dist;\n\tnearest = cur;\n }\n }\n return nearest;\n }", "org.apache.xmlbeans.XmlDecimal xgetSingleBetMinimum();", "public Point2D nearest(Point2D p) {\n if (isEmpty()) {\n return null;\n }\n double minDistance = Double.POSITIVE_INFINITY;\n Point2D nearest = null;\n for (Point2D i : pointsSet) {\n if (i.distanceTo(p) < minDistance) {\n nearest = i;\n minDistance = i.distanceTo(p);\n }\n }\n return nearest;\n\n }", "public Point2D nearest(Point2D p) {\n if (bst.isEmpty()) {\n return null;\n }\n\n Point2D nearest = null;\n double nearestDist = Double.POSITIVE_INFINITY;\n \n \n for (Point2D point: bst.keys()) {\n\n if (nearest == null \n || point != null \n && (nearestDist > point.distanceSquaredTo(p)\n && (!point.equals(p)))) {\n nearest = point;\n nearestDist = point.distanceSquaredTo(p);\n }\n \n }\n return nearest;\n }", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "public Node getClosest(int x, int y)\n {\n if(NodeList.isEmpty()) return null;\n\n\n double distance = 0;\n //big fat pixel number... Stupidest way to initializa that value, but it's working flawlessly so...\n double reference = 1000000000;\n Node closest = null;\n\n //for each Node in NodeList\n for(Node myNode : NodeList)\n {\n\n //calculate distance\n distance = getDistance(myNode,x,y);\n //System.out.println(\"distance : \" + distance);\n\n if(distance < reference)\n {\n closest = myNode;\n reference = distance;\n }\n }\n\n return closest;\n }", "public Bid getLowestBid() {\n return jobBids.get(jobBids.size() - 1);\n }", "public static int closestNumber(int p, int high, int low) {\n\t\tif(p>Math.abs(high-p)) {\n\t\t\tp=high;\n\t\t}\n\t\telse {\n\t\t\tp=low;\n\t\t}\n\t\treturn p;\n\t}", "public Point2D nearest(Point2D p) {\n if (p == null) throw new IllegalArgumentException(\"p cannot be null\");\n if (isEmpty()) return null;\n Point2D champ = root.p;\n champ = nearest(p, champ, root, inftyBbox);\n return champ;\n }", "public static Unit getNearest(List<Unit> units, MapLocation loc, Predicate<Unit> shouldPrioritize) {\n if (units == null) return null;\n int numUnits = (int) units.size();\n if (numUnits == 0) return null;\n Unit nearest = null;\n Unit nearestLowPrio = null;\n int nearistDist = Integer.MAX_VALUE;\n int nearestDistLowPrio = Integer.MAX_VALUE;\n for (int i=0; i<numUnits; i++) {\n Unit unit = units.get(i);\n assert gc.canSenseUnit(unit.id());\n int distance = (int) unit.location().mapLocation().distanceSquaredTo(loc);\n if (shouldPrioritize != null && shouldPrioritize.test(unit)) {\n if (distance < nearistDist) {\n nearest = unit;\n nearistDist = distance;\n }\n } else {\n if (distance < nearestDistLowPrio) {\n nearestLowPrio = unit;\n nearestDistLowPrio = distance;\n }\n }\n }\n return (nearest == null) ? nearestLowPrio : nearest;\n }", "private Process findClosestProcess(){\n\n //Ensure that the process queue is sorted by process ID for traversal.\n Collections.sort(this.unfinishedJobs,new PIDComparator());\n\n //If there was no process currently executing on the CPU,\n //the next process is simply the process queue's first item.\n if(this.activeJob == null){\n if(this.unfinishedJobs.size() > 0){\n return this.unfinishedJobs.get(0);\n } \n } else {\n\n //Find the first process with a higher process ID than the currently executing\n //process and set it as the new process to execute next.\n for(int i = 0; i < this.unfinishedJobs.size(); i++){\n Process temp = this.unfinishedJobs.get(i);\n if(temp.getPID() > this.activeJob.getPID()){\n return temp;\n }\n }\n\n //If there are no processes with a higher process ID than the current process, use the \n //process queue's first item as a default.\n if(this.unfinishedJobs.size() > 0){\n return this.unfinishedJobs.get(0);\n }\n }\n return null;\n }", "private Exemplar nearestExemplar(Instance inst){\n\n if (m_Exemplars == null)\n return null;\n Exemplar cur = m_Exemplars, nearest = m_Exemplars;\n double dist, smallestDist = cur.squaredDistance(inst);\n while (cur.next != null){\n cur = cur.next;\n dist = cur.squaredDistance(inst);\n if (dist < smallestDist){\n\tsmallestDist = dist;\n\tnearest = cur;\n }\n }\n return nearest;\n }", "public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }", "static ToDoubleBiFunction<Integer, Integer> findFeasibleDemandFlow(\n Collection<Integer> nodes,\n final ToDoubleBiFunction<Integer, Integer> capacity,\n final ToDoubleFunction<Integer> demand) {\n\n // Make sure that the demands could even possibly be met.\n double surplus = 0, deficit = 0;\n for (Integer n : nodes) {\n if (demand.applyAsDouble(n) >= EPSILON)\n surplus += demand.applyAsDouble(n);\n if (demand.applyAsDouble(n) <= -EPSILON)\n deficit += -demand.applyAsDouble(n);\n }\n assert Math.abs(surplus - deficit) <= 1e-5;\n\n Integer max = 0;\n List<Integer> updatedNodes = new ArrayList<Integer>(nodes);\n for (Integer val : nodes) {\n \tmax = Math.max(max, val);\n }\n final Integer source = max + 1;\n final Integer sink = source + 1;\n updatedNodes.add(sink);\n updatedNodes.add(source);\n return GraphUtils.maxFlow(source, sink, updatedNodes, (a, b) -> {\n \tif ((!a.equals(source) && !a.equals(sink)) && b.equals(sink) &&\n \t\t demand.applyAsDouble(a) > 0) {\n\t\t\treturn demand.applyAsDouble(a);\n\t\t} else if ((!b.equals(source) && !b.equals(sink)) &&\n\t\t\t\t\ta.equals(source) && demand.applyAsDouble(b) < 0) {\n\t\t\treturn -demand.applyAsDouble(b);\n\t\t} else if ((!a.equals(source) && !a.equals(sink)) &&\n\t\t\t\t\t(!b.equals(source) && !b.equals(sink))) {\n\t\t\treturn capacity.applyAsDouble(a, b);\n\t\t}\n\t\treturn 0.0;});\n }", "static public Element nearest(Color c)\n {\n int r = c.getRed();\n int g = c.getGreen();\n int b = c.getBlue();\n int minDelta = Integer.MAX_VALUE;\n Element nearest = null;\n\n for (Element e: Element.values())\n {\n Color ec = e.getColor();\n int delta = \n abs(r - ec.getRed()) +\n abs(g - ec.getGreen()) +\n abs(b - ec.getBlue());\n\n if (delta < minDelta)\n {\n minDelta = delta;\n nearest = e;\n }\n }\n return nearest;\n }", "BigDecimal getLowPrice();", "long closest(double lon, double lat) {\n double smallestDist = Double.MAX_VALUE;\n long smallestId = 0;\n Iterable<Node> v = world.values();\n for (Node n : v) {\n double tempLat = n.getLat();\n double tempLon = n.getLon();\n double tempDist = distance(lon, lat, tempLon, tempLat);\n if (tempDist < smallestDist) {\n smallestDist = tempDist;\n smallestId = n.getId();\n }\n }\n return smallestId;\n }", "public SeleniumQueryObject closest(String selector) {\n\t\treturn ClosestFunction.closest(this, elements, selector);\n\t}", "public Bid toBid() {\n double[] demand = new double[newBid.length];\n for (int i = 0; i < newBid.length; i++) {\n demand[i] = newBid[i].demandWatt;\n }\n return new Bid(marketBasis, demand);\n }", "public Resource findNearestResource(){\n\t\tResource nearestResource = null;\n\t\tfloat distanceToCurrentResource = 0f;\n\t\tfor (Resource resource : MapData.getInstance().getResources()) {\n\t\t\tif(resource.isResourceMaxed()) continue;\n\t\t\tif (resource.getCenter().dst2(getCenter()) < 4000000) {\n\t\t\t\tif (nearestResource == null) {\n\t\t\t\t\tnearestResource = resource;\n\t\t\t\t\tdistanceToCurrentResource = nearestResource\n\t\t\t\t\t\t\t.getCenter().dst2(this.getCenter());\n\t\t\t\t} else {\n\t\t\t\t\tfloat distanceToNewResource = resource.getCenter()\n\t\t\t\t\t\t\t.dst2(this.getCenter());\n\t\t\t\t\tnearestResource = (distanceToNewResource < distanceToCurrentResource) ? resource\n\t\t\t\t\t\t\t: nearestResource;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nearestResource;\n\t}", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "public double getBid(double v) {\n double[] weights = {\n 0.6601863864966815,\n -0.44050297744775085,\n -0.3288461116450685,\n 0.7354115471274265,\n 0.6528564967694372,\n -0.021270821816517627,\n -0.751090383677677\n };\n if (roundsLeft == 0) {\n return Math.min(v * weights[0], cash);\n }\n if (roundsLeft / totalRounds < weights[1] * 333) {\n if (v > avrgBids[avrgBids.length - 1]) {\n return Math.min(v * weights[2], cash);\n } else if (v > avrgBids[avrgBids.length - 2]) {\n return Math.min(avrgBids[avrgBids.length - 2] - 1, cash);\n } else if (v > avrgBids[0] && v < avrgBids[1]) {\n return Math.min(v * weights[3], cash);\n }\n }\n return Math.min(v * weights[4], cash);\n }", "public int closest2(TreeNode root, int target) {\n\t\tif (root.key == target || (root.left == null && root.right == null)) {\n\t\t\treturn root.key;\n\t\t}\n\t\tint result = root.key;\n\t\twhile (root != null) {\n\t\t\tif (root.key == target) {\n\t\t\t\treturn root.key;\n\t\t\t} else {\n\t\t\t\tif (Math.abs(root.key - target) < Math.abs(result - target)) {\n\t\t\t\t\tresult = root.key;\n\t\t\t\t}\n\t\t\t\tif (root.key < target) {\n\t\t\t\t\troot = root.right;\n\t\t\t\t} else {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public int[] getClosestInput(int[] input) {\n\t\tint minDist = input.length;\n\t\tint minIndex = 0;\n\t\tfor(int i = 0 ; i < this.inputs.size() ; i++) {\n\t\t\tint d = this.hammingDistance(input, this.inputs.get(i));\n\t\t\tif(d < minDist) {\n\t\t\t\tminDist = d;\n\t\t\t\tminIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn this.inputs.get(minIndex);\n\t}", "public Point2D nearest(Point2D p) {\n\t\tRectHV rect = new RectHV(-Double.MAX_VALUE, -Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE);\n\t\treturn nearest(root, p, rect, true);\n\t}", "public double getSupplyToDemandRatio() {\n return (this.supplyToDemandRatio == -1.0) ? (double) this.getTotalSupply() / this.getTotalDemand() : this.supplyToDemandRatio;\n }", "public Point2D nearest(Point2D p) {\n if (p == null) throw new IllegalArgumentException(\"nearest: Point2D is null\");\n mindist = Double.POSITIVE_INFINITY;\n nearestSearch(p, root);\n return nearest;\n }", "public static EntityPlayer getClosest() {\r\n\t\tdouble lowestDistance = Integer.MAX_VALUE;\r\n\t\tEntityPlayer closest = null;\r\n\t\t\r\n\t\tfor (EntityPlayer player : getAll()) {\r\n\t\t\tif (player.getDistance(mc.player) < lowestDistance) {\r\n\t\t\t\tlowestDistance = player.getDistance(mc.player);\r\n\t\t\t\tclosest = player;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn closest;\r\n\t}", "public Coordinates closestPoint() {\n return closestPoint;\n }", "public closest(){\n\t\tthis.pnt = null;\n\t}", "public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }", "Pair<Double, Integer> bid();", "public int minQ(inValues input) {\n float qValue = (2 * input.orderCost * input.demandsArray[0][0] * (input.invCost + input.saleLossCost) * 360 / (input.invCost * input.saleLossCost));\n qValue = Math.round(Math.sqrt(qValue));\n return (int) qValue;\n }", "public Id GetNearestEdge(Coordinate coord) {\n\t\tfloat distsq = Float.MAX_VALUE;\n\t\tId nearest = null;\n\t\tfor (Edge e : listOfEdges) {\n\t\t\tif (e == null) continue;\n\t\t\tfloat mydistsq = e.getDistanceSq(coord, this);\n\t\t\tif (mydistsq < distsq && mydistsq >= 0.0f) {\n\t\t\t\tdistsq = mydistsq;\n\t\t\t\tnearest = e.getId();\n\t\t\t}\n\t\t}\n\t\treturn nearest;\n\t}", "@Override\r\n public BidDetails determineNextBid() {\r\n\r\n double time = negotiationSession.getTime();\r\n\r\n // for the first 20% of the time, offer the bid which gives max utility\r\n if(time < Offer_Max_Util_Time){\r\n BidDetails maxBid = null;\r\n try {\r\n maxBid = this.outcomespace.getMaxBidPossible();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Exception: cannot generate max utility bid\");\r\n }\r\n return maxBid;\r\n\r\n }else {\r\n //compute the target utility based on time\r\n double utilityGoal = p(time);\r\n // if there is no opponent model available\r\n if (opponentModel instanceof NoModel) {\r\n // generate a Bid near the Utility we wish to have\r\n nextBid = negotiationSession.getOutcomeSpace().getBidNearUtility(utilityGoal);\r\n } else {\r\n // get the best Bid for the Opponent among a list of similarly preferred bids for our Agent\r\n // Then, make an offer with that bid\r\n nextBid = omStrategy.getBid(outcomespace, utilityGoal);\r\n }\r\n }\r\n return nextBid;\r\n }", "public Point getClosestPoint(Point p) {\n\t\t// If the node is not diveded and there are no points then we \n\t\t// cant return anything\n\t\tif (!divided && points.keySet().size() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Loop through all the points and find the one that is the\n\t\t// closest to the point p\n\t\tdouble smallestDistance = Double.MAX_VALUE;\n\t\tPoint closest = null;\n\t\t\n\t\tfor (Point c : points.keySet()) {\n\t\t\tif (closest == null) {\n\t\t\t\tclosest = c;\n\t\t\t\tsmallestDistance = p.distance(c);\n\t\t\t} else if (p.distance(c) < smallestDistance) {\n\t\t\t\tsmallestDistance = p.distance(c);\n\t\t\t\tclosest = c;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn closest;\n\t}", "@Override\r\n public Point nearest(double x, double y) {\r\n Point input = new Point(x, y);\r\n Point ans = points.get(0);\r\n double dist = Point.distance(ans, input);\r\n for (Point point : points) {\r\n if (Point.distance(point, input) < dist) {\r\n ans = point;\r\n dist = Point.distance(ans, input);\r\n }\r\n }\r\n return ans;\r\n }", "public String getNextBid(Card bidCard) {\n\n\t\tint rank=getValue(bidCard.rank);\n\t\tint min=rank/2;\n\t\tCard nextCard;\n \n\t\tfor(int i=1;i<cardsInHand.size();i++)\n\t\t{\n\t\t\tif(getValue(cardsInHand.get(i).rank) >rank)\n\t\t\t{\t\n\t\t\t\tnextCard=cardsInHand.get(i);\n\t\t\t\tcardsInHand.remove(i);\n\t\t\t\treturn nextCard.rank;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(getValue(cardsInHand.get(0).rank) >rank)\n\t\t{\t\n\t\t\tnextCard=cardsInHand.get(0);\n\t\t\tcardsInHand.remove(0);\n\t\t\treturn nextCard.rank;\n\t\t}\n\t\t\n\t\tnextCard=cardsInHand.get(cardsInHand.size()-1);\n\t\treturn nextCard.rank;\t \n\t}", "long closest(double lon, double lat) {\n return kdTreeForNearestNeighbor.nearest(lon, lat);\n }", "org.apache.xmlbeans.XmlDecimal xgetMultipleBetMinimum();", "public Edge extractMin() {\n return Q.remove(0);\n }", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "private int findNearestValue(final int i, final double key) {\n\n\t\tint low = 0;\n\t\tint high = m_NumValues[i];\n\t\tint middle = 0;\n\t\twhile (low < high) {\n\t\t\tmiddle = (low + high) / 2;\n\t\t\tdouble current = m_seenNumbers[i][middle];\n\t\t\tif (current == key) {\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\tif (current > key) {\n\t\t\t\thigh = middle;\n\t\t\t} else if (current < key) {\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}", "public Money findMinPrice(long n) {\n\t\tif (!hashMap.containsKey(n)) {\n\t\t\treturn new Money();\n\t\t}\n\t\tTreeSet<Long> idSet = hashMap.get(n);\n\t\tMoney min = new Money();\n\t\tboolean flag = false;\n\t\tfor (Long id : idSet) {\n\t\t if(treeMap.containsKey(id)){\n\t\t\tMoney current = treeMap.get(id).price;\n\t\t\tif (min.compareTo(current) == 1 || !flag) {\n\t\t\t\tmin = current;\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t }\n\t\t}\n\t\treturn min;\n\t}", "public Point2D nearest(Point2D p) {\n Point2D nearest = null;\n double nearestDistance = Double.MAX_VALUE;\n for (Point2D cur: mPoints) {\n double distance = cur.distanceTo(p);\n if (nearestDistance > distance) {\n nearest = cur;\n nearestDistance = distance;\n }\n }\n return nearest;\n }", "public double getHighestReward() {\n if (this.highestReward == -1.0) {\n double tempHighestReward = -1.0;\n for (B bidder : this.bidders) {\n if (bidder.getReward() > tempHighestReward) {\n tempHighestReward = bidder.getReward();\n }\n }\n this.highestReward = tempHighestReward;\n }\n return this.highestReward;\n }", "public void findNearestDriver() {\n\t\tint currentDistance, driverX, driverY, pickupX, pickupY;\n\t\tpickupX = (int)this.currentRide.getPickup().getX();\n\t\tpickupY = (int)this.currentRide.getPickup().getY();\n\t\tfor(int i = 0; i < drivers.size(); i++) {\n\t\t\tdriverX = (int)this.drivers.get(i).getLocation().getX();\n\t\t\tdriverY = (int)this.drivers.get(i).getLocation().getY();\n\t\t\tcurrentDistance = (int) Math.sqrt(Math.pow((driverX - pickupX), 2) + Math.pow((driverY - pickupY),2));\n\t\t\tthis.drivers.get(i).setDistanceFromPassenger(currentDistance);\n\t\t}\n\t\tCollections.sort(this.drivers);\n\t\tif(this.drivers.get(0).getDistanceFromPassenger() == this.drivers.get(1).getDistanceFromPassenger()){\n\t\t\tif(drivers.get(0).getRating() < drivers.get(1).getRating()) {\n\t\t\t\tdrivers.set(0, drivers.get(1));\n\t\t\t}\n\t\t}\t\t\n\t}", "private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }", "public Address getClosestAddressTo(Depot d) {\n double bestDistance = Double.MAX_VALUE;\n Address bestAddress = null;\n for (Address a : addresses) {\n double distance = a.getCoordinates().companyDistanceTo(d.getCoordinates());\n if (distance < bestDistance) {\n bestAddress = a;\n bestDistance = distance;\n }\n }\n return bestAddress;\n }", "public static int findClosest(int[] array, int value){\n if(value < array[0]) return array[0];\n if(value > array[array.length-1]) return array[array.length-1];\n\n int low = 0;\n int high = array.length -1;\n\n while(low <= high){\n int mid = (low+high)/2;\n if(array[mid] == value) return array[mid];\n else if(array[mid] < value) low = mid+1;\n else high = mid-1;\n }\n\n return ((array[low] - value) < (value - array[high])) ? array[low] : array[high];\n }", "public T findMin();", "public Point2D nearest(Point2D p) {\n if (p == null) throw new NullPointerException();\n Point2D champion = pointSet.first();\n if (champion == null) return null;\n \n for (Point2D point : pointSet) {\n if (point.distanceSquaredTo(p) < champion.distanceSquaredTo(p)) {\n champion = point;\n }\n }\n return champion;\n }", "public Point2D nearest(Point2D p) {\n if (p == null) {\n throw new IllegalArgumentException();\n }\n if (isEmpty()) return null;\n\n Point2D nearestPoint = null;\n double distance = Double.NEGATIVE_INFINITY;\n for (Point2D point : points) {\n if (nearestPoint == null) {\n nearestPoint = point;\n distance = point.distanceSquaredTo(p);\n } else {\n double newDistance = point.distanceSquaredTo(p);\n if (newDistance < distance) {\n nearestPoint = point;\n distance = newDistance;\n }\n }\n }\n return nearestPoint;\n }", "Point findNearestActualPoint(Point a, Point b) {\n\t\tPoint left = new Point(a.x-this.delta/3,a.y);\n\t\tPoint right = new Point(a.x+this.delta/3,a.y);\n\t\tPoint down = new Point(a.x,a.y-this.delta/3);\n\t\tPoint up = new Point(a.x,a.y+this.delta/3);\n\t\tPoint a_neighbor = left;\n\t\tif (distance(right,b) < distance(a_neighbor,b)) a_neighbor = right;\n\t\tif (distance(down,b) < distance(a_neighbor,b)) a_neighbor = down;\n\t\tif (distance(up,b) < distance(a_neighbor,b)) a_neighbor = up;\n\n\t\treturn a_neighbor;\n\t}", "public E poll() {\n\t\tif (apq.isEmpty())\n\t\t\treturn null;\n\t\tE retValue = apq.get(1);\n\t\tswap(1, apq.size() - 1); // -1 changed, change back if it doesnt work\n\t\tapq.remove(apq.size() - 1); // -1 changed, change back if it doesnt work\n\t\tdownheap(1);\n\t\treturn retValue; // implement this method\n\t}", "public Product findBestSelling() {\n\t\tString hql=\"SELECT p FROM Row r JOIN r.product p GROUP BY p.id ORDER BY SUM(cant) DESC \";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tquery.setFirstResult(0);\n query.setMaxResults(1);\n Product prod = (Product) query.getSingleResult();\n\t\treturn prod;\n\t}", "public Node findClosest(int search_key){\n\n Node current, closest; //จำตำแหน่ง node ตอนนี้\n closest = current = root; // เก็บตำแหน่ง node ที่ใกล้ค่าที่หามากสุด\n int min_diff = Integer.MAX_VALUE; // ตัวเปรียบเทียบคสาต่าง\n while (current!= null){ // Use while loop to traverse from root to the closest leaf\n if (search_key == current.key){ //ถ้าเจอก็ return\n return current;\n }\n else{\n if(Math.abs(current.key - search_key) < min_diff){ //หาค่าความต่าง ถ้าอันใหม่ต่างน้อยกว่า แสดงว่าใกล้กว่า\n min_diff = Math.abs(current.key - search_key);\n closest = current;\n }\n\n }\n\n if(search_key < current.key) // กำหยดว่าจะลงไปในทิศทางไหนของ subtree\n {current = current.left;}\n else{current = current.right;}\n }\n\n\n\n return closest;\n }", "Pair<Vertex, Double> closestVertexToPath(Loc pos);", "public Station getClosestStation(Actor actor)\n {\n Station with_lowest_distance = null;\n float lowest_distance = Float.MAX_VALUE;\n\n for (Station station : stations)\n {\n if (station == null)\n continue;\n\n float distance = station.distance(actor);\n if (distance < lowest_distance)\n {\n with_lowest_distance = station;\n lowest_distance = distance;\n }\n }\n\n return with_lowest_distance;\n }", "public final Node getNearestNode(Point p) {\n double minDistanceSq = Double.MAX_VALUE;\n Node minPrimitive = null;\n for (Node n : getData().nodes) {\n if (n.deleted || n.incomplete)\n continue;\n Point sp = getPoint(n.eastNorth);\n double dist = p.distanceSq(sp);\n if (minDistanceSq > dist && dist < snapDistance) {\n minDistanceSq = p.distanceSq(sp);\n minPrimitive = n;\n }\n // prefer already selected node when multiple nodes on one point\n else if(minDistanceSq == dist && n.selected && !minPrimitive.selected)\n {\n minPrimitive = n;\n }\n }\n return minPrimitive;\n }", "public com.google.openrtb.OpenRtb.BidRequest getBidrequest() {\n return bidrequest_;\n }", "private double getNearestAEnergy() {\n\t\tdouble value = getInitialEnergy();\n\t\tdouble ret = value;\n\t\twhile (value < getaEnergy()) {\n\t\t\tdouble step = getPreEdgeStep();\n\t\t\t// avoid infinite loop\n\t\t\tif (step <= 0.0)\n\t\t\t\tstep = 1.0;\n\t\t\tvalue += step;\n\t\t\tif (value > getaEnergy())\n\t\t\t\tbreak;\n\t\t\tret = value;\n\t\t}\n\t\treturn ret;\n\t}", "@SuppressWarnings(\"null\")\n\tpublic static Node optimalIterativeSolution (Node Tree, int target) {\n\t\tNode curr = Tree;\n\t\tNode Closest = null;\n\t\tClosest.val = Integer.MAX_VALUE;\n\t\twhile (curr != null) {\n\t\t\tif (Math.abs(target - Closest.val) > Math.abs(target - curr.val)) {\n\t\t\t\tClosest = curr;\n\t\t\t} else if (target < curr.val) {\n\t\t\t\tcurr = curr.left;\n\t\t\t} else if (target > curr.val) {\n\t\t\t\tcurr = curr.right;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn Closest;\n\t}", "Double getMinimumValue();", "public Point2D nearest(Point2D p2d) {\n if (size == 0) {\n return null;\n } \n return nearest(root, p2d, root.p2d, true);\n }", "static S2Point closestAcceptableEndpoint(\n S2Point a0, S2Point a1, S2Point aNorm, S2Point b0, S2Point b1, S2Point bNorm, S2Point x) {\n CloserResult r = new CloserResult(Double.POSITIVE_INFINITY, x);\n if (orderedCCW(b0, a0, b1, bNorm)) {\n r.replaceIfCloser(x, a0);\n }\n if (orderedCCW(b0, a1, b1, bNorm)) {\n r.replaceIfCloser(x, a1);\n }\n if (orderedCCW(a0, b0, a1, aNorm)) {\n r.replaceIfCloser(x, b0);\n }\n if (orderedCCW(a0, b1, a1, aNorm)) {\n r.replaceIfCloser(x, b1);\n }\n return r.getVmin();\n }", "public Point2D nearest(Point2D p) {\n\t\tif (p == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tif (isEmpty()) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tPoint2D result = null;\n\t\t\tresult = nearest(root, p, result);\n\t\t\treturn result;\n\t\t}\n\t}", "public abstract Bid chooseOpeningBid();", "public Sample SelectSample() {\n\t\t\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfloat sum = 0;\n\t\tfloat min = Float.MAX_VALUE;\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tmin = Math.min(min, ptr.s.weight);\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tmin = Math.abs(min) + 1;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\t\t\tif(ptr.s.weight + min < 0) {\n\t\t\t\tSystem.out.println(\"neg val\");System.exit(0);\n\t\t\t}\n\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfloat val = (float) (Math.random() * sum);\n\n\t\tsum = 0;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\n\t\t\tif(sum >= val) {\n\t\t\t\treturn ptr.s;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\tSystem.out.println(\"error\");System.exit(0);\n\t\treturn null;\n\t}", "public com.google.openrtb.OpenRtb.BidRequest getRequest() {\n return request_;\n }", "public static TreeNode smallestLarger(TreeNode root, int target) {\n\t\tTreeNode smallestLarger = null;\n\t\tTreeNode cur = root;\n\t\twhile (cur != null) {\n\t\t\tif (cur.val <= target) {\n\t\t\t\tcur = cur.right;\n\t\t\t} else {\n\t\t\t\tsmallestLarger = cur;\n\t\t\t\tcur = cur.left;\n\t\t\t}\n\t\t}\n\t\treturn smallestLarger;\n\t}", "public GPSNode getClosestNodeOnRoad(double lat, double lon) {\n\tGPSNode closest = null;\n\tdouble min = Double.MAX_VALUE;\n\t\n\tSet<String> wayList = ways.keySet();\n\tfor(String str : wayList) {\n\t Way way = ways.get(str);\n\t if(way != null && way.canDrive()) {\n\t\tArrayList<String> refs = way.getRefs();\n\t\tif(refs != null && refs.size() > 0) {\n\t\t for(String ref: refs) {\n\t\t\tGPSNode node = (GPSNode) getNode(ref);\n\t\t\t\n\t\t\tif(node == null)\n\t\t\t continue;\n\t\t\t\n\t\t\tdouble nodeLat = node.getLatitude();\n\t\t\tdouble nodeLon = node.getLongitude();\n\t\t\t \n\t\t\tdouble dist = calcDistance(lat, lon, nodeLat, nodeLon);\n\t\t\t \n\t\t\tif(dist < min) {\n\t\t\t min = dist;\n\t\t\t closest = node;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t}\n\t\n\treturn closest;\n }", "public Program getImbalancedChild() {\n\t\tMap<Integer, List<Program>> weightsToChildren = new HashMap<>();\n\t\tfor (Program child : getChildren()) {\n\t\t\tweightsToChildren.computeIfAbsent(child.getTotalWeight(), k -> new ArrayList<>());\n\t\t\tweightsToChildren.get(child.getTotalWeight()).add(child);\n\t\t}\n\t\t// No children, or all children have the same total weight.\n\t\tif (getChildren().isEmpty() || weightsToChildren.size() == 1) {\n\t\t\treturn (null);\n\t\t}\n\t\t// Get the loner child. Assumption: The tree will have 3 or more children, so weight with only 1 child is the\n\t\t// imbalanced one.\n\t\tfor (List<Program> children : weightsToChildren.values()) {\n\t\t\tif (children.size() == 1) {\n\t\t\t\treturn (children.get(0));\n\t\t\t}\n\t\t}\n\t\tthrow new RuntimeException(\"Could not locate imbalanced child of program \" + getName());\n\t}", "public BigDecimal getScrappedQty() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"ScrappedQty\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}", "static BigDecimal FindMinPrice(String productname){\n\t\tLong prdname=Long.parseLong(productname);\n\t\tBigDecimal returnVal=new BigDecimal(0);\n\t\tif(productListOnNames.containsKey(prdname)){\n\t\t\tTreeMap<Long,BigDecimal> existingSet=productListOnNames.get(prdname);\n\n\t\t\treturnVal=Collections.min(existingSet.values());\n\n\t\t}\n\n\t\treturn returnVal;\n\n\t}", "public static double closestPair(Point[] sortedX) {\n if (sortedX.length <= 1) {\n return Double.MAX_VALUE;\n }\n double mid = sortedX[(sortedX.length) / 2].getX();\n double firstHalf = closestPair(Arrays.copyOfRange(sortedX, 0, (sortedX.length) / 2));\n double secondHalf = closestPair(Arrays.copyOfRange(sortedX, (sortedX.length) / 2, sortedX.length));\n double min = Math.min(firstHalf, secondHalf);\n ArrayList<Point> close = new ArrayList<Point>();\n for (int i = 0; i < sortedX.length; i++) {\n double dis = Math.abs(sortedX[i].getX() - mid);\n if (dis < min) {\n close.add(sortedX[i]);\n }\n }\n // sort by Y coordinates\n Collections.sort(close, new Comparator<Point>() {\n public int compare(Point obj1, Point obj2) {\n return (int) (obj1.getY() - obj2.getY());\n }\n });\n Point[] near = close.toArray(new Point[close.size()]);\n\n for (int i = 0; i < near.length; i++) {\n int k = 1;\n while (i + k < near.length && near[i + k].getY() < near[i].getY() + min) {\n if (min > near[i].distance(near[i + k])) {\n min = near[i].distance(near[i + k]);\n System.out.println(\"near \" + near[i].distance(near[i + k]));\n System.out.println(\"best \" + best);\n\n if (near[i].distance(near[i + k]) < best) {\n best = near[i].distance(near[i + k]);\n arr[0] = near[i];\n arr[1] = near[i + k];\n // System.out.println(arr[0].getX());\n // System.out.println(arr[1].getX());\n\n }\n }\n k++;\n }\n }\n return min;\n }", "public double getCurrentBidToMatch() {\n\t\treturn currentBidToMatch;\n\t}", "Object getBest();", "double getMin();", "double getMin();", "@Override\n public Point nearest(double x, double y) {\n double distance = Double.POSITIVE_INFINITY;\n Point nearestPoint = new Point(0, 0);\n Point targetPoint = new Point(x, y);\n\n for (Point p : pointsList) {\n double tempdist = Point.distance(p, targetPoint);\n if (tempdist < distance) {\n distance = tempdist;\n nearestPoint = p;\n }\n }\n\n return nearestPoint;\n }" ]
[ "0.583562", "0.5740464", "0.56160045", "0.5545606", "0.54977137", "0.5475154", "0.5469573", "0.54109806", "0.53903276", "0.5386665", "0.53335536", "0.53328174", "0.53156704", "0.53002125", "0.52934045", "0.5275449", "0.5264278", "0.52315295", "0.52303", "0.52256835", "0.51872283", "0.5184876", "0.5181123", "0.51780236", "0.5176918", "0.51244676", "0.51060593", "0.5070677", "0.50613266", "0.50548816", "0.50327396", "0.5025336", "0.5018217", "0.5016479", "0.5005224", "0.5001271", "0.49874514", "0.4986338", "0.49479783", "0.49366963", "0.49225947", "0.49180126", "0.489114", "0.48867303", "0.48769283", "0.4862957", "0.48598173", "0.48576477", "0.4857189", "0.4855794", "0.48527518", "0.4852576", "0.4850447", "0.48459086", "0.4825064", "0.48130444", "0.48043823", "0.47969994", "0.47922772", "0.4786619", "0.4783735", "0.4764697", "0.47596294", "0.47586283", "0.47575963", "0.47512305", "0.47397575", "0.4720954", "0.47179255", "0.4708336", "0.47056517", "0.47046483", "0.47034007", "0.47030157", "0.46925688", "0.46904102", "0.46881756", "0.46856314", "0.46774873", "0.46707225", "0.46692392", "0.46689272", "0.46677926", "0.46638253", "0.46620536", "0.46617952", "0.46616343", "0.46615264", "0.46575153", "0.46506655", "0.46497422", "0.46496496", "0.46442625", "0.4643921", "0.46402174", "0.46400508", "0.46320474", "0.46295092", "0.46295092", "0.46278125" ]
0.81474334
0
Returns the index that comes closest to the price
private double priceOf(double priceFraction) { return marketBasis.getMinimumPrice() + priceFraction * (marketBasis.getMaximumPrice() - marketBasis.getMinimumPrice()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int calculateIndexOfClosestPoint(Position[] smoothedPath) {\n double[] distances = new double[smoothedPath.length];\n for (int i = 0/*lastClosestPointIndex*/; i < smoothedPath.length; i++) {\n distances[i] = Functions.Positions.subtract(smoothedPath[i], currentCoord).getMagnitude();\n }\n\n // calculates the index of value in the array with the smallest value and returns that index\n lastClosestPointIndex = Functions.calculateIndexOfSmallestValue(distances);\n return lastClosestPointIndex;\n }", "private int findNearestValue(final int i, final double key) {\n\n\t\tint low = 0;\n\t\tint high = m_NumValues[i];\n\t\tint middle = 0;\n\t\twhile (low < high) {\n\t\t\tmiddle = (low + high) / 2;\n\t\t\tdouble current = m_seenNumbers[i][middle];\n\t\t\tif (current == key) {\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\tif (current > key) {\n\t\t\t\thigh = middle;\n\t\t\t} else if (current < key) {\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}", "private int[] getLowestPricesInTerm(int[] prices){\n int lowest = Integer.MAX_VALUE;\n int index = -1;\n for(int i=0;i<prices.length;i++){\n if(prices[i]<lowest){\n lowest = prices[i];\n index = i;\n }\n }\n return new int[]{lowest,index};\n }", "private int findZeroClosestIndex( final int numRows, final double[] pctVals ) {\n\n int closestMarketIndex = 0 ;\n double lastClosestDist = -1 ;\n double distance = -1 ;\n\n for( int i=0; i<numRows; i++ ) {\n // Find the index whose value is the closest to zero. We plan\n // to mark it in the spectrum.\n if( lastClosestDist == -1 ) {\n lastClosestDist = Math.abs( pctVals[i] ) ;\n }\n else {\n distance = Math.abs( pctVals[i] ) ;\n if( distance < lastClosestDist ) {\n closestMarketIndex = i ;\n lastClosestDist = distance ;\n }\n }\n }\n return closestMarketIndex ;\n }", "public int getClosestIndex(final DataPoint point) {\n DataPoint closest = ntree.getClosestPoint(point);\n return ntree.getIndex(closest);\n }", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "int funkcjaRynkuGetIndex(float cena)\n\t{\n\t\tArrayList<Point> L1 =listaFunkcjiUzytecznosci.get(0);\n\n\t\tint a=0;\n\t\twhile (cena>L1.get(a).getPrice())\n\t\t{\n\t\t\ta++;\n\t\t}\n\t\t\n\t\tif(a>0)\n\t\t{\n\t\t\ta--;\n\t\t}\n\t\t\n\t\tif (a==L1.size())\n\t\t{\n\t\t\ta--;\t\n\t\t}\n\t\t\n\t\t\n\t\t//getInput(\"funkcjaRynkuGetIndex \"+a+\" cena \"+ cena);\n\t\t\t\n\t\treturn a;\n\t}", "public static double findNearestElement(double[] values, double item) {\n\n //defining some variables to use.\n double nearestElement = 0;\n double differenceLowest = 300;\n\n // Loop invariant is: 0 <= i < values.length.\n for (int i = 0; i < values.length; i++){\n\n /* Gets the absolute value for the difference between the input item\n * and the current value in the array.\n */\n double difference = java.lang.Math.abs(item - values[i]);\n\n /* Checks whether the current difference is less than the lowest distance.\n * if this is the case, the value of the new lowest difference is assigned\n * to the differenceLowest variable.\n */\n if (difference < differenceLowest){\n differenceLowest = difference;\n // Assigns the value of the current array element to the nearestElement variable.\n nearestElement = values[i];\n }\n } \n return nearestElement;\n }", "private int getMinIndex(List<Integer> cost) {\n int min = cost.get(0);\n int index = 0;\n for (int i = 1; i < cost.size(); i++) {\n if (cost.get(i) < 0) {\n continue;\n }\n if (cost.get(i) < min) {\n min = cost.get(i);\n index = i;\n }\n }\n return index;\n }", "public IndexPrice getPriceIndex() {\n return _priceIndex;\n }", "public int getBestPrice() {\n\t\treturn this.bestPrice;\n\t}", "public int getOptimalNumNearest();", "public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }", "private int closest(double [] v){\n \t\tdouble mindist = dist(v, nCentroids[0]);\n \t\tint label =0;\n \t\tfor (int i=1; i<nClusters; i++){\n \t\t\tdouble t = dist(v, nCentroids[i]);\n \t\t\tif (mindist>t){\n \t\t\t\tmindist = t;\n \t\t\t\tlabel = i;\n \t\t\t}\n \t\t}\n \t\treturn label;\n \t}", "private static int getMinDistIndex(ArrayList<Double> list, int indexNotInterested) {\n \tdouble newDistMin = Double.MAX_VALUE;\n\t\tint newMinDistIndex = -1;\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tif(i != indexNotInterested && newDistMin > list.get(i)) {\n\t\t\t\tnewDistMin = list.get(i);\n\t\t\t\tnewMinDistIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newMinDistIndex;\n }", "private int getDistanceIndex(int point) {\n switch (point) {\n case 0:\n return -1; /* no start for point 0 */\n case 1:\n return 0;\n default:\n int n = point - 1;\n return ((n * n) + n) / 2;\n }\n }", "protected int find_by_index(DateTime dt){\r\n int in = 0;\r\n int l = this.candles.length;\r\n for(int i=0; i < l; i++){\r\n if (this.candles[i].getDT().isLower(dt) || this.candles[i].getDT().isEqual(dt)){\r\n in++;\r\n }\r\n }\r\n if (this.candles[in-1].getDT().isLower(dt)){\r\n return in-1;\r\n } else {\r\n return in;\r\n }\r\n }", "protected IgniteBiTuple<Integer, Double> findClosest(Vector[] centers, Vector pnt) {\n double bestDistance = Double.POSITIVE_INFINITY;\n int bestInd = 0;\n\n for (int i = 0; i < centers.length; i++) {\n double dist = distance(centers[i], pnt);\n if (dist < bestDistance) {\n bestDistance = dist;\n bestInd = i;\n }\n }\n\n return new IgniteBiTuple<>(bestInd, bestDistance);\n }", "int findVertex(Point2D.Float p) {\n double close = 5*scale;\n for (int i = 0; i < points.size(); ++i) {\n if (points.get(i).distance(p) < close) {\n return i;\n }\n }\n return -1;\n }", "long closest(double lon, double lat) {\n double smallestDist = Double.MAX_VALUE;\n long smallestId = 0;\n Iterable<Node> v = world.values();\n for (Node n : v) {\n double tempLat = n.getLat();\n double tempLon = n.getLon();\n double tempDist = distance(lon, lat, tempLon, tempLat);\n if (tempDist < smallestDist) {\n smallestDist = tempDist;\n smallestId = n.getId();\n }\n }\n return smallestId;\n }", "public static double closestPair(Point[] sortedX) {\n if (sortedX.length <= 1) {\n return Double.MAX_VALUE;\n }\n double mid = sortedX[(sortedX.length) / 2].getX();\n double firstHalf = closestPair(Arrays.copyOfRange(sortedX, 0, (sortedX.length) / 2));\n double secondHalf = closestPair(Arrays.copyOfRange(sortedX, (sortedX.length) / 2, sortedX.length));\n double min = Math.min(firstHalf, secondHalf);\n ArrayList<Point> close = new ArrayList<Point>();\n for (int i = 0; i < sortedX.length; i++) {\n double dis = Math.abs(sortedX[i].getX() - mid);\n if (dis < min) {\n close.add(sortedX[i]);\n }\n }\n // sort by Y coordinates\n Collections.sort(close, new Comparator<Point>() {\n public int compare(Point obj1, Point obj2) {\n return (int) (obj1.getY() - obj2.getY());\n }\n });\n Point[] near = close.toArray(new Point[close.size()]);\n\n for (int i = 0; i < near.length; i++) {\n int k = 1;\n while (i + k < near.length && near[i + k].getY() < near[i].getY() + min) {\n if (min > near[i].distance(near[i + k])) {\n min = near[i].distance(near[i + k]);\n System.out.println(\"near \" + near[i].distance(near[i + k]));\n System.out.println(\"best \" + best);\n\n if (near[i].distance(near[i + k]) < best) {\n best = near[i].distance(near[i + k]);\n arr[0] = near[i];\n arr[1] = near[i + k];\n // System.out.println(arr[0].getX());\n // System.out.println(arr[1].getX());\n\n }\n }\n k++;\n }\n }\n return min;\n }", "static int findMin(double[] pq)\n\t{\n\t\tint ind = -1; \n\t\tfor (int i = 0; i < pq.length; ++i)\n\t\t\tif (pq[i] >= 0 && (ind == -1 || pq[i] < pq[ind]))\n\t\t\t\tind = i;\n\t\treturn ind;\n\t}", "Execution getClosestDistance();", "long closest(double lon, double lat) {\n double closet = Double.MAX_VALUE;\n long vertex = 0;\n\n for (Long v : vertices()) {\n double nodeLon = getNode(v).Lon;\n double nodeLat = getNode(v).Lat;\n double lonDist = nodeLon - lon;\n double latDist = nodeLat - lat;\n double dist = Math.sqrt(lonDist * lonDist + latDist * latDist);\n if (dist < closet) {\n vertex = v;\n closet = dist;\n }\n }\n return vertex;\n }", "public int pickIndex() {\n int len = weightPrefixSum.length;\n\n int idx = random.nextInt(weightPrefixSum[len - 1]) + 1;\n\n int start = 0;\n int end = len - 1;\n while(start <= end){\n int mid = start + (end - start) / 2;\n\n if(weightPrefixSum[mid] == idx){\n return mid;\n }else if(weightPrefixSum[mid] < idx){\n start = mid + 1;\n }else{\n end = mid - 1;\n }\n }\n\n return start;\n\n }", "BigDecimal getPreviousClosePrice();", "private int getNearestNode(LatLng vic) {\n\t\tint node = 0;\n\t\tfor(int j=0; j<nodeList.size()-1; j++){\n\t\t\tdouble dist1 = getWeight(vic, nodeList.get(node));\n\t\t\tdouble dist2 = getWeight(vic, nodeList.get(j));\n\t\t\tif(dist1 > dist2){\n\t\t\t\tnode = j;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}", "public int comparePrice(Route r2) {\n double val = this.price - r2.price;\n if (val > 0.01) return 1; // just in case of more precise prices\n if (val < -0.01) return -1; // but should be unnecessary\n return 0;\n }", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "private Exemplar nearestExemplar(Instance inst){\n\n if (m_Exemplars == null)\n return null;\n Exemplar cur = m_Exemplars, nearest = m_Exemplars;\n double dist, smallestDist = cur.squaredDistance(inst);\n while (cur.next != null){\n cur = cur.next;\n dist = cur.squaredDistance(inst);\n if (dist < smallestDist){\n\tsmallestDist = dist;\n\tnearest = cur;\n }\n }\n return nearest;\n }", "public int getIndex(int index, Position position) {\n\t\t\n\t\tint toReturn = index;\n\t\tint max = index + MAX;\n\t\tfloat closest = Float.MAX_VALUE;\n\t\tfloat distance = 0;\n\t\t\n\t\t//Move through the array starting at the given index.\n\t\tfor(index++ ;index < vertices.size() && index < max; index++) {\n\t\t\tVertex current = vertices.get(index);\n\t\t\tint x = current.getX() - position.getX();\n\t\t\tint z = current.getZ() - position.getZ();\n\t\t\tdistance = (float) Math.sqrt((x*x) + (z*z));\n\t\t\t\n\t\t\tif(distance < closest) {\n\t\t\t\tclosest = distance;\n\t\t\t\ttoReturn = index;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\treturn toReturn;\n\t}", "private int locate (List<Integer> list, int hash) {\n\t\tif (list.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint index_a = -1;\n\t\tint index_b = list.size();\n\t\tfloat value_a = (float)list.get(index_a+1);\n\t\tfloat value_b = (float)list.get(index_b-1);\n\t\tfloat hash_float = (float)hash;\n\n\t\tif (hash <= value_a) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (hash > value_b) {\n\t\t\treturn list.size();\n\t\t}\n\n\t\twhile (index_b - index_a > 1) {\n\t\t\tint index_mid = index_a+(int)((float)(index_b-index_a)*(hash_float-value_a)/(value_b-value_a));\n\t\t\tif (index_mid == index_a) {\n\t\t\t\tindex_mid++;\n\t\t\t} else if (index_mid == index_b) {\n\t\t\t\tindex_mid--;\n\t\t\t}\n\t\t\tif (hash >= list.get(index_mid)) {\n\t\t\t\tindex_a = index_mid;\n\t\t\t\tvalue_a = list.get(index_a);\n\t\t\t} else {\n\t\t\t\tindex_b = index_mid;\n\t\t\t\tvalue_b = list.get(index_b);\n\t\t\t}\n\t\t}\n\t\tif (hash == list.get(index_a)) {\n\t\t\treturn index_a;\n\t\t}\n\t\treturn index_b;\n\t}", "private static int findIndexOfSmallest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.MAX_VALUE;\n\t\tfloat temp;\n\t\tfor (int d=0; d<Constants.ACCEL_DIM; ++d) {\n\t\t\ttemp = vector[d];\n\t\t\tif (temp<0.0f)\n\t\t\t\ttemp = -temp;\n\t\t\t\n\t\t\tif (temp<value) {\n\t\t\t\tvalue = temp;\n\t\t\t\tindex = d;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "cosmos.base.v1beta1.CoinOuterClass.Coin getPrice(int index);", "@Override\n\tpublic int compareTo(@NonNull Item o) {\n\t\treturn Math.round(this.price - o.price);\n\t}", "protected int search(double value) {\n int n = sequence.size();\n int left = 0, right = n - 1, index = 0;\n while (left != right) {\n index = (right - left) / 2 + left;\n if (value >= sequence.get(index == left ? index + 1 : index)) {\n left = index == left ? index + 1 : index;\n } else {\n right = index;\n }\n }\n while (left > 0 && value == sequence.get(left - 1)) {\n left -= 1;\n }\n return left;\n }", "private ItemStack getClosest(ItemStack[] mainInventory, int slot) {\n int check = slot == 8 ? 0 : slot + 1;\n ItemStack stack = mainInventory[check];\n if (stack != null && stack.getItem() == HFFishing.FISHING_ROD) return stack;\n else {\n check = slot == 0 ? 8 : slot + -1;\n stack = mainInventory[check];\n if (stack != null && stack.getItem() == HFFishing.FISHING_ROD) return stack;\n else return null;\n }\n }", "private int[] getHighestPricesInTerm(int[] prices){\n int highest = -1;\n int index = -1;\n for(int i=0;i<prices.length;i++){\n if(prices[i]>highest){\n highest = prices[i];\n index = i;\n }\n }\n return new int[]{highest,index};\n }", "public Set<? extends Position> findNearest(Position position, int k);", "private UnconstrainedBidElement getClosest(double demandWatt) {\n UnconstrainedBidElement best = null;\n double bestDistance = Double.MAX_VALUE;\n for (UnconstrainedBidElement e : elements) {\n double distance = Math.abs(demandWatt - e.demandWatt);\n if (best == null || distance < bestDistance) {\n best = e;\n bestDistance = distance;\n }\n }\n return best;\n }", "private int getRealIndex()\r\n\t{\r\n\t\treturn index - 1;\r\n\t}", "long closest(double lon, double lat) {\n return kdTreeForNearestNeighbor.nearest(lon, lat);\n }", "private Node find(Order ord){\n\t\tNode position=head;\n\t\tOrder ItemPosition;\n\t\twhile (position!=null){\n\t\t\tItemPosition = position.ord;\n\t\t\tif(ItemPosition.equals(ord)) {\n\t\t\t\tposition=bestBid;\n\t\t\t\treturn position;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public int getSmallestSpotNum() {\n if (getNumavailable() >= 1) {\n for (int i = 0; i < spotArr.size(); i++) {\n if (spotArr.get(i).isAvailable()) {\n return i;\n }\n }\n }\n return -1;\n }", "private static int findIndexOfLargest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.NEGATIVE_INFINITY;\n\t\tfloat temp;\n\t\tfor (int d=0; d<Constants.ACCEL_DIM; ++d) {\n\t\t\ttemp = vector[d];\n\t\t\tif (temp<0.0f)\n\t\t\t\ttemp = -temp;\n\t\t\t\n\t\t\tif (temp>value) {\n\t\t\t\tvalue = temp;\n\t\t\t\tindex = d;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "private Double getPriceNumber(String price) {\n\t\ttry {\n\t\t\tList<Double> allMatches = new ArrayList<Double>();\n\t\t\tPattern pattern = Pattern.compile(\"((\\\\d*\\\\s)+)\\\\d*\\\\.\\\\d{2}\");\n\t\t\tMatcher matcher = pattern.matcher(price);\n\t\t\twhile (matcher.find()) {\n\t\t\t\tDouble priceMatch = Double.parseDouble(matcher.group().replace(\" \", \"\"));\n\t\t\t\tallMatches.add(priceMatch);\n\t\t\t}\n\n\t\t\treturn Collections.min(allMatches);\n\t\t} catch (Exception | AssertionError e) {\n\t\t\tString errorMessage = String.format(\"An error ocurred while getting the price number\", e.getMessage());\n\t\t\tthrow new Error(errorMessage);\n\t\t}\n\t}", "public Coordinates closestPoint() {\n return closestPoint;\n }", "synchronized protected int findNearestPoint(final int x_p, final int y_p, final long layer_id) {\n \t\tint index = -1;\n \t\tdouble min_dist = Double.MAX_VALUE;\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tif (layer_id != p_layer[i]) continue;\n \t\t\tdouble sq_dist = Math.pow(p[0][i] - x_p, 2) + Math.pow(p[1][i] - y_p, 2);\n \t\t\tif (sq_dist < min_dist) {\n \t\t\t\tindex = i;\n \t\t\t\tmin_dist = sq_dist;\n \t\t\t}\n \t\t}\n \t\treturn index;\n \t}", "private int findIndexInStock(FoodItem itemToCheck) {\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // if they're the same\n if (isSameFoodItem(this._stock[i], itemToCheck)) {\n // return current index.\n return i;\n }\n }\n return -1;\n }", "public int searchBigSortedArrayExponential(ArrayReader reader, int target) {\n // write your code here\n int index = 1;\n while (reader.get(index - 1) < target) index *= 2;\n\n int start = 0, end = index;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (reader.get(mid) < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (reader.get(start) == target) return start;\n if (reader.get(end) == target) return end;\n return -1;\n }", "private Exemplar nearestExemplar(Instance inst, double c){\n\n if (m_ExemplarsByClass[(int) c] == null)\n return null;\n Exemplar cur = m_ExemplarsByClass[(int) c], nearest = m_ExemplarsByClass[(int) c];\n double dist, smallestDist = cur.squaredDistance(inst);\n while (cur.nextWithClass != null){\n cur = cur.nextWithClass;\n dist = cur.squaredDistance(inst);\n if (dist < smallestDist){\n\tsmallestDist = dist;\n\tnearest = cur;\n }\n }\n return nearest;\n }", "public static double nearestEIAValue(final double res, final EIASeries series) {\n\t\tdouble closest = res;\n\t\tif (res > 0.) {\n\t\t\tfinal double denom = Math.pow(10., Math.floor(Math.log10(res)) - 2.0);\n\t\t\tfinal double significand = res / denom;\n\t\t\t// Round it off to the 0.1th place\n\t\t\tfinal int[] candidates = EIA_VALUES[series.ordinal()];\n\t\t\tfinal int value = (int)Math.round(significand), index =\n\t\t\t\tArrays.binarySearch(candidates, value);\n\t\t\t// Exact matches need not go here\n\t\t\tif (index < 0) {\n\t\t\t\tfinal int intendedIndex = -index - 1;\n\t\t\t\t// Find the nearest above and below\n\t\t\t\tfinal int below, above;\n\t\t\t\tif (intendedIndex > 0)\n\t\t\t\t\tbelow = candidates[intendedIndex - 1];\n\t\t\t\telse\n\t\t\t\t\tbelow = candidates[candidates.length - 1] / 10;\n\t\t\t\tif (intendedIndex < candidates.length)\n\t\t\t\t\tabove = candidates[intendedIndex];\n\t\t\t\telse\n\t\t\t\t\tabove = 1000;\n\t\t\t\t// Closest significand\n\t\t\t\tfinal int closeSig = (above - value > value - below) ? below : above;\n\t\t\t\tclosest = (double)closeSig * denom;\n\t\t\t}\n\t\t}\n\t\treturn closest;\n\t}", "private int selectSolr()\n {\n //Select the endpoint with the least amount of load\n //The start index is randomized to reduce bias to nodes earlier\n //in the list.\n int minIndex = -1;\n int minOutstanding = Integer.MAX_VALUE;\n int startIndex = ThreadLocalRandom.current().nextInt(outstandingRequests.length());\n int loopEnd = outstandingRequests.length() + startIndex;\n for (int ii = startIndex; ii < loopEnd; ii++)\n {\n int index = ii % outstandingRequests.length();\n int outstanding = outstandingRequests.get(index);\n if (outstanding < minOutstanding)\n {\n minIndex = index;\n minOutstanding = outstanding;\n }\n }\n\n return minIndex;\n }", "private int indexOfLargest(ArrayList<QuakeEntry> data) {\n int index = 0;\n double magnitude = 0;\n for (QuakeEntry qe : data) {\n double currMag = qe.getMagnitude();\n if (currMag > magnitude) {\n index = data.indexOf(qe);\n magnitude = currMag;\n }\n }\n System.out.println(magnitude);\n return index;\n }", "private double calcNearestNeighborIndex(ArrayList<Point> pts) {\n int width = layoutPanel.getLayoutSize().width;\n int height = layoutPanel.getLayoutSize().height;\n\n // calculate average nearest neighbor\n double avgNN = 0;\n int n = pts.size();\n for (int i = 0; i < n; i++) {\n double minDist = Float.MAX_VALUE;\n for (int j = 0; j < n; j++) {\n if (i != j) {\n Point pti = pts.get(i);\n Point ptj = pts.get(j);\n double dist = Point2D\n .distanceSq(pti.x, pti.y, ptj.x, ptj.y);\n if (minDist > dist) {\n minDist = dist;\n }\n }\n }\n avgNN += Math.sqrt(minDist);\n }\n avgNN = avgNN / (double) n;\n\n // calculate estimated average neighbor\n double estANN = 1.0 / (2.0 * Math.sqrt((double) n\n / (double) (width * height)));\n\n return avgNN / estANN;\n }", "BigDecimal getLowPrice();", "public int getbestline() {\n\t\tint i=0;\n\t\tint biggest=0;\n\t\tint keep_track=0;\n\t\twhile(i < amount.length) {\n\t\t\tif(Faucets.amount[i] > biggest) {\n\t\t\t\tbiggest = Faucets.amount[i];\n\t\t\t\tkeep_track = i;\n\t\t\t}\n\t\t\ti+=1;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Keep_Track = \\\"\" + keep_track + \"\\\"\");\n\t\treturn keep_track;\n\t\t\n\t}", "public int getIndexForXVal(double xVal) {\n\t\tint upper = pointList.size()-1;\n\t\tint lower = 0;\n\t\t\n\t\tif (pointList.size()==0)\n\t\t\treturn 0;\n\t\t\n\t\t//TODO Are we sure an binarySearch(pointList, xVal) wouldn't be a better choice here?\n\t\t//it can gracefully handle cases where the key isn't in the list of values...\n\t\tdouble stepWidth = (pointList.get(pointList.size()-1).getX()-pointList.get(0).getX())/(double)pointList.size();\n\t\t\n\t\tint index = (int)Math.floor( (xVal-pointList.get(0).getX())/stepWidth );\n\t\t//System.out.println(\"Start index: \" + index);\n\t\t\n\t\t//Check to see if we got it right\n\t\tif (index>=0 && (index<pointList.size()-1) && pointList.get(index).getX() < xVal && pointList.get(index+1).getX()>xVal) {\n\t\t\t//System.out.println(\"Got it right on the first check, returning index : \" + index);\n\t\t\treturn index;\n\t\t}\n\t\t\t\t\n\t\t//Make sure the starting index is sane (between upper and lower)\n\t\tif (index<0 || index>=pointList.size() )\n\t\t\tindex = (upper+lower)/2; \n\t\t\n\t\tif (xVal < pointList.get(0).getX()) {\n\t\t\treturn 0;\n\t\t}\n\t\t\t\n\t\tif(xVal > pointList.get(pointList.size()-1).getX()) {\n\t\t\treturn pointList.size()-1;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\twhile( upper-lower > 1) {\n\t\t\tif (xVal < pointList.get(index).getX()) {\n\t\t\t\tupper = index;\n\t\t\t}\n\t\t\telse\n\t\t\t\tlower = index;\n\t\t\tindex = (upper+lower)/2;\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\treturn index;\n\t}", "@Test\n public void getIndex(){\n List <Double> list = new ArrayList<>();\n list.add(1.0);\n list.add(2.0);\n list.add(3.0);\n list.add(4.0);\n\n assertEquals(0,list.indexOf(1.0));\n }", "public double calDistance()\n {\n double closest = poly[0].getD();\n\n for(int i = 1; i < sides; i++)\n {\n if(closest > poly[i].getD())\n {\n closest = poly[i].getD();\n }\n }\n this.distance = closest;\n\n return closest;\n }", "public int closest2(TreeNode root, int target) {\n\t\tif (root.key == target || (root.left == null && root.right == null)) {\n\t\t\treturn root.key;\n\t\t}\n\t\tint result = root.key;\n\t\twhile (root != null) {\n\t\t\tif (root.key == target) {\n\t\t\t\treturn root.key;\n\t\t\t} else {\n\t\t\t\tif (Math.abs(root.key - target) < Math.abs(result - target)) {\n\t\t\t\t\tresult = root.key;\n\t\t\t\t}\n\t\t\t\tif (root.key < target) {\n\t\t\t\t\troot = root.right;\n\t\t\t\t} else {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static int findNextHigherIndex(int[] a, int k) {\n\t\tint start = 0, end = a.length - 1; \n\t \n int ans = -1; \n while (start <= end) { \n int mid = (start + end) / 2; \n \n // Move to right side if target is \n // greater. \n if (a[mid] <= k) { \n start = mid + 1; \n } \n \n // Move left side. \n else { \n ans = mid; \n end = mid - 1; \n } \n } \n return ans;\n\t}", "Pair<Vertex, Double> closestVertexToPath(Loc pos);", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "private int findIndexOfMax(){\n\t\tint value=0;\n\t\tint indexlocation=0;\n\t\tfor(int i=0; i<myFreqs.size();i++){\n\t\t\tif(myFreqs.get(i)>value){\n\t\t\t\tvalue = myFreqs.get(i);\n\t\t\t\tindexlocation =i;\n\t\t\t}\n\t\t}\n\t\treturn indexlocation;\n\t}", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "public int best(){\n List<Integer> points = count();\n Integer max = 0;\n for (Integer p: points){\n if (p <= 21 && max < p){\n max = p;\n }\n }\n return max;\n }", "static <E> int minPos( List<E> list, Comparator<E> fn ) {\n if ( list.isEmpty() ) {\n return -1;\n }\n E eBest = list.get( 0 );\n int iBest = 0;\n for ( int i = 1; i < list.size(); i++ ) {\n E e = list.get( i );\n if ( fn.compare( e, eBest ) < 0 ) {\n eBest = e;\n iBest = i;\n }\n }\n return iBest;\n }", "private int getIdx(MouseEvent e) {\n Point p = e.getPoint();\n p.translate(-BORDER_SIZE, -BORDER_SIZE);\n int x = p.x / CELL_SIZE;\n int y = p.y / CELL_SIZE;\n if (0 <= x && x < GUI.SIZE[1] && 0 <= y && y < GUI.SIZE[1]) {\n return GUI.SIZE[1] * x + y;\n } else {\n return -1;\n }\n }", "public List<Double> getLowestAskAndHighestBid(String asset) {\n\n Optional<List<Offer>> offerList = offerRepository.findOffersByAsset_Name(asset);\n\n if (offerList.isPresent()) {\n\n double lowestAsk = Double.MAX_VALUE;\n double highestBid = -1;\n for (Offer offer : offerList.get()) {\n if (offer.getType().equals(OfferType.SELL)) {\n if (offer.getPrice() < lowestAsk) {\n lowestAsk = offer.getPrice();\n }\n\n } else if (offer.getType().equals(OfferType.BUY)) {\n if (offer.getPrice() > highestBid) {\n highestBid = offer.getPrice();\n }\n\n }\n }\n\n if (lowestAsk == Double.MAX_VALUE) {\n lowestAsk = -1;\n }\n return Arrays.asList(lowestAsk, highestBid);\n }\n throw new NotFoundException(\"No current offers for this asset\");\n\n }", "public int getIndexOfProduct(Product p){\r\n for (int i = 0; i <allProducts.size() ; i++) {\r\n if(p.equals(allProducts.get(i))){\r\n return i ;\r\n }\r\n }\r\n return -1;\r\n }", "Price getHighestPricedTrade(Collection<Trade> trades);", "private static Company best_price(long input) {\n\t\tif(all_prices.isEmpty()) { //if no company was successfully parsed/empty file\n\t\t\tCompany temp = new Company(\"Empty\",new TreeMap<Long,Double>(),0,Long.MAX_VALUE,Double.MAX_VALUE);\n\t\t\treturn temp;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<all_prices.size(); i++) { //for each operator\n\t\t\tCompany operatr = all_prices.elementAt(i);\n\t\t\tMap<Long,Double> operator_price_map = operatr.getPrices(); //take its ext to price map\n\t\t\t//find which extension is the longest for a certain operator.\n\t\t\t//in so doing we are able cut the input number's digit search\n\t\t\t//to the longest extension (in terms of number of digits) available \n\t\t\tint longest_extension_digits = operatr.getMost_digits_ext(); \n\t\t\tString str_input = String.valueOf(input);\n\t\t\tfor(int j=longest_extension_digits; j>0; j--) { //going from longest possible substring of input num for an operator\n\t\t\t\tString input_digit_substring = str_input.substring(0, j);\n\t\t\t\tlong digit_prefix = Long.valueOf(input_digit_substring);\n\t\t\t\tif (operator_price_map.containsKey(digit_prefix)) { //if the operator has a match with the number, we terminate search because the longest possible extension has been chosen\n\t\t\t\t\toperatr.setLongest_matching_extension(digit_prefix);\n\t\t\t\t\toperatr.setMatching_price(operator_price_map.get(digit_prefix));\n\t\t\t\t\tbreak; //break because we want to prioritize the longest extension that matches\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.sort(all_prices, new CompanyComparator());\n\t\t\n\t\tCompany result = all_prices.elementAt(0);\n\t\treturn result;\n\t}", "private int getLeftOf(int index) {\n // TODO: YOUR CODE HERE\n return index * 2;\n }", "public static int closestNumber(int p, int high, int low) {\n\t\tif(p>Math.abs(high-p)) {\n\t\t\tp=high;\n\t\t}\n\t\telse {\n\t\t\tp=low;\n\t\t}\n\t\treturn p;\n\t}", "public static int mostMoney(int[][] a) { \n double[] totals = new double[3]; \n double rowTotal = 0.0;\n double rowTotal1 = 0.0;\n double rowTotal2 = 0.0;\n \n \n for(int i = 0; i<4; i++){\n rowTotal += a[0][i];\n totals[0] = rowTotal;}\n \n for(int j = 0; j<4; j++){\n rowTotal1 += a[1][j];\n totals[1] = rowTotal1;}\n \n for(int k = 0; k<4; k++){\n rowTotal2 += a[0][k];\n totals[2] = rowTotal2;}\n \n int indexOfBest=0; //used to find index of best year\n double best = totals[0];\n for(int i =0; i < 3; i++) {\n if(totals[i] >= best){\n best = totals[i];\n indexOfBest = i;}\n \n } return indexOfBest;\n }", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public int FindNearbyPts(Vector CurvData, int Eleindex, Stroke theStroke){\n\t\tint index;\n\t\tVector WinElements = new Vector();\n\t\tint CurvEleIndex;\n\t\tDouble minDistance = 999.0; // initialized to some larger value say 999.0\n\t\tDouble Distance;\n\t\tint ReturnIndex = -1;\n\t\tint min = Eleindex - PixelIndexWindow;\n\t\tint max = Eleindex + PixelIndexWindow;\n\t\tfor(index=0;index<CurvData.size(); index++){\n\t\t\tCurvEleIndex = (Integer)CurvData.elementAt(index);\n\t\t\tif(CurvEleIndex >= min && CurvEleIndex <= max){\n\t\t\t\t\tVector ptList = theStroke.getM_ptList();\n\t\t\t\t\tPoint CurvPt = ((PixelInfo) ptList.get(CurvEleIndex));\n\t\t\t\t\tPoint SpeedPt = ((PixelInfo)ptList.get(Eleindex));\n\t\t\t\t\tif((Distance = SpeedPt.distance(CurvPt)) < TolerantDistance){\n\t\t\t\t\t\tif(minDistance > Distance){\n\t\t\t\t\t\t\tminDistance = Distance;\n\t\t\t\t\t\t\tReturnIndex = index;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ReturnIndex;\n\t}", "public Point2D nearest(Point2D p) {\n if (bst.isEmpty()) {\n return null;\n }\n\n Point2D nearest = null;\n double nearestDist = Double.POSITIVE_INFINITY;\n \n \n for (Point2D point: bst.keys()) {\n\n if (nearest == null \n || point != null \n && (nearestDist > point.distanceSquaredTo(p)\n && (!point.equals(p)))) {\n nearest = point;\n nearestDist = point.distanceSquaredTo(p);\n }\n \n }\n return nearest;\n }", "private double getNearestAEnergy() {\n\t\tdouble value = getInitialEnergy();\n\t\tdouble ret = value;\n\t\twhile (value < getaEnergy()) {\n\t\t\tdouble step = getPreEdgeStep();\n\t\t\t// avoid infinite loop\n\t\t\tif (step <= 0.0)\n\t\t\t\tstep = 1.0;\n\t\t\tvalue += step;\n\t\t\tif (value > getaEnergy())\n\t\t\t\tbreak;\n\t\t\tret = value;\n\t\t}\n\t\treturn ret;\n\t}", "private SPlotPoint findClosestPoint( Point mousePoint )\r\n {\r\n SPlotPoint plotPoint;\r\n\r\n\r\n // The distance between cursor position and given plot point\r\n double distance;\r\n \r\n // A large amount - used to isolate the closest plot point to the \r\n // mouse,in the case of the cursor being within the radius of two \r\n // plot points\r\n double minDistance = 300;\r\n\r\n\r\n SPlotPoint closestPoint = null;\r\n \r\n // Holder in loop for points\r\n SPlotPoint currPoint;\r\n\r\n\r\n for (int i = 0; i<pointVector_.size(); i++)\r\n {\r\n currPoint = (SPlotPoint)pointVector_.elementAt(i);\r\n distance = calcDistance(mousePoint, currPoint);\r\n \r\n // If the cursor is on a plot point,\r\n if (distance < OVAL_DIAMETER)\r\n {\r\n // Isolate the closest plot point to the cursor\r\n if (distance < minDistance)\r\n {\r\n closestPoint = currPoint;\r\n\r\n\r\n // Reset the distance\r\n minDistance = distance;\r\n }\r\n }\r\n }\r\n return closestPoint;\r\n }", "public float minDistancePair(int doc) throws IOException {\n float distance = 0f;\n final SortedSet<Integer> pos = new TreeSet<Integer>();\n final LeafReader reader = this.context.reader();\n if (reader != null && this.terms.size() > 1) {\n // get a sorted list of positions\n for (final TermCountPair term : this.terms) {\n final PostingsEnum posting =\n reader.postings(new Term(this.privateField, term.getTerm()), PostingsEnum.POSITIONS);\n if (posting != null) {\n // move to the document currently looking at\n posting.advance(doc);\n int count = 0;\n final int freq = posting.freq();\n // make sure to add them all\n while (count < freq) {\n pos.add(new Integer(posting.nextPosition()));\n count += 1;\n }\n }\n }\n // now find the closest pairs\n Integer dist = Math.abs(pos.first() - pos.last());\n final Iterator<Integer> it = pos.iterator();\n Integer prev = pos.last();\n Integer current;\n while (it.hasNext()) {\n current = it.next();\n if (Math.abs(current - prev) < dist) {\n dist = Math.abs(current - prev);\n }\n prev = current;\n }\n distance = dist.intValue();\n } else if (this.terms.size() > 1) {\n distance = this.getDocLength(doc);\n }\n return distance;\n }", "java.math.BigDecimal getSingleBetMinimum();", "public int currentIndexRelativeToZero() {\n return calculateIndexRelativeToZero(currentIndex());\n }", "float getNotIn(int index);", "public int findNN(int position){\n int nearest = -1;\n double shortestDistance = 99999999; //super big so first find is always smaller\n\n for (int i = 0; i < locations.size(); i++){\n if(locations.get(i).isVisited() || i == position){\n //Do nothing, skip to next location\n continue;\n }\n else {\n double tempDistance = distances[position][i];\n\n if (tempDistance < shortestDistance) {\n shortestDistance = tempDistance;\n nearest = i;\n }\n }\n }\n\n return nearest;\n }", "public BigDecimal getPriceLastOrd();", "private Position getGoalItemPosition(Set<Item> items) {\n Vector closest = new Vector(0, 0);\n double distance = Double.MAX_VALUE;\n Iterator<Item> it = items.iterator();\n while (it.hasNext()) {\n Item item = it.next();\n Vector center = item.center();\n double currDistance = center.distance(player.center());\n if (currDistance < distance) {\n distance = currDistance;\n closest = center;\n goalItem = item;\n }\n }\n return new Position(closest.x, closest.y);\n }" ]
[ "0.63207597", "0.61142725", "0.59211534", "0.5868824", "0.5824542", "0.5781286", "0.5776981", "0.5773154", "0.57616025", "0.57449454", "0.57426035", "0.57133937", "0.5710198", "0.57073075", "0.5675749", "0.56598556", "0.5635921", "0.5628465", "0.5608822", "0.5606028", "0.55561346", "0.5549686", "0.5549288", "0.5549233", "0.5546239", "0.5501116", "0.5499209", "0.54822314", "0.5477938", "0.546342", "0.54615706", "0.54556435", "0.54461634", "0.54441386", "0.5427556", "0.54256606", "0.5421914", "0.54132557", "0.53856546", "0.5385152", "0.53630763", "0.5353984", "0.53509414", "0.53435236", "0.53305364", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.5327562", "0.532756", "0.53246474", "0.5319316", "0.53179884", "0.5313126", "0.5310631", "0.5300777", "0.5297811", "0.5281054", "0.5260179", "0.5259878", "0.52551216", "0.5254397", "0.52518517", "0.5249167", "0.5241596", "0.5237882", "0.5236298", "0.5234736", "0.52294135", "0.5226937", "0.52156377", "0.5213263", "0.5205074", "0.5203335", "0.52003175", "0.5199832", "0.5187243", "0.5185555", "0.51824117", "0.5181976", "0.51769024", "0.5176164", "0.5175812", "0.5171417", "0.5169034", "0.51681614", "0.51638806", "0.51567066", "0.51523685", "0.5151552", "0.51511806", "0.51419455" ]
0.0
-1
Given a PriceInfo object, the UnconstrainedBidElement is returned that expresses which RunningMode the Unconstrained device should go to.
public UnconstrainedBidElement runningModeForPrice(Price price) { return newBid[price.getPriceIndex()]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "io.grpc.user.task.PriceCondition getCondition();", "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n double minPriority = 0.0;\n double maxPriority = 1.0;\n\n // First make the ideal, continuous bid, that does not care about discrete running modes.\n rawBid = Bid.create(marketBasis)\n .add(priceOf(minPriority), maxDemand)\n .add(priceOf(maxPriority), minDemand)\n .build();\n\n // Now construct actual bid\n double[] rawDemand = rawBid.getDemand();\n newBid = new UnconstrainedBidElement[rawDemand.length];\n for (int i = 0; i < rawDemand.length; i++) {\n newBid[i] = getClosest(rawDemand[i]);\n }\n }", "public void setPriceMode(final ProductPriceModeEnum priceMode);", "public BigDecimal getBSCA_ProfitPriceLimit();", "public BigDecimal getBSCA_ProfitPriceLimitEntered();", "BigDecimal getOpenPrice();", "public BigDecimal getPriceLimit();", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "public BigDecimal getPriceLimitEntered();", "BigDecimal getLowPrice();", "@Override\r\n public double getBidEvaluation(Bid bid) {\r\n double BidUtil = 0;\r\n try {\r\n BidUtil = opponentUtilitySpace.getUtility(bid);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return BidUtil;\r\n }", "public abstract Bid chooseOpeningBid();", "public BigDecimal getActualBidPrice() {\n return actualBidPrice;\n }", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.roomprice.v1.RoomPrice getRoomPriceReq(RoomPrice roomPrice){com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.roomprice.v1.RoomPrice roomPriceReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.roomprice.v1.RoomPrice();\n\t\t\n\t\t\t\t//Setting two more fields to hold transfer cost and hotel cost\n\t\t\troomPriceReq.setHotelCost(roomPrice.getHotelCost());\n\t\t\troomPriceReq.setTransferCost(roomPrice.getTransferCost());\n\t\n\t\n\t\n\t\troomPriceReq.setHotelId( new Integer( roomPrice.getHotelId() ) );\n\t\troomPriceReq.setRoomCategoryId( new Integer( roomPrice.getRoomCategoryId() ) );\n\t\troomPriceReq.setRoomId( new Byte( roomPrice.getRoomId() ) );\n\t\troomPriceReq.setTotalAmount( new Double( roomPrice.getTotalAmount() ) );\n\t\troomPriceReq.setTax( new Double( roomPrice.getTax() ) );\n\t\troomPriceReq.setCommissionAmount( new Double( roomPrice.getCommissionAmount() ) );\n\t\troomPriceReq.setCommissionPercent( new Double( roomPrice.getCommissionPercent() ) );\n\t\troomPriceReq.setLateFee( new Double( roomPrice.getLateFee() ) );\n\t\troomPriceReq.setFreeNights( new Integer( roomPrice.getFreeNights() ) );\n\t\troomPriceReq.setPromoSavingsAmount( new Double( roomPrice.getPromoSavingsAmount() ) );\n\t\troomPriceReq.setSavings( new Double( roomPrice.getSavings() ) );\n\t\troomPriceReq.setCurrency( roomPrice.getCurrency() );\n\t\troomPriceReq.setPriceChanged( new Boolean( roomPrice.isPriceChanged() ) );\n\t\troomPriceReq.setGuestAllocation( roomPrice.getGuestAllocation() );\n\t\troomPriceReq.setPackagePrice( new Double( roomPrice.getPackagePrice() ) );\n\t\troomPriceReq.setPerAdultBasePrice( new Double( roomPrice.getPerAdultBasePrice() ) );\n\t\troomPriceReq.setPerAdultBasePriceSavings( new Double( roomPrice.getPerAdultBasePriceSavings() ) );\n\t\tif( roomPrice.getPaxBasePrices() != null ){\n\t\t\troomPriceReq.setPaxBasePrices( this.getPaxTypeBasePricesReq( roomPrice.getPaxBasePrices() ) );\n\t\t}\n\t\tif( (roomPrice.getPaxTypePriceBreakups() != null) && (roomPrice.getPaxTypePriceBreakups().size() > 0) ){\n\t\t\tfor(int i=0; i < roomPrice.getPaxTypePriceBreakups().size(); i++){\n\t\t\t\troomPriceReq.getPaxTypePriceBreakups().add( this.getPaxTypePriceBreakupReq(roomPrice.getPaxTypePriceBreakups().get(i)) );\n\t\t\t}\n\t\t}\n\t\n\t\treturn roomPriceReq;\n\t}", "public WebElement atmPaymode() {\n\t\treturn findElement(repositoryParser, PAGE_NAME, \"atmPay\");\n\t}", "@JsonProperty(\"priceMode\")\n public ProductPriceModeEnum getPriceMode();", "BigDecimal getClosePrice();", "public boolean isSetPriceLimit();", "public boolean isSetB2bprice() {\n return __isset_bit_vector.get(__B2BPRICE_ISSET_ID);\n }", "public int getWinningBid() {\n return winningBid;\n }", "public Boolean isBigTrade() {\n\t\treturn null;\r\n\t}", "BigDecimal getHighPrice();", "public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.25;\n } else {\n price += 0.75;\n }\n }\n return price;\n }", "public int getWinningBid() {\n return this.winningBid;\n }", "public BigDecimal getPriceLimitOld();", "@Override\r\n public BidDetails determineNextBid() {\r\n\r\n double time = negotiationSession.getTime();\r\n\r\n // for the first 20% of the time, offer the bid which gives max utility\r\n if(time < Offer_Max_Util_Time){\r\n BidDetails maxBid = null;\r\n try {\r\n maxBid = this.outcomespace.getMaxBidPossible();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Exception: cannot generate max utility bid\");\r\n }\r\n return maxBid;\r\n\r\n }else {\r\n //compute the target utility based on time\r\n double utilityGoal = p(time);\r\n // if there is no opponent model available\r\n if (opponentModel instanceof NoModel) {\r\n // generate a Bid near the Utility we wish to have\r\n nextBid = negotiationSession.getOutcomeSpace().getBidNearUtility(utilityGoal);\r\n } else {\r\n // get the best Bid for the Opponent among a list of similarly preferred bids for our Agent\r\n // Then, make an offer with that bid\r\n nextBid = omStrategy.getBid(outcomespace, utilityGoal);\r\n }\r\n }\r\n return nextBid;\r\n }", "public static WSPricingModel valueOf(PricingModel pricingModel)\r\n\t{\r\n\t\tfor(WSPricingModel model : WSPricingModel.values())\r\n\t\t\tif(model.getPricingModel() == pricingModel)\r\n\t\t\t\treturn model;\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public Integer getPrice(VideoTypeEnum videoTypeId);", "public synchronized WebElement productPrice() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_priceRange\", \"| Mark down price not present\");\n\t}", "private void checkSecondPriceAuctions() {\n\n // Get all auctions of according type.\n TypedQuery<Auction> auctionByTypeQuery = getAuctionByTypeQuery(AuctionType.SECOND_PRICE);\n List<Auction> secondPriceResultList = auctionByTypeQuery.getResultList();\n\n // Get current timestamp for comparison.\n DateTime now = new DateTime(DateTimeZone.forID(\"Europe/Berlin\"));\n Date nowDate = now.toDate();\n\n // Filter all auctions that have timed out.\n List<Auction> timeoutSecondPriceAuctions = secondPriceResultList\n .stream()\n .filter(auction -> nowDate.compareTo(auction.getEndTime()) == 1 && auction.isRunning()).collect(Collectors.toList());\n\n // Check if there are any auction that have timed out.\n if (timeoutSecondPriceAuctions.size() > 0) {\n\n for (Auction auction : timeoutSecondPriceAuctions) {\n\n // Stop auction and get its bidders.\n auction.setRunning(false);\n List<Bid> auctionBids = new ArrayList<>();\n List<Bidder> bidder = auction.getBidder();\n\n // Continue only if there are any bidders.\n if (bidder.size() > 0) {\n\n for (Bidder bidderElem : bidder) {\n auctionBids.addAll(bidderElem.getBids());\n }\n\n // Find winner only if registered bidders have bidden.\n if (auctionBids.size() > 0) {\n\n // Sort bids ascending according to their value.\n auctionBids.sort(new BidComperator());\n Bid winningBid = auctionBids.get(0);\n\n // If there is only one bid the bidder has to pay the price\n // originally entered by the article owner, which is basically the second highest\n // amount possible.\n BigDecimal priceToPay = null;\n if (auctionBids.size() == 1) {\n priceToPay = auction.getPrice();\n } else {\n // If there is more than one bid, the winner is still the bidder with\n // the highest bid, but the price he has to pay is the second highest bid.\n priceToPay = auctionBids.get(1).getAmount();\n }\n\n // Get user from Liferay to have access to user related data such as name and mail address.\n long winningUserId = winningBid.getBidder().getUserId();\n try {\n\n User userById = UserLocalServiceUtil.getUserById(winningUserId);\n AuctionResult auctionResult = new AuctionResult();\n auctionResult.setDescription(auction.getArticle().getShortDesc());\n auctionResult.setPrice(priceToPay);\n auctionResult.setFirstName(userById.getFirstName());\n auctionResult.setSurname(userById.getLastName());\n auctionResult.setMail(userById.getEmailAddress());\n auctionResult.setAuctionType(auction.getAuctionType());\n entityManager.persist(auctionResult);\n } catch (Exception e) {\n\n entityManager.getTransaction().rollback();\n }\n }\n }\n }\n }\n }", "com.cantor.drop.aggregator.model.CFTrade.Capacity getCapacity();", "BigDecimal getDirtyPrice();", "public String getUnitPrice() {\n\t\tPrice discountP=null;\n\t\tdouble disAmount=this.price.getBasePrice();\n\t\tPrice p=new Price(this.price.getBasePrice());\n\t\tif(this.getDiscount()!=null){\n\t\t\tif(this.getDiscount().getSkuLimit() > 0 && !this.price.getBasePriceUnit().equalsIgnoreCase(\"lb\") && this.getDiscount().getSkuLimit() != this.getQuantity()) {\n\t\t\t\t\n\t\t\t\tdisAmount=this.price.getBasePrice();\n\t\t\t\t\n\t\t\t//APPDEV-4148-Displaying unit price if quantity is greater than sku limit - START\n\t\t\t\t\n\t\t\t\tif(this.getDiscount().getSkuLimit() < this.getQuantity()){\n\t\t\t\t\tif(this.getDiscount().getDiscountType().equals(EnumDiscountType.PERCENT_OFF))\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdisAmount=((this.price.getBasePrice() * this.getQuantity()) - ((this.price.getBasePrice() * this.getDiscount().getSkuLimit()) * this.getDiscount().getAmount() )) / this.getQuantity();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdisAmount=((this.price.getBasePrice() * (this.getQuantity())) - (this.getDiscount().getAmount() * this.getDiscount().getSkuLimit()))/ this.getQuantity() ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//APPDEV-4148-Displaying unit price if quantity is greater than sku limit - END\n\t\t\t\t\n\t\t\t} else if(this.getDiscount().getSkuLimit() > 0 && this.price.getBasePriceUnit().equalsIgnoreCase(\"lb\") && this.getDiscount().getDiscountType().equals(EnumDiscountType.DOLLAR_OFF)) {\n\t\t\t\tdisAmount=this.price.getBasePrice();\n\t\t\t} else {\n\t\t\t\tif(this.getDiscount().getMaxPercentageDiscount() > 0) {\n\t\t\t\t\tdisAmount = this.orderLine.getPrice()/this.orderLine.getQuantity();\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdiscountP=PricingEngine.applyDiscount(p,1,this.getDiscount(),this.price.getBasePriceUnit());\n\t\t\t\t\t\tdisAmount=discountP.getBasePrice();\n\t\t\t\t\t} catch (PricingException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Apply the coupon discount on top of line item discount and calculate the final base price.\n\t\tif (this.getCouponDiscount() != null) {\n\t\t\ttry {\n\t\t\t\tdiscountP = PricingEngine.applyCouponDiscount(null!=discountP?discountP:p, 1/this.getQuantity(), this.getCouponDiscount(), this.price.getBasePriceUnit());\n\t\t\t\tdisAmount = discountP.getBasePrice();\n\t\t\t} catch (PricingException e) {\n\t\t\t\tdisAmount = 0.0;\n\t\t\t}\n\t\t} \n\t\t\t \n\t\treturn CURRENCY_FORMATTER.format(disAmount) + \"/\" + this.price.getBasePriceUnit().toLowerCase();\n\t}", "public Cut<C> b(BoundType boundType, DiscreteDomain<C> discreteDomain) {\n switch (boundType) {\n case CLOSED:\n return this;\n case OPEN:\n Comparable next = discreteDomain.next(this.a);\n return next == null ? Cut.e() : b(next);\n default:\n throw new AssertionError();\n }\n }", "public DistributionModeInternal getMode() {\n return this.mode;\n }", "public BigDecimal getBSCA_ProfitPriceList();", "@ApiModelProperty(value = \"The price of the top bid order.\")\n public BigDecimal getBidPrice() {\n return bidPrice;\n }", "public BigDecimal getBSCA_ProfitPriceListEntered();", "public Cut<C> b(BoundType boundType, DiscreteDomain<C> discreteDomain) {\n switch (boundType) {\n case CLOSED:\n Comparable previous = discreteDomain.previous(this.a);\n return previous == null ? Cut.e() : new AboveValue<>(previous);\n case OPEN:\n return this;\n default:\n throw new AssertionError();\n }\n }", "public interface StrategyLegTradePrice {\n\t\n\t/**\n\t * The following constants defines leg trade price's relation \n\t * to the leg market.\n\t * \n\t * NOT_APPLY: no relation check \n\t * MARKET_INVERTED: the bid ask price is inverted\n\t * IN_BETWEEN: price above the bid, and below the ask.\n\t * TOUCH_CBOE_BID: price touches CBOE bid and CBOE bid is the BB\n\t * TOUCH_CBOE_ASK: price touches CBOE ask and CBOE ask is the BO\n\t * TOUCH_CBOE_BOTH: price touches CBOE bid and ask, and they are the BBO\n\t * OUTSIDE_BB: price is outside BBO\n\t * OUTSIDE_BO: price is outside BBO\n\t * \n\t */\n\tenum TradePriceMarketRelation\n\t{\n\t\tNOT_APPLY(true, false, false, 0),\n\t\tINCOMPLETE_MARKET(false, false, false, 0),\n\t\tLOCK_AT_LOCKED_MARKET(true, false, false, 0),\n\t\tMARKET_INVERTED(false, true, false, 0),\n\t\tIN_BETWEEN(true, false, false, 0),\n\t\tIN_NO_ASK(true, false, false, 0),\n\t\tTOUCH_CBOE_BID_NO_ASK(true, true, false, +1),\n\t\tTOUCH_CBOE_BID_WIDER_THAN_TICK(true, true, false, +1),\n\t\tTOUCH_CBOE_ASK_WIDER_THAN_TICK(true, true, false, -1),\n\t\tTOUCH_CBOE_BID_TICK_WIDE(true, true, true, +1),\n\t\tTOUCH_CBOE_ASK_TICK_WIDE(true, true, true, -1),\n\t\tTOUCH_CBOE_BOTH(true, true, false, 0),\n\t\tOUTSIDE_BB(false, false, false, +1),\n\t\tOUTSIDE_BO(false, false, false, -1);\n\n\t\tpublic final boolean validTradePrice;\n\t\tpublic final boolean touchMarket;\n\t\tpublic final boolean tickWideAndTouchMarket;\n\t\tpublic final int adjustDirection;\n\n\t\tTradePriceMarketRelation(\n\t\t\t\tboolean validTradePrice,\n\t\t\t\tboolean touchMarket,\n\t\t\t\tboolean tickWideAndTouchMarket,\n\t\t\t\tint adjustDirection)\n\t\t{\n\t\t\tthis.validTradePrice = validTradePrice;\n\t\t\tthis.touchMarket = touchMarket;\n\t\t\tthis.tickWideAndTouchMarket = tickWideAndTouchMarket;\n this.adjustDirection = adjustDirection;\n\t\t}\n\t}\n \n\t/**\n\t * Gets the ratio quantity of the leg.\n\t */\n\tint getRatioQuantity();\n\n\t/**\n\t * Gets the side of the leg.\n\t */\n\tSide getSide();\n\n\t/**\n\t * Gets the price at which the leg should be traded. Without split trade, the length is one.\n * With split trade, the length is two.\n\t */\n\tPrice[] getTradePrices();\n\n /**\n * get the first element of trade prices. This is basically a convenient method for non split trade\n */\n Price getTradePrice();\n\n\t/**\n\t * Gets the trading product.\n\t */\n\tTradingProduct getTradingProduct();\n\n /**\n * Gets the product key.\n */\n int getProductKey();\n\n /**\n * Return a boolean to indicate if the split trading method has been employed\n * in the process of calculating the trade prices for the leg\n */\n boolean splitTradingEmployed();\n\n /**Return an array with two numbers ( x + y = 1) which tells how to split the volume.\n * The first number corresponding to the first trade price and second number corresponding\n * to the second price of the results of getTradePrices().\n *\n * Note: if splitTradingEmployed() return false, the result of this method is not defined.\n */\n double[] getSplitRatios();\n}", "public BoundCodeDt<InstanceAvailabilityEnum> getAvailabilityElement() { \n\t\tif (myAvailability == null) {\n\t\t\tmyAvailability = new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myAvailability;\n\t}", "public BoundCodeDt<InstanceAvailabilityEnum> getAvailabilityElement() { \n\t\tif (myAvailability == null) {\n\t\t\tmyAvailability = new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myAvailability;\n\t}", "com.google.openrtb.OpenRtb.BidResponse getBidresponse();", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.paxtypepricebreakup.v1.PaxTypePriceBreakup getPaxTypePriceBreakupReq(PaxTypePriceBreakup paxTypePriceBreakup){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.paxtypepricebreakup.v1.PaxTypePriceBreakup paxTypePriceBreakupReq =\n\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.paxtypepricebreakup.v1.PaxTypePriceBreakup();\n\t\t\n\t\tpaxTypePriceBreakupReq.setPaxType( Character.toString( paxTypePriceBreakup.getPaxType() ) );\n\t\tpaxTypePriceBreakupReq.setCount( new Integer( paxTypePriceBreakup.getCount() ) );\n\t\tpaxTypePriceBreakupReq.setTaxes( new Double( paxTypePriceBreakup.getTaxes() ) );\n\t\tpaxTypePriceBreakupReq.setPrice( new Double( paxTypePriceBreakup.getPrice() ) );\n\t\tpaxTypePriceBreakupReq.setUsTax( new Double( paxTypePriceBreakup.getUsTax() ) );\n\t\tpaxTypePriceBreakupReq.setForeignTax( new Double( paxTypePriceBreakup.getForeignTax() ) );\n\t\tpaxTypePriceBreakupReq.setAirportTax( new Double( paxTypePriceBreakup.getAirportTax() ) );\n\t\tpaxTypePriceBreakupReq.setTotalAmount( new Double( paxTypePriceBreakup.getTotalAmount() ) );\n\t\tpaxTypePriceBreakupReq.setTypeRule( paxTypePriceBreakup.getTypeRule() );\n\t\tpaxTypePriceBreakupReq.setMinAge( new Byte( paxTypePriceBreakup.getMinAge() ) );\n\t\tpaxTypePriceBreakupReq.setMaxAge( new Byte( paxTypePriceBreakup.getMaxAge() ) );\n\t\tpaxTypePriceBreakupReq.setSavings( new Double( paxTypePriceBreakup.getSavings() ) );\n\t\tpaxTypePriceBreakupReq.setRoomId( new Byte( paxTypePriceBreakup.getRoomId() ) );\n\t\tpaxTypePriceBreakupReq.setAge( new Byte( paxTypePriceBreakup.getAge() ) );\n\t\t\n\t\treturn paxTypePriceBreakupReq;\n\t}", "public boolean isSetC2bprice() {\n return __isset_bit_vector.get(__C2BPRICE_ISSET_ID);\n }", "public int selectCeilBitrate(double throughput) {\n// int pre = selectFloorBitrate(Thrp);\n// return nextBitrate(pre);\n //code cũ sai trong trư�ng hợp throughput < tất cả bitrate. Khi đó nó sẽ ch�n 0, và next tức là 1. Trong khi mình muốn cái 0.\n int i = 0;\n while (i < NUMBER_OF_BITRATES - 1 && bitrateArray[i] < throughput) i++;\n return bitrateArray[i];\n }", "public BigDecimal getPriceActual();", "public com.felania.msldb.MsgPriceOuterClass.MsgPrice.Builder getPriceBuilder() {\n \n onChanged();\n return getPriceFieldBuilder().getBuilder();\n }", "public double getCellUpperPrice() {\r\n\t\treturn CellUpperPrice;\r\n\t}", "@Override\n public float getProductPrice() {\n return ProductPrice.REFLECTIONS_II_BOOSTER_PACK;\n }", "public abstract boolean isAcceptable(Bid plannedBid);", "@RequestMapping(value=\"/affordable/{price}\", method=RequestMethod.GET)\r\n @ApiMethod(description = \"Get all hotel bookings there is a price per night less than provided value\")\r\n public List<HotelBooking> getAffordable(@ApiPathParam(name=\"price\") @PathVariable double price) {\r\n return this.bookingRepository.findByPricePerNightLessThan(price);\r\n }", "public double getBidEvaluation(Bid bid) {\n\t\tdouble result = 0;\n\t\tif (issueEvaluationList.isReady()) {\n\t\t\tList<Issue> issues = negotiationSession.getUtilitySpace().getDomain().getIssues();\n\n\t\t\tdouble totalEstimatedUtility = 0;\n\t\t\tfor (Issue issue : issues) {\n\t\t\t\ttry {\n\t\t\t\t\tint issueID = issue.getNumber();\n\n\t\t\t\t\t// Get the estimated normalized weight of the issue, which\n\t\t\t\t\t// indicates how important the issue is.\n\t\t\t\t\tdouble issueWeight = this.issueEvaluationList.getNormalizedIssueWeight(issueID);\n\n\t\t\t\t\t// Get the estimated normalized weight of the value of the\n\t\t\t\t\t// issue, which corresponds to the value that has\n\t\t\t\t\t// been offered in the bid.\n\t\t\t\t\tValue offeredValue = bid.getValue(issueID);\n\t\t\t\t\tAIssueEvaluation issueEvaluation = this.issueEvaluationList.getIssueEvaluation(issueID);\n\t\t\t\t\tdouble offeredValueWeight = issueEvaluation.getNormalizedValueWeight(offeredValue);\n\n\t\t\t\t\t// Since all issueWeights combined should add up to 1, and\n\t\t\t\t\t// the maximum value of the valueWeight is 1,\n\t\t\t\t\t// the estimated utility should be exactly 1 if all offered\n\t\t\t\t\t// valueWeights are 1. So to calculate the partial estimated\n\t\t\t\t\t// utility for this specific issue-value combination, we\n\t\t\t\t\t// need to multiply the weights.\n\t\t\t\t\ttotalEstimatedUtility += (issueWeight * offeredValueWeight);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Make sure to remove roundoff errors from the utility.\n\t\t\tresult = Math.min(1, Math.max(0, totalEstimatedUtility));\n\t\t}\n\t\treturn result;\n\t}", "public String getBuy_mode() {\r\n\t\treturn buy_mode;\r\n\t}", "public PriceEntry toProto() {\n return PriceEntry.newBuilder().setId(getId()).setProductId(getProduct_id())\n .setPrice(getPrice()).setCreatedTime(convertDate2String(getCreatedTime()))\n .setUpdatedTime(convertDate2String(getUpdatedTime())).build();\n }", "public UnconstrainedBid(UnconstrainedBidElement element, MarketBasis marketBasis) {\n this(Collections.<UnconstrainedBidElement> singleton(element), marketBasis);\n }", "public String getIsFixPrice();", "public ThreadCapsuleInt getThreadCapsule(){\n\n\tif(poolLocked)return null;\n\telse{\n\n\t tempThreadCapsule=(ThreadCapsuleInt)passivePool.pop();\n\n\t if(tempThreadCapsule == null) return tempThreadCapsule;\n\t else{\n\n\t\tactivePool.add(tempThreadCapsule);\n\t\tactivePoolSize=activePool.getPresentSize();\n\t\tpassivePoolSize=passivePool.getPresentSize();\n\n\t\treturn tempThreadCapsule;\n\n\t }//else closing\n\n\t}//else closing\n\n }", "public static PresentValueCurveSensitivityBlackCalculator getInstance() {\n return INSTANCE;\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_MONETARY_SYSTEM_CURRENCY_ISSUANCE;\n }", "public PricingModel getPricingModel()\r\n\t{\r\n\t\treturn pricingModel;\r\n\t}", "public Point getBlackPool(){\n return new Point(blackPool, blackCapPool);\n }", "@Override\n\tpublic double GetValue() {\n\t\tdouble spot = inputs.getSpot();\n\t\tdouble strike = inputs.getStrike();\n\t\tdouble vol = inputs.getVol();\n\t\tint noSteps=inputs.getNoSteps();\n\t\tdouble expiry=inputs.getExpiry();\n\t OptionType type=inputs.getType();\n\t ExerciseType exercise=inputs.getExercise();\n\t InterestRate interestRate=inputs.getR();\n\t\t\n\t double timestep = expiry/noSteps;\n\t double DF = Math.exp(-interestRate.GetRate(1.)*timestep);\n\t double temp1 = Math.exp((interestRate.GetRate(1.) + vol * vol)*timestep);\n\t double temp2 = 0.5 * (DF + temp1);\n\t double up = temp2 + Math.sqrt(temp2*temp2 - 1);\n\t double down = 1/ up;\n\t double probaUp = (Math.exp(interestRate.GetRate(1.) * timestep) - down)/(up -down) ;\n\t double probaDown = 1 - probaUp;\n\n\t //stock price tree\n\t\tstockPrice[0][0]=spot;\n\t for (int n = 1; n <= noSteps; n ++) {\n for (int j = n; j > 0; j--){\n \tstockPrice[j][n] = up * stockPrice[j-1][n-1];\n }\n \t\tstockPrice[0][n] = down * stockPrice[0][n-1];\n }\n\t \n\t //last column set payoffs\n\t\tfor (int j = 0; j <= noSteps; j++) {\n\t\t\t\tif(type.equals(OptionType.CALL)) {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(this.stockPrice[j][noSteps] - strike, .0);\n\t\t\t\t}else {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(strike - this.stockPrice[j][noSteps], .0);\n\t\t\t\t}\n\t\t}\n\n\t\t\n\t //payoff tree in backwardation\n\t \n\t for (int i = noSteps ; i >= 1; i--) {\n for (int j = 0; j <= i-1; j++) {\n\t \tif(exercise.equals(ExerciseType.AMERICAN)) { \n\t //American\t\n\t \t\tif(type.equals(OptionType.CALL)) {\n\t \t\t\t\tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(this.stockPrice[j][i-1] - strike, .0));\n\t \t\t\t\n\t \t\t}else \tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(strike - this.stockPrice[j][i-1] , .0));\n\t \t}else { \n\t \t\t\t//European put and call option\n\t \t\t\t\tpayOff[j][i-1] = DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]);\n\t }\n }\n }\n\t \n\t double deltaUp = (payOff[0][2]-payOff[1][2])/(stockPrice[0][2]-stockPrice[1][2]);\n\t double deltaDown = (payOff[1][2]-payOff[2][2])/(stockPrice[1][2]-stockPrice[2][2]);\n\t delta = (deltaUp + deltaDown) /2;\n\t gamma = (deltaUp-deltaDown)/((stockPrice[0][2]-stockPrice[2][2])/2);\n\t theta = (payOff[1][2]-payOff[0][0])/(365*2*timestep);//time in days\n\t \n\t long rounded = Math.round(payOff[0][0]*10000);\n\t return rounded/10000.0;\n\t}", "CleanPrice getCleanPrice();", "public TaskStack getVisibleHwMulitWindowStackLocked(int mode) {\n if (!(mode == 100 || mode == 101)) {\n return null;\n }\n for (int i = DisplayContent.this.mTaskStackContainers.getChildCount() - 1; i >= 0; i--) {\n TaskStack stack = (TaskStack) DisplayContent.this.mTaskStackContainers.getChildAt(i);\n if (stack != null) {\n int windowingMode = stack.getWindowingMode();\n if (windowingMode == 1) {\n return null;\n }\n if (windowingMode == mode) {\n return stack;\n }\n }\n }\n return null;\n }", "public BigDecimal getActualSellingPrice() {\n return actualSellingPrice;\n }", "BigDecimal getPrice();", "public BigDecimal getAvailable() {\n return available;\n }", "public double getPriceFromAvailability(Availability availability){\n for(int i=0; i<prices.size(); i++){\n if (prices.get(i).getFlightNumber().equals(availability.getFlightNumber()) && prices.get(i).getClassCode().equals(availability.getClassCode()) && prices.get(i).getEndDate().after(availability.getDepartureDate()) && prices.get(i).getStartDate().before(availability.getDepartureDate()) ){\n return prices.get(i).getPrice();\n }\n }\n return Integer.MAX_VALUE;\n }", "private Bid fixedPrice(int turn, int price) {\r\n\t\tfor(int i = 0; i < players.length-1; i++) {\r\n\t\t\tint biddingTurn = (turn+i+1)%players.length;\r\n\t\t\tif(players[biddingTurn].buy(price)) {\r\n\t\t\t\treturn new Bid(biddingTurn, price);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Bid(turn,price);\r\n\t}", "public boolean isSetBidPrice() {\n return EncodingUtils.testBit(__isset_bitfield, __BIDPRICE_ISSET_ID);\n }", "protected Job getNextJobInReadyQueue(long tick) {\n Job targetJob = null;\n int highestActivePriority = 0;\n\n for (Job job : nextJobOfATask.values()) {\n if (job.releaseTime > tick)\n continue;\n if (job.task.getPriority() > highestActivePriority) {\n highestActivePriority = job.task.getPriority();\n targetJob = job;\n }\n }\n return targetJob;\n }", "public int getSellPrice(){\n\t\treturn (int)(price * 0.6);\n\t}", "public BigDecimal getPrice() {\n return (BigDecimal)getAttributeInternal(PRICE);\n }", "Bid getNewBidWithUtil(double ourUtility, BidSpace bs) {\n\t\tBidPoint bestbid = null;\n\t\tdouble bestbidutil = 0;\n\t\tfor (BidPoint p : bs.bidPoints) {\n\t\t\tif (Math.abs(\n\t\t\t\t\tourUtility - p.getUtilityA()) < ALLOWED_UTILITY_DEVIATION\n\t\t\t\t\t&& p.getUtilityB() > bestbidutil\n\t\t\t\t\t&& !myPreviousBids.contains(p.getBid())) {\n\t\t\t\tbestbid = p;\n\t\t\t\tbestbidutil = p.getUtilityB();\n\t\t\t}\n\t\t}\n\t\tif (bestbid == null)\n\t\t\treturn null;\n\t\treturn bestbid.getBid();\n\t}", "EDataType getActivePower();", "int getSellCurrent();", "public String getStandardPriceFromGeneralTab(){\r\n\t\t\r\n\t\treturn McsElement.getElementByAttributeValueAndParentElement(driver, \"div\", \"@class\", PURCHASING_PRODUCT_WINDOW_CLASS, \"input\", \"@name\", \"standardPrice\", true, true).getAttribute(\"value\");\r\n\t\t\r\n\t}", "ElementCircuit getCible();", "int getWinCondition();", "com.felania.msldb.MsgPriceOuterClass.MsgPrice getPrice();", "private void processLowValue(Bid bid) {\n\t}", "protected RatingResult performRateEvaluationTiered(String PriceModel, ArrayList<RateMapEntry> tmpRateModel, double valueToRate, double valueOffset, long CDRDate, boolean BreakDown) throws ProcessingException {\n RatingResult tmpRatingResult = new RatingResult();\n int index = 0;\n double AllTiersValue = 0;\n RatingBreakdown tmpBreakdown;\n\n // check that we have something to work on\n if (tmpRateModel == null) {\n throw new ProcessingException(\"Price Model <\" + PriceModel + \"> not defined\", getSymbolicName());\n }\n\n // For multi-packet rating, we have to apply the offset\n double effectiveValueToRate = valueToRate + valueOffset;\n\n // set the default value\n double rumValueUsed = 0;\n double rumValueUsedOffset = 0;\n double roundedRUMUsed = 0;\n\n tmpRatingResult.RatedValue = 0;\n tmpRatingResult.RUMUsed = 0;\n\n // We need to loop through all the tiers until we have finshed\n // consuming all the rateable input\n while (index < tmpRateModel.size()) {\n\n // Get the root price model\n RateMapEntry tmpEntry = tmpRateModel.get(index);\n\n // Get the validty for this cdr\n tmpEntry = getRateModelEntryForTime(tmpEntry, CDRDate);\n\n // Validate that we have something we can work with\n if (tmpEntry == null) {\n message = \"CDR with <\" + CDRDate + \"> date not rated by model <\"\n + PriceModel + \"> because of missing validity coverage\";\n throw new ProcessingException(message, getSymbolicName());\n }\n\n // For positive rating cases\n double thisTierValue;\n double thisTierRUMUsed = 0;\n long thisTierBeatCount = 0;\n double thisTierRoundedRUM;\n\n // For offset rating cases\n double thisTierOffsetRUMUsed = 0;\n long thisTierOffsetBeatCount = 0;\n\n // ********************* Deal with the rating value **********************\n // See if this event crosses the lower tier threshold\n if (effectiveValueToRate > tmpEntry.getFrom()) {\n // see if we use all of the tier\n if (effectiveValueToRate >= tmpEntry.getTo()) {\n // Calculate the amount in this tier\n thisTierRUMUsed = (tmpEntry.getTo() - tmpEntry.getFrom());\n rumValueUsed += thisTierRUMUsed;\n\n // Get the number of beats in this tier\n thisTierBeatCount = Math.round(thisTierRUMUsed / tmpEntry.getBeat());\n\n // Deal with unfinished beats\n if ((thisTierRUMUsed - thisTierBeatCount * tmpEntry.getBeat()) > 0) {\n thisTierBeatCount++;\n }\n\n // Deal with the empty beat\n if (thisTierBeatCount == 0) {\n thisTierBeatCount += 1;\n }\n } else {\n // Partial tier to do, and then we have finished\n thisTierRUMUsed = (effectiveValueToRate - tmpEntry.getFrom());\n rumValueUsed += thisTierRUMUsed;\n\n thisTierBeatCount = Math.round(thisTierRUMUsed / tmpEntry.getBeat());\n\n // Deal with unfinished beats\n if ((thisTierRUMUsed - thisTierBeatCount * tmpEntry.getBeat()) > 0) {\n thisTierBeatCount++;\n }\n\n // Deal with the empty beat\n if (thisTierBeatCount == 0) {\n thisTierBeatCount = 1;\n }\n }\n }\n\n // *********************** Deal with the offset ************************\n if (valueOffset != 0) {\n // See if this event crosses the lower tier threshold\n if (valueOffset > tmpEntry.getFrom()) {\n // see if we use all of the tier\n if (valueOffset >= tmpEntry.getTo()) {\n // Calculate the amount in this tier\n thisTierOffsetRUMUsed = (tmpEntry.getTo() - tmpEntry.getFrom());\n rumValueUsedOffset += thisTierOffsetRUMUsed;\n\n // Get the number of beats in this tier\n thisTierOffsetBeatCount = Math.round(thisTierOffsetRUMUsed / tmpEntry.getBeat());\n\n // Deal with unfinished beats\n if ((thisTierOffsetRUMUsed - thisTierOffsetBeatCount * tmpEntry.getBeat()) > 0) {\n thisTierOffsetBeatCount++;\n }\n\n // Deal with the empty beat\n if (thisTierOffsetBeatCount == 0) {\n thisTierOffsetBeatCount = 1;\n }\n } else {\n // Partial tier to do, and then we have finished\n thisTierOffsetRUMUsed = (valueOffset - tmpEntry.getFrom());\n rumValueUsedOffset += thisTierOffsetRUMUsed;\n\n thisTierOffsetBeatCount = Math.round(thisTierOffsetRUMUsed / tmpEntry.getBeat());\n\n // Deal with unfinished beats\n if ((thisTierOffsetRUMUsed - thisTierOffsetBeatCount * tmpEntry.getBeat()) > 0) {\n thisTierOffsetBeatCount++;\n }\n\n // Deal with the empty beat\n if (thisTierOffsetBeatCount == 0) {\n thisTierOffsetBeatCount = 1;\n }\n }\n }\n }\n\n // Now roll up the rating values\n thisTierRoundedRUM = (thisTierBeatCount - thisTierOffsetBeatCount) * tmpEntry.getBeat();\n thisTierValue = (thisTierRoundedRUM * tmpEntry.getFactor()) / tmpEntry.getChargeBase();\n \n // Only count rounded RUM used for non-singularity steps, otherwise we count more than once\n if (tmpEntry.getFrom() != tmpEntry.getTo()) {\n roundedRUMUsed += thisTierRoundedRUM;\n }\n\n // provide the rating breakdown if it is required\n if (BreakDown) {\n // initialise the breakdown if necessary\n if (tmpRatingResult.breakdown == null) {\n tmpRatingResult.breakdown = new ArrayList<>();\n }\n\n // provide the charging breakdown\n tmpBreakdown = new RatingBreakdown();\n tmpBreakdown.beat = tmpEntry.getBeat();\n tmpBreakdown.beatCount = thisTierBeatCount - thisTierOffsetBeatCount;\n tmpBreakdown.factor = tmpEntry.getFactor();\n tmpBreakdown.chargeBase = tmpEntry.getChargeBase();\n tmpBreakdown.ratedAmount = thisTierValue;\n tmpBreakdown.RUMRated = thisTierRUMUsed - thisTierOffsetRUMUsed;\n tmpBreakdown.stepUsed = index;\n tmpBreakdown.tierFrom = tmpEntry.getFrom();\n tmpBreakdown.tierTo = tmpEntry.getTo();\n tmpBreakdown.validFrom = tmpEntry.getStartTime();\n\n // Store the breakdown\n tmpRatingResult.breakdown.add(tmpBreakdown);\n }\n\n // Increment the tier counter\n index++;\n\n // Accumulate the tier value\n AllTiersValue += thisTierValue;\n }\n\n // Roll up the final values \n tmpRatingResult.RatedValue = AllTiersValue;\n tmpRatingResult.RUMUsed = rumValueUsed - rumValueUsedOffset;\n tmpRatingResult.RUMUsedRounded = roundedRUMUsed;\n\n // return OK\n return tmpRatingResult;\n }", "int getBid();", "public abstract Bid chooseCounterBid();", "public boolean hasPrice() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "protected byte desiredWinScale() { return 9; }", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "@Test\n public void getBoostBoxRequirement_matchesUkSpreadsheet() {\n SiteInfo si = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.UK,\n \"Default Site\"\n );\n\n assertEquals(1.4, si.getBoostBoxRequirement(), 0.05);\n }", "public BigDecimal getSellingPrice() {\n return sellingPrice;\n }", "public double getClosingPrice() {\n return this.closingPrice;\n }", "@ApiModelProperty(value = \"The size of the top bid order.\")\n public BigDecimal getBidSize() {\n return bidSize;\n }", "PriceModel getZeroPriceModel();", "public BigDecimal getCommodityPrice() {\n return commodityPrice;\n }", "boolean hasProductBiddingCategoryConstant();", "private void processSuperHighValue(Bid bid) {\n\t}", "public BigDecimal getMarketPrice() {\n return marketPrice;\n }", "public boolean hasPrice() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "public boolean getSystemPricingFlag() {\n\t\t// TODO staviti u varbs...\n\t\treturn SYSTEM_PRICING_FLAG;\n\t}", "private ManufactureProcess getRunningManufactureProcess() {\n\t\tManufactureProcess result = null;\n\n\t\tint skillLevel = getEffectiveSkillLevel();\n\t\tIterator<ManufactureProcess> i = workshop.getProcesses().iterator();\n\t\twhile (i.hasNext() && (result == null)) {\n\t\t\tManufactureProcess process = i.next();\n\t\t\tif ((process.getInfo().getSkillLevelRequired() <= skillLevel) && (process.getWorkTimeRemaining() > 0D)) {\n\t\t\t\tresult = process;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}" ]
[ "0.47164", "0.4615696", "0.45672724", "0.4516371", "0.445015", "0.44156533", "0.43511775", "0.43299708", "0.4303648", "0.42750403", "0.4255609", "0.42546806", "0.42498285", "0.4215314", "0.41760403", "0.41667277", "0.4158972", "0.41580185", "0.41430247", "0.41354933", "0.41230613", "0.4121691", "0.409393", "0.40651473", "0.40619698", "0.4060569", "0.40545803", "0.40535894", "0.40474275", "0.40470454", "0.403462", "0.4029907", "0.40292826", "0.40111497", "0.4010816", "0.40062338", "0.40006813", "0.39985523", "0.3995217", "0.3987905", "0.3986343", "0.3986343", "0.39790624", "0.3977955", "0.3968945", "0.39631268", "0.3963122", "0.3955425", "0.39552552", "0.39487037", "0.39439932", "0.39368892", "0.39352334", "0.39337394", "0.39280748", "0.39051825", "0.39033628", "0.39021248", "0.39019006", "0.3897425", "0.38923132", "0.38881734", "0.38880908", "0.38868272", "0.3865762", "0.386554", "0.38652298", "0.38646418", "0.3856767", "0.3847431", "0.38374314", "0.38317236", "0.38311252", "0.38310528", "0.3827847", "0.3824468", "0.38131067", "0.38013753", "0.37917387", "0.37831298", "0.37826222", "0.37773013", "0.3771694", "0.37699956", "0.3769872", "0.37628213", "0.3761281", "0.37611175", "0.375948", "0.3757295", "0.37553334", "0.37548122", "0.37540683", "0.37538698", "0.37533343", "0.37504143", "0.3747629", "0.3741862", "0.374172", "0.37410405" ]
0.6981807
0
Produces the Bid object on the basis of the prepared info.
public Bid toBid() { double[] demand = new double[newBid.length]; for (int i = 0; i < newBid.length; i++) { demand[i] = newBid[i].demandWatt; } return new Bid(marketBasis, demand); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BInformation findOne(Long id);", "public Bid assembleBid(BidDTO bidDTO) {\r\n AuctionPersistenceHelper.validateNotNull(bidDTO, \"bidDTO\");\r\n\r\n CustomBid bid = new CustomBid(bidDTO.getBidderId(), bidDTO.getImageId(), bidDTO.getMaxAmount(),\r\n bidDTO.getTimestamp());\r\n\r\n if (bidDTO.getEffectiveAmount() != null) {\r\n bid.setEffectiveAmount(bidDTO.getEffectiveAmount().intValue());\r\n }\r\n\r\n if (bidDTO.getId() != null) {\r\n bid.setId(bidDTO.getId().longValue());\r\n }\r\n\r\n return bid;\r\n }", "public Bid() {}", "java.lang.String getBidid();", "public BidDTO assembleBidDTO(Bid bid) {\r\n AuctionPersistenceHelper.validateNotNull(bid, \"bid\");\r\n\r\n if (!(bid instanceof CustomBid)) {\r\n throw new IllegalArgumentException(\"Bid must be an instanceof of CustomBid.\");\r\n }\r\n\r\n CustomBid custonBid = (CustomBid) bid;\r\n BidDTO bidDTO = new BidDTO();\r\n bidDTO.setBidderId(bid.getBidderId());\r\n bidDTO.setEffectiveAmount(bid.getEffectiveAmount());\r\n bidDTO.setMaxAmount(bid.getMaxAmount());\r\n bidDTO.setTimestamp(bid.getTimestamp());\r\n bidDTO.setId(custonBid.getId());\r\n bidDTO.setImageId(custonBid.getImageId());\r\n\r\n return bidDTO;\r\n }", "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n double minPriority = 0.0;\n double maxPriority = 1.0;\n\n // First make the ideal, continuous bid, that does not care about discrete running modes.\n rawBid = Bid.create(marketBasis)\n .add(priceOf(minPriority), maxDemand)\n .add(priceOf(maxPriority), minDemand)\n .build();\n\n // Now construct actual bid\n double[] rawDemand = rawBid.getDemand();\n newBid = new UnconstrainedBidElement[rawDemand.length];\n for (int i = 0; i < rawDemand.length; i++) {\n newBid[i] = getClosest(rawDemand[i]);\n }\n }", "public BookInfoDO(Integer id, String isbn, Integer ownerId, Integer borrowerId, Integer bookStatus, String author, String bookType, String publishers, String pic, String brief, String bookComment, Integer deposit, Integer cost, Date gmtModified, Date gmtCreate, String bookTitile) {\n this.id = id;\n this.isbn = isbn;\n this.ownerId = ownerId;\n this.borrowerId = borrowerId;\n this.bookStatus = bookStatus;\n this.author = author;\n this.bookType = bookType;\n this.publishers = publishers;\n this.pic = pic;\n this.brief = brief;\n this.bookComment = bookComment;\n this.deposit = deposit;\n this.cost = cost;\n this.gmtModified = gmtModified;\n this.gmtCreate = gmtCreate;\n this.bookTitile = bookTitile;\n }", "com.google.protobuf.ByteString\n getBididBytes();", "public void testNewBid(){\n\n Thing thing = new Thing(new User());\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing, borrower, 800);\n }catch(Exception e){\n fail();\n }\n assertEquals(800, bid.getAmount());\n assertEquals(Bid.Per.FLAT, bid.getPer());\n assertEquals(\"8.00\", bid.valueOf());\n assertEquals(\"$8.00\", bid.toString());\n\n }", "@Component\npublic interface BidDao {\n\n /**\n * 通过标id查找该标的信息\n * @return\n */\n @Select(value = \"select id,userId,bidAmount,bidCurrentAmount,bidRepaymentMethod,bidRate,bidDeadline,substr(to_char(bidIssueDate,'yyyy-mm-dd hh24:mi:ss'),0,19) bidIssueDate,bidDeadDay,bidDeadDate,bidApplyDate,bidDesc,bidType from bid_info where id=#{id}\")\n Map getBidInfoById(int id);\n\n /**\n * 根据用户id查找该用户的信息\n * @param userId\n * @return\n */\n @Select(value = \"select realname,sex,address,idnumber,academic,housed,marriage,income from realname_certification where userId=#{userId}\")\n Map getBaseInfoByUserId(int userId);\n\n /**\n * 将投标信息放入到bid_submit投资记录表中\n * @param map\n * @return\n */\n @Insert(value = \"insert into bid_submit values(seq_bidinfo_id.nextval,#{bidid},#{userId},#{bidNum},#{bidRate},sysdate)\")\n int investBid(Map map);\n\n /**\n * 根据标的id来查投该标的总钱数\n * @param map\n * @return\n */\n @Select(value = \"select nvl(sum(bidAmount),0) bidAmount,nvl(sum(bidRate),0) bidRate from bid_submit where bidInfoID=#{bidid}\")\n Map findInvestMoney(Map map);\n\n /**\n * 通过当前用户查找该用户的登录信息\n * @param userId\n * @return\n */\n @Select(value = \"select username,password,telephone from user_login_info where id=#{userId}\")\n Map findUserName(int userId);\n\n /**\n * 根据标id查找该标的投资状况\n * @param id\n * @return\n */\n @Select(value = \"select b.id,b.BIDINFOID,b.BIDAMOUNT,b.BIDRATE,substr(to_char(b.BIDDATE,'yyyy-mm-dd hh24:mi:ss'),0,19) BIDDATE,u.id,u.USERNAME,u.PASSWORD,u.TELEPHONE from bid_submit b left join USER_LOGIN_INFO u on u.ID=b.USERID where b.BIDINFOID=#{id}\")\n List<Map> findInvestInfo(int id);\n\n /**\n * 通过标id找到招标人id\n * @param id\n * @return\n */\n @Select(value = \"select userId from bid_info where id=#{id}\")\n Map findBidUserId(int id);\n\n /**\n * 根据招标人的id查找该人的还款信息\n * @param bidUserId\n * @return\n */\n /*@Select(value = \"select id,bidID,bidRepayAmount,bidRepayDate,bidRepayDeadDate,bidNextRepayDate,bidNextReapyAmount,bidRepayState,bidRepayNumber,bidRepayTotPmts,bidRepayMethod,(select max(bidrepaydeaddate) from bid_repay_info where bidRepayUserID=#{bidUserId}) lastDate from bid_repay_info where bidRepayUserID=#{bidUserId}\")*/\n @Select(value = \"select id,bidID,bidRepayAmount,bidRepayDate,bidRepayDeadDate,substr(to_char(bidNextRepayDate,'yyyy-mm-dd hh24:mi:ss'),0,19) bidNextRepayDate,bidNextReapyAmount,bidRepayState,bidRepayNumber,bidRepayTotPmts,bidRepayMethod,(select substr(to_char(max(bidrepaydeaddate),'yyyy-mm-dd hh24:mi:ss'),0,19) from bid_repay_info where bidRepayUserID=#{bidUserId}) lastDate from bid_repay_info where bidRepayUserID=#{bidUserId}\")\n List<Map> findRepayByBidUserId(int bidUserId);\n\n /**\n * 根据登录人id查找用户的支付密码\n * @param userId\n * @return\n */\n @Select(value = \"select paypwd from user_info where userId=#{userId}\")\n Map getPayPwd(int userId);\n\n /**\n * 根据登录人的id查找该用户的总的待收利息,总的待收本金\n * @param userId\n * @return\n */\n @Select(value = \"select sum(bidrate) bidrate,sum(bidAmount) bidAmount from bid_submit where userId = #{userId}\")\n Map findTotalRateAndMoney(int userId);\n\n /**\n * 根据用户id查找该用户的账户信息表\n * @param userId\n * @return\n */\n @Select(value = \"select id,USERID,AVAILABLEBALANCE,RECEIVEINTEREST,RECEIVEPRINCIPAL,RETURNAMOUNT,FREEZINGAMOUNT,CREDITLINE,SURPLUSCREDITLINE,TRANSACTIONPASSWORD from user_account where userId=#{userId}\")\n Map findUserAccount(int userId);\n\n /**\n * 根据用户的投标相应的更新用户账户表\n * @param userAccountMap\n * @return\n */\n @Update(value = \"update user_account set availableBalance=#{availableBalance},receiveInterest=#{receiveInterest},receivePrincipal=#{receivePrincipal},freezingAmount=#{freezingAmount} where userId = #{userID}\")\n int updateUserAccount(Map userAccountMap);\n\n /**\n * 用户投标之后将该条信息插入到用户账户流水表中去\n * @param map\n * @return\n */\n @Insert(value = \"insert into user_account_flow values(seq_user_account_flow_id.nextval,#{userId},#{accountId},#{amount},#{availableBalance},sysdate,8)\")\n int insertUserAccountFolw(Map map);\n}", "public @NotNull Bidder newBidder();", "public BankThing retrieve(String id);", "@Override\n public int getBidId()\n {\n return 0;\n }", "public int getBid() {\n return instance.getBid();\n }", "public Bids[] populateBids() {\r\n\t\tint bidsLength = bids.size();\r\n\t\tint index = 0;\r\n\t\t\r\n\t\tBids[] auctionBids = new Bids[bidsLength];\r\n\t\tfor(Map.Entry<Integer, Bids> auctions: bids.entrySet()) {\r\n\t\t\tauctionBids[index] = auctions.getValue();\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn auctionBids;\r\n\t\r\n\t}", "int getBId();", "@Override\n\tpublic RotateBID get(String id) {\n\t\tRotateBID rotateBID=dao.get(id);\n\t\t\n\t\tif(\"招标采购\".equals(rotateBID.getBidType())) {\n\t\t\tList<RotateBIDPurchase> purchaseList=dao.listPurchase(id);\n\t\t\trotateBID.setPurchaseList(purchaseList);\n\t\t}else {\n\t\t\tList<RotateBIDSale> saleList=dao.listSale(id);\n\t\t\trotateBID.setSaleList(saleList);\n\t\t}\n\n\t\treturn rotateBID;\n\t}", "public @NotNull Bidder findBidder(@NotNull Identifier identifier) throws BidderNotFoundException, BazaarException;", "public static BidInfo searchBid(String ID) {\n\t\tFile f = new File(\"bids/\" + ID);\n\t\tif (!f.exists())\n\t\t\treturn null;\n\t\ttry {\n\t\t\tScanner bidsParser = new Scanner(f);\n\t\t\tString seller = bidsParser.next();\n\t\t\tString winner = bidsParser.next();\n\t\t\tdouble price = Double.valueOf(bidsParser.next());\n\t\t\tCalendar start = Calendar.getInstance();\n\t\t\tCalendar end = Calendar.getInstance();\n\t\t\t// SimpleDateFormat sdf = new\n\t\t\t// SimpleDateFormat(\"EEE MMM dd HH:mm:ss z yyyy\");\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd-hh.mm.ss\");\n\t\t\ttry {\n\t\t\t\tstart.setTime(sdf.parse(bidsParser.next()));\n\t\t\t\tend.setTime(sdf.parse(bidsParser.next()));\n\t\t\t} catch (ParseException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn new BidInfo(seller, winner, price, start, end);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public String getBid() {\r\n return bid;\r\n }", "Bird findById(String id);", "@Override\r\n\tpublic List<Buss> findbid() {\n\t\treturn dao.findbid();\r\n\t}", "public String getBid() {\n return bid;\n }", "public @NotNull Bid findBid(@NotNull final Identifier identifier) throws BidNotFoundException, BazaarException;", "public int getBId() {\n return bId_;\n }", "public com.google.protobuf.ByteString\n getBididBytes() {\n java.lang.Object ref = bidid_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n bidid_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getBid() {\n return bid_;\n }", "public DoctorRecord(Integer id, Integer age, Integer workTime, Byte sex, String name, String url, Byte duty, String hospitalCode, String certificateCode, String professionalCode, Date registerTime, String registerHospital, String mobile, Integer titleId, BigDecimal consultationPrice, String treatDisease, Byte status, Integer userId, Byte isDelete, Timestamp createTime, Timestamp updateTime, Timestamp onDutyTime, Byte isOnDuty, Byte canConsultation, Integer avgAnswerTime, Integer consultationNumber, BigDecimal avgCommentStar, Integer attentionNumber, String userToken, Timestamp authTime, BigDecimal consultationTotalMoney, Byte isFetch, String signature) {\n super(Doctor.DOCTOR);\n\n set(0, id);\n set(1, age);\n set(2, workTime);\n set(3, sex);\n set(4, name);\n set(5, url);\n set(6, duty);\n set(7, hospitalCode);\n set(8, certificateCode);\n set(9, professionalCode);\n set(10, registerTime);\n set(11, registerHospital);\n set(12, mobile);\n set(13, titleId);\n set(14, consultationPrice);\n set(15, treatDisease);\n set(16, status);\n set(17, userId);\n set(18, isDelete);\n set(19, createTime);\n set(20, updateTime);\n set(21, onDutyTime);\n set(22, isOnDuty);\n set(23, canConsultation);\n set(24, avgAnswerTime);\n set(25, consultationNumber);\n set(26, avgCommentStar);\n set(27, attentionNumber);\n set(28, userToken);\n set(29, authTime);\n set(30, consultationTotalMoney);\n set(31, isFetch);\n set(32, signature);\n }", "public abstract Bid chooseCounterBid();", "protected void prepare()\n\t{\n\t\tlog.info(\"\");\n\t\tm_ctx = Env.getCtx();\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"C_BankStatementLoader_ID\"))\n\t\t\t\tm_C_BankStmtLoader_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse if (name.equals(\"FileName\"))\n\t\t\t\tfileName = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tm_AD_Client_ID = Env.getAD_Client_ID(m_ctx);\n\t\tlog.info(\"AD_Client_ID=\" + m_AD_Client_ID);\n\t\tm_AD_Org_ID = Env.getAD_Org_ID(m_ctx);\n\t\tlog.info(\"AD_Org_ID=\" + m_AD_Org_ID);\n\t\tlog.info(\"C_BankStatementLoader_ID=\" + m_C_BankStmtLoader_ID);\n\t}", "private OwnerBean getOwnerDetails(String query, int id) {\n\t\tResultSet rs=null;\n\t\tOwnerBean owner = new OwnerBean();\n\t\ttry {\n\t\t\t\n\t\t\t//pstmt = con.prepareStatement(query);\n\t\t\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\towner.setoEmail(rs.getString(\"oEmail\"));\n\t\t\t\towner.setoFirstName(rs.getString(\"oFirstName\"));\n\t\t\t\towner.setoLastName(rs.getString(\"oLastName\"));\n\t\t\t\towner.setoPassword(rs.getString(\"oPassword\"));\n\t\t\t\towner.setoPhoneNo(rs.getLong(\"oPhoneNo\"));\n\t\t\t\towner.setOwnerId(rs.getInt(\"ownerId\"));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn owner;\n\t}", "private Bike getBikeFromRS(ResultSet rs){ //Help method to get a bike from a ResultSet query\n try{\n int bID = rs.getInt(cBikeID);\n LocalDate date = rs.getDate(cDate).toLocalDate();\n Double price = rs.getDouble(cPrice);\n String make = rs.getString(cMake);\n int typeId = rs.getInt(cTypeId);\n String typeName = rs.getString(cTypeName);\n double rentalPrice = rs.getDouble(cRentalPrice);\n int stationId = rs.getInt(cStationId);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double lat = rs.getDouble(cLatitude);\n double lng = rs.getDouble(cLongitude);\n double chargingLvl = rs.getDouble(cChargingLevel);\n\n BikeData bd = new BikeData(bID, dateTime, lat, lng, chargingLvl);\n BikeType t = new BikeType(typeName,rentalPrice);\n t.setTypeId(typeId);\n Bike bike = new Bike(date, price, make, t, stationId);\n bike.setBikeId(bID);\n bike.setBikeData(bd);\n return bike;\n }catch(Exception e){\n System.out.println(\"Exception \" + e);\n }\n return null;\n }", "@Override\r\n\tpublic BirdDetail validateBirdDetails(String bdId) throws Exception {\n\t\tBirdDetail birddet=new BirdDetail();\r\n\t\ttry {\r\n\t\t\tsession=sessionfactory.openSession();\r\n\t\t\ttransaction = session.beginTransaction();\r\n\t\t\tString sql=\"select * from tbl_bird bd, tbl_bird_detail bds where bd.BirdId = bds.BdId and bd.BirdId = \"+bdId;\r\n\t\t\tSQLQuery query=session.createSQLQuery(sql);\r\n\t\t\tquery.addEntity(BirdDetail.class);\r\n\t\t\tList<BirdDetail> list = query.list();\r\n\t\t\tbirddet=list.get(0);\r\n\t\t\treturn birddet;\r\n\t\t} catch (HibernateException e) {\r\n\t\t\tlogger.error(\"Exception occurs in \", e);\r\n\t\t}catch(Exception ex){\r\n\t\t\tlogger.error(\"Exception occurs in \", ex);\r\n\t\t}finally{\r\n\t\t\ttry {\r\n\t\t\t\tsession.close();\r\n\t\t\t} catch (HibernateException e) {\r\n\t\t\t\tlogger.error(\"Exception occurs in \", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn birddet;\r\n\t}", "public Auction assembleAuction(AuctionDTO auctionDTO) {\r\n AuctionPersistenceHelper.validateNotNull(auctionDTO, \"auctionDTO\");\r\n\r\n BidDTO[] bidDTOs = auctionDTO.getBids();\r\n Bid[] bids = new Bid[bidDTOs.length];\r\n\r\n for (int i = 0; i < bidDTOs.length; i++) {\r\n bids[i] = assembleBid(bidDTOs[i]);\r\n }\r\n\r\n return new AuctionImpl(auctionDTO.getId(), auctionDTO.getSummary(), auctionDTO.getDescription(),\r\n auctionDTO.getItemCount(), auctionDTO.getMinimumBid(), auctionDTO.getStartDate(), auctionDTO.getEndDate(),\r\n bids);\r\n }", "public com.google.protobuf.ByteString\n getBididBytes() {\n java.lang.Object ref = bidid_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n bidid_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "Book selectByPrimaryKey(String bid);", "public Builder setBididBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n bidid_ = value;\n onChanged();\n return this;\n }", "private Borrower createBorrower() {\n Borrower bor = null;\n try {\n bor = new Borrower(Integer.parseInt(tfBorrowerID.getText()), driver);\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return bor;\n }", "public int getBId() {\n return instance.getBId();\n }", "private Optional<MotorTorpedoBoat> buildBoat(final ShipId shipId) {\n try {\n MotorTorpedoBoat boat = boatDAO.load(shipId);\n boat.setFlotilla(this);\n return Optional.of(boat);\n } catch (ShipyardException ex) {\n log.error(\"Unable to build sub '{}' for side {}\", shipId.getName(), shipId.getSide());\n return Optional.empty();\n }\n }", "public String getBeanBagDetails(String id)\r\n throws BeanBagIDNotRecognisedException, IllegalIDException {\n Check.validID(id);\r\n // Define integer \"n\" and set value to 0.\r\n int n = 0;\r\n // Define string \"Info\" with null value.\r\n String info = \"\";\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the ID in the stockList matches the passed parameter ID.\r\n if (((BeanBag) stockList.get(i)).getID().equals(id)) {\r\n // Set the \"Info\" string to the value stored in the \"stockList\".\r\n info = ((BeanBag) stockList.get(i)).getInformation();\r\n // Increment variable integer \"n\" by 1.\r\n n++;\r\n // Condition met, so break from the loop.\r\n break;\r\n }\r\n }\r\n if (n < 1) {\r\n throw new BeanBagIDNotRecognisedException(\"No BeanBags with this ID have been sold.\");\r\n }\r\n // Return the string \"Info\".\r\n return info;\r\n }", "T buidEntity(ResultSet rs) throws SQLException;", "public abstract Bid chooseFirstCounterBid();", "com.google.openrtb.OpenRtb.BidResponse getBidresponse();", "public BookRecord(Integer id, Integer availableqty, Integer pendingqty, String name, Integer medium, Integer grade, String authorname, Integer noofpages, Integer status, BigDecimal price) {\n super(Book.BOOK);\n\n set(0, id);\n set(1, availableqty);\n set(2, pendingqty);\n set(3, name);\n set(4, medium);\n set(5, grade);\n set(6, authorname);\n set(7, noofpages);\n set(8, status);\n set(9, price);\n }", "BaacDTO findOne(Long id);", "@Override\n\tpublic Besoin getBesion(int idBesion) {\n\t\treturn dao.getBesion(idBesion);\n\t}", "private ApartmentDetailsBean getApartmentInfo(String query, int id) {\n\t\tResultSet rs=null;\n\t\tApartmentDetailsBean apt = new ApartmentDetailsBean();\n\t\ttry {\n\t\t\t\n\t\t\t//pstmt = con.prepareStatement(query);\n\t\t\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\tapt.setApartmentId(rs.getInt(\"apartmentId\"));\n\t\t\t\tapt.setDepositAmt(rs.getInt(\"depositAmt\"));\n\t\t\t\tapt.setRent(rs.getInt(\"rent\"));\n\t\t\t\tapt.setAvailablityFrom(rs.getDate(\"availablityFrom\"));\n\t\t\t\tapt.setUtilities(rs.getString(\"utilities\"));\n\t\t\t\tapt.setArea(rs.getString(\"area\"));\n\t\t\t\tapt.setStreet(rs.getString(\"street\"));\n\t\t\t\tapt.setDoorNo(rs.getString(\"doorNo\"));\n\t\t\t\tapt.setCity(rs.getString(\"city\"));\n\t\t\t\tapt.setno_of_rooms(rs.getInt(\"no_of_rooms\"));\n\t\t\t\tapt.setno_of_bathroom(rs.getInt(\"no_of_bathroom\"));\n\t\t\t\tapt.setFlooring(rs.getString(\"flooring\"));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn apt;\n\t}", "public BookBean retrieveBook(String bid) throws SQLException {\r\n\t\tString query = \"select * from BOOK where bid='\" + bid + \"'\";\t\t\r\n\t\tBookBean book = null;\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bookID = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString bookCategory = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tbook = new BookBean(bookID, title, price,bookCategory);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn book;\r\n\t}", "public Builder setBidid(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n bidid_ = value;\n onChanged();\n return this;\n }", "protected static Book goodBookValues(String bidField, String bnameField, String byearField, String bpriceField, String bauthorField, String bpublisherField) throws Exception{\n Book myBook;\n String [] ID,strPrice;\n String Name;\n int Year;\n double Price;\n \n try{\n ID = bidField.split(\"\\\\s+\"); // split using spaces\n if (ID.length > 1 || ID[0].equals(\"\")) // id should only be one word\n {\n throw new Exception (\"ERROR: The ID must be entered\\n\"); // if the id is empty, it must be conveyed to this user via this exception\n }\n if (ID[0].length() !=6) // id must be 6 digits\n throw new Exception (\"ERROR: ID must be 6 digits\\n\");\n if (!(ID[0].matches(\"[0-9]+\"))) // id must only be numbers\n throw new Exception (\"ERROR: ID must only contain numbers\");\n Name = bnameField;\n if (Name.equals(\"\")) // name must not be blank\n throw new Exception (\"ERROR: Name of product must be entered\\n\");\n if (byearField.equals(\"\") || byearField.length() != 4) // year field cannot be blank\n {\n throw new Exception (\"ERROR: Year of product must be 4 numbers\\n\");\n } else {\n Year = Integer.parseInt(byearField);\n if (Year > 9999 || Year < 1000)\n {\n throw new Exception (\"Error: Year must be between 1000 and 9999 years\");\n }\n }\n \n strPrice = bpriceField.split(\"\\\\s+\");\n if (strPrice.length > 1 || strPrice[0].equals(\"\"))\n Price = 0;\n else\n Price = Double.parseDouble(strPrice[0]);\n \n myBook = new Book(ID[0],Name,Year,Price,bauthorField,bpublisherField);\n ProductGUI.Display(\"Book fields are good\\n\");\n return myBook;\n } catch (Exception e){\n throw new Exception (e.getMessage());\n }\n \n }", "public Bid getfinalBid(List<Bid> bids) {\n\t\t\r\n\t\tBid myBid=null;\r\n\t\tdouble lower=0,upper=0,total=0;\r\n\t\t//briskw meso oro\r\n\t for(int i=0;i<bids.size();i++)\r\n\t {\r\n\t \ttotal=total+US.getUtility(bids.get(i));\t \t\r\n\t }\t\t\r\n\t\tlower=total/bids.size();\r\n\t\tupper=lower;\r\n\t\t\r\n\t\t//anoigo ta oria ean den iparxei bid konta ston meso oro \r\n\t\twhile(myBid==null) {\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<bids.size();i++) {\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdouble util = US.getUtility(bids.get(i));\r\n\t\t\t\t\tif (util >= lower && util <= upper) {\r\n\t\t\t\t\t\tmyBid=bids.get(i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(lower>=0.025 && upper<=0.974) {\r\n\t\t\t\tlower=lower-0.025;\r\n\t\t\t\tupper=upper+0.025;\r\n\t\t\t}\r\n\t\t\telse if (upper>0.974) {\r\n\t\t\t\tlower=lower-0.025;\r\n\t\t\t\tupper=1;\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\treturn myBid;\r\n\t}", "Optional<BannerInfoDTO> findOne(Long id);", "public String getBscid() {\r\n return bscid;\r\n }", "public String getBscid() {\r\n return bscid;\r\n }", "TBBearPer selectByPrimaryKey(Integer id);", "public New getObject(long id);", "public String getBscid() {\n return bscid;\n }", "public String getBscid() {\n return bscid;\n }", "List<Info> getBookInfoById(Long infoId) throws Exception;", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "@Override\r\n\tpublic Bidding getData(byte[] bytes) throws UnsupportedEncodingException {\r\n\t\treturn new Bidding(\r\n\t\t\t\tUtilities.bytesToLong(Utilities.cutBytes(bytes, 0, 8)),\r\n\t\t\t\tUtilities.bytesToString(Utilities.cutBytes(bytes, 8, 28)),\r\n\t\t\t\tUtilities.bytesToInt(Utilities.cutBytes(bytes, 28, 32)),\r\n\t\t\t\tUtilities.cutStringWhitAditionalSpace(Utilities.bytesToString(Utilities.cutBytes(bytes, 32, 62))),\r\n\t\t\t\tTypeProduct.values()[Utilities.bytesToInt(Utilities.cutBytes(bytes, 62, 66))],\r\n\t\t\t\tthis.getProduct(Utilities.cutBytes(bytes, 66, 157)), \t\t\t\t\r\n\t\t\t\tnew BidTime(\r\n\t\t\t\t\t\tnew BidDate(\r\n\t\t\t\t\t\tUtilities.cutStringWhitAditionalSpace(Utilities.bytesToString(Utilities.cutBytes(bytes, 157, 167)))), \r\n\t\t\t\t\t\tUtilities.bytesToFloat(Utilities.cutBytes(bytes, 167, 171))), \r\n\t\t\t\tnew BidTime(\r\n\t\t\t\t\t\tnew BidDate(\r\n\t\t\t\t\t\tUtilities.cutStringWhitAditionalSpace(Utilities.bytesToString(Utilities.cutBytes(bytes, 171, 181)))), \r\n\t\t\t\t\t\tUtilities.bytesToFloat(Utilities.cutBytes(bytes, 181, 185))), \r\n\t\t\t\tnew BidTime(\r\n\t\t\t\t\t\tnew BidDate(\r\n\t\t\t\t\t\tUtilities.cutStringWhitAditionalSpace(Utilities.bytesToString(Utilities.cutBytes(bytes, 185, 195)))), \r\n\t\t\t\t\t\tUtilities.bytesToFloat(Utilities.cutBytes(bytes, 195, 199))), \r\n\t\t\t\t(Utilities.cutBytes(bytes, 199, 200)[0]==0), \r\n\t\t\t\t(Utilities.cutBytes(bytes, 200, 201)[0]==0), \r\n\t\t\t\tUtilities.cutStringWhitAditionalSpace(Utilities.bytesToString(Utilities.cutBytes(bytes, 201, 221))));\r\n\t}", "LuckyBag selectByPrimaryKey(Integer id);", "public abstract Bid chooseOpeningBid();", "public Bid newBid(Item item, User buyer, Money amount)\n {\n return auctionManager.newBid(item, buyer, amount);\n }", "public static item getItemById(int id) {\n try {\n PreparedStatement st = conn.prepareStatement(\"SELECT itemID, ownerID, Name, status, description, category, image1,image2,image3,image4 FROM iteminformation WHERE itemID=?\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n item item = new item(rs.getInt(1), rs.getString(2), rs.getString(3), (rs.getInt(4) == 1) ? true : false, rs.getString(5), rs.getString(6), rs.getBlob(7), rs.getBlob(8), rs.getBlob(9), rs.getBlob(10));\n return item;\n } else {\n return null;\n }\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public java.lang.String getBidid() {\n java.lang.Object ref = bidid_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n bidid_ = s;\n }\n return s;\n }\n }", "public ResultSet getAuctionBids(int auctionID) throws SQLException {\n\t\tConnection dbConnection = getConnection();\n\t\tString query = \"SELECT BidID,OfferPrice,OfferedBy FROM BID \" + \"WHERE BID.AuctionID=\" + auctionID;\n\n\t\tPreparedStatement preparedStatement = dbConnection.prepareStatement(query);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\treturn rs;\n\t}", "public ArrayList<Bid> getBids(){\n\t\tArrayList<Bid> bids = new ArrayList<Bid>();\n\t\tcreateFile(bidsFile);\n\t\ttry {\n\t\t\tString[] data;\n\t\t\treader = new BufferedReader(new FileReader(bidsFile));\n\t\t\t\n\t\t\tString strLine;\n\t\t\twhile((strLine = getLine()) != null){\n\t\t\t\tdata = strLine.split(\",\");\n\n\t\t\t\tBid bid = new Bid(data[0], Integer.parseInt(data[1]),Integer.parseInt(data[2]));\n\t\t\t\tbids.add(bid);\n\n\t\t\t}\n\t\t}catch (IOException e){\n\t\t\t//TODO auto generated catch block\n\t\tSystem.err.println(e);\n\t\t}\n\t\t\n\t\treturn bids;\n\t}", "public Beneficios fetchBeneficiosById(FetchByIdRequest request);", "public AID getBidder() {\n\t\treturn bidder;\n\t}", "public java.lang.String getBidid() {\n java.lang.Object ref = bidid_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n bidid_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "BOp createBOp();", "BnesBrowsingHis selectByPrimaryKey(BigDecimal browsingHisId) throws SQLException;", "@GET\n @Path(\"/id/{id}\")\n public Book findById(@PathParam(\"id\") long id) {\n return new Book();\n }", "@Override\n\tpublic Brand get(int id) {\n\t\t\n \ttry {\n \t\tsql=\"select * from brands where id=?\";\n\t\t\tquery=connection.prepareStatement(sql);\n \t\tquery.setInt(1, id);\n\t\t\t\n\t\t\tResultSet result=query.executeQuery();\n\t\t\tresult.next();\n\t\t\t\n\t\t\tBrand brand=new Brand(result.getInt(\"Id\"),result.getString(\"Name\"));\n\t\t\t\n\t\t\treturn brand;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tnew Exception(e.getMessage());\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "int getBid();", "private Item fromResultSet(ResultSet resultSet) throws SQLException {\n String name = resultSet.getString(\"Name\");\n String description = resultSet.getString(\"Description\");\n int dollars = resultSet.getInt(\"PriceDollars\");\n int cents = resultSet.getInt(\"PriceCents\");\n Item i = new Item(name, description, dollars, cents);\n\t dao.setId(i, resultSet.getInt(\"id\"));\n\t return i;\n }", "Booking getBookingById(BookingKey bookingKey);", "public static Pregnancy getOne(Connection conn, Long id) throws SQLException, ServletException, ObjectNotFoundException {\r\n\t\tPregnancy item = null;\r\n\t\tString sql;\r\n\t\tArrayList values;\r\n\t\tsql = \"SELECT id, patient_id AS patientId, date_pregnancy_begin AS datePregnancyBegin, \" +\r\n\t\t\"pregnancy_begin_encounter_id AS pregnancyBeginEncounter, date_pregnancy_end AS datePregnancyEnd, \" +\r\n\t\t\"last_modified AS lastModified, created AS created, last_modified_by AS lastModifiedBy, \" +\r\n\t\t\"created_by AS createdBy, site_id AS siteId, created_site_id AS createdSiteId,\" +\r\n\t\t\"labour_admission_encounter_id AS labourAdmissionEncounterId, date_labour_admission AS dateActiveLabour, \" +\r\n\t\t\"import_pregnancy_id AS importPregnancyId, uuid, \" +\r\n\t\t\"pregnancy_begin_encounter_uuid AS pregnancyBeginEncounterUuid, pregnancy_end_encounter_id AS pregnancyEndEncounter, \" +\r\n\t\t\"pregnancy_end_encounter_uuid AS pregnancyEndEncounterUuid, \" +\r\n\t\t\"labour_admission_encounter_uuid AS labourAdmissionEncounterUuid \" +\r\n\t\t\"FROM pregnancy WHERE id=?\";\r\n\t\tvalues = new ArrayList();\r\n\t\tvalues.add(id);\r\n\t\titem = (Pregnancy) DatabaseUtils.getZEPRSBean(conn, Pregnancy.class, sql, values);\r\n\t\treturn item;\r\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<Bird> getBird(@PathVariable(value = \"id\",required = true) String id ){\n logger.trace(\"Get Bird by Id invoked, with id {}\" , id);\n Bird bird = birdService.findById(id);\n logger.trace(\"Get Bird by Id finished, with id {} \" , id);\n return ResponseEntity.status(HttpStatus.OK).body(bird);\n }", "public Bidding getBiddingById(long id) {\r\n\t\treturn biddingPersistence.getBiddingById(id);\r\n\t}", "@Override\r\n\tpublic void createReimbursement(RebsObj reb) {\n\t\tPreparedStatement ps = null;\r\n\t\tPreparedStatement ps2 = null;\r\n\t\tResultSet rs = null; // creating a resultSet which will save any queries\r\n\t\t\r\n\t\t// looks in util/ConnectionUtil.java and saves the url, username and password to \"conn\"\r\n\t\ttry(Connection conn = ConnectionUtil.getConnection();){ \r\n\t\t\t\r\n\t\t\t//int rebs_id = reb.getRebsId(); // REBS_ID IS AUTO INCREMENTING\r\n\t\t\tint user_id = reb.getUserId();\r\n\t\t\t//int man_id = reb.getManagerId(); // not needed\r\n\t\t\tint rebs_type = reb.getRebsType();\r\n\t\t\tint rebs_status = reb.getRebsStatus();\r\n\t\t\tdouble rebs_amount = reb.getRebsAmount();\r\n\t\t\tString rebs_description = reb.getRebsDescription();\r\n\t\t\t// Blob rebs_attachments\r\n\t\t\tTimestamp time_submitted = new Timestamp(System.currentTimeMillis());\t\t\r\n\t\t\t// Timestamp time_resolved\r\n\t\t\t\r\n\t\t\tPart rebs_photo = reb.getRebsPhoto();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-YY hh:mm:ss.SSSSSSSSS\");\r\n\t\t\tdateFormat.format(time_submitted);\r\n\t\t\treb.setTimeSubmitted(time_submitted);\r\n\t\t\tSystem.out.println(\"TIME STAMP IN DAO: \" + time_submitted);\r\n\t\t\t\r\n\t\t\tString sql2 = \"SELECT REBS_SEQ.nextval FROM DUAL\"; // trying to get the next table value (for id #)\r\n\t\t\tps2 = conn.prepareStatement(sql2); // uses connection to send string as a prepared statement\r\n\t\t\trs = ps2.executeQuery();\r\n\t\t\t\r\n\t\t\twhile (rs.next()) // goes through all query results (in this case, we should only have 1)\r\n\t\t\t{\r\n\t\t\t\t// get first column of rs, then set it ==\r\n\t\t\t\treb.setRebsId(rs.getInt(1)); \r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tint rebs_id = reb.getRebsId(); // setting rebs_id to the the rebs_seq value\r\n\t\t\t\r\n\t\t\t// you can put this string 'sql' into multiple lines by adding +, and having everything within \"\"\r\n\t\t\t// this sql line will be ran on SQL\r\n\t\t\tString sql = \"INSERT INTO ERS_REIMBURSEMENTS(rebs_id, user_id_author, user_id_resolver, \"\r\n\t\t\t\t\t+ \"rebs_type, rebs_status, rebs_amount, rebs_description, rebs_receipt, \"\r\n\t\t\t\t\t+ \"rebs_submitted, rebs_resolved) \" \r\n\t\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\t//+ \"RETURNING rebs_id INTO ?\";\r\n\t\t\t\r\n\t\t\t// creating prepared statement\r\n\t\t\tps = conn.prepareStatement(sql); // uses connection to send string as a prepared statement\r\n\t\t\tps.setInt(1, rebs_id); // REBS_ID IS AUTO INCREMENTING\r\n\t\t\tps.setInt(2, user_id);\r\n\t\t\tps.setString(3, null);\r\n\t\t\tps.setInt(4, rebs_type);\r\n\t\t\tps.setInt(5, rebs_status);\r\n\t\t\tps.setDouble(6, rebs_amount);\r\n\t\t\tps.setString(7, rebs_description);\r\n\t\t\t//ps.setString(8, null); this is the attachment\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// size must be converted to int otherwise it results in error\r\n\t\t\t\tps.setBinaryStream(8, rebs_photo.getInputStream(), (int) rebs_photo.getSize());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tps.setTimestamp(9, time_submitted);\r\n\t\t\tps.setString(10, null);\r\n\t\t\t//ps.setInt(11, rebs_id);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"in DAO, rebs_id: \" + rebs_id);\r\n\t\t\t// rows affected\r\n\t\t\tint affected = ps.executeUpdate();\r\n\t\t\tSystem.out.println(\"Rows inserted: \" + affected);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}catch(SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tclose(ps);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Created new reimbursement request!\");\r\n\r\n\t}", "@GET\r\n\tpublic JsonObject getItem(@QueryParam(\"id\") int id){\r\n\t\tConnection database = DBConnecter.getConnection();\r\n\t Statement stat = null;\r\n\t ResultSet rs = null;\r\n\t System.out.print(id);\r\n\t\ttry {\r\n\t\t\tItem item = null;\r\n\t\t\tstat = database.createStatement();\r\n\t\t\tString sqlQueryString = \"select * from item where idTag='\" + id+ \"';\";\r\n\t\t\trs = stat.executeQuery(sqlQueryString);\r\n\t\t\tstat.executeQuery(sqlQueryString);\r\n\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\titem = new Item(\r\n\t \t\trs.getInt(idTagString),\r\n\t \t\trs.getInt(binNumString),\r\n\t \t\trs.getString(departmentString),\r\n\t \t\trs.getString(descriptionString),\r\n\t \t\trs.getFloat(replacementCostString),\r\n\t \t\trs.getFloat(priceString),\r\n\t \t\trs.getString(dimensionsString),\r\n\t \t\trs.getInt(lengthString),\r\n\t \t\trs.getFloat(weightString),\r\n\t\t\t \trs.getString(modelNumberString),\r\n\t\t\t \trs.getInt(purchaseDateString),\r\n\t\t\t \trs.getInt(warrantyEndDateString),\r\n\t\t\t \trs.getString(categoryString)\r\n\t \t\t);\r\n\t\t\t}\r\n\t\t\tif(item != null)\r\n\t\t\t\treturn item.toJSON();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t\tstat.close();\r\n\t\t\t\tdatabase.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t \r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic BikeAdvert getBikeAdvert(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t//now retrive /read from db using the primary key\n\t\tBikeAdvert theBikeAdvert = currentSession.get(BikeAdvert.class,theId);\n\t\t\n\t\treturn theBikeAdvert;\n\t}", "public BasketItemBuilder() {\n generateRandomId();\n }", "public BusinessObject getItem(Package pkg, String id);", "public IBaseDTO getInquiryCardInfo(String id) {\n\t\tOperInquiryCard po=(OperInquiryCard)dao.loadEntity(OperInquiryCard.class, id);\n\t\tIBaseDTO dto = new DynaBeanDTO();\n\t\tdto.set(\"questionType\", po.getDictQuestionType());\n\t\tdto.set(\"question\",po.getQuestion());\n\t\tdto.set(\"alternatives\",po.getAlternatives());\n\t\tdto.set(\"id\",po.getId());\n\t\tdto.set(\"createTime\",TimeUtil.getTheTimeStr(po.getCreateTime(),\"yyyy-MM-dd\"));\n\t\treturn dto;\n\t}", "private Object makeObj(final String item, final int ID) {\n return new Object() {\n\n @Override\n public String toString() {\n return item;\n }\n\n @Override\n public int hashCode() {\n return ID;\n }\n };\n }", "private void bid() {\n\t\t\t\n\t\t}", "public int makeBid(AuctionItem item, int secretKey){\n Bid oldBid = item.getBid();\n oldBid.setSecretKey(secretKey);\n item.setBid(oldBid);\n Message<AuctionItem> message = new Message<>(Message.MessageIdentifier.\n MAKE_BID,item);\n Message<String> reply = sendMSG(message);\n switch( reply.getMessageIdentifier() ) {\n case BID_REJECTED_INADEQUATE:\n return 0;\n case BID_REJECTED_NSF:\n return 1;\n case BID_ACCEPTED:\n return 2;\n case CASE_NOT_FOUND:\n default:\n return -1;\n }\n }", "public synchronized String getItemDetails(){\n \tString s = \"\\n========================================\";\n \ts += \"\\nID: \"+ ID;\n \ts += \"\\nName: \"+ item_name;\n \ts += \"\\nStarting Price: \"+ start_price;\n \ts += \"\\nNumber Of bidders: \" + bids.size();\n \ts += \"\\n status: \" + status;\n\n \tif(status == \"open\"){\n \t\tif(last_bidder == null){\n \t\t\t\ts += \"\\nLast Bidder: No bids yet\";\n \t\t}else{\n \t\t\ts += \"\\n last_bidder: \"+ last_bidderName;\n \t\t}\n \t}else if(status == \"closed\"){\n \t\tif(last_bidder == null){\n \t\t\t\ts += \"\\nLast Bidder: Closed with No bids\";\n \t\t}else{\n \t\t\ts += \"\\n Won by: \"+ last_bidderName +\" at price of \"+ start_price;\n \t\t}\n \t}\n \ts += \"\\n========================================\";\n return s;\n }", "public Dealer(List<Car> owned_cars, HashSet<Integer> leasing_cars, List<Status> leasing_details, String city, String name, Integer budget, int objectId) {\r\n this.owned_cars = owned_cars;\r\n this.leasing_cars = leasing_cars;\r\n this.leasing_details = leasing_details;\r\n this.city = city;\r\n this.name = name;\r\n this.budget = budget;\r\n //this.objectId = objectId;\r\n }", "public BikeData getBikeDataFromRS(ResultSet rs){\n try{\n int bikeId = rs.getInt(cBikeID);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double latitude = rs.getDouble(cLatitude);\n double longitude = rs.getDouble(cLongitude);\n double chargingLevel = rs.getDouble(cChargingLevel);\n BikeData bd = new BikeData(bikeId, dateTime, latitude, longitude, chargingLevel);\n return bd;\n }catch(Exception e){\n System.out.println(\"Exception \" + e);\n }\n return null;\n }", "public Integer getBcId() {\n return bcId;\n }", "public void prepare()\n {\n // First, we assign the payload a new UUID if it does not already have one\n if(getId() == null)\n setId(UUID.randomUUID());\n \n // Set the submission date to now\n setSubmissionDate(new Date());\n }", "public OrderInventedRecord(Integer id, String orderSn, Integer sellerId, Integer memberId, String memberName, Byte orderState, Timestamp payTime, Byte paymentStatus, Byte invoiceStatus, String invoiceTitle, Byte invioceState, String invoiceType, BigDecimal moneyProduct, BigDecimal moneyOrder, BigDecimal moneyPaidBalance, BigDecimal moneyPaidReality, BigDecimal moneyGiftcardAmount, BigDecimal moneyCouponcode, BigDecimal moneyLowerAmount, BigDecimal moneyBack, Integer moneyIntegral, Integer lowerId, Integer giftcardId, Integer couponcodeId, String ip, String paymentName, String paymentCode, String mobile, String codeExchange, Byte isSuccess, String email, String zipCode, String remark, Timestamp finishTime, String tradeSn, String source, Byte isGiftCardOrder, Integer productCommentsId, Timestamp createTime, Timestamp updateTime) {\n super(OrderInvented.ORDER_INVENTED);\n\n set(0, id);\n set(1, orderSn);\n set(2, sellerId);\n set(3, memberId);\n set(4, memberName);\n set(5, orderState);\n set(6, payTime);\n set(7, paymentStatus);\n set(8, invoiceStatus);\n set(9, invoiceTitle);\n set(10, invioceState);\n set(11, invoiceType);\n set(12, moneyProduct);\n set(13, moneyOrder);\n set(14, moneyPaidBalance);\n set(15, moneyPaidReality);\n set(16, moneyGiftcardAmount);\n set(17, moneyCouponcode);\n set(18, moneyLowerAmount);\n set(19, moneyBack);\n set(20, moneyIntegral);\n set(21, lowerId);\n set(22, giftcardId);\n set(23, couponcodeId);\n set(24, ip);\n set(25, paymentName);\n set(26, paymentCode);\n set(27, mobile);\n set(28, codeExchange);\n set(29, isSuccess);\n set(30, email);\n set(31, zipCode);\n set(32, remark);\n set(33, finishTime);\n set(34, tradeSn);\n set(35, source);\n set(36, isGiftCardOrder);\n set(37, productCommentsId);\n set(38, createTime);\n set(39, updateTime);\n }", "protected abstract B getElement(Long id);", "BookInfo selectByPrimaryKey(Integer id);", "public ResultSet getBidderList(int ino) throws IllegalStateException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try {\n\t\t con = openDBConnection();\n\t String queryString = \"SELECT biddate , username , maximumbidlimit \" \n \t\t+ \"FROM BIDS, CUSTOMER \"\n\t\t\t + \" where id = bidderid and isbidder = 'Y' and itemid = '\"+ino+\"'\";\n\t stmt = con.createStatement();\n\t result = stmt.executeQuery(queryString);\n\t } catch (Exception e) {\n\t\t e.printStackTrace();\n\t }\n\t return result;\n}" ]
[ "0.60778654", "0.60376126", "0.5995017", "0.5921622", "0.5610566", "0.5578892", "0.5556809", "0.5549637", "0.5484341", "0.5474827", "0.54305565", "0.5418521", "0.54048103", "0.5359941", "0.52675515", "0.525616", "0.52552897", "0.52465487", "0.5246064", "0.5238638", "0.5233244", "0.52319103", "0.5223487", "0.5201611", "0.51925033", "0.51403975", "0.51384264", "0.513246", "0.51130027", "0.5098329", "0.5092266", "0.5082101", "0.5068992", "0.50536644", "0.5050089", "0.50463265", "0.5045922", "0.50410056", "0.50399894", "0.50256944", "0.5025514", "0.500717", "0.49735048", "0.49703", "0.49576306", "0.49573034", "0.49421147", "0.49157465", "0.49051932", "0.49025503", "0.48930958", "0.48922968", "0.48914686", "0.4889513", "0.4889513", "0.488561", "0.4884899", "0.48796335", "0.48796335", "0.48736632", "0.4868787", "0.4868343", "0.4856583", "0.4853814", "0.48518708", "0.48418832", "0.48361456", "0.48327643", "0.48286766", "0.48260674", "0.48256865", "0.48245454", "0.48234978", "0.4823297", "0.48215875", "0.48160642", "0.48019248", "0.4800957", "0.47961208", "0.4791835", "0.47894347", "0.47782573", "0.47756973", "0.47685343", "0.4763594", "0.47590503", "0.47577393", "0.4757417", "0.47562224", "0.47547975", "0.47544777", "0.47474626", "0.47446904", "0.4742276", "0.47410527", "0.47345844", "0.47317493", "0.47271702", "0.47253898", "0.4724601" ]
0.59246767
3
write the token to Shared Preference
public static void writeAccessToken(Oauth2AccessToken token) { if (null == token) { return; } SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); sharedPref.setWeiboUID(token.getUid()); sharedPref.setWeiboAccessToken(token.getToken()); sharedPref.setWeiboExpiresTime(token.getExpiresTime()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateToken(String token){\n //todo something\n if (sharedPreferencesUtils != null){\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }else {\n sharedPreferencesUtils = new SharedPreferencesUtils(this);\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }\n }", "private void saveToken(Context context, String text) {\n android.content.SharedPreferences settings;\n android.content.SharedPreferences.Editor editor;\n \n settings = context.getSharedPreferences(\"PREFS_NAME\", Context.MODE_PRIVATE);\n editor = settings.edit();\n editor.putString(\"TOKEN\", text);\n editor.apply();\n }", "public static void storeToken(AccessToken token, Context cont)\n\t{\n\t\tSharedPreferences.Editor editor = cont.getSharedPreferences(\"StatPump\", 0).edit();\n\t\teditor.putString(\"Token\", token.getToken());\n\t\teditor.putString(\"Token Secret\", token.getTokenSecret());\n\t\teditor.commit();\n\t}", "public void GuardarToken(String token){\n SharedPreferences.Editor edits = prefs.edit();\n edits.putString(MYConstantsPreferences.MAQUIPURAY_TOKEN, token);\n edits.apply();\n }", "public boolean saveDeviceToken(String token) {\n SharedPreferences sharedPreferences = (_context).getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);\n Editor editor = sharedPreferences.edit();\n editor.putString(TAG_TOKEN, token);\n editor.apply();\n return true;\n }", "public static void storeFacebookToken(String token, Context cont)\n\t{\n\t\tSharedPreferences.Editor editor = cont.getSharedPreferences(\"StatPump\", 0).edit();\n\t\teditor.putString(\"Facebook Token\", token);\n\t\teditor.commit();\n\t}", "private void m2192d(String str) {\n this.f980b.m1158c().getSharedPreferences(\"com.facebook.login.AuthorizationClient.WebViewAuthHandler.TOKEN_STORE_KEY\", 0).edit().putString(\"TOKEN\", str).apply();\n }", "public void storeToken(AuthorizationToken token);", "@Override\n public void onTokenRefresh() {\n\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // TODO: 13/6/2017 Persistir token en archivo XML.\n sharedPreferences = getSharedPreferences(\"datos\",MODE_PRIVATE);\n SharedPreferences.Editor edit = sharedPreferences.edit();\n edit.putString(String.valueOf(R.string.token),refreshedToken);\n edit.commit();\n\n\n }", "public void storePreferences(String userid, String token, JSONArray settings) throws JSONException {\n SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(\"ca.gc.inspection.scoop\", Context.MODE_PRIVATE);\n\n JSONObject setting = settings.getJSONObject(0);\n Iterator<String> keys = setting.keys();\n while(keys.hasNext()){\n String settingKey = keys.next();\n if (settingKey.equals(useridStr)){ continue;}\n sharedPreferences.edit().putString(settingKey, setting.getString(settingKey)).apply();\n }\n\n // storing the token into shared preferences\n sharedPreferences.edit().putString(\"token\", token).apply();\n Config.token = token;\n\n // storing the user id into shared preferences\n sharedPreferences.edit().putString(useridStr, userid).apply();\n Config.currentUser = userid;\n\n // change activities once register is successful\n if(Config.token != null && Config.currentUser != null) registerSuccess();\n }", "public void saveToken(String token, long passTime) {\n }", "@Override\n\tprotected void saveTokenExtra(String pToken) {\n\t}", "private void savePreference() {\n\t\tString myEmail = ((TextView) findViewById(R.id.myEmail)).getText().toString();\n\t\tString myPassword = ((TextView) findViewById(R.id.myPassword)).getText().toString();\n\t\t\n\t\tEditor editor = sharedPreferences.edit();\n\t\teditor.putString(\"myEmail\", myEmail);\n\t\teditor.putString(\"myPassword\", myPassword);\n\t\teditor.putString(\"readOPtion\", Constants.READ_OPTION_SUBJECT_ONLY);\n\t\teditor.putInt(\"increment\", 10);\n\t\teditor.putString(\"bodyDoneFlag\", bodyDoneFlag);\n\t\teditor.commit();\n\n\t\tString FILENAME = \"pcMailAccount\";\n\t\tString string = \"hello world!\";\n\t\tString del = \"_____\";\n\t\t\n\t\tFile folder = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM + \"/VoiceMail\");\n\t\tif (!folder.isDirectory()) {\n\t\t\tfolder.mkdirs();\n\t\t}\n \n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfolder.createNewFile();\n//\t\t\tfos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\t fos = new FileOutputStream(new File(folder, FILENAME));\n\t string = \"myEmail:\" + myEmail + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"myPassword:\" + myPassword + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"bodyDoneFlag:\" + bodyDoneFlag + del;\n\t\t\tfos.write(string.getBytes());\n\t\t\t\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"myToken\", \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n getApplicationContext().sendBroadcast(new Intent(broadcast));\n SharedPrefManager.getInstance(getApplicationContext()).storeToken(refreshedToken);\n }", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "public String saveAuthToken() { // basically for signin\n return authTokenAssist.saveMemberToken(getSavedUserBean().get().getMemberAccount());\n }", "public boolean save(Context context, AccessToken accessToken) \n {\n\n Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();\n\n this.token = accessToken.getToken();\n this.tokensecret = accessToken.getTokenSecret();\n editor.putString(TOKEN, token);\n editor.putString(TOKENSECRET, tokensecret);\n \n\n if (editor.commit()) \n {\n singleton = this;\n return true;\n }\n return false;\n }", "public void writeUserInro(String name,String key){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"uName\" ,name);\n mydata.putString(\"uKey\",key);\n mydata.commit();\n }", "public static void setRequestToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public void writeEncounterNumPreferences(long encounterNum){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putLong(mContext.getString(R.string.encounter),encounterNum);\n editor.commit();\n}", "@Override\n public void onNewToken(String token) {\n Log.d(TAG, \"Refreshed token: \" + token);\n\n }", "public static void setAccessToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ACCESS_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "private void writeAccount() {\n SharedPreferences pref = getSharedPreferences(\"ACCOUNT\", Context.MODE_PRIVATE);\n SharedPreferences.Editor edt = pref.edit();\n\n edt.putString(\"email\", Me.getInstance().getEmail());\n edt.putString(\"password\", txtPassword.getText().toString().trim());\n\n edt.commit();\n }", "public void putToken(Token token)throws Exception;", "protected void storeSharedPrefs(String un2, String pwd2) {\n \teditor.putString(\"username\", un2);\n \teditor.putString(\"password\", pwd2); \t\n\t\teditor.commit(); //Commiting changes\n\t}", "public void saveDataToSharedPreference(View view) {\n email = emailEditText.getText().toString();\n name = nameEditText.getText().toString();\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(\"name\",name);\n editor.putString(\"email\",email);\n editor.apply();\n\n Toast.makeText(context, \"Data saved successfully into SharedPreferences!\", Toast.LENGTH_SHORT).show();\n clearText();\n }", "private void enviarTokenRegistro(String token){\n Log.d(TAG, token);\n }", "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "public void writeToSharedPreference(int value){\n SharedPreferences sharedPreferences = getActivity().getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(\"NUMBER OF ITEMS\",value);\n editor.commit();\n\n }", "private void sendRegistrationToServer(String token) {\n CustomerApp.e.putString(\"fcm_token\",token);\n CustomerApp.e.putBoolean(\"fcm_token_sync\",false);\n CustomerApp.e.apply();\n\n //Displaying token on logcat\n Log.v(Constants.TAG, \"Refreshed token: \" + token);\n }", "public boolean saveRequest(Context context, RequestToken requestToken, Twitter t) \n {\n\n \ttwitter = t;\n Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();\n\n rtoken = requestToken.getToken();\n rtokensecret =requestToken.getTokenSecret();\n editor.putString(R_TOKEN,rtoken);\n editor.putString(R_TOKENSECRET, rtokensecret);\n\n if (editor.commit()) \n {\n singleton = this;\n return true;\n }\n return false;\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n SharedPreferences settings =\n getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(PREF_FIREBASE_TOKEN, refreshedToken);\n editor.apply();\n }", "public void writeUserLog(String name){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"userlist\" ,name);\n mydata.commit();\n }", "@Override\n public void onNewToken(String token) {\n Log.e(\"Token:\", token);\n }", "public void setToken(java.lang.String param){\n localTokenTracker = true;\n \n this.localToken=param;\n \n\n }", "public void writeSyncPreferences(String string){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSharedPreference.edit();\n editor.putString(getCurrentIdentity(),string);\n editor.commit();\n }", "public void setOauth_token(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localOauth_tokenTracker = true;\r\n } else {\r\n localOauth_tokenTracker = false;\r\n \r\n }\r\n \r\n this.localOauth_token=param;\r\n \r\n\r\n }", "@Override\n public void onNewToken(String token) {\n Log.d(TAG, \"Refreshed token: \" + token);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n enviaTokenParaServidor(token);\n }", "@Override\n public void onNewToken(String token) {\n Log.d(TAG, \"Refreshed token: \" + token);\n super.onNewToken(token);\n Log.e(\"newToken\", token);\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendRegistrationToServer(token);\n }", "public static void write(Context context, String key, String value) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\tsp.edit().putString(key, value).commit();\n\t}", "public void setToken(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localTokenTracker = true;\r\n } else {\r\n localTokenTracker = false;\r\n \r\n }\r\n \r\n this.localToken=param;\r\n \r\n\r\n }", "private void storeLoggedInUser(LoginResponse response){\n preferenceManager = SharedPreferenceManager.getInstance(this);\n preferenceManager.StoreAccountDetails(response.getAccount());\n\n if(response.getCamera() != null){\n preferenceManager.StoreDeviceDetails(response.getCamera());\n }\n registerDeviceToken();\n }", "public void putRoleValue(String key, String value){\n SharedPreferences sharedPreference = context.getSharedPreferences(LOGIN, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreference.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public static void saveToSharedPreference(String key, String value) {\n\n appSharePreference.edit().putString(key.toString(), value.toString()).apply();\n }", "@SuppressLint(\"CommitPrefEdits\") // Preferences change needs to be synchronous\n public void invalidateToken() {\n preferences.edit().remove(getString(R.string.auth_token)).commit();\n validateToken();\n }", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "@Override\n public void onNewToken(String token) {\n //Log.d(TAG, \"Refreshed token: \" + token);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendRegistrationToServer(token);\n\n }", "@Override\n public void onNewToken(String token) {\n Log.d(TAG, \"Refreshed token: \" + token);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendRegistrationToServer(token);\n }", "static String getToken(Context context) {\r\n SharedPreferences preferences = context.getSharedPreferences(context.getString(R.string.shared_preferences), MODE_PRIVATE);\r\n return preferences.getString(context.getString(R.string.token), null);\r\n }", "public static void saveLoginWhenFirst(Context context) {\n SharedPreferences.Editor editor = context.getSharedPreferences(SHARED_PREFERENCES_KEY, context.MODE_PRIVATE).edit();\n editor.putBoolean(IS_FIRST_TOKEN,false);\n editor.commit();\n }", "public static void saveToPrefs(Context context,String key, String value) {\n SharedPreferences prefs = getSettings();\n final SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public static boolean checkSavedToken(Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n String storage_token = preferences.getString(\"token\", \"notoken\");\n\n if (!storage_token.equals(\"notoken\")) {\n Log.d(\"Service\", \"Using stored token\");\n header_token = \"Bearer \" + storage_token;\n isTokenPresent = true;\n bindToken();\n return true;\n }\n return false;\n }", "@Override\n public void onNewToken(String token) {\n Log.d(\"FireBaseActivity\", \"Refreshed token: \" + token);\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n // sendRegistrationToServer(token);\n }", "public static void saveRequestInformation(SharedPreferences settings, String token, String secret)\n\t{\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t\tif (token == null)\n\t\t{\n\t\t\teditor.remove(REQUEST_TOKEN);\n\t\t\tLog.d(TAG, \"Clearing Request Token\");\n\t\t} \n\t\telse\n\t\t{\n\t\t\teditor.putString(REQUEST_TOKEN, token);\n\t\t\tLog.d(TAG, \"Saving Request Token: \" + token);\n\t\t}\n\t\tif (secret == null)\n\t\t{\n\t\t\teditor.remove(REQUEST_SECRET);\n\t\t\tLog.d(TAG, \"Clearing Request Secret\");\n\t\t} \n\t\telse\n\t\t{\n\t\t\teditor.putString(REQUEST_SECRET, secret);\n\t\t\tLog.d(TAG, \"Saving Request Secret: \" + secret);\n\t\t}\n\t\teditor.commit();\n\t}", "@Override\n public void onTokenRefresh() {\n\n //Getting registration token\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n\n //Displaying token on logcat\n Log.e(TAG, \"Refreshed token: \" + refreshedToken);\n\n //calling the method store token and passing token\n storeToken(refreshedToken);\n }", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userinfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n\n editor.apply();\n Toast.makeText(this,\"Saved!\",Toast.LENGTH_LONG).show();\n }", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "private void writePref() {\n SharedPreferences.Editor editor = sp.edit();\n long currentTime = System.currentTimeMillis();\n editor.putLong(UPDATE, currentTime);\n editor.commit();\n System.out.println(\"Time of current update: \" + getDateFromLong(currentTime));\n }", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE); //This means the info is private and hence secured\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }", "protected void saveToken(HttpServletRequest request) {\r\n Logger l = LogUtils.enterLog(getClass(), \"saveToken\", request);\r\n\r\n saveToken(request, getTokenConstant());\r\n\r\n l.exiting(getClass().getName(), \"saveToken\");\r\n }", "public void onSendRegistrationToServer(final String token){\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();\n databaseReference.child(Constants.ARG_USERS)\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .child(Constants.ARG_FIREBASE_TOKEN)\n .setValue(token);\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void shared() {\n\n String Email = editTextEmail.getText().toString();\n String Password = editTextPassword.getText().toString();\n String username = userstring;\n\n SharedPreferences sharedlog = getSharedPreferences(\"usernamelast\" , MODE_PRIVATE);\n SharedPreferences.Editor editorlogin = sharedlog.edit();\n editorlogin.putString(\"usernamelast\", username);\n editorlogin.apply();\n\n SharedPreferences sharedPref = getSharedPreferences(\"email\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"email\", Email);\n editor.apply();\n //Los estados los podemos setear en la siguiente actividad\n SharedPreferences sharedPref2 = getSharedPreferences(\"password\", MODE_PRIVATE);\n SharedPreferences.Editor editor2 = sharedPref2.edit();\n editor2.putString(\"password\", Password);\n editor2.apply();\n\n\n }", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "public void setAuthentication(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.putString(\"userid\", mUserId);\n preferencesEditor.putString(\"areaid\", mAreaId);\n preferencesEditor.commit();\n }", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "public void savePushToken(String paramString) {\n }", "private void savePreferences(String key, String value) {\n\t\tSharedPreferences sp = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tEditor edit = sp.edit();\n\t\tedit.putString(key, value);\n\t\tedit.commit();\n\t}", "private void saveInfoHelper(){\n\n if(!isAnyEmpty()) {\n boolean firstSave = (prefs.getString(\"email\", null) == null);\n //store first name\n editor.putString(\"fname\", fname.getText().toString());\n // store last name\n editor.putString(\"lname\", lname.getText().toString());\n // store email\n editor.putString(\"email\", email.getText().toString());\n // store password\n editor.putString(\"password\", password.getText().toString());\n // store currency\n editor.putInt(\"curr\", spinner_curr.getSelectedItemPosition());\n // store stock\n editor.putInt(\"stock\", spinner_stock.getSelectedItemPosition());\n // store date\n editor.putString(\"date\", new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(Calendar.getInstance().getTime()));\n\n editor.putString(\"token\", \"\");\n\n editor.commit();\n\n Toast.makeText(this, R.string.data_saved, Toast.LENGTH_SHORT).show();\n\n loadInfo(); //to show new data immediately without refreshing the page\n\n requestToken();\n\n if(firstSave){\n finish();\n }\n\n }else{\n Toast.makeText(this, R.string.data_empty, Toast.LENGTH_SHORT).show();\n }\n\n }", "private void storeKeyWord(String keyWord) {\n SharedPrefsUtils.setStringPreference(application.getApplicationContext(),\"KEY\",keyWord);\n }", "void putToken(String name, String value);", "private void savePreferenceData(String role){\n if (getIntent()!=null){\n SharedPreferences preferences = getSharedPreferences(detailPreference, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(preferenceKey, role);\n editor.apply();\n }\n }", "private void sendRegistrationToServer(String token) {\n // TODO: Implement this method to send token to your app server.\n }", "private void sendRegistrationToServer(String token) {\n // TODO: Implement this method to send token to your app server.\n }", "@Override\n public void onTokenRefresh() {\n final String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n\n //To displaying token on logcat\n Log.w(\"TOKEN: \", refreshedToken);\n\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFERENCE_FILE, MODE_PRIVATE);\n final Long userId = sharedPreferences.getLong(\"userId\", 0L);\n\n if (!userId.equals(0L)){\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"firebaseToken\", refreshedToken);\n editor.apply();\n\n Handler handler = new Handler(this.getMainLooper());\n\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n\n // Update token for this user\n UserTask<Void> userTask = new UserTask<>(userId);\n userTask.setFirebaseToken(refreshedToken);\n userTask.execute(\"refreshFirebaseToken\");\n\n }\n };\n\n handler.post(runnable);\n\n }\n\n }", "public void sendTokenToServer(final String strToken) {\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n final DatabaseReference usersRef = database.getReference(\"users\");\n\n usersRef.addListenerForSingleValueEvent(new com.google.firebase.database.ValueEventListener() {\n @Override\n public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {\n\n for (com.google.firebase.database.DataSnapshot userSnapshot : dataSnapshot.getChildren()) {\n //Getting the data from snapshot\n FirebaseUserModel firebaseUserModel = userSnapshot.getValue(FirebaseUserModel.class);\n\n if (strToken != null && firebaseUserModel.getDeviceId().equals(user.deviceId) && !strToken.equals(firebaseUserModel.getDeviceToken())) {\n user.deviceToken = strToken;\n usersRef.child(userSnapshot.getKey()).child(\"deviceToken\").setValue(strToken, new Firebase.CompletionListener() {\n\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n Log.i(TAG, firebaseError.toString());\n } else {\n System.out.println(\"Refreshed Token Updated\");\n }\n }\n });\n\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n System.out.println(\"The read failed: \" + databaseError.getMessage());\n }\n });\n\n }", "SharedPreferences mo117960a();", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "private final synchronized void writePreferencesImpl() {\n if ( LOGD ) { Log.d( TAG, \"writePreferencesImpl \" + mPrefFile + \" \" + mPrefKey ); }\n\n mForcePreferenceWrite = false;\n\n SharedPreferences pref =\n Utilities.getContext().getSharedPreferences( mPrefFile, Context.MODE_PRIVATE );\n SharedPreferences.Editor edit = pref.edit();\n edit.putString( mPrefKey, getSerializedString() );\n Utilities.commitNoCrash(edit);\n }", "private void updateRegistrationToServer(String token) {\n // Add custom implementation, as needed.\n JSONObject object = new JSONObject();\n try {\n object.put(\"device_id\", token);\n object.put(\"api_token\", Prefs.getUserInfo() != null ? Prefs.getUserInfo().getToken() : \"\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n String postData = object.toString();\n new DownloadAsyncTask(getApplicationContext(), Constants.API_UPDATE_DEVICE_ID, Constants.ID_METHOD_API_UPDATE_DEVICE_ID, jsonCallback, false, DownloadAsyncTask.HTTP_VERB.POST.getVal(), postData);\n\n }", "private void mtd_refresh_token() {\n RxClient.get(FeedActivity.this).Login(new loginreq(sharedpreferences.\n getString(SharedPrefUtils.SpEmail, \"\"),\n sharedpreferences.getString(SharedPrefUtils.SpPassword, \"\")), new Callback<loginresp>() {\n @Override\n public void success(loginresp loginresp, Response response) {\n\n if (loginresp.getStatus().equals(\"200\")){\n\n editor.putString(SharedPrefUtils.SpRememberToken,loginresp.getToken().toString());\n editor.commit();\n\n final Handler handler = new Handler();\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n wbService(tmpansList);\n progressBar.setVisibility(View.INVISIBLE);\n }\n };\n handler.postDelayed(runnable, 500);\n\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n progressBar.setVisibility(View.INVISIBLE);\n Log.d(\"refresh token\", \"refresh token error\");\n Toast.makeText(FeedActivity.this, \"Service not response\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n });\n\n }", "public void saveValueToSharedPreference(Context context, String fileKey, Integer mode, String key, @Nullable String value) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileKey, mode);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value).apply();\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n /*Log.d(\"Refreshed token\", \"Refreshed token: \" + refreshedToken);\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n final CollectionReference clients = FirebaseFirestore.getInstance().collection(\"Tokens\");\n Map<String, Object> data1 = new HashMap<>();\n data1.put(\"token\", refreshedToken);\n clients.document(\"Iamhere\").set(data1, SetOptions.merge());*/\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n }", "@Override\r\n public void onTokenRefresh() {\n App.sendToken();\r\n }", "private void saveData() {\n\n SharedPreferences sharedPreferences=getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n\n editor.putString(\"name\",name.getText().toString());\n editor.putString(\"regnum\",regnum.getText().toString());\n editor.putInt(\"count\", count);\n editor.apply();\n\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "@Override\n public void onTokenRefresh() {\n\n String token = FirebaseInstanceId.getInstance().getToken();\n CTOKEN = token;\n\n// if(sgen.ID != \"\") {\n// String query = \"UPDATE USER_DETAILS SET FTOKEN = '\"+token+\"' WHERE ID = '\"+sgen.ID+\"'; \";\n// ArrayList<Team> savedatateam = servicesRequest.save_data(query);\n// sgen.FTOKEN = token;\n// }\n\n\n // Once the token is generated, subscribe to topic with the userId\n// if(sgen.ATOKEN.equals(sgen.CTOKEN)) {\n try {\n FirebaseMessaging.getInstance().subscribeToTopic(SUBSCRIBE_TO);\n Log.i(TAG, \"onTokenRefresh completed with token: \" + token);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n// }\n\n\n /* sendRegistrationToServer(refreshedToken);*/\n }", "public void saveInfo(View view) {\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n usernameInput.setText(\"\");\n passwordInput.setText(\"\");\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }", "public static void setShared(Context context, String name, String value) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(name, value);\n editor.commit();\n }", "public void addSocialToken(String token, String authProviderStr){\n socialtoken = token;\n authProvider = authProviderStr;\n saveTokenDataLocally();\n }", "private void sendRegistrationToServer(String token) {\n LoginManager loginManager = new LoginManager(this);\n loginManager.setFCM_KEY(token);\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n saveToken(refreshedToken);\n sendRegistrationToServer(refreshedToken);\n }", "public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }", "@Override\n public void onTokenRefresh() {\n // Get updated InstanceID token.\n device_id = Settings.Secure.getString(this.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n\n //**************need to modify the code such that it can update exisiting user data***********************\n sendRegistrationToServer(refreshedToken);\n //**************need to modify the code such that it can update exisiting user data***********************\n }", "public static void saveGCMToken(String gcmDeviceId) {\n String appVersion = AppUtils.getAppVersionName();\n String cacheKey = \"gcm_reg_id_\" + appVersion;\n\n getSharedPreferences().edit().putString(cacheKey, gcmDeviceId);\n Log.i(LOG_TAG, \"Caching GCM token for app version \" + appVersion);\n }" ]
[ "0.7654978", "0.7583154", "0.74124897", "0.73137784", "0.70741355", "0.69093466", "0.6848724", "0.68390214", "0.68082935", "0.6783555", "0.663972", "0.66027427", "0.6504394", "0.64461803", "0.64376265", "0.63845485", "0.6367403", "0.63639826", "0.63085747", "0.63021445", "0.6298283", "0.6297284", "0.6295333", "0.6258452", "0.6231233", "0.6212876", "0.6210973", "0.6177418", "0.6175185", "0.6170559", "0.61647177", "0.6146668", "0.6137874", "0.61331433", "0.61265165", "0.61260563", "0.6113886", "0.61117715", "0.60902095", "0.6057022", "0.6051213", "0.6048118", "0.60430455", "0.6031863", "0.60049456", "0.5990267", "0.5984131", "0.5975666", "0.596656", "0.5943277", "0.5931291", "0.59248966", "0.5924698", "0.5910246", "0.5876429", "0.5875665", "0.5875479", "0.585934", "0.5854292", "0.5851834", "0.5839622", "0.5829531", "0.5829531", "0.5828571", "0.5823057", "0.5818296", "0.58085763", "0.5799903", "0.5797968", "0.5787907", "0.5752552", "0.5739346", "0.57380134", "0.5729454", "0.5729454", "0.5728179", "0.5719401", "0.57176775", "0.5716842", "0.5715305", "0.5704506", "0.5701785", "0.5694626", "0.56848454", "0.56777215", "0.56758803", "0.56687546", "0.56681174", "0.566609", "0.5662096", "0.5660774", "0.5654315", "0.5652018", "0.5652018", "0.5652018", "0.5652018", "0.56462836", "0.56398165", "0.56391156", "0.5635711" ]
0.6684513
10
/ Set if user login nyftii by Weibo
public static void setIsMainAccount(boolean is) { SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); sharedPref.setWeiboMainAccount(is); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasWeixinLogin();", "boolean hasLoginapiavgrtt();", "int getLoginFlag();", "public boolean isLogin() {\n // Mengembalikan nilai boolean degan mengambil data dari pref KEY_IS_LOGIN\n return preference.getBoolean(Constants.KEY_IS_LOGIN, false);\n }", "public boolean logedIn(String logindata) {\r\n\t\tif (logindata == null) {\r\n\t\t\tSystem.out.println(logindata);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tSystem.out.println(logindata);\r\n\t\tString[] data = logindata.split(\"-\");\r\n\t\tif (Ueberpruefer.loginUberpruefung(benutzer, data[0], data[1])) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasLoginRequest();", "public boolean loginUser();", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "private boolean isLoginUnique(int currentUserId){\n\t\tUser user = Main.getMMUser().getUserForLogin(userLoginField.getText());\n\t\tif (user == null) return true;\n\t\telse {\n\t\t\tif (user.getId() == currentUserId) return true;\n\t\t}\t\n\t\tlackUserLoginLabel.setText(\"taki login istnieje w bazie\");\n\t\tlackUserLoginLabel.setVisible(true);\n\t\treturn false;\n\t}", "boolean hasLogin();", "boolean hasLogin();", "@Override\n\tpublic boolean isLogin() {\n\t\treturn false;\n\t}", "private boolean AlreadyLogin() {\n\t\tString usn = uPreferences.getString(\"username\", null);\n\t\tString pwd = uPreferences.getString(\"password\", null);\n\t\tif((usn == null) || ((pwd == null))){\n\t\t\treturn false;\n\t\t}\n\t\telse \n\t\t\treturn true;\n\t}", "private boolean isLoggedInUser(){\n return true;\n }", "void setHasLoggedIn(Boolean value);", "public static boolean checkUserFBLogin() {\n\t\tboolean isFbLogin = Pref.getBoolean(\n\t\t\t\tGeneralClass.temp_iUserFaceBookBLOGIN, false);\n\t\t// Log.e(\"is facebook login\", \"---->\" + isFbLogin);\n\t\t// if (isloginShare && isFbLogin) {\n\t\t// return false;\n\t\t// } else {\n\t\tif (isFbLogin) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t// }\n\t}", "private boolean setLoggedInUser(String userId) {\n if (currentContext != null) {\n //Set the user Id when user is successfully logged_in\n if (mFireBaseAnalytics != null)\n mFireBaseAnalytics.setUserId(userId);\n SharedPreferences sharedPrefs = currentContext.getSharedPreferences(LOGIN_SHARED_PREF_NAME, 0);\n return sharedPrefs.edit().putString(USER_ID_SHARED_PREF_NAME, userId).commit() &&\n setLoggedInTime();\n }\n return false;\n }", "public boolean hasWeixinLogin() {\n return weixinLogin_ != null;\n }", "@Override\r\n\tpublic void ShowLogin(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e( \"ShowLogin\");\r\n\t\tsuper.ShowLogin(_in_context, _in_data);\r\n\t\tif(HMPay.isLogined()){\r\n\t\t\tTypeSDKNotify_haima notify = new TypeSDKNotify_haima();\r\n \t\tnotify.sendToken(token, uid);\r\n\t\t} else {\r\n\t\t\tthis.haimaLogin();\r\n\t\t}\r\n\t\t\r\n\t}", "public void setIsLogin(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isLogin\", value);\n\t\teditor.commit();\n\t}", "private boolean cekUser(String user){\n return user.equals(Preferences.getRegisteredUser(getBaseContext()));\n }", "private void checkLogin() {\n SharedPref sp = new SharedPref(this);\n if (!sp.readLoginStatus()) {\n Intent i = new Intent(this, LoginActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);\n startActivity(i);\n }\n }", "@Override\n\tpublic boolean login(MemberBean param) {\n\t\treturn false;\n\t}", "public boolean isLoggedIn(){\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n if (sharedPreferences.getString(KEY_USERNAME, null) != null){\n return true;\n }\n return false;\n }", "public void setUserLogStatus(boolean bValue){\n /*SharedPreferences sharedPreferences = _context.getSharedPreferences(APP_PREFERENCES, PRIVATE_MODE);\n SharedPreferences.Editor editor;\n editor = sharedPreferences.edit();*/\n editor.putBoolean(IS_LOGGED_IN, bValue);\n editor.apply();\n }", "public boolean getRememberLogin() {return this.accountConfig.getProperty(\"rememberLogin\").equals(\"true\");}", "private void masuk(){\n Preferences.setLoggedInUser(getBaseContext(),Preferences.getRegisteredUser(getBaseContext()));\n Preferences.setLoggedInStatus(getBaseContext(), true);\n startActivity(new Intent(getBaseContext(),MainActivity.class));\n finish();\n }", "private boolean isTwitterLoggedInAlready() {\n // return twitter login status from Shared Preferences\n return mSharedPreferences.getBoolean(PREF_KEY_TWITTER_LOGIN, false);\n }", "Boolean isLogIn();", "private void loggedInUser() {\n\t\t\n\t}", "@Override\n public boolean isLoggedin(HttpServletRequest request) {\n boolean result = false;\n HttpSession session = request.getSession();\n String userName = (String) session.getAttribute(\"userName\");\n String token = (String) session.getAttribute(\"token\");\n if (userName != null && token != null) {\n CrUser user = userRepo.findByUserName(userName);\n if (user != null && isTokenValid(user, token)) {\n result = true;\n }\n }\n return result;\n }", "public void login(View view) {\n\n final String username = mUsername.getText().toString();\n String password = mPassword.getText().toString();\n editor = pref.edit();\n if (rememberPass.isChecked()) {\n editor.putBoolean(\"remember_password\", true);\n editor.putString(\"account\", username);\n editor.putString(\"password\", password);\n\n } else {\n editor.clear();\n }\n editor.apply();\n if (username.equals(\"\") || password.equals(\"\"))\n return;\n if (variable_quantity.identify.equals(\"学生\")){\n Log.d(TAG, \"login: \"+variable_quantity.ifStudent);\n\n Toast.makeText(MainActivity.this, \"正在登录\", Toast.LENGTH_LONG).show();\n BmobQuery<users> query = new BmobQuery<users>();\n query.addWhereEqualTo(\"username\", username);\n query.addWhereEqualTo(\"password\", password);\n query.findObjects(new FindListener<users>() {\n @Override\n public void done(List<users> list, BmobException e) {\n if (e == null) {\n if (list.size() == 1) {\n Toast.makeText(MainActivity.this, \"已登录\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(MainActivity.this, ZhuYeMian.class);\n startActivity(intent);\n\n setUsername_key(username);\n } else {\n// Toast.makeText(MainActivity.this,\"用户名不存在,请先注册\",Toast.LENGTH_LONG).show();\n// Intent intent = new Intent(MainActivity.this,register.class);\n// startActivity(intent);\n BmobQuery<users> query = new BmobQuery<users>();\n query.addWhereEqualTo(\"username\", username);\n query.findObjects(new FindListener<users>() {\n @Override\n public void done(List<users> list, BmobException e) {\n if (isNet == false) {\n Toast.makeText(MainActivity.this, \"未连接网络\", Toast.LENGTH_LONG).show();\n return;\n }\n if (list.size() == 1) {\n Toast.makeText(MainActivity.this, \"用户名或密码错误\", Toast.LENGTH_LONG).show();\n return;\n } else {\n Toast.makeText(MainActivity.this, \"用户名不存在,请先注册1\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(MainActivity.this, register.class);\n startActivity(intent);\n }\n }\n });\n }\n } else {\n if (isNet == false) {\n Toast.makeText(MainActivity.this, \"未连接网络\", Toast.LENGTH_LONG).show();\n return;\n }\n Toast.makeText(MainActivity.this, \"用户名或密码错误\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n }else if(variable_quantity.identify.equals(\"商家\")){\n Log.d(TAG, \"identify: \"+identify);\n Toast.makeText(MainActivity.this, \"正在登录\", Toast.LENGTH_LONG).show();\n BmobQuery<business> query = new BmobQuery<business>();\n query.addWhereEqualTo(\"businessName\", username);\n query.addWhereEqualTo(\"password\", password);\n query.findObjects(new FindListener<business>() {\n @Override\n public void done(List<business> list, BmobException e) {\n if (e == null) {\n if (list.size() == 1) {\n Toast.makeText(MainActivity.this, \"已登录\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(MainActivity.this, ZhuYeMian.class);\n startActivity(intent);\n finish();\n setUsername_key(username);\n } else {\n// Toast.makeText(MainActivity.this,\"用户名不存在,请先注册\",Toast.LENGTH_LONG).show();\n// Intent intent = new Intent(MainActivity.this,register.class);\n// startActivity(intent);\n BmobQuery<business> query = new BmobQuery<business>();\n query.addWhereEqualTo(\"businessName\", username);\n query.findObjects(new FindListener<business>() {\n @Override\n public void done(List<business> list, BmobException e) {\n if (isNet == false) {\n Toast.makeText(MainActivity.this, \"未连接网络\", Toast.LENGTH_LONG).show();\n return;\n }\n if (list.size() == 1) {\n Toast.makeText(MainActivity.this, \"用户名或密码错误\", Toast.LENGTH_LONG).show();\n return;\n } else {\n Toast.makeText(MainActivity.this, \"用户名不存在,请先注册2\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(MainActivity.this, newBusiness.class);\n startActivity(intent);\n }\n }\n });\n }\n } else {\n if (isNet == false) {\n Toast.makeText(MainActivity.this, \"未连接网络\", Toast.LENGTH_LONG).show();\n return;\n }\n Toast.makeText(MainActivity.this, \"用户名或密码错误\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }else{\n Toast.makeText(MainActivity.this, \"请选择你的身份\", Toast.LENGTH_LONG).show();\n }\n\n\n\n// users loginObj = new users();\n// loginObj.setUsername(username);\n// loginObj.setPassword(password);\n// loginObj.save(new SaveListener<String>() {\n// @Override\n// public void done(String s, BmobException e) {\n// if(e==null){\n// Toast.makeText(MainActivity.this,\"success\",Toast.LENGTH_SHORT).show();\n// }\n// else\n// Toast.makeText(MainActivity.this,\"failure\",Toast.LENGTH_SHORT).show();\n//\n// }\n// });\n\n// users users = new users();\n// users.setUsername(username);\n// users.setPassword(password);\n// users.login(new SaveListener<String>() {\n//\n// public void done(String s, BmobException e) {\n// if(e==null){\n// Toast.makeText(MainActivity.this,\"success\",Toast.LENGTH_SHORT).show();\n// }\n// else\n// Toast.makeText(MainActivity.this,\"failure\",Toast.LENGTH_SHORT).show();\n//\n// }\n// });\n\n }", "public boolean hasWeixinLogin() {\n return weixinLoginBuilder_ != null || weixinLogin_ != null;\n }", "public static void saveLoginWhenFirst(Context context) {\n SharedPreferences.Editor editor = context.getSharedPreferences(SHARED_PREFERENCES_KEY, context.MODE_PRIVATE).edit();\n editor.putBoolean(IS_FIRST_TOKEN,false);\n editor.commit();\n }", "private boolean requestUserLogin() {\n\t\tServerAPITask userTasks = new ServerAPITask();\n\t\tString uName = usernameField.getText().toString();\n\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\ttry {\n\t\t\tString response = userTasks.execute(\"\").get();\n\t\t\tLog.e(\"Response String\", response);\n\t\t\t\n\t\t\tjsonResponse = new JSONArray(response);\n\t\t\tif (jsonResponse.length() < 1) {\n\t\t\t\tToast.makeText(this.getContext(), \"The username does not exist\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJSONObject jsObj = jsonResponse.getJSONObject(0);\n\t\t\t\tif (jsObj == null) {\n\t\t\t\t\tToast.makeText(this.getContext(), \"An error occurred while retrieving user\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString _user_id = jsObj.getString(\"_id\");\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USER_ID_KEY, _user_id);\n\t\t\t\t\t\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USERNAME_KEY, uName);\n\t\t\t\t\t((Activity) userContext).getActionBar().setTitle(\"Stone - \" + uName);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\treturn true;\n\t}", "private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }", "public void customLoginTwitter() {\n //check if user is already authenticated or not\n if (getTwitterSession() == null) {\n\n //if user is not authenticated start authenticating\n client.authorize(this, new Callback<TwitterSession>() {\n @Override\n public void success(Result<TwitterSession> result) {\n\n // Do something with result, which provides a TwitterSession for making API calls\n TwitterSession twitterSession = result.data;\n fetchTwitterEmail(twitterSession);\n }\n\n @Override\n public void failure(TwitterException e) {\n // Do something on failure\n Toast.makeText(SignInActivity.this, \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n //if user is already authenticated direct call fetch twitter email api\n Toast.makeText(this, \"User already authenticated\", Toast.LENGTH_SHORT).show();\n// fetchTwitterEmail(getTwitterSession());\n }\n }", "void setAllSeenByLogin(String login);", "public int getLoginFlag() {\n return loginFlag_;\n }", "private static void logedIn(Request req, Response res, CloudService cloud) {\r\n\t\t\tif (cloud.getKorisnici().get(req.cookie(\"userID\")) == null) {\r\n\t\t\t\tString[] params = req.splat();\r\n\t\t\t\tString path;\r\n\t\t\t\tif(params.length == 0)\r\n\t\t\t\t\tpath = \"\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpath = params[0];\r\n\t\t\t\tif(path.equals(\"checkLogin\") || path.equals(\"favicon.ico\"))\r\n\t\t\t\t\treturn;\r\n\t\t\t\tres.redirect(\"/login.html\");\r\n\t\t\t\thalt(302);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(req.session().attribute(\"user\") == null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tKorisnik k = cloud.getKorisnici().get(req.cookie(\"userID\"));\r\n\t\t\t\t\treq.session().attribute(\"user\", k); // postavi mu korisnika za sesiju\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic boolean login(Map<String, Object> map) {\n\t\treturn false;\n\t}", "public boolean isUserAuthenticated() {\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n if(settings!=null){\n String user=settings.getString(\"userid\",null);\n String area=settings.getString(\"areaid\",null);\n if (user != null && !user.equals(\"\")) {\n mUserId=user;\n mAreaId=area;\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "private Boolean isInSession(String token, String username) {\n \treturn true;\n }", "@Override\n protected boolean tryAlreadyLoginOrRememberMe(LoginHandlingResource resource) {\n if (super.tryAlreadyLoginOrRememberMe(resource)) { // if hybrid with session\n return true;\n }\n return requestManager.getHeader(\"x-authorization\").flatMap(token -> {\n return findByAuthToken(token).map(member -> {\n syncCheckLoginSessionIfNeeds(createUserBean(member)); // sometimes synchronize with database\n saveLoginInfoToSession(member); // if hybrid with session\n return true;\n });\n }).orElse(false);\n }", "public boolean hasLogin() {\n return login_ != null;\n }", "public void login() {\n\t\tloggedIn = true;\n\t}", "final String loginAsAutoUser() {\r\n \treturn loginAsAutoUser(false);\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public boolean checklogin() {\n\t\treturn (pref.getBoolean(\"isLog\", false));\n\t}", "public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}", "public boolean isUserLoggedIn();", "public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }", "public boolean gotUserName(){return gotUserName;}", "boolean hasLoginResponse();", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\n\t\t\t\t\tpublic boolean loginWithGoogle(String userName, String password) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "public Boolean login(String nome, String senha) {\n try {\n if (metodos.logar(nome, senha)) {\n this.nome = nome;\n return true;\n }\n } catch (RemoteException ex) {\n Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return false;\n }", "public int getLoginFlag() {\n return loginFlag_;\n }", "public boolean isSetLogin() {\n return this.login != null;\n }", "public boolean isSetLogin() {\n return this.login != null;\n }", "private void checkLogin() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String username = preferences.getString(\"username\", null);\n if(username==null){\n Intent intent = new Intent(this,LoginActivity.class);\n startActivity(intent);\n }\n else {\n /* if(preferences.getString(\"name\",null) ==null)\n Toast.makeText(HomeActivity.this, \"Hello \" +username, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, \"Hello \" + preferences.getString(\"name\", \"username\"), Toast.LENGTH_SHORT).show();\n */}\n }", "private boolean loggedIn() {\n boolean exist = false;\n UsuarioBean u = (UsuarioBean) FacesUtil.getBean(\"usuarioBean\");\n if (u.getLoggedIn() != null) {\n exist = u.getLoggedIn().booleanValue();\n }\n return exist;\n }", "public boolean getFacebookLogin() {\n return sp.getBoolean(USER_MANUAL_LOGIN, false);\n }", "public boolean isLoggedin(){\n return STATE.equals(IN);\n }", "boolean hasLoginapifailhitcount();", "public static boolean shouldLogin() {\n if (AppPreference.getInstance().getUserLoggedIn() == null ) {\n //|| deltaActive > Constant.SESSION_EXIPRED_TIME) {\n return true;\n }\n\n return false;\n }", "@Override\n\tpublic void setLoggedIn(boolean arg0) {\n\t\t\n\t}", "private boolean checkRemember() {\n boolean ricorda = sessionManager.checkLogin();\n\n if (ricorda) {\n rememberMe.setChecked(true);\n editTextUsername.setText(sessionManager.getSessionUsername());\n editTextPassword.setText(sessionManager.getSessionPassword());\n ricorda = true;\n }\n return ricorda;\n }", "protected String loginIdentifyString() {\r\n return \"hao\";\r\n }", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "private void checkIfLoggedIn() {\n LocalStorage localStorage = new LocalStorage(getApplicationContext());\n\n if(localStorage.checkIfAuthorityPresent()){\n Intent intent = new Intent(getApplicationContext(),AuthorityPrimaryActivity.class);\n startActivity(intent);\n } else if(localStorage.checkIfUserPresent()){\n Intent intent = new Intent(getApplicationContext(), UserPrimaryActivity.class);\n startActivity(intent);\n }\n }", "private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }", "public void customLoginTwitter(View view) {\n if (getTwitterSession() == null) {\n\n //if user is not authenticated start authenticating\n client.authorize(getActivity(), new Callback<TwitterSession>() {\n @Override\n public void success(Result<TwitterSession> result) {\n // Do something with result, which provides a TwitterSession for making API calls\n TwitterSession twitterSession = result.data;\n fetchTwitterAccount();\n dismiss();\n }\n\n @Override\n public void failure(TwitterException e) {\n // Do something on failure\n Toast.makeText(getActivity().getApplicationContext(), \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n //if user is already authenticated direct call fetch twitter email api\n Toast.makeText(getActivity().getApplicationContext(), \"User already authenticated\", Toast.LENGTH_SHORT).show();\n }\n }", "public boolean autentica(int senha) {\n\t\tif(this.senha == senha) {\n\t\treturn true;\n\t\t} else {\n\t\treturn false;\n\t\t}\n\t}", "public boolean checkLogin() {\n return sharedPref.getBoolean(LOGGEDIN_KEY, false);\n }", "private void initFBTwitterLogIn() {\n TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);\n Fabric.with(AuthenticationFragment.this.getContext(), new Twitter(authConfig));\n }", "@Override\n\tpublic boolean followUser(Long us_id) {\n\t\treturn false;\n\t}", "@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}", "@Override\n\tpublic boolean autentica(String senha) {\n\t\treturn false;\n\t}", "public void checkAlreadyLogin(CheckLoggedInInterface listner) {\n currentUser = firebaseAuth.getCurrentUser();\n if(currentUser != null) listner.isLoggedIn(true);\n else listner.isLoggedIn(false);\n }", "boolean isLoginAvailable();", "public void setLogin(LoginModel param) {\n localLoginTracker = true;\n\n this.localLogin = param;\n }", "public boolean hasLogin() {\n return loginBuilder_ != null || login_ != null;\n }", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }", "private void checkIfUserIsAuthenticated() {\n splashViewModel.checkIfUserIsAuthenticated();\n splashViewModel.getIsUserAuthenticated().observe(this, user -> {\n if (!user.isAuthenticated()) {\n startAuthActivity();\n finish();\n } else {\n getUserFromDatabase(user.getUid());\n }\n });\n }", "private void checkForSavedLogin() {\n\t\taccessToken = getAccessToken();\n\t\tif (accessToken==null) return;\t//if there are no credentials stored then return to usual activity\n\n\t\t// initialize Twitter4J\n\t\ttwitter.setOAuthAccessToken(accessToken);\n\t}", "@Override\n public void login(String nome, String email, int senha) {\n if (getNome() == nome && this.getEmail() == email && this.getSenha() == senha){\n System.out.println(\"Login efetuado com sucesso\");\n } else {\n System.out.println(\"0 - Sair\");\n System.out.println(\"Saiu do usuario\");\n }\n\n }", "void setAuthenticated(boolean b);", "void AllowUserToLogin(String userName, String password) {\n\t\tParseUser.logInInBackground(userName, password, new LogInCallback() {\r\n\t\t\tpublic void done(ParseUser user, ParseException e) {\r\n\t\t\t\tif (user != null) {\r\n\t\t\t\t\t// If user exist and authenticated, send user to\r\n\t\t\t\t\t// Welcome.class\r\n\t\t\t\t\tIntent intent = new Intent(Register.this, ClientList.class);\r\n\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\r\n\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_CLEAR_TASK);\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\t\"Successfully Logged in\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\tshowAlert(\"No such user exist, please signup\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void checkIfAtLogin(){\n checkIfIdDisplayed(R.id.login_main_view);\n checkIfIdDisplayed(R.id.username_text_input);\n checkIfIdDisplayed(R.id.password_text_input);\n checkIfIdDisplayed(R.id.login_button);\n }", "public Builder setLoginFlag(int value) {\n \n loginFlag_ = value;\n onChanged();\n return this;\n }", "private void login_finally(String token, String user_name){\n RequestBody requestBody = new FormBody.Builder()\r\n .add(\"username\", user_name)\r\n .add(\"password\", password)\r\n .build();\r\n\r\n HttpUtil.sendOkHttpRequest(Login.this, login_url, requestBody, new Callback(){\r\n int check_login_user = 0;\r\n String user_name;\r\n\r\n @Override\r\n public void onResponse(Call call, Response response) throws IOException{\r\n Slog.d(TAG, \"========header :\"+response.headers());\r\n String responseText = response.body().string();\r\n Slog.d(TAG, \"login response : \"+responseText);\r\n if(!TextUtils.isEmpty(responseText)){\r\n try {\r\n JSONObject login_response= new JSONObject(responseText);\r\n String sessionId = login_response.getString(\"sessid\");\r\n String session_name = login_response.getString(\"session_name\");\r\n JSONObject user = login_response.getJSONObject(\"user\");\r\n Slog.d(TAG, \"sessionId: \"+sessionId+\"===session name: \"+session_name);\r\n\r\n SharedPreferences.Editor editor = getSharedPreferences(\"session\", MODE_PRIVATE).edit();\r\n editor.putString(\"sessionId\", sessionId);\r\n editor.putString(\"sessionName\", session_name);\r\n editor.putInt(\"uid\", user.getInt(\"uid\"));\r\n editor.apply();\r\n\r\n Intent intent = new Intent(Login.this, MainActivity.class);\r\n startActivity(intent);\r\n\r\n\r\n }catch (JSONException e){\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Call call, IOException e){\r\n runOnUiThread(new Runnable(){\r\n @Override\r\n public void run(){\r\n closeProgressDialog();\r\n Toast.makeText(Login.this, \"登录失败\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n }\r\n });\r\n }", "public boolean isLoggedIn() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n return sharedPreferences.getString(KEY_EMAIL, null) != null;\r\n }", "private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }", "public DialogRegistroUser(Login vl, boolean b) {\r\n\t\tsuper();\r\n\t\tinicializar();\r\n\t}", "void onOnlineLoginSuccess(User user);" ]
[ "0.64690953", "0.6446348", "0.6366738", "0.6260299", "0.6156295", "0.61519206", "0.6138971", "0.6132651", "0.61197984", "0.6118711", "0.6118711", "0.6099967", "0.6092767", "0.6064161", "0.6036815", "0.60193884", "0.601509", "0.5987978", "0.5982802", "0.5976034", "0.59612924", "0.5934658", "0.59091944", "0.5897103", "0.58850634", "0.58662933", "0.5861311", "0.5861108", "0.585309", "0.5846955", "0.5842012", "0.5833397", "0.5827945", "0.5795959", "0.57883435", "0.57820576", "0.57804304", "0.5778285", "0.57769674", "0.57722116", "0.57684046", "0.57527834", "0.5751606", "0.5751479", "0.5750686", "0.5737758", "0.5726937", "0.5724494", "0.5724494", "0.5724494", "0.57130873", "0.57120275", "0.57007223", "0.5695766", "0.5685801", "0.5682078", "0.5681826", "0.5681826", "0.56751657", "0.5673761", "0.5669767", "0.56647015", "0.56647015", "0.5657933", "0.5655247", "0.56551766", "0.565086", "0.56437814", "0.5642696", "0.5636577", "0.5630652", "0.56229436", "0.5615236", "0.5599375", "0.5596765", "0.5589777", "0.55817753", "0.55787784", "0.5569037", "0.5568436", "0.556793", "0.556106", "0.5557158", "0.55547863", "0.55361444", "0.5534695", "0.5530063", "0.5518051", "0.5514993", "0.55139905", "0.5503456", "0.55020577", "0.54969877", "0.54938716", "0.5491108", "0.54826754", "0.54817045", "0.5479961", "0.5479934", "0.5474609" ]
0.59306246
22
/ Check if user login nyftii by Weibo
public static boolean isMainAccount() { SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); return sharedPref.isWeiboMainAccount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasWeixinLogin();", "boolean hasLoginapiavgrtt();", "boolean hasLogin();", "boolean hasLogin();", "boolean hasLoginRequest();", "public static boolean checkUserFBLogin() {\n\t\tboolean isFbLogin = Pref.getBoolean(\n\t\t\t\tGeneralClass.temp_iUserFaceBookBLOGIN, false);\n\t\t// Log.e(\"is facebook login\", \"---->\" + isFbLogin);\n\t\t// if (isloginShare && isFbLogin) {\n\t\t// return false;\n\t\t// } else {\n\t\tif (isFbLogin) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t// }\n\t}", "@Override\n public boolean isLoggedin(HttpServletRequest request) {\n boolean result = false;\n HttpSession session = request.getSession();\n String userName = (String) session.getAttribute(\"userName\");\n String token = (String) session.getAttribute(\"token\");\n if (userName != null && token != null) {\n CrUser user = userRepo.findByUserName(userName);\n if (user != null && isTokenValid(user, token)) {\n result = true;\n }\n }\n return result;\n }", "public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }", "boolean hasLoginResponse();", "boolean hasLoginapifailhitcount();", "public static boolean checkUserLogin(String login)\n\t{\n\t\tSearchResponse response = client.prepareSearch(\"projektzespolowy\")\n\t\t\t\t.setTypes(\"user\")\n\t\t\t\t.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)\n\t\t\t\t.setQuery(QueryBuilders.termQuery(\"LOGIN\", login))\n\t\t\t\t.setSize(0).setFrom(0)\n\t\t\t\t.execute()\n\t\t\t\t.actionGet();\n\t\t\n\t\t\n\t\tif(response.getHits().getTotalHits() > 0)\n\t\t\treturn false;\n\t\telse \n\t\t\treturn true;\n\t}", "boolean isLoginAvailable();", "public boolean loginUser();", "public boolean hasWeixinLogin() {\n return weixinLogin_ != null;\n }", "private boolean requestUserLogin() {\n\t\tServerAPITask userTasks = new ServerAPITask();\n\t\tString uName = usernameField.getText().toString();\n\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\ttry {\n\t\t\tString response = userTasks.execute(\"\").get();\n\t\t\tLog.e(\"Response String\", response);\n\t\t\t\n\t\t\tjsonResponse = new JSONArray(response);\n\t\t\tif (jsonResponse.length() < 1) {\n\t\t\t\tToast.makeText(this.getContext(), \"The username does not exist\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJSONObject jsObj = jsonResponse.getJSONObject(0);\n\t\t\t\tif (jsObj == null) {\n\t\t\t\t\tToast.makeText(this.getContext(), \"An error occurred while retrieving user\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString _user_id = jsObj.getString(\"_id\");\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USER_ID_KEY, _user_id);\n\t\t\t\t\t\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USERNAME_KEY, uName);\n\t\t\t\t\t((Activity) userContext).getActionBar().setTitle(\"Stone - \" + uName);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\treturn true;\n\t}", "boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);", "public boolean logedIn(String logindata) {\r\n\t\tif (logindata == null) {\r\n\t\t\tSystem.out.println(logindata);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tSystem.out.println(logindata);\r\n\t\tString[] data = logindata.split(\"-\");\r\n\t\tif (Ueberpruefer.loginUberpruefung(benutzer, data[0], data[1])) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isLoggedIn(){\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n if (sharedPreferences.getString(KEY_USERNAME, null) != null){\n return true;\n }\n return false;\n }", "public boolean isUserExisted(String _fbEmail);", "boolean hasLoginapisuccessfulhitcount();", "boolean isLogin(String username, String password)\n {\n String endURL = \"login/\" + username + \"/\" + password;\n return (request(\"GET\", \"\", endURL).equals(\"SUCCESSFUL\"));\n }", "private Boolean isInSession(String token, String username) {\n \treturn true;\n }", "Boolean isLogIn();", "@WebMethod public Pertsona isLogin(String erabiltzaileIzena, String pasahitza);", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "private void checkLogin() {\n SharedPref sp = new SharedPref(this);\n if (!sp.readLoginStatus()) {\n Intent i = new Intent(this, LoginActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);\n startActivity(i);\n }\n }", "boolean hasLoginapihitcount();", "private boolean AlreadyLogin() {\n\t\tString usn = uPreferences.getString(\"username\", null);\n\t\tString pwd = uPreferences.getString(\"password\", null);\n\t\tif((usn == null) || ((pwd == null))){\n\t\t\treturn false;\n\t\t}\n\t\telse \n\t\t\treturn true;\n\t}", "private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }", "public boolean checkToken(BrewFindToken tok) {\n\t\t\n\t\t// The 'token' field on BrewFindToken contains the username base64 encoded\n\t\tString uname = Base64.decodeAsString(tok.token);\n\t\t\n\t\t// Make sure the user exists\n\t\tUser u = findUser(uname);\n\t\tif(u == null) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn checkToken(tok, u);\n\t\t\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }", "public boolean hasWeixinLogin() {\n return weixinLoginBuilder_ != null || weixinLogin_ != null;\n }", "private boolean checkLogin() {\n firebaseAuth = FirebaseAuth.getInstance();\n currentUser = firebaseAuth.getCurrentUser();\n if(currentUser == null) {\n //show login activity\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n return false;\n } else {\n verifyUserPII(currentUser);\n return true;\n }\n }", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "private void checkIfAtLogin(){\n checkIfIdDisplayed(R.id.login_main_view);\n checkIfIdDisplayed(R.id.username_text_input);\n checkIfIdDisplayed(R.id.password_text_input);\n checkIfIdDisplayed(R.id.login_button);\n }", "int getLoginFlag();", "public boolean isUserLoggedIn();", "private void checkLogin(final String email, final String password, final String isFacebookLogin) {\n String tag_string_req = \"req_login\";\n mDialog = new ProgressDialaogView().getProgressDialog(getActivity());\n mDialog.show();\n\n NetworkUtils.callLogin(isFacebookLogin, email, password, tag_string_req, LoginFragmentMain.this);\n }", "private boolean isLoginUnique(int currentUserId){\n\t\tUser user = Main.getMMUser().getUserForLogin(userLoginField.getText());\n\t\tif (user == null) return true;\n\t\telse {\n\t\t\tif (user.getId() == currentUserId) return true;\n\t\t}\t\n\t\tlackUserLoginLabel.setText(\"taki login istnieje w bazie\");\n\t\tlackUserLoginLabel.setVisible(true);\n\t\treturn false;\n\t}", "private boolean isAuthorize(String token, String username) {\n User user;\n user = lobbyManager.getUserByToken(token);\n return !user.getName().equals(username);\n }", "private boolean isLoggedInUser(){\n return true;\n }", "public boolean isUserLoggedIn(Context context){\n\t\tDatabaseHandler db = new DatabaseHandler(context);\n\t\tint count = db.getRowCount();\n\t\tif(count > 0){\n\t\t\t// user logged in\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void checkIfLoggedIn() {\n LocalStorage localStorage = new LocalStorage(getApplicationContext());\n\n if(localStorage.checkIfAuthorityPresent()){\n Intent intent = new Intent(getApplicationContext(),AuthorityPrimaryActivity.class);\n startActivity(intent);\n } else if(localStorage.checkIfUserPresent()){\n Intent intent = new Intent(getApplicationContext(), UserPrimaryActivity.class);\n startActivity(intent);\n }\n }", "boolean hasUserName();", "public abstract boolean isLoggedIn(String url);", "private boolean validateFBLogin() {\n\t\tSession session = Session.getActiveSession();\n\t\tif (session != null && session.isOpened()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSession sessionNew = Session.openActiveSessionFromCache(this);\n\n\t\t\tif (sessionNew != null && sessionNew.isOpened()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "boolean hasLoggedIn();", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "public boolean login() throws Exception {\n\n\t\tif (LoginDataBase.getInstance().constainsUsername(username)) {\n\t\t\t// local memory has records of that\n\t\t\tif (hashedPassword == LoginDataBase.getInstance()\n\t\t\t\t\t.getHashedPassword(password)) {\n\t\t\t\tsessionID = UUID.randomUUID().toString();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tPassExceptionToUI.passToUI(new PasswordMismatchError());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// check with web server\n\t\t\tCertificateValidation.invalidate();\n\t\t\tURL url = new URL(\n\t\t\t\t\t\"https://mlite-demo.musoni.eu:8443/mifosng-provider/api/v1/authentication?username=\"\n\t\t\t\t\t\t\t+ username\n\t\t\t\t\t\t\t+ \"&password=\"\n\t\t\t\t\t\t\t+ password\n\t\t\t\t\t\t\t+ \"&tenantIdentifier=code4good\");\n\n\t\t\tHttpsURLConnection con = (HttpsURLConnection) url.openConnection();\n\t\t\tcon.setRequestMethod(\"POST\");\n\n\t\t\tif (con.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\t// if the account is found in web server\n\t\t\t\tLoginDataBase.getInstance().updateDataBase(username, hashedPassword);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// if web server does not have match\n\t\t\t\tPassExceptionToUI.passToUI(new UsernameMismatchError(username));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "private boolean isTwitterLoggedInAlready() {\n // return twitter login status from Shared Preferences\n return mSharedPreferences.getBoolean(PREF_KEY_TWITTER_LOGIN, false);\n }", "@Override\n\tpublic boolean isLogin() {\n\t\treturn false;\n\t}", "public void login(View view) {\n\n final String username = mUsername.getText().toString();\n String password = mPassword.getText().toString();\n editor = pref.edit();\n if (rememberPass.isChecked()) {\n editor.putBoolean(\"remember_password\", true);\n editor.putString(\"account\", username);\n editor.putString(\"password\", password);\n\n } else {\n editor.clear();\n }\n editor.apply();\n if (username.equals(\"\") || password.equals(\"\"))\n return;\n if (variable_quantity.identify.equals(\"学生\")){\n Log.d(TAG, \"login: \"+variable_quantity.ifStudent);\n\n Toast.makeText(MainActivity.this, \"正在登录\", Toast.LENGTH_LONG).show();\n BmobQuery<users> query = new BmobQuery<users>();\n query.addWhereEqualTo(\"username\", username);\n query.addWhereEqualTo(\"password\", password);\n query.findObjects(new FindListener<users>() {\n @Override\n public void done(List<users> list, BmobException e) {\n if (e == null) {\n if (list.size() == 1) {\n Toast.makeText(MainActivity.this, \"已登录\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(MainActivity.this, ZhuYeMian.class);\n startActivity(intent);\n\n setUsername_key(username);\n } else {\n// Toast.makeText(MainActivity.this,\"用户名不存在,请先注册\",Toast.LENGTH_LONG).show();\n// Intent intent = new Intent(MainActivity.this,register.class);\n// startActivity(intent);\n BmobQuery<users> query = new BmobQuery<users>();\n query.addWhereEqualTo(\"username\", username);\n query.findObjects(new FindListener<users>() {\n @Override\n public void done(List<users> list, BmobException e) {\n if (isNet == false) {\n Toast.makeText(MainActivity.this, \"未连接网络\", Toast.LENGTH_LONG).show();\n return;\n }\n if (list.size() == 1) {\n Toast.makeText(MainActivity.this, \"用户名或密码错误\", Toast.LENGTH_LONG).show();\n return;\n } else {\n Toast.makeText(MainActivity.this, \"用户名不存在,请先注册1\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(MainActivity.this, register.class);\n startActivity(intent);\n }\n }\n });\n }\n } else {\n if (isNet == false) {\n Toast.makeText(MainActivity.this, \"未连接网络\", Toast.LENGTH_LONG).show();\n return;\n }\n Toast.makeText(MainActivity.this, \"用户名或密码错误\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n }else if(variable_quantity.identify.equals(\"商家\")){\n Log.d(TAG, \"identify: \"+identify);\n Toast.makeText(MainActivity.this, \"正在登录\", Toast.LENGTH_LONG).show();\n BmobQuery<business> query = new BmobQuery<business>();\n query.addWhereEqualTo(\"businessName\", username);\n query.addWhereEqualTo(\"password\", password);\n query.findObjects(new FindListener<business>() {\n @Override\n public void done(List<business> list, BmobException e) {\n if (e == null) {\n if (list.size() == 1) {\n Toast.makeText(MainActivity.this, \"已登录\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(MainActivity.this, ZhuYeMian.class);\n startActivity(intent);\n finish();\n setUsername_key(username);\n } else {\n// Toast.makeText(MainActivity.this,\"用户名不存在,请先注册\",Toast.LENGTH_LONG).show();\n// Intent intent = new Intent(MainActivity.this,register.class);\n// startActivity(intent);\n BmobQuery<business> query = new BmobQuery<business>();\n query.addWhereEqualTo(\"businessName\", username);\n query.findObjects(new FindListener<business>() {\n @Override\n public void done(List<business> list, BmobException e) {\n if (isNet == false) {\n Toast.makeText(MainActivity.this, \"未连接网络\", Toast.LENGTH_LONG).show();\n return;\n }\n if (list.size() == 1) {\n Toast.makeText(MainActivity.this, \"用户名或密码错误\", Toast.LENGTH_LONG).show();\n return;\n } else {\n Toast.makeText(MainActivity.this, \"用户名不存在,请先注册2\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(MainActivity.this, newBusiness.class);\n startActivity(intent);\n }\n }\n });\n }\n } else {\n if (isNet == false) {\n Toast.makeText(MainActivity.this, \"未连接网络\", Toast.LENGTH_LONG).show();\n return;\n }\n Toast.makeText(MainActivity.this, \"用户名或密码错误\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }else{\n Toast.makeText(MainActivity.this, \"请选择你的身份\", Toast.LENGTH_LONG).show();\n }\n\n\n\n// users loginObj = new users();\n// loginObj.setUsername(username);\n// loginObj.setPassword(password);\n// loginObj.save(new SaveListener<String>() {\n// @Override\n// public void done(String s, BmobException e) {\n// if(e==null){\n// Toast.makeText(MainActivity.this,\"success\",Toast.LENGTH_SHORT).show();\n// }\n// else\n// Toast.makeText(MainActivity.this,\"failure\",Toast.LENGTH_SHORT).show();\n//\n// }\n// });\n\n// users users = new users();\n// users.setUsername(username);\n// users.setPassword(password);\n// users.login(new SaveListener<String>() {\n//\n// public void done(String s, BmobException e) {\n// if(e==null){\n// Toast.makeText(MainActivity.this,\"success\",Toast.LENGTH_SHORT).show();\n// }\n// else\n// Toast.makeText(MainActivity.this,\"failure\",Toast.LENGTH_SHORT).show();\n//\n// }\n// });\n\n }", "public static boolean shouldLogin() {\n if (AppPreference.getInstance().getUserLoggedIn() == null ) {\n //|| deltaActive > Constant.SESSION_EXIPRED_TIME) {\n return true;\n }\n\n return false;\n }", "boolean hasAuth();", "boolean hasUserAppId();", "boolean hasUserAppId();", "private boolean cekUser(String user){\n return user.equals(Preferences.getRegisteredUser(getBaseContext()));\n }", "public boolean hasLogin() {\n return login_ != null;\n }", "@Override\n\tpublic String checkuser() {\n\t\ttry {\n\t\t\tMap<String, String> sParam = new LinkedHashMap<String, String>();\n\t\t\tsParam.put(\"uid\", userid);\n\t\t\tsParam.put(\"serverid\", serverid+\"\");\n\t\t\tHttp h = Http.getInstance();\n\t\t\tString SubmitResult = h.hp(QST_CHECK_PATH,sParam,\"get\");\n\t\t\t\n//\t\t\tString SubmitResult = Http.hp(QST_CHECK_PATH+\"?uid=\"+userid+\"&serverid=\"+serverid);\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\n\t\t\t return SubmitResult;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\n\t}", "@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }", "public boolean isLoggedIn() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n return sharedPreferences.getString(KEY_EMAIL, null) != null;\r\n }", "private void checkAccessAndLoggIn() {\n // Make sure we have access\n ConnectionChecker connectionHelper = new ConnectionChecker(this);\n boolean haveAccess = connectionHelper.canConnectInternet();\n if (haveAccess) {\n // Check if user is logged in\n final ParseUser user = ParseUser.getCurrentUser();\n boolean isLoggedIn = (user != null);\n Log.d(TAG, \"User logged in = \" + isLoggedIn);\n checkLogIn(isLoggedIn);\n } else {\n // Alert user we need access to internet\n Toast.makeText(this, \"We are unable to access Good Feed. Please check your connection\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic boolean check() {\n\t\tSystem.out.println(\"\\n---------登陆---------\");\n\t\tSystem.out.println(\"请输入ID\");\n\t\tString ID_C=console.next();\n\t\tSystem.out.println(\"请输入密码\");\n\t\tString code_c=console.next();\n\t\t if (!Tool.confirm(ID_C, \"log\")) {\n\t System.out.println(\"[此ID不存在] 重新输入#返回\");\n\t if((ID = Tool.back()) == null)\n\t return false;\n\t }\n\t\t Statement sta;\n\t ResultSet rs;\n\t try {\n\t sta = conn.createStatement();\n\t rs = sta.executeQuery(\"SELECT code FROM log WHERE ID=\"+ID_C);\n\t rs.next();\n\t if (rs.getString(1).equals(code_c))\n\t return true;\n\t \n\t } catch (SQLException e) {\n\t e.printStackTrace();\n\t }\n\t\treturn false;\n\t}", "private boolean loggedIn() {\n boolean exist = false;\n UsuarioBean u = (UsuarioBean) FacesUtil.getBean(\"usuarioBean\");\n if (u.getLoggedIn() != null) {\n exist = u.getLoggedIn().booleanValue();\n }\n return exist;\n }", "@Override\r\n\tpublic void ShowLogin(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e( \"ShowLogin\");\r\n\t\tsuper.ShowLogin(_in_context, _in_data);\r\n\t\tif(HMPay.isLogined()){\r\n\t\t\tTypeSDKNotify_haima notify = new TypeSDKNotify_haima();\r\n \t\tnotify.sendToken(token, uid);\r\n\t\t} else {\r\n\t\t\tthis.haimaLogin();\r\n\t\t}\r\n\t\t\r\n\t}", "public static boolean login(Context ctx) {\n\t\t\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\t\n\t\tSystem.out.println(username);\n\t\tSystem.out.println(password);\n\t\t\n\t\tif(username.equals(\"user\") && password.equals(\"pass\")) {\n\t\t\tctx.res.setStatus(204);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"McBobby\",true));\n\t\t\treturn true;\n\t\t}else {\n\t\t\t\n\t\t\tctx.res.setStatus(400);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"fake\",false));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n//\t\tctx.queryParam(password); /authenticate?password=value\n//\t\tctx.pathParam(password); /authenticate/{password}\n\t}", "@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}", "private void checkIfUserIsAuthenticated() {\n splashViewModel.checkIfUserIsAuthenticated();\n splashViewModel.getIsUserAuthenticated().observe(this, user -> {\n if (!user.isAuthenticated()) {\n startAuthActivity();\n finish();\n } else {\n getUserFromDatabase(user.getUid());\n }\n });\n }", "public Boolean login(String nome, String senha) {\n try {\n if (metodos.logar(nome, senha)) {\n this.nome = nome;\n return true;\n }\n } catch (RemoteException ex) {\n Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return false;\n }", "public void customLoginTwitter() {\n //check if user is already authenticated or not\n if (getTwitterSession() == null) {\n\n //if user is not authenticated start authenticating\n client.authorize(this, new Callback<TwitterSession>() {\n @Override\n public void success(Result<TwitterSession> result) {\n\n // Do something with result, which provides a TwitterSession for making API calls\n TwitterSession twitterSession = result.data;\n fetchTwitterEmail(twitterSession);\n }\n\n @Override\n public void failure(TwitterException e) {\n // Do something on failure\n Toast.makeText(SignInActivity.this, \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n //if user is already authenticated direct call fetch twitter email api\n Toast.makeText(this, \"User already authenticated\", Toast.LENGTH_SHORT).show();\n// fetchTwitterEmail(getTwitterSession());\n }\n }", "public Boolean checkToken(BrewFindToken tok, User u) {\n\t\tBrewFindToken uTok = u.getU_curToken();\t\n\t\tif(uTok == null) {\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// Check that the token matches\n\t\tif((tok.access == uTok.access) && (tok.stamp == uTok.stamp) && (tok.token.equals(uTok.token))) {\n\t\t\treturn true;\n\t\t}\n\t\t\t\t\n\t\treturn false;\n\t}", "public boolean checkLogin() {\n // Check login status\n if (!this.usuarioConectado()) {\n\n // user is not logged in redirect him to Login Activity\n Intent i = new Intent(contexto, LoginActivity.class);\n\n // Closing all the Activities from stack\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n // Add new Flag to start new Activity\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n // Staring Login Activity\n contexto.startActivity(i);\n\n return true;\n }\n return false;\n }", "public static boolean logIn(LogIn log) throws Exception {\r\n PreparedStatement prepedSt = con.prepareStatement(\"Select username,\"\r\n + \"password from accounts where username=? And password=?\");\r\n prepedSt.setString(1,log.credent[0]);\r\n prepedSt.setString(2,log.credent[1]);\r\n ResultSet rs = prepedSt.executeQuery(); \r\n return rs.next() != false;\r\n }", "private void checkLogin() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String username = preferences.getString(\"username\", null);\n if(username==null){\n Intent intent = new Intent(this,LoginActivity.class);\n startActivity(intent);\n }\n else {\n /* if(preferences.getString(\"name\",null) ==null)\n Toast.makeText(HomeActivity.this, \"Hello \" +username, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, \"Hello \" + preferences.getString(\"name\", \"username\"), Toast.LENGTH_SHORT).show();\n */}\n }", "protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "public boolean isLogin() {\n // Mengembalikan nilai boolean degan mengambil data dari pref KEY_IS_LOGIN\n return preference.getBoolean(Constants.KEY_IS_LOGIN, false);\n }", "private boolean checkLogin(String enterLogin) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getLogin().equals(enterLogin)) {\n return true;\n }\n }\n return false;\n }", "@Override\n\t\t\t\t\tpublic boolean loginWithGoogle(String userName, String password) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "public void checkIfUserIsSame(){\n if(!FirebaseAuth.getInstance().getCurrentUser().getUid().equals(getIntent().getStringExtra(\"uID\"))) {\n Log.i(\"XXX\", \"passed NOT SAME USER\");\n checkIfUserIsFriend();\n }else{\n userStatus = \"same user\";\n ((RelativeLayout) findViewById(R.id.loadingPanel)).setVisibility(View.GONE);\n }\n }", "public boolean isUser(String userName) throws Exception;", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "public boolean isUserAuthenticated() {\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n if(settings!=null){\n String user=settings.getString(\"userid\",null);\n String area=settings.getString(\"areaid\",null);\n if (user != null && !user.equals(\"\")) {\n mUserId=user;\n mAreaId=area;\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "@Override\r\n\tpublic boolean checkLogin(int accNo) throws EwalletException {\n\t\ttemp =dao.loginuser(accNo);\r\n\t\tif(temp!=null)\r\n\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}", "@Override\n\tpublic int checkLogin(User user) {\n\t\tint msg=0;\n\t\ttry{\n\t\t\tUser user2=uDao.loginUser(user.getUsername().toString());\n\t\t\tString pwd=getEncodTool.decodeHexTest(user2.getPassword());\n\t\t\tif(pwd.equals(user.getPassword())){\n\t\t\tmsg=1;\n\t\t\t}else{\n\t\t\t\tmsg=3;\t\n\t\t\t}\n\t\t}catch(NullPointerException e){\n\t\t\tmsg=2;\n\t\t}\t\n\t\treturn msg;\n\t}", "private boolean isRequestAlreadySent(String friendName)\r\n\t{\r\n\t\tlogger.debug(\"->->->->-> Inside isUserExist method ->->->->->\");\r\n\t\tString loggedInUserName = (String) httpSession.getAttribute(\"loggedInUserName\");\r\n\t\tlogger.debug(\"UserName in isRequestAlreadySent :\"+loggedInUserName);\r\n\t\tif(friendDAO.getFriendWithUserNameAndFriendName(loggedInUserName,friendName)==null){\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "private void checkToLogin() {\n Intent intent = new Intent(this, LoginActivity.class);\n startActivityForResult(intent, ConstantValue.LOG_IN_CODE);\n }" ]
[ "0.71436626", "0.7141804", "0.6701494", "0.6701494", "0.6679826", "0.6635429", "0.6410264", "0.638553", "0.6373526", "0.6316384", "0.629944", "0.6262721", "0.6243119", "0.62414134", "0.62197775", "0.6160781", "0.6159879", "0.6159752", "0.6154922", "0.6138429", "0.6138382", "0.6133377", "0.6131279", "0.6122418", "0.6113239", "0.61123425", "0.6100041", "0.60871345", "0.6082199", "0.6039657", "0.60368687", "0.60368687", "0.6016386", "0.6000213", "0.5997227", "0.5994413", "0.5988781", "0.5985415", "0.5984521", "0.59820235", "0.59802115", "0.59645385", "0.59621733", "0.59527767", "0.5940417", "0.59353995", "0.5935161", "0.5934394", "0.5926257", "0.5914996", "0.5908956", "0.5908956", "0.5908956", "0.5908956", "0.5908956", "0.5908956", "0.5900739", "0.5884278", "0.5880728", "0.588072", "0.5855547", "0.5841937", "0.5841707", "0.5841707", "0.58378184", "0.5828786", "0.5828168", "0.5821508", "0.5821344", "0.5813291", "0.5805195", "0.5796653", "0.5778651", "0.57711893", "0.5770777", "0.5764963", "0.5761357", "0.5758135", "0.575623", "0.5742853", "0.5739135", "0.57388496", "0.57292616", "0.5726506", "0.57261676", "0.5725735", "0.5724201", "0.5723343", "0.57192004", "0.57192004", "0.57192004", "0.57192004", "0.57192004", "0.57192004", "0.57192004", "0.57164407", "0.57159966", "0.57155365", "0.5711187", "0.5697408", "0.569237" ]
0.0
-1
get the token info from shared preferences
public static Oauth2AccessToken readAccessToken() { Oauth2AccessToken token = new Oauth2AccessToken(); SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); token.setUid(sharedPref.getWeiboUID()); token.setToken(sharedPref.getWeiboAccessToken()); token.setExpiresTime(sharedPref.getWeiboExpiresTime()); return token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String getToken(Context context) {\r\n SharedPreferences preferences = context.getSharedPreferences(context.getString(R.string.shared_preferences), MODE_PRIVATE);\r\n return preferences.getString(context.getString(R.string.token), null);\r\n }", "private String m2194g() {\n return this.f980b.m1158c().getSharedPreferences(\"com.facebook.login.AuthorizationClient.WebViewAuthHandler.TOKEN_STORE_KEY\", 0).getString(\"TOKEN\", \"\");\n }", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}", "private void collectToken()\n {\n String token = FirebaseInstanceId.getInstance().getId();\n Log.d(\"MYTAG\", \"Firebase_token \" + token);\n }", "public static String getRequestToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN, null);\n\t\t}", "public static String getToken() {\n \treturn mToken;\n }", "void onGetTokenSuccess(AccessTokenData token);", "public String getToken();", "public String getToken() {\n return token.get();\n }", "public String getToken()\n {\n return token;\n }", "OAuth2Token getToken();", "public static String getRequestTokenSecret(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN_SECRET, null);\n\t\t}", "public String getToken() {\r\n return token;\r\n }", "public String getToken() {\r\n return token;\r\n }", "public String getToken() {\n return this.token;\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "public void getToken(Context context) {\n FirebaseInstanceId.getInstance().getInstanceId()\r\n .addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<InstanceIdResult> task) {\r\n if (!task.isSuccessful()) {\r\n Log.w(TAG, \"getInstanceId failed\", task.getException());\r\n return;\r\n }\r\n\r\n // Get new Instance ID token\r\n String token = task.getResult().getToken();\r\n\r\n // Log and toast\r\n String msg = context.getString(R.string.msg_token_fmt, token);\r\n Log.d(TAG, msg);\r\n //Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n // [END retrieve_current_token]\r\n }", "public String getToken() {\n return this.token;\n }", "public String getToken() {\n return this.token;\n }", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "public void getProfile() {\n\n String mKey = getString(R.string.preference_name);\n SharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n // Load the user email\n\n /*userEmail = getString(R.string.preference_key_profile_email);\n userPassword = getString(R.string.preference_key_profile_password);*/\n\n // Load the user email\n\n mKey = getString(R.string.preference_key_profile_email);\n userEmail = mPrefs.getString(mKey, \"\");\n\n // Load the user password\n\n mKey = getString(R.string.preference_key_profile_password);\n userPassword = mPrefs.getString(mKey, \"\");\n\n\n //userEmail = getString(R.string.register_email);\n //userPassword = getString(R.string.register_password);\n\n }", "public java.lang.String getToken(){\r\n return localToken;\r\n }", "public String getToken()\n {\n return ssProxy.getToken();\n }", "public static String getAccessToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_ACCESS_TOKEN, null);\n\t\t}", "private String getTokenizedUrl() {\n SharedPreferences sharedPreferences = getSharedPreferences();\n String tokenKey = MainActivity.sharedPrefKeys.TOKENIZED_URL.toString();\n\n if (sharedPreferences.contains(tokenKey)) {\n return sharedPreferences.getString(tokenKey, \"\");\n }\n return \"\";\n }", "public String getToken() {\n\n return this.token;\n }", "public String getToken() {\n return token_;\n }", "public String getToken() {\n return token_;\n }", "public String getToken() {\n return token_;\n }", "private void GetSharedPrefs()\n {\n// SharedPreferences pref = getActivity().getSharedPreferences(\"LoginPref\", 0);\n// UserId = pref.getInt(\"user_id\", 0);\n// Mobile = pref.getString(\"mobile_number\",DEFAULT);\n// Email = pref.getString(\"email_id\",DEFAULT);\n// Username = pref.getString(\"user_name\",DEFAULT);\n// Log.i(TAG, \"GetSharedPrefs: UserId: \"+UserId);\n\n SharedPreferences pref = getActivity().getSharedPreferences(\"RegPref\", 0); // 0 - for private mode\n UserId = pref.getInt(\"user_id\", 0);\n Mobile = pref.getString(\"mobile_number\",DEFAULT);\n Email = pref.getString(\"email_id\",DEFAULT);\n Log.i(TAG, \"GetSharedPrefs: UserId: \"+UserId);\n CallOnGoingRideAPI();\n }", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "java.lang.String getRemoteToken();", "public OAuthTokenResponse getToken() {\n return token;\n }", "public java.lang.String getToken(){\n return localToken;\n }", "public void updateToken(String token){\n //todo something\n if (sharedPreferencesUtils != null){\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }else {\n sharedPreferencesUtils = new SharedPreferencesUtils(this);\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }\n }", "public String getToken() {\n\t\treturn token;\n\t}", "public String getToken() {\n\t\treturn token;\n\t}", "public String getUserToken() {\n if (userinfo == null)\n return null;\n return userinfo.token;\n }", "public String getCurrentIdentity(){\n mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n if(mSharedPreference.contains(\"zzxxyz\")) {\n\n return mSharedPreference.getString(\"zzxxyz\", \"\");\n }\n else\n return \"\";\n}", "GetToken.Res getGetTokenRes();", "public static boolean checkSavedToken(Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n String storage_token = preferences.getString(\"token\", \"notoken\");\n\n if (!storage_token.equals(\"notoken\")) {\n Log.d(\"Service\", \"Using stored token\");\n header_token = \"Bearer \" + storage_token;\n isTokenPresent = true;\n bindToken();\n return true;\n }\n return false;\n }", "@Override\n public Object getCredentials() {\n return token;\n }", "public AuthorizationToken retrieveToken(String token);", "@Override\n public void onTokenRefresh() {\n\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // TODO: 13/6/2017 Persistir token en archivo XML.\n sharedPreferences = getSharedPreferences(\"datos\",MODE_PRIVATE);\n SharedPreferences.Editor edit = sharedPreferences.edit();\n edit.putString(String.valueOf(R.string.token),refreshedToken);\n edit.commit();\n\n\n }", "public static String getGCMToken() {\n String appVersion = AppUtils.getAppVersionName();\n String cacheKey = \"gcm_reg_id_\" + appVersion;\n return getSharedPreferences().getString(cacheKey, null);\n }", "String getAccessToken();", "String getAccessToken();", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "public void retrieveAccessToken(Context context) {\n PBookAuth mPBookAuth = mApplicationPreferences.getPBookAuth();\n if (mPBookAuth == null || TextUtils.isEmpty(mPBookAuth.getClientName())) {\n view.onReturnAccessToken(null, false);\n return;\n }\n Ion.with(context).load(ACCESS_TOKEN_SERVICE_URL).setBodyParameter(\"client\", mPBookAuth.getClientName()).setBodyParameter(\"phoneNumber\", mPBookAuth.getPhoneNumber()).setBodyParameter(\"platform\", PLATFORM_KEY).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null || !TextUtils.isEmpty(accessToken)) {\n mApplicationPreferences.setTwilioToken(accessToken);\n view.onReturnAccessToken(accessToken, true);\n } else {\n view.onReturnAccessToken(accessToken, false);\n }\n }\n });\n }", "@Override\n public void onResponse(String response) {\n\n try {\n\n SharedPreferences.Editor editor = prefs.edit();\n JSONObject data= new JSONObject(response);\n String token = data.getString(\"access_token\");\n editor.putString(\"token\", token);\n\n getDatosUser(usuario,token);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "public String getAccessToken();", "String getPrimaryToken();", "public String getAppToken() {\r\n return appToken;\r\n }", "private void getData() {\n\t\tSharedPreferences preferences = getActivity().getSharedPreferences(\"the_username_and_password\", LoginActivity.MODE_PRIVATE);\n\t\tmToken = preferences.getString(\"accessToken\", \"\");\n//\t\tmap.put(\"access_token\", mToken);\n\n\t\tIPresenter presenter = new IPresenter(new IView<FeaturesBean>() {\n\n\t\t\t@Override\n\t\t\tpublic void success(FeaturesBean bean) {\n\t\t\t\tif (swipe != null) {\n\t\t\t\t\tswipe.setRefreshing(false);\n\t\t\t\t\tswipe.setEnabled(true);\n\t\t\t\t}\n\t\t\t\tonSuccess(bean);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void defeat(String s) {\n\t\t\t\tswipe.setRefreshing(false);\n\t\t\t\tswipe.setEnabled(true);\n\t\t\t}\n\t\t});\n\n\t\tpresenter.DoGet(UrlUtils.ROUTE_URL + mToken);\n\t}", "GetToken.Req getGetTokenReq();", "public String getTokenKey()\r\n\t{\r\n\t\treturn TOKEN_KEY;\r\n\t}", "public String userToken() {\n return userToken;\n }", "private static SharedPreferences getSharedPreference(Context context){\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"myToken\", \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n getApplicationContext().sendBroadcast(new Intent(broadcast));\n SharedPrefManager.getInstance(getApplicationContext()).storeToken(refreshedToken);\n }", "public void GuardarToken(String token){\n SharedPreferences.Editor edits = prefs.edit();\n edits.putString(MYConstantsPreferences.MAQUIPURAY_TOKEN, token);\n edits.apply();\n }", "public String getDeviceToken() {\n return FirebaseInstanceId.getInstance().getToken();\n }", "public Token getToken() {\n return token;\n }", "public Token getToken() {\r\n return _token;\r\n }", "com.google.protobuf.ByteString\n getTokenBytes();", "public String getAuthtoken() {\n return authtoken;\n }", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "public static String getToken() {\n String token = \"96179ce8939c4cdfacba65baab1d5ff8\";\n return token;\n }", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "public com.google.protobuf.ByteString\n getTokenBytes() {\n return instance.getTokenBytes();\n }", "public com.google.protobuf.ByteString\n getTokenBytes() {\n return instance.getTokenBytes();\n }", "public com.google.protobuf.ByteString\n getTokenBytes() {\n return instance.getTokenBytes();\n }", "protected void checkToken(){\n DBManager dao = new DBManager(appContext);\n dao= dao.open();\n Cursor c = dao.selectionner();\n if (c.getCount()>0) {\n System.out.println(\"Base activity token:\"+c.getCount());\n System.out.println(\"Base activity token:\"+c.getString(0));\n Intent main =new Intent(this, SplashScreenActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n } else {\n System.out.println(\"No token Found\");\n Intent main = new Intent(this, LoginActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n }\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n SharedPreferences settings =\n getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(PREF_FIREBASE_TOKEN, refreshedToken);\n editor.apply();\n }", "private void saveToken(Context context, String text) {\n android.content.SharedPreferences settings;\n android.content.SharedPreferences.Editor editor;\n \n settings = context.getSharedPreferences(\"PREFS_NAME\", Context.MODE_PRIVATE);\n editor = settings.edit();\n editor.putString(\"TOKEN\", text);\n editor.apply();\n }", "public void getTokenFromDB() {\n Cursor c = mDBManager.query(new String[]{\"token\", \"name\"}, null, null, null, null, null);\n if (c != null && c.moveToFirst()) {\n token = c.getString(0);\n name= c.getString(1);\n }\n c.close();\n\n }", "public byte[] getToken() {\n\t\treturn this.token;\n\t}" ]
[ "0.7736196", "0.69978434", "0.69323915", "0.68069404", "0.67990184", "0.6760051", "0.67505616", "0.6749331", "0.67442966", "0.6718089", "0.66156447", "0.6579099", "0.6498842", "0.64799607", "0.64765155", "0.64765155", "0.6460627", "0.64528626", "0.64528626", "0.64528626", "0.64447606", "0.64447606", "0.64447606", "0.64447606", "0.64447606", "0.6424379", "0.64149374", "0.64041305", "0.63853514", "0.6377219", "0.6377219", "0.6377219", "0.6377219", "0.6377219", "0.6377219", "0.63646424", "0.63639843", "0.6363652", "0.63553935", "0.63502276", "0.6334532", "0.6309508", "0.6309508", "0.6309508", "0.6297471", "0.6287488", "0.6287488", "0.6287488", "0.6287488", "0.6287488", "0.62832713", "0.6271704", "0.6268134", "0.6262439", "0.62596625", "0.62596625", "0.6258597", "0.62510777", "0.6221122", "0.6220762", "0.62186706", "0.6213435", "0.6211818", "0.62101495", "0.6208756", "0.6208756", "0.6163117", "0.6159927", "0.61480147", "0.6144196", "0.61364645", "0.61344236", "0.6127756", "0.61208916", "0.61185336", "0.6084703", "0.60636467", "0.60465926", "0.60427", "0.6032293", "0.6030387", "0.60286283", "0.60233355", "0.60086745", "0.59983945", "0.59983945", "0.59983945", "0.59910274", "0.59768707", "0.59768707", "0.59768707", "0.59768707", "0.59768707", "0.59709585", "0.59709585", "0.59709585", "0.59705067", "0.5966951", "0.59666795", "0.59623945", "0.5943687" ]
0.0
-1
clear the token info in shared preferences
public static void clear() { SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); sharedPref.clearWeiboPref(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"CommitPrefEdits\") // Preferences change needs to be synchronous\n public void invalidateToken() {\n preferences.edit().remove(getString(R.string.auth_token)).commit();\n validateToken();\n }", "private void clearSharedPreference() {\n //Instantiate SharedPreferences\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n //clears all saved data in SharedPreferences with tag sm_tag\n editor.clear();\n editor.apply();\n }", "void removeAccessToken() {\n SharedPreferences prefs = // because rest also needs token\n context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE);\n prefs.edit()\n .remove(KEY_ACCESS_TOKEN)\n .apply();\n // notification to all listeners\n state.onNext(new AuthState(false));\n\n }", "private void clearAccessToken() {\n SharedPreferences sharedPref = this\n .getSharedPreferences(getString(R.string.authorization_preference_file), Context.MODE_PRIVATE);\n if(sharedPref.contains(getResources().getString(R.string.authorization))){\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.remove(getResources().getString(R.string.authorization));\n editor.apply();\n }\n }", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "@Override\n public void clearSharedPrefs() {\n\n }", "public void clearSharedPreferences(){\n\n //clear user session data\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.clear();\n editor.apply();\n\n }", "private static void clear() {\n Context context = Leanplum.getContext();\n if (context != null) {\n SharedPreferences.Editor editor = context.getSharedPreferences(\n \"__leanplum__\", Context.MODE_PRIVATE).edit();\n if (editor != null) {\n editor.clear();\n editor.apply();\n }\n\n editor = context.getSharedPreferences(\"__leanplum_push__\", Context.MODE_PRIVATE).edit();\n if (editor != null) {\n editor.clear();\n editor.apply();\n }\n }\n }", "private void clearTokens(){\n Login.gramateia_counter = false; \n }", "public void clearLoginInfo(){\n ProfileSharedPreferencesRepository.getInstance(application).clearLoginInfo();\n }", "public static void clearSavedSession(Context context) \n {\n Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();\n editor.clear();\n editor.commit();\n singleton = null;\n }", "@Override\n public void handleTokenExpiration(){\n JWTToken.removeTokenSharedPref(this);\n }", "public void clearExpiredTokens();", "public void removePushToken() {\n }", "protected void ClearData() {\n\t\t// TODO Auto-generated method stub\n\t\n\t\t sharedPreferences = this.getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);\n\t\t Editor editor = sharedPreferences.edit();\n\t\t if(sharedPreferences.contains(\"username\")||sharedPreferences.contains(\"password\")){\n\t\t\t editor.remove(\"username\");\n\t\t\t editor.remove(\"password\");\n\t\t }\n\t\t editor.clear();\n\t\t editor.commit();\n\t}", "public void logout() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n editor.clear();\r\n editor.apply();\r\n ctx.startActivity(new Intent(ctx, MainActivity.class));\r\n }", "public void clearPrefs() {\n getSharedPreferencesEditor().clear().apply();\n }", "public void removedetails(){\n SharedPreferences.Editor editor = userDetails.edit();\n editor.clear();\n editor.commit();\n\n }", "public static void clearAllSavedUserData() {\n cacheUser = null;\n cacheAccessToken = null;\n getSharedPreferences().edit().clear().commit();\n }", "void clear()\n {\n captcha.reset();\n requestToken.setEnabled(false);\n username.setValue(\"\");\n greeting.setValue(\"\");\n token.setValue(\"\");\n newPassword.setValue(\"\");\n newPasswordRepeat.setValue(\"\");\n show(REQUEST_TOKEN);\n }", "public static void clear(){\n preferences.edit().clear().apply();\n }", "public void logout() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(AppConfig.SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.clear();\n editor.apply();\n mCtx.startActivity(new Intent(mCtx, LoginActivity.class));\n }", "public void clearTokens() {\n numTokens = 0;\n lastTokenTime = service.elapsedMillis();\n // TODO(oshlack/reuben): Change this to use scheduler.isScheduled(task) once it exists.\n if (isScheduled) {\n service.scheduleDelayed(task, schedulingInterval);\n }\n }", "public void clearTokenType() {\n genClient.clear(CacheKey.tokenType);\n }", "private void onLogoutButtonClick() {\r\n mViewModel.logout();\r\n //Clear input fields\r\n mUsernameInput.setText(\"\");\r\n mTokenInput.setText(\"\");\r\n\r\n //Clear saved credentials\r\n FragmentActivity activity = getActivity();\r\n if (activity == null) {\r\n return;\r\n }\r\n SharedPreferences sharedPreferences = activity.getApplicationContext().getSharedPreferences(getString(R.string.key_pref_file), MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n editor.putString(getString(R.string.key_pref_username), \"\");\r\n editor.putString(getString(R.string.key_pref_token), \"\");\r\n editor.apply();\r\n }", "public static void clearPreferences(Context context) {\n SharedPreferences.Editor editor = getSharedPreferences(context).edit();\n editor.clear();\n editor.apply();\n }", "public void logout() {\n // Mengambil method clear untuk menghapus data Shared Preference\n editor.clear();\n // Mengeksekusi perintah clear\n editor.commit();\n // Membuat intent untuk berpindah halaman\n Intent intent = new Intent(context, LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n }", "public void onSignOut() {\n SharedPreferences userPrefs = PreferenceManager.getDefaultSharedPreferences(\n TBLoaderAppContext.getInstance());\n SharedPreferences.Editor editor = userPrefs.edit();\n editor.clear().apply();\n mTbSrnHelper = null;\n mUserPrograms = null;\n }", "public static void reset() {\n prefs().edit()\n .remove(PREFKEY_USER_ID)\n .remove(PREFKEY_READER_TAG)\n .remove(PREFKEY_READER_RECOMMENDED_OFFSET)\n .remove(PREFKEY_READER_SUBS_PAGE_TITLE)\n .commit();\n }", "private void resetSharedPreferences(){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(getString(R.string.pref_genre_key), getString(R.string.pref_genre_any_value));\n editor.putString(getString(R.string.pref_earliest_year_key), getString(R.string.pref_earliest_year_default));\n editor.putString(getString(R.string.pref_latest_year_key), getString(R.string.pref_latest_year_default));\n // Commit the edits\n editor.apply();\n }", "public void clearAllAuthInfo();", "public void clearSession(){\n mIsLoggedIn = false;\n mUser = null;\n clearSharedPreference();\n }", "public static void clearAllPreferences(Context context){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = preferences.edit();\n editor.clear();\n editor.commit();\n }", "public void clearOTP(String key){\n otpCache.invalidate(key);\n }", "public void clearAllPreferenceData() {\n sharedPreferences.edit().clear().apply();\n }", "public void logout() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.clear();\n editor.apply();\n Intent myIntent = new Intent(mCtx, LoginActivity.class);\n myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mCtx.startActivity(myIntent);\n }", "private void releaseTokenState() {\n //checks if token is taken\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());\n if (preferences!=null && preferences.getBoolean(TOKEN_RELEASED_ERROR, false)) {\n leaveToken();\n }\n }", "public static void clearPreferencesTheKey(Context context,String key){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = preferences.edit();\n editor.remove(key);\n editor.commit();\n }", "public void logout() {\n updateToken(\"\");\n startActivity(new Intent(GarageListActivity.this, LoginScreenActivity.class));\n updateToken(\"\");\n finish();\n }", "@Override\n \tpublic void onSharedPreferenceChanged(SharedPreferences sharedPreferences,\n \t\t\tString key) {\n \t\ttwitter = null;\n \t}", "public void Logout(){\n preferences.edit().remove(userRef).apply();\n }", "public void logout(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", 0);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.clear();\n preferencesEditor.commit();\n // take user back to login screen\n Intent logoutIntent = new Intent(mContext, LoginActivity.class);\n logoutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(logoutIntent);\n }", "@Override\n public void onTokenRefresh() {\n\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // TODO: 13/6/2017 Persistir token en archivo XML.\n sharedPreferences = getSharedPreferences(\"datos\",MODE_PRIVATE);\n SharedPreferences.Editor edit = sharedPreferences.edit();\n edit.putString(String.valueOf(R.string.token),refreshedToken);\n edit.commit();\n\n\n }", "public void clearOTP(String key) {\n otpCache.invalidate(key);\n }", "private void clearRecord() {\n // Clearing current booking information from sharedPreference\n SharedPreferences.Editor editor = sharedpreferences.edit();\n editor.clear();\n editor.commit();\n shutdown();\n }", "public void removeAllSharedPreference(Context context, String fileKey, Integer mode) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileKey, mode);\n sharedPreferences.edit()\n .clear()\n .apply();\n }", "@Override\n public void onClick(View v) {\n SharedPreferences prefs = getSharedPreferences(getString(R.string.prefs_file), Context.MODE_PRIVATE);\n prefs.edit().clear();\n prefs.edit().apply();\n //END BORRADO DE DATOS\n\n FirebaseAuth.getInstance().signOut();\n onBackPressed();//retorna al activity inicial, el main\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n SharedPreferences sharedPreferences=getSharedPreferences(\"LoginData\",MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.clear();\n editor.commit();\n\n\n Toast.makeText(getApplicationContext(),\"Password was Change\",Toast.LENGTH_SHORT).show();\n\n }", "public Builder clearToken() {\n \n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public void updateToken(String token){\n //todo something\n if (sharedPreferencesUtils != null){\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }else {\n sharedPreferencesUtils = new SharedPreferencesUtils(this);\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }\n }", "public void dangXuat(View view) {\n SharedPreferences.Editor editor = mPreferences.edit();\n editor.clear();\n editor.apply();\n\n //Quay ve Activity Dang nhap???\n }", "public static synchronized void deleteFromToken(int token) {\n tokenMap.remove(token);\n }", "private String PerformLogout(String token){\n next_online.remove(token);\n current_online.remove(token);\n\n // rimuovo anche la callback dalla Hashtable\n cr.RemoveClient(token);\n return \"ok\";\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"myToken\", \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n getApplicationContext().sendBroadcast(new Intent(broadcast));\n SharedPrefManager.getInstance(getApplicationContext()).storeToken(refreshedToken);\n }", "private void removeSpUserInfo() {\n\t\tPreferencesHelper preferencesHelper = new PreferencesHelper(\n\t\t\t\tChangeLoginActivity.this);\n\t\tpreferencesHelper.remove(\"uid\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_EMAIL\");\n\t\tpreferencesHelper.remove(\"nickName\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ICON\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ALREADY_LOGIN\");\n\t\tpreferencesHelper.remove(\"LOGIN_PASSWORD\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ID\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_NAME\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_PHONE\");\n\t}", "public void logout() {\n if (mAccessToken != null) {\n mSession.resetAccessToken();\n mAccessToken = null;\n }\n }", "void clearCurrentUser() {\n currentUser = null;\n }", "private void clearAShortToken() {\n \n aShortToken_ = getDefaultInstance().getAShortToken();\n }", "private void clearLongToken() {\n \n longToken_ = getDefaultInstance().getLongToken();\n }", "private void clearLongToken() {\n \n longToken_ = getDefaultInstance().getLongToken();\n }", "private void clearCache() {\n List<User> users = null;\n try {\n Log.d(TAG, \"Clearing app cache\");\n users = sampleApp.getUsers();\n\n if (users == null) {\n /* We have no users */\n\n Log.d(TAG, \"Faield to Sign out/clear cache, no user\");\n } else if (users.size() == 1) {\n /* We have 1 user */\n\n /* Remove from token cache */\n sampleApp.remove(users.get(0));\n\n Log.d(TAG, \"Signed out/cleared cache\");\n\n }\n else {\n /* We have multiple users */\n\n for (int i = 0; i < users.size(); i++) {\n sampleApp.remove(users.get(i));\n }\n\n Log.d(TAG, \"Signed out/cleared cache for multiple users\");\n }\n\n Toast.makeText(getBaseContext(), \"Signed Out!\", Toast.LENGTH_SHORT)\n .show();\n\n } catch (MsalClientException e) {\n /* No token in cache, proceed with normal unauthenticated app experience */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n\n } catch (IndexOutOfBoundsException e) {\n Log.d(TAG, \"User at this position does not exist: \" + e.toString());\n }\n }", "@Override\n protected void onDestroy() {\n SharedPreferences sharedPreferences = MainActivity.this.getSharedPreferences(KEY_SHAREDPREF_FILE,Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(KEY_SHARED_PREF_NOTIF, notificationPreferences);\n editor.apply();\n\n this.unbindService(spotifyServiceConnection);\n\n super.onDestroy();\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n SharedPreferences settings =\n getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(PREF_FIREBASE_TOKEN, refreshedToken);\n editor.apply();\n }", "public AuthorizationToken removeToken(String token);", "public void logoutpackged() {\n\n editor.remove(IS_LOGIN);\n editor.remove(KEY_NAME);\n editor.remove(KEY_EMAIL);\n editor.remove(KEY_ID);\n// editor.remove(KEY_IMAGEURI);\n editor.remove(PROFILE_IMG_URL);\n editor.remove(PROFILE_IMG_PATH);\n// editor.remove(KEY_LANGUAGE);\n editor.commit();\n\n /* Intent i = new Intent(context, SelectLanguage.class);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(i);\n ((Activity) context).finish();*/\n\n }", "public Builder clearToken() {\n copyOnWrite();\n instance.clearToken();\n return this;\n }", "public Builder clearToken() {\n copyOnWrite();\n instance.clearToken();\n return this;\n }", "public Builder clearToken() {\n copyOnWrite();\n instance.clearToken();\n return this;\n }", "public static void ResetPreferences() throws Exception{\n File root = InstrumentationRegistry.getTargetContext().getFilesDir().getParentFile();\n String[] sharedPreferencesFileNames = new File(root, \"shared_prefs\").list();\n try{\n for (String fileName : sharedPreferencesFileNames) {\n InstrumentationRegistry.getTargetContext().getSharedPreferences(fileName.replace(\".xml\", \"\"), Context.MODE_PRIVATE).edit().clear().commit();\n }\n }\n catch (NullPointerException exp){}\n\n }", "protected final void closeSessionAndClearTokenInformation() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.closeAndClearTokenInformation();\n }\n }", "private void logout() {\n getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit().clear().apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE).edit().putBoolean(IS_LOGGED_IN, false).apply();\n\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(URL + \"/nuh/logout\")\n .build();\n AsyncTask.execute(() -> {\n try {\n client.newCall(request).execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n }", "public void logout(final Context applicationContext) {\n LoginManager.getInstance().logOut();\n\n SharedPreferences preferences\n = applicationContext.getSharedPreferences(ApplicationConstants.sSTRING_SHARED_PREFERENCES_FILENAME, Context.MODE_PRIVATE);\n // Clear SharedPreferences\n preferences.edit().clear().apply();\n\n setLoginState(false, applicationContext);\n\n }", "public void clearSupportsMultiPayToken() {\n genClient.clear(CacheKey.supportsMultiPayToken);\n }", "public void clearUserSession() {\n editor.clear();\r\n editor.commit();\r\n }", "public static void reset() {\n if (mPreference == null)\n return ;\n\n Editor editor = mPreference.edit();\n editor.clear();\n editor.commit();\n }", "public void GuardarToken(String token){\n SharedPreferences.Editor edits = prefs.edit();\n edits.putString(MYConstantsPreferences.MAQUIPURAY_TOKEN, token);\n edits.apply();\n }", "public Builder clearTokenId() {\n if (tokenIdBuilder_ == null) {\n tokenId_ = null;\n onChanged();\n } else {\n tokenId_ = null;\n tokenIdBuilder_ = null;\n }\n\n return this;\n }", "public void clearStatus(){\r\n\t\tmsgActionResult=null;\r\n\t\tcurrentPasswordConfirmed = false;\r\n\t\tpassword = \"\";\r\n\t}", "public void resetValues() {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(CUREDIFFICULTY, null);\n editor.putInt(CURETARGETSCORE, 0);\n editor.putInt(CURRSCOREFINDCURE, 0);\n editor.apply();\n System.out.println(sharedPreferences.getAll());\n\n }", "void logout(String userTokenTokenContent);", "private void clearGetTokenRes() {\n if (rspCase_ == 4) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "@Override\r\n public void onTokenRefresh() {\n App.sendToken();\r\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "private void clearShortToken() {\n \n shortToken_ = getDefaultInstance().getShortToken();\n }", "@Override\n\tpublic synchronized void onSharedPreferenceChanged(SharedPreferences prefs,\n\t\t\tString key) {\n\t\tthis.twitter = null;\n\t\tLog.d(TAG, \"Twitter object invalidated\");\n\t}" ]
[ "0.7690618", "0.75620395", "0.7518366", "0.7479749", "0.7407753", "0.7407753", "0.7407753", "0.72947407", "0.72113943", "0.7184273", "0.71417964", "0.71025705", "0.69603604", "0.6922531", "0.6864332", "0.6829412", "0.68191314", "0.6785413", "0.6735803", "0.67343146", "0.6709957", "0.6664713", "0.66504663", "0.66463614", "0.6634672", "0.6631678", "0.6622539", "0.64986634", "0.649633", "0.6489239", "0.64828354", "0.6441441", "0.64365983", "0.640837", "0.64027345", "0.6372976", "0.6369493", "0.6357797", "0.633347", "0.6314631", "0.62916636", "0.62365973", "0.62231076", "0.6221316", "0.6220649", "0.62010926", "0.6193208", "0.6175491", "0.6157131", "0.6153412", "0.6125586", "0.6119108", "0.61097854", "0.60899824", "0.60819125", "0.60786754", "0.60786754", "0.60786754", "0.60786754", "0.60786754", "0.6062153", "0.60487866", "0.6046357", "0.6028685", "0.60201365", "0.60039526", "0.60039526", "0.5999908", "0.5983617", "0.59799945", "0.59555215", "0.594535", "0.5936729", "0.5936729", "0.5936729", "0.5936369", "0.5930165", "0.59101695", "0.5907463", "0.59021586", "0.58874667", "0.588388", "0.58751893", "0.5861743", "0.5856766", "0.5853055", "0.58528876", "0.5850962", "0.5826457", "0.58213353", "0.58213353", "0.58213353", "0.58213353", "0.58213353", "0.58213353", "0.58213353", "0.58213353", "0.58213353", "0.58213353", "0.5817853" ]
0.69186866
14
We create the heroes and add them to heroes list.
public void play() { List<String> playersData = getGameInput().getPlayersData(); for (int id = 0; id < playersData.size() / Constants.DATAENTITY; id++) { getHeroes().add(getHeroFactory().getHero( playersData.get(id * Constants.DATAENTITY), Integer.parseInt( playersData.get( id * Constants.DATAENTITY + Constants.INDEXPOSX)), Integer.parseInt( playersData.get( id * Constants.DATAENTITY + Constants.INDEXPOSY)), id)); } // We create the angels and add them to angels list. List<Integer> numOfAngels = getGameInput().getNumOfAngels(); List<String> angelsData = getGameInput().getAngelsData(); for (int i = 0; i < angelsData.size() / Constants.DATAENTITY; i++) { getAngels().add(getAngelsFactory().getAngel( angelsData.get(i * Constants.DATAENTITY), Integer.parseInt( angelsData.get( i * Constants.DATAENTITY + Constants.INDEXPOSX)), Integer.parseInt( angelsData.get( i * Constants.DATAENTITY + Constants.INDEXPOSY)))); } getUtl().prepareAdmins(); int angelCounter = 0; // To iterate through all angels only once. // We start the actual game. for (int i = 0; i < getMovements().size(); i++) { // For every round. getUtl().printRound(i + 1); // We start printing from round 1... for (int j = 0; j < getHeroes().size(); j++) { /* Apply overtime ability if the case and then hero chooses * strategy and moves if he is not rooted. Lastly we decrease * the amount of rounds that a hero must be affected by. */ if (!getHeroes().get(j).isDead()) { if (getHeroes().get(j).isAffectedByAoT()) { getUtl().applyAoT(getHeroes().get(j)); } if (!getHeroes().get(j).isRooted()) { getHeroes().get(j).chooseStrategy(); getHeroes().get(j).move(getMovements().get(i).get(j)); } if (getHeroes().get(j).isAffectedByAoT()) { getHeroes().get(j).setAffectedByAoTRounds( getHeroes().get(j).getAffectedByAoTRounds() - 1); } } } // Check if there are any players on the same terrain. for (int j = 0; j < getHeroes().size(); j++) { for (int k = 0; k < getHeroes().size(); k++) { if (k == j) { continue; // So a hero doesn't fight himself. } if ((getHeroes().get(j).getPosX() == getHeroes().get(k).getPosX()) && (getHeroes().get(j).getPosY() == getHeroes().get(k).getPosY())) { // If they are both alive, fight. if (!getHeroes().get(j).isDead() && !getHeroes().get(k).isDead()) { getUtl().fight(getHeroes().get(k), getHeroes().get(j), getMap()); } } } } // Selecting the angels that appear on round i for (int j = 0; j < numOfAngels.get(i); j++) { getUtl().spawnAngel(getAngels().get(angelCounter)); for (int k = 0; k < getHeroes().size(); k++) { /* Checking if the selected angel and player k are on the * same terrain. */ if (getAngels().get(angelCounter).getPosX() == getHeroes().get(k).getPosX() && (getAngels().get(angelCounter).getPosY() == getHeroes().get(k).getPosY())) { getUtl().affectHeroByAngel( getAngels().get(angelCounter), getHeroes().get(k)); } } angelCounter++; } // When round is complete, everyone can fight again for (AbstractHero hero : getHeroes()) { hero.setFought(false); } getUtl().getOutput().add("\n"); } printResults(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addHero()\n {\n // Initial horizontal position\n int initialX = TILE_SIZE;\n\n // Instantiate the hero object\n theHero = new Hero(initialX);\n\n // Add hero in bottom left corner of screen\n addObject(theHero, initialX, 8 * TILE_SIZE);\n }", "public static void startHeroes(){\n\t\tCoordinate[] placement = map.getHeroSpawnPoints();\n\t\t\n\t\tplayer.setNumCharactersToSpawn(placement.length);\n\t\t\n\t\theroList = player.getCharacters();\n\t\t\n\t\tfor (int i = 0; i < placement.length; i++){\n\t\t\theroList[i].setCoordinate(placement[i]);\n\t\t}\n\t}", "private void addEnemies() {\n\t\tred_ghost = new Enemy();\r\n\t\tthis.add(red_ghost);\r\n\t\tenemies.add(red_ghost);\r\n\t\t\r\n\t}", "private void createSpells() {\n spells.add(new Heal(owner, assets));\n spells.add(new Renew(owner, assets));\n spells.add(new FlashHeal(owner, assets));\n spells.add(new Dispel(owner, assets));\n spells.add(new HolyNova(owner, assets));\n spells.add(new PrayerOfMending(owner, assets));\n spells.add(new Barrier(owner, assets));\n spells.add(new GreaterHeal(owner, assets));\n spells.add(new Smite(owner, assets));\n spells.add(new Penance(owner, assets));\n spells.add(new HolyShock(owner, assets));\n spells.add(new Lightwell(owner, assets));\n spells.add(new DivineHymn(owner, assets));\n spells.add(new DivineProtection(owner, assets));\n spells.add(new BlessedGarden(owner, assets));\n\n // add spell to group\n for(int i = 0; i < spells.size(); i++) {\n addActor(spells.get(i));\n }\n }", "private Hero createHeroObject(){\n return new Hero(\"ImageName\",\"SpiderMan\",\"Andrew Garfield\",\"6 feet 30 inches\",\"70 kg\",\n \"Webs & Strings\",\"Fast thinker\",\"Webs & Flexible\",\n \"200 km/hour\",\"Very fast\",\"Spiderman - Super Hero saves the world\",\n \"SuperHero saves the city from all the villians\");\n }", "private void createEnemyHelicopter()\n\t {\n\t \t\tRandNum = 0 + (int)(Math.random()*700);\n\t\t \t\tint xCoordinate = 1400;\n\t int yCoordinate = RandNum; \n\t eh = new Enemy(xCoordinate,yCoordinate);\n\t \n\t // Add created enemy to the list of enemies.\n\t EnemyList.add(eh);\n\t \n\t }", "public void addHero(Hero h) {\r\n if (team.size() < MAX_MEMBER_IN_A_TEAM) {\r\n team.add(h);\r\n }\r\n }", "HeroPool createHeroPool();", "private void createBasicEnemies() {\n\t\tint xTemp1 = (int) app.random(60, 500);\n\t\tint xTemp2 = (int) app.random(650, 1140);\n\t\tint yTemp = -60;\n\t\t\n\t\t//Contador para crear enemigo cada cierto tiempo\n\t\tapp.frameRate(80);\n\t\t\n\t\t//Agregar enemigos basicos\n\t\tif (app.frameCount%120 == 0) {\n\t\t\tbasicEnemies1.add(new BasicEnemy(app, xTemp1, yTemp));\n\t\t\tbasicEnemies2.add(new BasicEnemy(app, xTemp2, yTemp));\n\t\t}\n\t\t\n\t\t//Agregar enemigos que disparan\t\t\n\t\tif (app.frameCount%250 == 0) {\n\t\t\thardEnemies1.add(new HardEnemy(app, xTemp1, yTemp));\n\t\t\thardEnemies2.add(new HardEnemy(app, xTemp2, yTemp));\n\t\t}\n\t}", "Hero createHero();", "public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }", "public CreateHero() {\r\n\t\tinitComponents();\r\n\t}", "public void enemyCreator() { // Creates enemies\n \tif(createFrame >= createTime) {\n \t\tfor(int i = 0; i < enemies.length; i++) {\n \t\t\tif(!enemies[i].isAlive) { // If the enemy is no longer alive\n \t\t\t\tenemies[i].Create(0); // Create a new one\n \t\t\t\tbreak;\n \t\t\t} \t\t\t\t\n \t\t}\n \t\tcreateFrame = 0;\n \t}\n \telse\n \t\tcreateFrame += 1;\n \t\n \tif(killCount == 10){ // Every ten enemies\n \t\tkillCount = 0;\n \t\tif(createTime > 700)\n \t\t\tcreateTime -= 275; // Increase spawn rate\n \t\t\n \t\tif(Enemy.moveSpeed > 8)\t\n \t\t\t\tEnemy.moveSpeed -= 2; // Increase enemy movement speed\n \t\tif(killed > 100)\n \t\t\tBlock.healthTime += 25; // Increase enemy health\n \t\telse if(killed > 200)\n \t\t\tBlock.healthTime += 30;\n \t\telse\n \t\t\tBlock.healthTime += 20;\n \t}\n }", "private void generateEnemies() {\n for(int i =0; i < currentEnemies.length; i++) {\n Attributes a = genAttributes();\n double[] healthSpeed = genHealthAndSpeed();\n LinkedList<Pathing> paths = map.getPathings();\n this.currentEnemies[i] = new Enemy(determineImage(a, healthSpeed[0]), healthSpeed[0], healthSpeed[1], 10+currentDifficulty/20, a, paths);\n }\n\n }", "public List<Troop> getHeroes()\n\t{\n\t\treturn heroes;\n\t}", "private List<Monster> createMonster(List<Hero> list) {\r\n int highestLevel = 0;\r\n for(Hero hero: list){\r\n if(highestLevel < hero.getLevel()){\r\n highestLevel = hero.getLevel();\r\n }\r\n }\r\n\r\n List<MonsterPrototype> monsterPrototypeList = MonsterCache.getList();\r\n Collections.shuffle(monsterPrototypeList);\r\n\r\n List<Monster> monsterList = new ArrayList<>(heroNumber);\r\n // get hero highest level, and match with monster\r\n for(MonsterPrototype monsterPrototype: monsterPrototypeList){\r\n if(monsterList.size() >= heroNumber){\r\n break;\r\n }\r\n if(monsterPrototype.getLevel() == highestLevel){\r\n monsterList.add(MonsterCache.createObject(monsterPrototype));\r\n }\r\n }\r\n return monsterList;\r\n }", "private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }", "private void generateEnemies(){\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tEnemy enemy = new Enemy(coordX,coordY);\n\t\tenemies.put(0, enemy);\n\t\tcoordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tcoordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tenemy = new Enemy(coordX,coordY);\n\t\tenemies.put(1, enemy);\n\t}", "public void addGameObjects() {\n\t\tint baseObject = 4 + random.nextInt(5);\n\t\tint energyDroneObject = 2+ random.nextInt(5);\n\t\t\n\t\tfor (int i = 1; i < baseObject; i++) {\n\t\t\tgameObjects.add(new Bases(i));\n\t\t\t baseCount++;\n\t\t}\n\t\tfor (int i = 0; i < energyDroneObject; i++) {\n\t\t\tgameObjects.add(new EnergyStation());\n\t\t\tenergyStationCount++;\n\t\t}\n\t\tfor (int i = 0; i < energyDroneObject ; i++) {\n\t\t\tgameObjects.add(new Drone());\n\t\t\tdroneCount++;\n\t\t}\n\t\tgameObjects.add(new Cyborg());\n\t\tcyborgCount++;\n\t}", "void initHero() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.post(\"/api/hero\")\n .content(objectMapper.writeValueAsString(createHeroObject()))\n .contentType(MediaType.APPLICATION_JSON));\n }", "@Override\n\tprotected void onInitialAgentsCreation() {\n\t\tSystem.out.println(\"Création drones\");\n\t\tDrone drone = null;\n\t\tDroneBuilder droneBuilder;\n\t\tfor (int i = 0; i < INITIAL_DRONE_COUNT; i++) {\n\t\t\tdrone = new Drone(this, getEnvironment().getRandom().nextInt(World.WIDTH), getEnvironment().getRandom().nextInt(World.HEIGHT));\n\t\t\tdroneBuilder = new DroneBuilder();\n\t\t\tdroneBuilder.setDrone(drone);\n\t\t\tdroneBuilder.buildBehaviorStates();\n\t\t\tdroneBuilder.buildAgentPhase();\n\t\t}\n\t}", "private void addAllSprites(String heroName) throws IOException {\n BufferedReader reader = new BufferedReader(\n new FileReader(\"assets/config/characters/\"+heroName+\"Sprites.txt\")\n );\n String line = reader.readLine();\n String[] data;\n BufferedImage[] sprites;\n while (line != null) {\n data = line.split(\"\\\\s+\"); //regex for spliting all spaces\n sprites = new BufferedImage[data.length-1];\n for (int i = 1; i < data.length; i++) {\n sprites[i-1] = Util.urlToImage(\"characters/\"+heroName+\"/\"+data[i]);\n \n }\n this.sprites.put(data[0], sprites);\n line = reader.readLine();\n }\n reader.close();\n }", "public Hero createHero() {\r\n\t\t// Creates hero with the defines statistics\r\n\t\tHero hero = new Hero(getTotalHealth(), getIllusion(), getHealing(), getHaggling());\r\n\t\t\r\n\t\treturn hero;\r\n\t\t\r\n\t}", "private void createArmy(int size)\n {\n for(int i = 0; i < size; i++)\n {\n int rando = Randomizer.nextInt(10) + 1;\n if(rando < 6 )\n {\n army1.add(new Human());\n } \n else if(rando < 8)\n {\n army1.add(new Dwarf());\n \n }\n else if (rando < 10)\n {\n army1.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army1.add(new Demon()); \n }\n else if(rando == 2)\n {\n army1.add(new CyberDemon());\n }\n else\n {\n army1.add(new Balrog());\n }\n }\n \n rando = Randomizer.nextInt(10) + 1;\n if(rando < 6)\n {\n army2.add(new Human());\n }\n else if (rando < 8)\n {\n army2.add(new Dwarf());\n }\n else if (rando < 10)\n {\n army2.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army2.add(new Demon()); \n }\n else if(rando == 2)\n {\n army2.add(new CyberDemon());\n }\n else\n {\n army2.add(new Balrog());\n }\n } \n }\n \n \n \n \n \n }", "private void createMonsters() {\n monsters = new ArrayList<Monster>();\n\n Integer value;\n Integer key;\n for(Map.Entry<Integer, Integer> entry : characterLoader.getMonsters().entrySet()){\n\n key = entry.getKey();\n value = entry.getValue();\n\n for(int i=0;i<value;i++) {\n\n Point newPoint = findEmptyCell();\n\n switch (key) {\n\n // Case Ghost\n case LabyrinthFactory.GHOST:\n monsters.add(new Ghost(newPoint.x, newPoint.y));\n break;\n\n // Case Troll\n case LabyrinthFactory.TROLL:\n monsters.add(new Troll(newPoint.x, newPoint.y));\n break;\n }\n }\n }\n\n playThread();\n }", "private void createInstances()\n {\n Room EnchantedForest, IdyllicGlade, GumdropHill, DenseWoods, VolcanoHell, SecretHotSpring, MagmaChamber, MysteriousCloud, SkyParadise, Cirrostratus, Nimbostratus, Stratocumulus, WaterTemple, Whirlpool, EyeoftheStorm, BossQuarters, Portal;\n \n random = new Random();\n allrooms = new ArrayList<Room>();\n \n // create the rooms providing an ID to be passed into the room constructor\n EnchantedForest = new EnchantedForestRoom();\n allrooms.add(EnchantedForest);\n IdyllicGlade = new IdyllicGladeRoom();\n allrooms.add(IdyllicGlade);\n GumdropHill = new GumdropHillRoom();\n allrooms.add(GumdropHill);\n DenseWoods = new DenseWoodsRoom();\n allrooms.add(DenseWoods);\n VolcanoHell = new VolcanoHellRoom();\n allrooms.add(VolcanoHell);\n SecretHotSpring = new SecretHotSpringRoom();\n allrooms.add(SecretHotSpring);\n MagmaChamber = new MagmaChamberRoom();\n allrooms.add(MagmaChamber);\n MysteriousCloud = new MysteriousCloudRoom();\n allrooms.add(MysteriousCloud);\n SkyParadise = new SkyParadiseRoom();\n allrooms.add(SkyParadise);\n Cirrostratus = new CirrostratusRoom();\n allrooms.add(Cirrostratus);\n Nimbostratus = new NimbostratusRoom();\n allrooms.add(Nimbostratus);\n Stratocumulus = new StratocumulusRoom();\n allrooms.add(Stratocumulus);\n WaterTemple = new WaterTempleRoom();\n allrooms.add(WaterTemple);\n Whirlpool = new WhirlpoolRoom();\n allrooms.add(Whirlpool);\n EyeoftheStorm = new EyeoftheStormRoom();\n allrooms.add(EyeoftheStorm);\n BossQuarters = new BossQuartersRoom(); \n allrooms.add(BossQuarters);\n Portal = new PortalRoom();\n \n \n // initialise room exits, items and creatures\n EnchantedForest.setExit(\"east\", IdyllicGlade);\n EnchantedForest.setExit(\"west\", GumdropHill);\n EnchantedForest.setExit(\"south\", DenseWoods);\n \n IdyllicGlade.setExit(\"west\", EnchantedForest);\n \n GumdropHill.setExit(\"down\", EnchantedForest);\n GumdropHill.setExit(\"up\", MysteriousCloud);\n\n DenseWoods.setExit(\"north\", EnchantedForest);\n DenseWoods.setExit(\"south\", VolcanoHell);\n \n MagmaChamber.setExit(\"north\",VolcanoHell);\n \n VolcanoHell.setExit(\"east\", SecretHotSpring);\n VolcanoHell.setExit(\"north\", DenseWoods);\n VolcanoHell.setExit(\"west\", MysteriousCloud);\n VolcanoHell.setExit(\"south\", MagmaChamber);\n \n SecretHotSpring.setExit(\"west\", VolcanoHell);\n \n MysteriousCloud.setExit(\"west\", VolcanoHell);\n MysteriousCloud.setExit(\"in\", Portal);\n MysteriousCloud.setExit(\"up\", SkyParadise);\n \n SkyParadise.setExit(\"down\", MysteriousCloud);\n SkyParadise.setExit(\"up\", Cirrostratus);\n SkyParadise.setExit(\"east\", Nimbostratus);\n \n Cirrostratus.setExit(\"north\", SkyParadise);\n Cirrostratus.setExit(\"down\", WaterTemple);\n \n Nimbostratus.setExit(\"west\", SkyParadise);\n Nimbostratus.setExit(\"east\", Stratocumulus);\n \n Stratocumulus.setExit(\"west\", Nimbostratus);\n Stratocumulus.setExit(\"down\", WaterTemple);\n \n WaterTemple.setExit(\"up\",Stratocumulus);\n WaterTemple.setExit(\"high\", Cirrostratus);\n WaterTemple.setExit(\"down\", Whirlpool);\n WaterTemple.setExit(\"in\", BossQuarters);\n \n Whirlpool.setExit(\"up\", WaterTemple);\n Whirlpool.setExit(\"down\", EyeoftheStorm);\n \n EyeoftheStorm.setExit(\"up\", Whirlpool);\n EyeoftheStorm.setExit(\"in\", BossQuarters);\n \n BossQuarters.setExit(\"out\", WaterTemple);\n \n currentRoom = EnchantedForest; \n }", "public static void main(String[] args) {\n Hero aventurier = new Hero(200, 100);\n Equipement epee = new Equipement(\"epee\", 0);\n Monsters sorciere = new Monsters(\"witch\", 180, 0);\n Monsters barbare = new Monsters(\"olaf\", 160, 0);//Degat et point attaque sont à 0 car ils prendront les valeurs du random\n\n\n System.out.println(\"Bienvenue dans le dongeon\");\n System.out.println(\"Vous avez \" + aventurier.getPointDeVie() + \" Point de vie, \" + aventurier.getFlasqueDeau() + \" flasques pour combatre vos ennemies et une \");\n\n // i=room ;si pointdevie > room-->room+1 sinon game over(pas besoin de creer une classe)\n int i = 1;\n do {\n\n if (aventurier.getPointDeVie() > 0) ;\n {\n System.out.println(\"Room\" + i);\n\n Monsters enemieActuel = barbare;\n//nbr aleatoire entre sorcier et monster\n Random random = new Random();\n int nbrAl = random.nextInt(2 );\n//si nbr=0 = sorcier sinon barbare\n if (nbrAl == 0) {\n enemieActuel = sorciere;\n //sinon barbare\n } else {\n enemieActuel = barbare;\n }\n\n\n //Si barbare faire le do while\n\n if (enemieActuel == barbare) {\n\n do { //Faire des degats aleatoire grace au random à l'aide de l'epee\n epee.setDegat((int) (5 + (Math.random() * 30)));//comme .set dega=0 on lui donne la valeur de math.random\n int degat = epee.getDegat(); //.get renvoi la valeur au int nommer degat\n barbare.setPointDeVie(barbare.getPointDeVie() - degat);//vie - degat\n System.out.println(\"Il reste au barbare \" + barbare.getPointDeVie());//nouvelle valeur de point de vie\n\n\n //idem avec l'aventurier\n barbare.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = barbare.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n // tant que les Pvie de l'aventurier >= 0 et idem barbare continuer le combat\n } while (aventurier.getPointDeVie() >= 0 && barbare.getPointDeVie() >= 0);\n //à la fin du combat si pvie de l'aventurier sont >0 et que i (room) egale 5 \"gagné\"\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n\n //Si juste pvie de l'aventurier > 0 --->room suivante\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n //on redonne les valeurs de depart pdeVie pour la nouvelle room\n aventurier.setPointDeVie(200);\n barbare.setPointDeVie(180);\n i+=1;\n }\n\n // sinon room = 6 pour envoyer le sout \"game over\"\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n\n\n\n }\n\n //IDEM avec sorciere\n else {\n do {\n\n\n aventurier.setFlasqueDeau((int) (5 + (Math.random() * 30)));\n int degat = aventurier.getFlasqueDeau();\n sorciere.setPointDeVie(sorciere.getPointDeVie() - degat);\n System.out.println(\"Il reste à la sorciere \" + sorciere.getPointDeVie());\n\n sorciere.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = sorciere.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n } while (aventurier.getPointDeVie() >= 0 && sorciere.getPointDeVie() >= 0);\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n aventurier.setPointDeVie(200);\n sorciere.setPointDeVie(160);\n i+=1;\n }\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n }\n } } while (i <= 5 && aventurier.getPointDeVie() > 0);\n\n\n }", "public void init()\n {\n for(int i = 0 ; i <= 30 ; i++){\n enemies.add(new theEnemies(r1.nextInt(200),r1.nextInt(200)));\n }\n // Test removing of item from linked list.\n enemies.remove(0);\n }", "public Hero(LogicController logicController, Vector2 vec){\n this.setWorld(logicController.getWorld());\n this.logicController=logicController;\n sprite = new Sprite();\n position=vec;\n booleanDefinition();\n resetCounters();\n this.bombs=new ArrayList<Bomb>();\n if(!logicController.getGame().getIsTest())\n heroAnimations();\n heroBody = new HeroBody(logicController, this,vec);\n if(!logicController.getGame().getIsTest()) {\n heroStandingTextureLoad();\n standRight.flip(true, false);\n sprite.setBounds(0, 0, 17*MyGame.PIXEL_TO_METER, 22*MyGame.PIXEL_TO_METER);\n }\n soundHurt= Gdx.audio.newSound(Gdx.files.internal(\"Sounds/hero_hurt.wav\"));\n soundDying= Gdx.audio.newSound(Gdx.files.internal(\"Sounds/hero_dying.wav\"));\n }", "public void createEnvironment() {\n //create a list of collidable objects and a list of sprite objects\n List<Collidable> collidables = new ArrayList<Collidable>();\n List<Sprite> spriteList = new ArrayList<Sprite>();\n //update the game's environment to be the collidables list.\n this.environment = new GameEnvironment(collidables);\n //update the game's sprites collection to be the list of sprites.\n this.sprites = new SpriteCollection(spriteList);\n }", "public void add(HeroNode heroNode){ //heroNode是需要添加的新节点\n // we need a temperate node temp, because the head node couldn't be changed\n HeroNode temp = head;\n // go through the linkedlist to find the last node\n while (true){\n //find the last node of this linkedlist\n if (temp.next==null){\n break;\n }\n temp = temp.next;\n }\n // temp points to the end of the linkedlist when exiting the while\n // let the next of the last node point to the new node\n temp.next = heroNode;\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "public void popEnemies() {\n\t\t\n\t\tEnemyList.add(orc);\n\t\tEnemyList.add(goblin);\n\t\tEnemyList.add(necromancer);\n\t\tEnemyList.add(troll);\n\t\tEnemyList.add(minotaur);\n\t\tEnemyList.add(hydra);\n\t\tEnemyList.add(zombie);\n\t\tEnemyList.add(thrall);\n\t\tEnemyList.add(demon);\n\t\tEnemyList.add(witch);\n\t\tEnemyList.add(boss);\n\t}", "@Override\n public void hero_dies() {\n SoundPlayer.playHeroDies();\n this.stop();\n\n get_hero().setPosition(PLAYER_START_POSITION);\n start();\n\n // setting every flower to its original position\n //reason: hero can knock the flower out of the pipe when it hits it\n for (int i = 0; i < get_pipes().size(); i++) {\n if (get_pipes().get(i).with_flower()) {\n get_pipes().get(i).get_flower().setLinearVelocity(new Vec2(0f, 0f));\n get_pipes().get(i).get_flower().setPosition(get_pipes().get(i).get_flower().get_original_position());\n }\n }\n \n for (int i = 0; i < get_fire_rods().size(); i++) {\n get_fire_rods().get(i).reset_position();\n }\n get_hero().addLife(-1);\n if (get_hero().get_life() < 1){\n getGameController().gameOver();\n //get_sound_player().stop_level_two_music();\n }\n }", "public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void addDemoActors(List<Actor> actorList)\n {\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTnImPW4s91ZjlXIsxV2nrHDRc6Ow-EuzDn1w&usqp=CAU\", \"Jitendra Kumar\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSb3Me0agAUxj_vqbJuKq7Uadd4tlDXOBLs_A&usqp=CAU\", \"Navin Kasturia\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ4lZGhdpg6KelA9EKsXhTJ25WTYxG4i70Vew&usqp=CAU\", \"Badri Chavan\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTNLnBFZ0JIGx7MNjtnjlOhvBgYXsvXi0iv9g&usqp=CAU\", \"Pankaj Tripathi\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ6tpXiB_461OEMpZgurzjOAhAU9gMXL9fqLQ&usqp=CAU\", \"Nawazuddin Siddiqui\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQeTKD3bdHxgiFYLV1L--zF8IFE65m9u2UHLg&usqp=CAU\", \"Mithila Palkar\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSHAaZKDQs3Yvcwf-6LONwIGyFWI6eviDbbHg&usqp=CAU\", \"Barkha singh\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSd0dg__IbxMiMurrmUiPba_EWgZn7IWVYepw&usqp=CAU\", \"Ahsas Channa\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS7F-vmS5aa6ZuQoqr77dN49K9VJl1E-BwNXg&usqp=CAU\", \"Manoj Bajpayee\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSebkgK0lyKUaqDQ-RIqIB0qXJWJsffl5xaeg&usqp=CAU\", \"Pratik Gandhi\")) ;\n }", "private void createCharacters()\n {\n Person player = new Person(PLAYER,getRoom(STARTROOM));\n characters.add(player);\n }", "public void populateVehicleList() {\n\t\tfor (int i = 0; i < VEHICLE_LIST_SIZE; i++) {\n\t\t\tvehicleList[i] = createNewVehicle();\n\t\t}\n\t}", "public Heroes(int x, int y,int tamanioX, int tamanioY,String nombre, boolean spawned,boolean alive, int HP, int velocidad) {//inicio de el constructor por paramteros que recibe si esta vivo, la vida, velocidad\r\n\t\t\tsuper(x,y,tamanioX,tamanioY,nombre,spawned,alive,HP,velocidad);\r\n\t\r\n\t\t}", "void updateEnemies() {\n getEnemies().forEach(e -> {\n if (!e.isAlive()) {\n e.die();\n SoundPlayer.play(SoundPlayer.enemyDestroyed);\n }\n });\n objectsInMap.removeIf(o -> o instanceof Enemy && !(((Enemy) o).isAlive()));//Removing Dead Enemies\n getEnemies().forEach(e -> e.setTarget(objectsInMap.stream().filter(p -> p.identifier.contains(\"PlayerTank0.\") &&\n p.isBlocking && ((Tank) p).isVisible()).collect(Collectors.toList())));//Giving Possible target to enemies to decide\n }", "private void createPlayers() {\n\t\t//Randomize roles\n\t\tArrayList<AdventurerEnum> randomisedRoles = getRandomisedRoles();\n\t\tfor(int i=0; i<numPlayers; i++) \n\t\t\tcreateOnePlayer(randomisedRoles.get(i), i+1);\n\t}", "private void generateEnemies(int count) {\n generateEnemiesOnLayer(map.getHell(), count);\n generateEnemiesOnLayer(map.getEarth(), count);\n generateEnemiesOnLayer(map.getHeaven(), count);\n }", "private void addMockData() {\n League league1 = new League(\"1\", \"Premier League\");\n League league2 = new League(\"2\", \"La Liga\");\n League league3 = new League(\"3\", \"Bundesliga\");\n\n leagueList.add(league1);\n leagueList.add(league2);\n leagueList.add(league3);\n }", "public void createhomeonts(List<Homology> homos){\r\n\t\tSimpleExample se = new SimpleExample();\r\n\t\tString nameuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Name\";\r\n\t\tString homoclsuri = se.PROMOTER_PREFIX + \"#Homology\";\r\n\t\tOntModel onmo = null;\r\n\t\ttry {\r\n\t\t\tonmo = se.loadDB2nd();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfor(Homology homo : homos){\r\n\t\t\tString homoidvuri = se.PROMOTER_PREFIX + \"#Homology_\" + homo.getId();\t\t\t\r\n\t\t\tIndividual itemp = onmo.createIndividual(homoidvuri, onmo.getOntClass(homoclsuri));\r\n\t\t\tse.addDataProperty(onmo, homoidvuri, nameuri, homo.getName());\t\t\t\r\n\t\t}\r\n\t\tse.testListIndividual(onmo, homoclsuri);\r\n\t}", "public JPanel createHeroList()\n\t{\t\n\t\t//create heroPanel\n\t\tJPanel heroPanel = new JPanel();\n\t\t//set the layout\n\t\theroPanel.setLayout(new GridLayout(3,1));\n\t\t//create the font for the panel and the labels\n\t\tFont heroFont = new Font(\"Comic Sans MS\",Font.BOLD,16);\n\t\t\n\t\t//create colorButton\n\t\tcolorButton = new JButton(\"Choose the Color\");\n\t\t//set font\n\t\tcolorButton.setFont(heroFont);\n\t\t//add the button to the panel\n\t\theroPanel.add(colorButton);\n\t\tcolorButton.setForeground(Color.ORANGE);\n\t\tcolorButton.setBackground(Color.BLACK);\n\t\tcolorButton.setOpaque(true);\n\t\t//implement action listener\n\t\tcolorButton.addActionListener(this);\n\t\t\n\t\t//create intro Label\n\t\tintroLabel = new JLabel(\"Super Hero Twenty Questions!!!\");\n\t\t//set the font\n\t\tintroLabel.setFont(heroFont);\n\t\tintroLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tintroLabel.setForeground(Color.ORANGE);\n\t\tintroLabel.setBackground(Color.BLACK);\n\t\tintroLabel.setOpaque(true);\n\t\t//add to the panel\n\t\theroPanel.add(introLabel);\n\t\t\n\t\t//create hero label and pick your favorite super hero\n\t\theroLabel = new JLabel(\"Choose your Favorite Super Hero!!!\");\n\t\t//set horizontal alignment\n\t\theroLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\theroLabel.setForeground(Color.ORANGE);\n\t\theroLabel.setBackground(Color.BLACK);\n\t\theroLabel.setOpaque(true);\n\t\theroLabel.setFont(heroFont);\n\t\t//add the label ot panel\n\t\theroPanel.add(heroLabel);\n\t\t//return Panel\n\t\treturn heroPanel;\n\t}", "public void allocateWeapons() {\n Collections.shuffle(this.getWeaponPieces());\n List<Room> rooms = this.board.getRooms();\n Collections.shuffle(rooms);\n int roomIndex = 0;\n for (WeaponPiece weapon : this.getWeaponPieces()) {\n Room room = rooms.get(roomIndex);\n if (room.getWeaponPiece() == null) {\n room.setWeaponPiece(weapon);\n roomIndex += 1;\n }\n }\n }", "void generateEnemy(){\n\t\tEnemy e = new Enemy((int)(Math.random()*\n\t\t\t(cp.getWidthScreen() - (ss.getWidth()/2)))\n\t\t\t,ss.getHeight(), cp.getHieghtScreen());\t\t\t\t//Enemy (int x, int y, int heightScreen)\n\t\tcp.shapes.add(e);\n\t\tenemies.add(e);\n\t}", "public void random_hero_start() {\n\t\tint randomX;\n\t\tint randomY;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\theroi.setX_coord(randomX);\n\t\theroi.setY_coord(randomY);\n\t\tchange_hero_pos();\n\t}", "@Override\n\tpublic void onAdd() {\n\t\tsuper.onAdd();\n\n\t\tsetIdleAnimation(4527);\n\t\tsetNeverRandomWalks(true);\n\t\tsetWalkingHomeDisabled(true);\n\n\t\tthis.region = Stream.of(AbyssalSireRegion.values()).filter(r -> r.getSire().getX() == getSpawnPositionX()\n\t\t && r.getSire().getY() == getSpawnPositionY()).findAny().orElse(null);\n\n\t\tRegion region = Region.getRegion(getSpawnPositionX(), getSpawnPositionY());\n\n\t\tif (region != null) {\n\t\t\tregion.forEachNpc(npc -> {\n\t\t\t\tif (npc instanceof AbyssalSireTentacle) {\n\t\t\t\t\tif (!npc.isDead()) {\n\t\t\t\t\t\tnpc.setDead(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tList<Position> tentaclePositions = Arrays.asList(\n\t\t\t\tthis.region.getTentacleEast(),\n\t\t\t\tthis.region.getTentacleWest(),\n\t\t\t\tthis.region.getTentacleNorthEast(),\n\t\t\t\tthis.region.getTentacleNorthWest(),\n\t\t\t\tthis.region.getTentacleSouthEast(),\n\t\t\t\tthis.region.getTentacleSouthWest()\n\t\t );\n\n\t\ttentaclePositions.forEach(position -> {\n\t\t\ttentacles.add(NpcHandler.spawnNpc(5909, position.getX(), position.getY(), position.getZ()));\n\t\t});\n\n\t\tList<Position> respiratoryPositions = Arrays.asList(\n\t\t\t\tthis.region.getRespiratorySystemNorthEast(),\n\t\t\t\tthis.region.getRespiratorySystemNorthWest(),\n\t\t\t\tthis.region.getRespiratorySystemSouthEast(),\n\t\t\t\tthis.region.getRespiratorySystemSouthWest()\n\t\t );\n\n\t\trespiratoryPositions.forEach(position -> respiratorySystems.add(\n\t\t\t\tNpcHandler.spawnNpc(5914, position.getX(), position.getY(), position.getZ())));\n\t}", "public void setWeaponCardsAndPieces() {\n List<WeaponCard> weaponCards = new ArrayList<>(); // empty list for the new weapon cards\n List<WeaponPiece> weaponPieces = new ArrayList<>(); // empty list for the new weapon pieces\n\n Data data = new Data(\"data.json\"); // read data from data.json\n JSONObject weaponData = (JSONObject) data.getJsonData().get(\"Weapons\"); // get the weapon data from the data\n for (int i = 0; i < 6; i++) { // for loop 0 to 5\n String weaponName = String.valueOf(weaponData.get(String.valueOf(i))); // get the weapon name\n //Make and add weaponCard and WeaponPiece to their specified lists.\n weaponCards.add(new WeaponCard(weaponName));\n weaponPieces.add(new WeaponPiece(weaponName));\n }\n //Assign the lists into their class variables\n this.weaponCards = weaponCards;\n this.weaponPieces = weaponPieces;\n }", "@Override\n public void run() {\n// handler.addObject(new Enemy(rnd.nextInt(Game.WIDTH), rnd.nextInt(200), ID.Trump));\n// handler.addObject(new Enemy(rnd.nextInt(Game.WIDTH), rnd.nextInt(200), ID.Trump));\n int rnd_x = rnd.nextInt(Game.WIDTH);\n handler.addObject(new Enemy(getX() + 30, y, ID.Trump, 0));\n handler.addObject(new Enemy(getX() -30, y, ID.Trump, 0));\n handler.addObject(new Enemy(getX() , y+30, ID.Trump, 0));\n handler.addObject(new Enemy(getX() , y-30, ID.Trump, 0));\n\n\n }", "public ArrayList<Enemy> getNewEnemies()\r\n\t{\r\n\t\tArrayList<Enemy> enemyList = new ArrayList<Enemy>();\r\n\t\tfor (Enemy enem : enemy)\r\n\t\t{\r\n\t\t\tenemyList.add(new Enemy(enem));\r\n\t\t}\r\n\t\treturn enemyList;\r\n\t}", "void createNewGame() {\n _gameList.add(new GameObject());\n Log.i(\"createGame\", \"Created New Game\");\n }", "private void btnCreateHeroActionPerformed() {// GEN-FIRST:event_btnCreateHeroActionPerformed\r\n\t\tdispose();\r\n\t\tHero h = new Hero(txtCreateName.getText());\r\n\t\tnew MainForm().setVisible(true);\r\n\t\tMainForm.setHero(h);\r\n\t\tMainForm.makeOpponents();\r\n\t\th = null;\r\n\t}", "@Override\n public void setTestUnit() {\n hero = new Hero(50, 2, field.getCell(0, 0));\n }", "private void addSpawnsToList()\n\t{\n\t\tSPAWNS.put(1, new ESSpawn(1, GraciaSeeds.DESTRUCTION, new Location(-245790,220320,-12104), new int[]{TEMPORARY_TELEPORTER}));\n\t\tSPAWNS.put(2, new ESSpawn(2, GraciaSeeds.DESTRUCTION, new Location(-249770,207300,-11952), new int[]{TEMPORARY_TELEPORTER}));\n\t\t//Energy Seeds\n\t\tSPAWNS.put(3, new ESSpawn(3, GraciaSeeds.DESTRUCTION, new Location(-248360,219272,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(4, new ESSpawn(4, GraciaSeeds.DESTRUCTION, new Location(-249448,219256,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(5, new ESSpawn(5, GraciaSeeds.DESTRUCTION, new Location(-249432,220872,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(6, new ESSpawn(6, GraciaSeeds.DESTRUCTION, new Location(-248360,220888,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(7, new ESSpawn(7, GraciaSeeds.DESTRUCTION, new Location(-250088,219256,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(8, new ESSpawn(8, GraciaSeeds.DESTRUCTION, new Location(-250600,219272,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(9, new ESSpawn(9, GraciaSeeds.DESTRUCTION, new Location(-250584,220904,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(10, new ESSpawn(10, GraciaSeeds.DESTRUCTION, new Location(-250072,220888,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(11, new ESSpawn(11, GraciaSeeds.DESTRUCTION, new Location(-253096,217704,-12296), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(12, new ESSpawn(12, GraciaSeeds.DESTRUCTION, new Location(-253112,217048,-12288), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(13, new ESSpawn(13, GraciaSeeds.DESTRUCTION, new Location(-251448,217032,-12288), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(14, new ESSpawn(14, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(15, new ESSpawn(15, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(16, new ESSpawn(16, GraciaSeeds.DESTRUCTION, new Location(-251416,217016,-12280), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(17, new ESSpawn(17, GraciaSeeds.DESTRUCTION, new Location(-249752,217016,-12280), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(18, new ESSpawn(18, GraciaSeeds.DESTRUCTION, new Location(-249736,217688,-12296), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(19, new ESSpawn(19, GraciaSeeds.DESTRUCTION, new Location(-252472,215208,-12120), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(20, new ESSpawn(20, GraciaSeeds.DESTRUCTION, new Location(-252552,216760,-12248), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(21, new ESSpawn(21, GraciaSeeds.DESTRUCTION, new Location(-253160,216744,-12248), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(22, new ESSpawn(22, GraciaSeeds.DESTRUCTION, new Location(-253128,215160,-12096), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(23, new ESSpawn(23, GraciaSeeds.DESTRUCTION, new Location(-250392,215208,-12120), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(24, new ESSpawn(24, GraciaSeeds.DESTRUCTION, new Location(-250264,216744,-12248), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(25, new ESSpawn(25, GraciaSeeds.DESTRUCTION, new Location(-249720,216744,-12248), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(26, new ESSpawn(26, GraciaSeeds.DESTRUCTION, new Location(-249752,215128,-12096), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(27, new ESSpawn(27, GraciaSeeds.DESTRUCTION, new Location(-250280,216760,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(28, new ESSpawn(28, GraciaSeeds.DESTRUCTION, new Location(-250344,216152,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(29, new ESSpawn(29, GraciaSeeds.DESTRUCTION, new Location(-252504,216152,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(30, new ESSpawn(30, GraciaSeeds.DESTRUCTION, new Location(-252520,216792,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(31, new ESSpawn(31, GraciaSeeds.DESTRUCTION, new Location(-242520,217272,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(32, new ESSpawn(32, GraciaSeeds.DESTRUCTION, new Location(-241432,217288,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(33, new ESSpawn(33, GraciaSeeds.DESTRUCTION, new Location(-241432,218936,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(34, new ESSpawn(34, GraciaSeeds.DESTRUCTION, new Location(-242536,218936,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(35, new ESSpawn(35, GraciaSeeds.DESTRUCTION, new Location(-240808,217272,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(36, new ESSpawn(36, GraciaSeeds.DESTRUCTION, new Location(-240280,217272,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(37, new ESSpawn(37, GraciaSeeds.DESTRUCTION, new Location(-240280,218952,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(38, new ESSpawn(38, GraciaSeeds.DESTRUCTION, new Location(-240792,218936,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(39, new ESSpawn(39, GraciaSeeds.DESTRUCTION, new Location(-239576,217240,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(40, new ESSpawn(40, GraciaSeeds.DESTRUCTION, new Location(-239560,216168,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(41, new ESSpawn(41, GraciaSeeds.DESTRUCTION, new Location(-237896,216152,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(42, new ESSpawn(42, GraciaSeeds.DESTRUCTION, new Location(-237912,217256,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(43, new ESSpawn(43, GraciaSeeds.DESTRUCTION, new Location(-237896,215528,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(44, new ESSpawn(44, GraciaSeeds.DESTRUCTION, new Location(-239560,215528,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(45, new ESSpawn(45, GraciaSeeds.DESTRUCTION, new Location(-239560,214984,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(46, new ESSpawn(46, GraciaSeeds.DESTRUCTION, new Location(-237896,215000,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(47, new ESSpawn(47, GraciaSeeds.DESTRUCTION, new Location(-237896,213640,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(48, new ESSpawn(48, GraciaSeeds.DESTRUCTION, new Location(-239560,213640,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(49, new ESSpawn(49, GraciaSeeds.DESTRUCTION, new Location(-239544,212552,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(50, new ESSpawn(50, GraciaSeeds.DESTRUCTION, new Location(-237912,212552,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(51, new ESSpawn(51, GraciaSeeds.DESTRUCTION, new Location(-237912,211912,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(52, new ESSpawn(52, GraciaSeeds.DESTRUCTION, new Location(-237912,211400,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(53, new ESSpawn(53, GraciaSeeds.DESTRUCTION, new Location(-239560,211400,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(54, new ESSpawn(54, GraciaSeeds.DESTRUCTION, new Location(-239560,211912,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(55, new ESSpawn(55, GraciaSeeds.DESTRUCTION, new Location(-241960,214536,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(56, new ESSpawn(56, GraciaSeeds.DESTRUCTION, new Location(-241976,213448,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(57, new ESSpawn(57, GraciaSeeds.DESTRUCTION, new Location(-243624,213448,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(58, new ESSpawn(58, GraciaSeeds.DESTRUCTION, new Location(-243624,214520,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(59, new ESSpawn(59, GraciaSeeds.DESTRUCTION, new Location(-241976,212808,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(60, new ESSpawn(60, GraciaSeeds.DESTRUCTION, new Location(-241960,212280,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(61, new ESSpawn(61, GraciaSeeds.DESTRUCTION, new Location(-243624,212264,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(62, new ESSpawn(62, GraciaSeeds.DESTRUCTION, new Location(-243624,212792,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(63, new ESSpawn(63, GraciaSeeds.DESTRUCTION, new Location(-243640,210920,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(64, new ESSpawn(64, GraciaSeeds.DESTRUCTION, new Location(-243624,209832,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(65, new ESSpawn(65, GraciaSeeds.DESTRUCTION, new Location(-241976,209832,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(66, new ESSpawn(66, GraciaSeeds.DESTRUCTION, new Location(-241976,210920,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(67, new ESSpawn(67, GraciaSeeds.DESTRUCTION, new Location(-241976,209192,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(68, new ESSpawn(68, GraciaSeeds.DESTRUCTION, new Location(-241976,208664,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(69, new ESSpawn(69, GraciaSeeds.DESTRUCTION, new Location(-243624,208664,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(70, new ESSpawn(70, GraciaSeeds.DESTRUCTION, new Location(-243624,209192,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(71, new ESSpawn(71, GraciaSeeds.DESTRUCTION, new Location(-241256,208664,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(72, new ESSpawn(72, GraciaSeeds.DESTRUCTION, new Location(-240168,208648,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(73, new ESSpawn(73, GraciaSeeds.DESTRUCTION, new Location(-240168,207000,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(74, new ESSpawn(74, GraciaSeeds.DESTRUCTION, new Location(-241256,207000,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(75, new ESSpawn(75, GraciaSeeds.DESTRUCTION, new Location(-239528,208648,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(76, new ESSpawn(76, GraciaSeeds.DESTRUCTION, new Location(-238984,208664,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(77, new ESSpawn(77, GraciaSeeds.DESTRUCTION, new Location(-239000,207000,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(78, new ESSpawn(78, GraciaSeeds.DESTRUCTION, new Location(-239512,207000,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(79, new ESSpawn(79, GraciaSeeds.DESTRUCTION, new Location(-245064,213144,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(80, new ESSpawn(80, GraciaSeeds.DESTRUCTION, new Location(-245064,212072,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(81, new ESSpawn(81, GraciaSeeds.DESTRUCTION, new Location(-246696,212072,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(82, new ESSpawn(82, GraciaSeeds.DESTRUCTION, new Location(-246696,213160,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(83, new ESSpawn(83, GraciaSeeds.DESTRUCTION, new Location(-245064,211416,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(84, new ESSpawn(84, GraciaSeeds.DESTRUCTION, new Location(-245048,210904,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(85, new ESSpawn(85, GraciaSeeds.DESTRUCTION, new Location(-246712,210888,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(86, new ESSpawn(86, GraciaSeeds.DESTRUCTION, new Location(-246712,211416,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(87, new ESSpawn(87, GraciaSeeds.DESTRUCTION, new Location(-245048,209544,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(88, new ESSpawn(88, GraciaSeeds.DESTRUCTION, new Location(-245064,208456,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(89, new ESSpawn(89, GraciaSeeds.DESTRUCTION, new Location(-246696,208456,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(90, new ESSpawn(90, GraciaSeeds.DESTRUCTION, new Location(-246712,209544,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(91, new ESSpawn(91, GraciaSeeds.DESTRUCTION, new Location(-245048,207816,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(92, new ESSpawn(92, GraciaSeeds.DESTRUCTION, new Location(-245048,207288,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(93, new ESSpawn(93, GraciaSeeds.DESTRUCTION, new Location(-246696,207304,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(94, new ESSpawn(94, GraciaSeeds.DESTRUCTION, new Location(-246712,207816,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(95, new ESSpawn(95, GraciaSeeds.DESTRUCTION, new Location(-244328,207272,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(96, new ESSpawn(96, GraciaSeeds.DESTRUCTION, new Location(-243256,207256,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(97, new ESSpawn(97, GraciaSeeds.DESTRUCTION, new Location(-243256,205624,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(98, new ESSpawn(98, GraciaSeeds.DESTRUCTION, new Location(-244328,205608,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(99, new ESSpawn(99, GraciaSeeds.DESTRUCTION, new Location(-242616,207272,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(100, new ESSpawn(100, GraciaSeeds.DESTRUCTION, new Location(-242104,207272,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(101, new ESSpawn(101, GraciaSeeds.DESTRUCTION, new Location(-242088,205624,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(102, new ESSpawn(102, GraciaSeeds.DESTRUCTION, new Location(-242600,205608,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\t// Seed of Annihilation\n\t\tSPAWNS.put(103, new ESSpawn(103, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184519,183007,-10456), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(104, new ESSpawn(104, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184873,181445,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(105, new ESSpawn(105, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184009,180962,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(106, new ESSpawn(106, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185321,181641,-10448), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(107, new ESSpawn(107, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184035,182775,-10512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(108, new ESSpawn(108, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185433,181935,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(109, new ESSpawn(109, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183309,183007,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(110, new ESSpawn(110, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184929,181886,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(111, new ESSpawn(111, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184009,180392,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(112, new ESSpawn(112, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183793,183239,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(113, new ESSpawn(113, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184245,180848,-10464), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(114, new ESSpawn(114, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-182704,183761,-10528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(115, new ESSpawn(115, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184705,181886,-10504), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(116, new ESSpawn(116, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184304,181076,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(117, new ESSpawn(117, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183596,180430,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(118, new ESSpawn(118, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184422,181038,-10480), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(119, new ESSpawn(119, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184929,181543,-10496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(120, new ESSpawn(120, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184398,182891,-10472), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(121, new ESSpawn(121, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177606,182848,-10584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(122, new ESSpawn(122, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178104,183224,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(123, new ESSpawn(123, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177274,182284,-10600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(124, new ESSpawn(124, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177772,183224,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(125, new ESSpawn(125, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181532,180364,-10504), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(126, new ESSpawn(126, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181802,180276,-10496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(127, new ESSpawn(127, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178429,180444,-10512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(128, new ESSpawn(128, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177606,182190,-10600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(129, new ESSpawn(129, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177357,181908,-10576), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(130, new ESSpawn(130, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178747,179534,-10408), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(131, new ESSpawn(131, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178429,179534,-10392), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(132, new ESSpawn(132, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178853,180094,-10472), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(133, new ESSpawn(133, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181937,179660,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(134, new ESSpawn(134, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-180992,179572,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(135, new ESSpawn(135, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185552,179252,-10368), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(136, new ESSpawn(136, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184572,178913,-10400), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(137, new ESSpawn(137, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184768,178348,-10312), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(138, new ESSpawn(138, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184572,178574,-10352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(139, new ESSpawn(139, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185062,178913,-10384), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(140, new ESSpawn(140, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181397,179484,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(141, new ESSpawn(141, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181667,179044,-10408), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(142, new ESSpawn(142, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185258,177896,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(143, new ESSpawn(143, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183506,176570,-10280), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(144, new ESSpawn(144, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183719,176804,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(145, new ESSpawn(145, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183648,177116,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(146, new ESSpawn(146, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183932,176492,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(147, new ESSpawn(147, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183861,176570,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(148, new ESSpawn(148, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183790,175946,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(149, new ESSpawn(149, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178641,179604,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(150, new ESSpawn(150, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178959,179814,-10432), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(151, new ESSpawn(151, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176367,178456,-10376), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(152, new ESSpawn(152, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-175845,177172,-10264), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(153, new ESSpawn(153, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-175323,177600,-10248), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(154, new ESSpawn(154, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174975,177172,-10216), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(155, new ESSpawn(155, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176019,178242,-10352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(156, new ESSpawn(156, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174801,178456,-10264), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(157, new ESSpawn(157, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185648,183384,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(158, new ESSpawn(158, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186740,180908,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(159, new ESSpawn(159, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185297,184658,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(160, new ESSpawn(160, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185697,181601,-15488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(161, new ESSpawn(161, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186684,182744,-15536), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(162, new ESSpawn(162, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184908,183384,-15616), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(163, new ESSpawn(163, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184994,185572,-15784), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(164, new ESSpawn(164, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185796,182616,-15608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(165, new ESSpawn(165, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184970,184385,-15648), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(166, new ESSpawn(166, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185995,180809,-15512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(167, new ESSpawn(167, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185352,182872,-15632), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(168, new ESSpawn(168, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185624,184294,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(169, new ESSpawn(169, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184486,185774,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(170, new ESSpawn(170, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186496,184112,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(171, new ESSpawn(171, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184232,185976,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(172, new ESSpawn(172, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184994,185673,-15792), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(173, new ESSpawn(173, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185733,184203,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(174, new ESSpawn(174, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185079,184294,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(175, new ESSpawn(175, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184803,180710,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(176, new ESSpawn(176, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186293,180413,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(177, new ESSpawn(177, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185352,182936,-15632), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(178, new ESSpawn(178, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184356,180611,-15496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(179, new ESSpawn(179, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185375,186784,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(180, new ESSpawn(180, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184867,186784,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(181, new ESSpawn(181, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180553,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(182, new ESSpawn(182, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180422,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(183, new ESSpawn(183, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-181863,181138,-15120), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(184, new ESSpawn(184, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-181732,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(185, new ESSpawn(185, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180684,180397,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(186, new ESSpawn(186, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-182256,180682,-15112), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(187, new ESSpawn(187, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185492,179492,-15392), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(188, new ESSpawn(188, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185894,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(189, new ESSpawn(189, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186028,178856,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(190, new ESSpawn(190, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185224,179068,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(191, new ESSpawn(191, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185492,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(192, new ESSpawn(192, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185894,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(193, new ESSpawn(193, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180619,178855,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(194, new ESSpawn(194, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180255,177892,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(195, new ESSpawn(195, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185804,176472,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(196, new ESSpawn(196, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184580,176370,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(197, new ESSpawn(197, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184308,176166,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(198, new ESSpawn(198, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-183764,177186,-15304), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(199, new ESSpawn(199, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180801,177571,-15144), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(200, new ESSpawn(200, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184716,176064,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(201, new ESSpawn(201, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184444,175452,-15296), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(202, new ESSpawn(202, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180164,177464,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(203, new ESSpawn(203, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180164,178213,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(204, new ESSpawn(204, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-179982,178320,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(205, new ESSpawn(205, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176925,177757,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(206, new ESSpawn(206, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176164,179282,-15720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(207, new ESSpawn(207, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175692,177613,-15800), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(208, new ESSpawn(208, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175418,178117,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(209, new ESSpawn(209, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176103,177829,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(210, new ESSpawn(210, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175966,177325,-15792), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(211, new ESSpawn(211, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174778,179732,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(212, new ESSpawn(212, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175692,178261,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(213, new ESSpawn(213, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176038,179192,-15736), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(214, new ESSpawn(214, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175660,179462,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(215, new ESSpawn(215, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175912,179732,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(216, new ESSpawn(216, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175156,180182,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(217, new ESSpawn(217, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182059,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(218, new ESSpawn(218, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175590,181478,-15640), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(219, new ESSpawn(219, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174510,181561,-15616), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(220, new ESSpawn(220, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182391,-15688), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(221, new ESSpawn(221, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174105,182806,-15672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(222, new ESSpawn(222, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174645,182806,-15712), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(223, new ESSpawn(223, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214962,182403,-10992), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(224, new ESSpawn(224, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-215019,182493,-11000), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(225, new ESSpawn(225, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211374,180793,-11672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(226, new ESSpawn(226, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211198,180661,-11680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(227, new ESSpawn(227, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213097,178936,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(228, new ESSpawn(228, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213517,178936,-12712), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(229, new ESSpawn(229, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214105,179191,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(230, new ESSpawn(230, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213769,179446,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(231, new ESSpawn(231, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214021,179344,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(232, new ESSpawn(232, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-210582,180595,-11672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(233, new ESSpawn(233, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-210934,180661,-11696), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(234, new ESSpawn(234, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207058,178460,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(235, new ESSpawn(235, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207454,179151,-11368), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(236, new ESSpawn(236, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207422,181365,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(237, new ESSpawn(237, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207358,180627,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(238, new ESSpawn(238, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207230,180996,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(239, new ESSpawn(239, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-208515,184160,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(240, new ESSpawn(240, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207613,184000,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(241, new ESSpawn(241, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-208597,183760,-11352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(242, new ESSpawn(242, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206710,176142,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(243, new ESSpawn(243, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206361,178136,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(244, new ESSpawn(244, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206178,178630,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(245, new ESSpawn(245, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-205738,178715,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(246, new ESSpawn(246, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206442,178205,-12648), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(247, new ESSpawn(247, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206585,178874,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(248, new ESSpawn(248, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206073,179366,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(249, new ESSpawn(249, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206009,178628,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(250, new ESSpawn(250, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206155,181301,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(251, new ESSpawn(251, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206595,181641,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(252, new ESSpawn(252, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206507,181641,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(253, new ESSpawn(253, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206507,181471,-12640), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(254, new ESSpawn(254, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206974,175972,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(255, new ESSpawn(255, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206304,175130,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(256, new ESSpawn(256, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206886,175802,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(257, new ESSpawn(257, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207238,175972,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(258, new ESSpawn(258, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206386,174857,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(259, new ESSpawn(259, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206386,175039,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(260, new ESSpawn(260, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-205976,174584,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(261, new ESSpawn(261, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207367,184320,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(262, new ESSpawn(262, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219002,180419,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(263, new ESSpawn(263, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218853,182790,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(264, new ESSpawn(264, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218853,183343,-12600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(265, new ESSpawn(265, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218358,186247,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(266, new ESSpawn(266, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218358,186083,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(267, new ESSpawn(267, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-217574,185796,-11352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(268, new ESSpawn(268, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219178,181051,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(269, new ESSpawn(269, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-220171,180313,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(270, new ESSpawn(270, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219293,183738,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(271, new ESSpawn(271, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219381,182553,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(272, new ESSpawn(272, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219600,183024,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(273, new ESSpawn(273, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219940,182680,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(274, new ESSpawn(274, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219260,183884,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(275, new ESSpawn(275, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219855,183540,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(276, new ESSpawn(276, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218946,186575,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(277, new ESSpawn(277, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219882,180103,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(278, new ESSpawn(278, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219266,179787,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(279, new ESSpawn(279, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219201,178337,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(280, new ESSpawn(280, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219716,179875,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(281, new ESSpawn(281, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219716,180021,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(282, new ESSpawn(282, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219989,179437,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(283, new ESSpawn(283, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219078,178298,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(284, new ESSpawn(284, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218684,178954,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(285, new ESSpawn(285, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219089,178456,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(286, new ESSpawn(286, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-220266,177623,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(287, new ESSpawn(287, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219201,178025,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(288, new ESSpawn(288, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219142,177044,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(289, new ESSpawn(289, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219690,177895,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(290, new ESSpawn(290, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219754,177623,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(291, new ESSpawn(291, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218791,177830,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(292, new ESSpawn(292, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218904,176219,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(293, new ESSpawn(293, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218768,176384,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(294, new ESSpawn(294, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218774,177626,-11320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(295, new ESSpawn(295, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218774,177792,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(296, new ESSpawn(296, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219880,175901,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(297, new ESSpawn(297, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219210,176054,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(298, new ESSpawn(298, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219850,175991,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(299, new ESSpawn(299, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219079,175021,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(300, new ESSpawn(300, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218812,174229,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(301, new ESSpawn(301, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218723,174669,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\t//@formatter:on\n\t}", "protected void createFighter( ArrayList <Luchador> list, ArrayList <ObjetoEquipable> inventory) throws Exception {\n ListaLuchadores.crearLuchador (list, inventory);\r\n }", "private void makeKillerEnemys(int n) {\n List<Enemy> enemies = getEnemies();\n\n for (int i = 0; i < n; i++) {\n Random r = new Random();\n //spawn enemies at random position on the map\n enemies.add(new KillerEnemy(getGameView(), r.nextInt((getMap().width - (-getMap().width)) + 1) + (-getMap().width),\n r.nextInt((getMap().height - (-getMap().height)) + 1) + (-getMap().height),\n 100));\n }\n\n setEnemies(enemies);\n }", "private void addEnemy(int e_num){\n\t\tRandom r_gen = new Random();\n\t\t\n\t\tenemy_num = e_num;\n\t\tenemy = new int[enemy_num][3];\n\t\tfor(int i=0;i<enemy_num;i++){\n\t\t\tenemy[i][0] = r_gen.nextInt(1000)+20;\n\t\t\tenemy[i][1] = r_gen.nextInt(750)+20;\n\t\t\n\t\t}\n\t\tenemy_arrows = new int[e_num][30][4];\n\t\tenemy_arrow_num = new int[e_num];\n\t\tfor(int i=0;i<e_num;i++){\n\t\t\tenemy_arrow_num[i] = 0;\n\t\t}\n\t\tenemy_choose_player();\n\t\n\t}", "public void buildHexes(){\n\t\t// Normal hexes\n\t\tHexLocation loc1 = new HexLocation(0, -2);\n\t\tTerrainHex hex1 = new TerrainHex(loc1, HexType.WOOD, 11);\n\t\thexes.put(loc1, hex1);\n\n\t\tHexLocation loc2 = new HexLocation(1, -2);\n\t\tTerrainHex hex2 = new TerrainHex(loc2, HexType.SHEEP, 12);\n\t\thexes.put(loc2, hex2);\n\t\t\n\t\tHexLocation loc3 = new HexLocation(2, -2);\n\t\tTerrainHex hex3 = new TerrainHex(loc3, HexType.WHEAT, 9);\n\t\thexes.put(loc3, hex3);\n\t\t\n\t\tHexLocation loc4 = new HexLocation(-1, -1);\n\t\tTerrainHex hex4 = new TerrainHex(loc4, HexType.BRICK, 4);\n\t\thexes.put(loc4, hex4);\n\t\t\n\t\tHexLocation loc5 = new HexLocation(0, -1);\n\t\tTerrainHex hex5 = new TerrainHex(loc5, HexType.ORE, 6);\n\t\thexes.put(loc5, hex5);\n\t\t\n\t\tHexLocation loc6 = new HexLocation(1, -1);\n\t\tTerrainHex hex6 = new TerrainHex(loc6, HexType.BRICK, 5);\n\t\thexes.put(loc6, hex6);\n\t\t\n\t\tHexLocation loc7 = new HexLocation(2, -1);\n\t\tTerrainHex hex7 = new TerrainHex(loc7,HexType.SHEEP, 10);\n\t\thexes.put(loc7, hex7);\n\t\t\n\t\tHexLocation loc8 = new HexLocation(-2, 0);\n\t\tTerrainHex hex8 = new TerrainHex(loc8, HexType.DESERT, 0);\n\t\thexes.put(loc8, hex8);\n\t\t\n\t\tHexLocation loc9 = new HexLocation(-1, 0);\n\t\tTerrainHex hex9 = new TerrainHex(loc9, HexType.WOOD, 3);\n\t\thexes.put(loc9, hex9);\n\t\t\n\t\tHexLocation loc10 = new HexLocation(0, 0);\n\t\tTerrainHex hex10 = new TerrainHex(loc10, HexType.WHEAT, 11);\n\t\thexes.put(loc10, hex10);\n\t\t\n\t\tHexLocation loc11 = new HexLocation(1, 0);\n\t\tTerrainHex hex11 = new TerrainHex(loc11, HexType.WOOD, 4);\n\t\thexes.put(loc11, hex11);\n\t\t\n\t\tHexLocation loc12 = new HexLocation(2, 0);\n\t\tTerrainHex hex12 = new TerrainHex(loc12, HexType.WHEAT, 8);\n\t\thexes.put(loc12, hex12);\n\t\t\n\t\tHexLocation loc13 = new HexLocation(-2, 1);\n\t\tTerrainHex hex13 = new TerrainHex(loc13, HexType.BRICK, 8);\n\t\thexes.put(loc13, hex13);\n\t\t\n\t\tHexLocation loc14 = new HexLocation(-1, 1);\n\t\tTerrainHex hex14 = new TerrainHex(loc14, HexType.SHEEP, 10);\n\t\thexes.put(loc14, hex14);\n\t\t\n\t\tHexLocation loc15 = new HexLocation(0, 1);\n\t\tTerrainHex hex15 = new TerrainHex(loc15, HexType.SHEEP, 9);\n\t\thexes.put(loc15, hex15);\n\t\t\n\t\tHexLocation loc16 = new HexLocation(1, 1);\n\t\tTerrainHex hex16 = new TerrainHex(loc16, HexType.ORE, 3);\n\t\thexes.put(loc16, hex16);\n\t\t\n\t\tHexLocation loc17 = new HexLocation(-2, 2);\n\t\tTerrainHex hex17 = new TerrainHex(loc17, HexType.ORE, 5);\n\t\thexes.put(loc17, hex17);\n\t\t\n\t\tHexLocation loc18 = new HexLocation(-1, 2);\n\t\tTerrainHex hex18 = new TerrainHex(loc18, HexType.WHEAT, 2);\n\t\thexes.put(loc18, hex18);\n\t\t\n\t\tHexLocation loc19 = new HexLocation(0, 2);\n\t\tTerrainHex hex19 = new TerrainHex(loc19, HexType.WOOD, 6);\n\t\thexes.put(loc19, hex19);\n\n\n\t\t\n\t}", "private void spawnEnemy() {\n float randomEnemy = (float) Math.random();\n\n if (round == 1) {\n addActorFunction.accept(new SimpleEnemy(tileSet));\n } else {\n float speedMultiplier = 1 + (0.08f * round);\n float healthMultiplier = 1 + (0.01f * round * round);\n\n if (randomEnemy < (round - 1) * 0.1) {\n addActorFunction.accept(new HeavyEnemy(tileSet, speedMultiplier, healthMultiplier));\n } else {\n addActorFunction.accept(new SimpleEnemy(tileSet, speedMultiplier, healthMultiplier));\n }\n }\n }", "private void initHeroRollSkills() {\n if (heroRoll.skills.isEmpty()) {\n for (int i : heroRoll.hero.skills40) {\n heroRoll.skills.add(singleton.skillsMap.get(i));\n }\n }\n }", "@Override\n public void onResponse(JSONObject response) {\n try {\n /* Obtenemos los atributos que hacen a un objeto heroes. */\n JSONArray jsonArray = response.getJSONArray(\"heroes\");\n\n datoNombre = new String[jsonArray.length()]; // Cantidad de nombres heros.\n datoUrls = new String[jsonArray.length()]; // Cantidad de URLs en \"heroes\".\n\n //Extraemos los atributos de cada heroe existente\n for (int i = 0; i < jsonArray.length(); i++) {\n\n JSONObject hero = jsonArray.getJSONObject(i);\n\n String nombre = hero.getString(\"name\");\n String imageUrl = hero.getString(\"imageurl\");\n\n Log.i(\"MOSTRAR\", nombre + \" - \" + imageUrl);\n\n //enviamos los datos extraidos en la posicion i al metodo recibir()\n // y jsonArray.length() es la cantidad de heroes encontrados en el json\n recibir(nombre, imageUrl, jsonArray.length());\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void generateEnemiesOnLayer(Layer layer, int count) {\n // Enemies are generated below the screen all with the same x position as the starting tile\n // but varying y positions.\n Random random = new Random();\n for (int i = 1; i <= count; i++) {\n int enemyType = random.nextInt(7 - 1 + 1) + 1;\n int randomOffset = (2 * (random.nextInt(40 - 15 + 1) + 15));\n int startingHeight = layer.getStartY() + (i * Tile.TILE_HEIGHT) + randomOffset;\n Enemy enemy = null;\n switch (enemyType) {\n case 1:\n enemy = new Rat(layer, layer.getStartX(), startingHeight, player);\n break;\n case 2:\n enemy = new Bat(layer, layer.getStartX(), startingHeight, player);\n break;\n case 3:\n enemy = new Skeleton(layer, layer.getStartX(), startingHeight, player);\n break;\n case 4:\n enemy = new Spider(layer, layer.getStartX(), startingHeight, player);\n break;\n case 5:\n enemy = new Goblin(layer, layer.getStartX(), startingHeight, player);\n break;\n case 6:\n enemy = new Slime(layer, layer.getStartX(), startingHeight, player);\n break;\n case 7:\n enemy = new Imp(layer, layer.getStartX(), startingHeight, player);\n break;\n }\n switch (layer.getLayerType()) {\n case HELL:\n hellEnemies.add(enemy);\n break;\n case EARTH:\n earthEnemies.add(enemy);\n break;\n case HEAVEN:\n heavenEnemies.add(enemy);\n break;\n }\n }\n }", "public void createAnimals() {\n\t\tanimals = new Animal[noAnimals];\n\n\t\tfor (int i = 0; i < noAnimals; i++) {\n\t\t\tanimals[i] = new Animal(noAnimals);\n\t\t\tanimals[i].setDiffCo(diffCo[i]);\n\t\t\tanimals[i].setDiffusionRate(diffusionRate[i]);\n animals[i].initiateDensities(getIo().getNeighbours().length,getIo().getNeighbours()[0].length);\n\t\t}\n\t\n\t\t animals[0].setName(\"Hare\"); \n\t\t animals[1].setName(\"Puma\");\n\t}", "public void createNewHouseAndAddToList(){\n\t\t\tHouse newHouse = new House();\r\n\t\t\tString id = createAutomaticallyID().trim();\r\n\t\t\tnewHouse.setId(id);\r\n\t\t\tnewHouse.setPrice(Double.parseDouble(priceTextField.getText().trim()));\r\n\t\t\tnewHouse.setNumberOfBathrooms(Integer.parseInt(bathroomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setAirConditionerFeature(airConditionerComboBox.getSelectedItem().toString());\r\n\t\t\tnewHouse.setNumberOfRooms(Integer.parseInt(roomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setSize(Double.parseDouble(sizeTextField.getText().trim()));\r\n\t\t\t\r\n\t\t\toriginalHouseList.add(newHouse);//first adding newHouse to arrayList\r\n\t\t\tcopyEstateAgent.setHouseList(originalHouseList);//then set new arrayList in copyEstateAgent\r\n\r\n\t\t}", "public void addAnimals() throws IOException {\n\t\tint b = 0;\n\t\tint c = 0;\n\t\tint a = 0;\n\t\tArrayList<GameObjects> animals = new ArrayList<GameObjects>();\n\t\tRandom rand = new Random();\n\t\twhile(b<bigFish) {\n\t\t\tanimals.add(new BigFish(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth/2))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\tb+=1;\n\t\t}\n\t\twhile(c<crab) {\n\t\t\tanimals.add(new Crab(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth - frameWidth/3))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\tc+=1;\n\t\t}\n\t\twhile(a<algae) {\n\t\t\tanimals.add(new Algae(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth - frameWidth/3))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\ta+=1;\n\t\t}\n\n\t\tanimals.add(new BigFish(frameWidth, frameHeight));\n\t\tanimals.add(new Crab(frameWidth, frameHeight));\n\t\tanimals.add(new Algae(frameWidth, frameHeight));\n\n\t\tthis.objects = animals;\n\t}", "private void addEnemyPowerUps() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint x = (int) (Math.random() * 10);\n\t\t\tint y = (int) (Math.random() * 10);\n\n\t\t\twhile (egrid[x][y] != 0) { // prevents overlaps\n\t\t\t\tx = (int) (Math.random() * 10);\n\t\t\t\ty = (int) (Math.random() * 10);\n\t\t\t}\n\n\t\t\tegrid[x][y] = 2;\n\t\t}\n\t}", "@Transactional\n\tprivate void generateSuperHeroSet() {\n\t\tMinionCard mechaChat = createMinionCard(\"Mechachat\", 10, 30, 5, 8, \"Technologie et mauvaises intentions.\",\n\t\t\t\t\"img/cardImg/superheroSet/mechacat.jpg\");\n\t\tMinionCard dopplemeower = createMinionCard(\"Dopplemeower\", 19, 1, 10, 5, \"Une vision terrible.\",\n\t\t\t\t\"img/cardImg/superheroSet/doppleMeower.jpg\");\n\t\tMinionCard moustacheRousse = createMinionCard(\"Moustache Rousse\", 8, 7, 5, 3,\n\t\t\t\t\"Le pirate le plus dangereux. Il a quand même peur de l'eau.\",\n\t\t\t\t\"img/cardImg/superheroSet/moustacheRousse.jpg\");\n\t\tMinionCard channibalLecter = createMinionCard(\"Channibal Lecter\", 10, 15, 15, 7,\n\t\t\t\t\"Un chat qui mange d'autres chats.\", \"img/cardImg/superheroSet/channibalLecter.jpg\");\n\t\tMinionCard ashesThePurrifier = createMinionCard(\"Ashes, The Purrifier\", 25, 30, 0, 10,\n\t\t\t\t\"Démon des temps anciens qui souhaite dominer le monde.\",\n\t\t\t\t\"img/cardImg/superheroSet/ashesThePurrifier.jpg\");\n\t\tMinionCard captainAmerichat = createMinionCard(\"Captain Americhat\", 10, 20, 10, 7, \"Protège la nation.\",\n\t\t\t\t\"img/cardImg/superheroSet/captainAmerichat.jpg\");\n\t\tMinionCard superChat = createMinionCard(\"Super Chat\", 15, 25, 10, 9, \"Un chat super.\",\n\t\t\t\t\"img/cardImg/superheroSet/superChat.png\");\n\t\tMinionCard goldenClaws = createMinionCard(\"Golden Claws\", 22, 3, 5, 5,\n\t\t\t\t\"Ses griffes légendaires peuvent couper n'importe quoi.\", \"img/cardImg/superheroSet/goldenClaws.jpg\");\n\t\tMinionCard redDotCatcher = createMinionCard(\"Red Dot Catcher\", 10, 5, 30, 8,\n\t\t\t\t\"Plus rapide que le point rouge par terre.\", \"img/cardImg/superheroSet/redDotCatcher.jpeg\");\n\t\tMinionCard theIncredibleWhisker = createMinionCard(\"The Incredible Whisker\", 5, 10, 10, 4,\n\t\t\t\t\"Son elegance est incomparable.\", \"img/cardImg/superheroSet/theIncredibleWhisker.jpg\");\n\t\tcardRepository.save(mechaChat);\n\t\tcardRepository.save(dopplemeower);\n\t\tcardRepository.save(moustacheRousse);\n\t\tcardRepository.save(channibalLecter);\n\t\tcardRepository.save(ashesThePurrifier);\n\t\tcardRepository.save(captainAmerichat);\n\t\tcardRepository.save(superChat);\n\t\tcardRepository.save(goldenClaws);\n\t\tcardRepository.save(redDotCatcher);\n\t\tcardRepository.save(theIncredibleWhisker);\n\t}", "private void prepare()\n {\n treespawn treespawn2 = new treespawn();\n addObject(treespawn2,30,486);\n\n hantu hantu = new hantu();\n addObject(hantu,779,359);\n \n hantu hantu2 = new hantu();\n addObject(hantu2,88,84);\n \n bergerak bergerak2 = new bergerak();\n addObject(bergerak2,745,423);\n\n bergerak bergerak3 = new bergerak();\n addObject(bergerak3,266,566);\n \n bergerak bergerak4 = new bergerak();\n addObject(bergerak4,564,566);\n\n hantu hantu3 = new hantu();\n addObject(hantu3,671,490);\n \n hantu hantu4 = new hantu();\n addObject(hantu4,371,499);\n\n bergerak bergerak = new bergerak();\n addObject(bergerak,150,148);\n\n lantai lantai = new lantai();\n addObject(lantai,561,577); \n addObject(lantai,419,579); \n\n player player = new player();\n addObject(player,882,498);\n\n lantai3 lantai3 = new lantai3();\n addObject(lantai3,120,148);\n\n flyinglantai flyinglantai = new flyinglantai();\n addObject(flyinglantai,292,148);\n\n treespawn treespawn = new treespawn();\n addObject(treespawn,30,291);\n\n lantai4 lantai4 = new lantai4();\n addObject(lantai4,235,536);\n \n lantai4 lantai42 = new lantai4();\n addObject(lantai42,275,508);\n \n lantai4 lantai43 = new lantai4();\n addObject(lantai43,323,480);\n \n lantai4 lantai44 = new lantai4();\n addObject(lantai44,369,454);\n\n lantai2 lantai2 = new lantai2();\n addObject(lantai2,680,424);\n\n \n lantai3 lantai32 = new lantai3();\n addObject(lantai32,938,146);\n \n lantai4 lantai45 = new lantai4();\n addObject(lantai45,21,370);\n\n lantai4 lantai46 = new lantai4();\n addObject(lantai46,210,180);\n \n lantai4 lantai47 = new lantai4();\n addObject(lantai47,257,201);\n \n lantai4 lantai48 = new lantai4();\n addObject(lantai48,302,229);\n \n lantai4 lantai49 = new lantai4();\n addObject(lantai49,354,255);\n \n lantai4 lantai410 = new lantai4();\n addObject(lantai410,402,281);\n \n lantai4 lantai411 = new lantai4();\n addObject(lantai411,444,302);\n \n lantai4 lantai412 = new lantai4();\n addObject(lantai412,491,334);\n \n lantai4 lantai413 = new lantai4();\n addObject(lantai413,546,364);\n \n lantai4 lantai414 = new lantai4();\n addObject(lantai414,582,397);\n \n doorlv3 doorlv3 = new doorlv3();\n addObject(doorlv3,910,45);\n\n \n }", "@Override\n\tpublic void loadEnemies() {\n\t\t\n\t}", "private void spawnStuff(PlayScreen screen, float delta) {\n if (stageId!=3 && stageId!=5) {\n isCombatEnabled = true;\n int where;\n boolean spawnRight = true;\n float speed;\n\n\n //Alien Spawn\n if (System.currentTimeMillis() - lastASpawn >= SpawnATimer + extraTimer) {\n speed = (float)(Utils.doRandom(250,400));\n lastASpawn = System.currentTimeMillis();\n int count = 3;\n if (stageId==4) count = 1;\n for (int i = 0; i < count; i++) {\n if (stageId==4){\n speed = (float) (speed*0.75);\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - Alien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - Alien.width, y, Alien.width, Alien.height)))\n hits = true;\n }\n }\n screen.entities.add(new Alien(new Vector2(x, y), 1, screen.alienImages, speed, screen.player));\n }else{\n int x = 0 - Alien.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - Alien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + Alien.width*2 , y, Alien.width, Alien.height)))\n hits = true;\n }\n }\n screen.entities.add(new Alien(new Vector2(x, y), 1, screen.alienImages, speed, screen.player,false));\n }\n }\n }\n //AcidAlien Spawn\n if (System.currentTimeMillis() - lastBSpawn >= SpawnBTimer + extraTimer) {\n speed = 200;\n lastBSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - AcidAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - AcidAlien.width, y, AcidAlien.width, AcidAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new AcidAlien(new Vector2(x, y), screen.alien2Images, screen.acidImage, speed, screen.player));\n }else{\n int x = 0 - AcidAlien.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - AcidAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + AcidAlien.width*2, y, AcidAlien.width, AcidAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new AcidAlien(new Vector2(x, y), screen.alien2Images, screen.acidImage, speed, screen.player,false));\n }\n }\n //FastAlien Spawn\n if (System.currentTimeMillis() - lastCSpawn >= SpawnCTimer + extraTimer) {\n speed= Utils.doRandom(250,400);\n lastCSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - FastAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - FastAlien.width, y, FastAlien.width, FastAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new FastAlien(new Vector2(x, y), 1, screen.alien3Images,speed, screen.player));\n }else{\n int x = 0 - FastAlien.width;\n int y =0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - FastAlien.height);\n for (int h=0;h<collisions.size();h++){\n if (Collision.checkWalls(collisions.get(h),new Rectangle(x-FastAlien.width*2,y,FastAlien.width,FastAlien.height))) hits = true;\n }\n }\n screen.entities.add(new FastAlien(new Vector2(x, y), 1, screen.alien3Images, speed,screen.player,false));\n }\n\n }\n\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule ) {\n speed = 500;\n int x = 0;\n int y = 0;\n lastCapsuleSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n x = (int) screen.gameViewport.getWorldWidth();\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }else{\n x = 0 - BlueBulletItem.width;\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width *2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }\n\n int capsule = screen.random.nextInt(2);\n\n if (capsule == 0) {\n if (spawnRight) {\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages));\n }else{\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages,false));\n }\n } else if (capsule == 1) {\n if (spawnRight) {\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages));\n }else{\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages,false));\n }\n }\n\n }\n if (System.currentTimeMillis() - lastHealthSpawn >= SpawnTimerHealth) {\n speed = 500;\n lastHealthSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages));\n }else{\n int x = 0 - BlueBulletItem.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width*2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages,false));\n }\n }\n /*if (System.currentTimeMillis() - lastBombSpawn >= SpawnTimerBomb) {\n lastBombSpawn = System.currentTimeMillis();\n int x = (int) screen.gameViewport.getWorldWidth();\n int y =0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - PurpleCapsuleItem.height);\n for (int h=0;h<collisions.size();h++){\n if (Collision.checkWalls(collisions.get(h),new Rectangle(x,y,PurpleCapsuleItem.width,PurpleCapsuleItem.height))) hits = true;\n }\n }\n screen.items.add(new PurpleCapsuleItem(x, y, 500, screen.itemPurpleImages));\n }*/\n }else{\n if (stageId==3) {\n //SPACE STAGE\n ///SPAWN ENEMY SHIP:\n //TODO\n if (PlayScreen.entities.size() == 1) {\n isCombatEnabled = false;\n //no enemy spawned, so spawn:\n if (spawnIterator >= killCount) {\n //TODO END STAGE\n } else {\n System.out.println(\"SPAWNS SHIP\");\n spawnIterator++;\n screen.entities.add(new EnemyShipOne(new Vector2(0, 0), 100, screen.enemyShipOne, true, screen.player));\n\n }\n }\n //Items:\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule) {\n lastCapsuleSpawn = System.currentTimeMillis();\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new BlackBulletItem(x, y, 1000, screen.itemBlackImages));\n\n\n }\n }else{\n if (stageId == 5){\n isCombatEnabled = true;\n float speed;\n boolean spawnRight=true;\n int where=0;\n //TODO FINAL STAGE\n if (!isBossSpawned){\n //TODO\n screen.entities.add(new Boss(new Vector2(PlayScreen.gameViewport.getWorldWidth(),PlayScreen.gameViewport.getWorldHeight()/2 - Boss.height/2),screen.player));\n isBossSpawned=true;\n }\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule ) {\n speed = 500;\n int x = 0;\n int y = 0;\n lastCapsuleSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n x = (int) screen.gameViewport.getWorldWidth();\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }else{\n x = 0 - BlueBulletItem.width;\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width *2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }\n\n int capsule = screen.random.nextInt(2);\n\n if (capsule == 0) {\n if (spawnRight) {\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages));\n }else{\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages,false));\n }\n } else if (capsule == 1) {\n if (spawnRight) {\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages));\n }else{\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages,false));\n }\n }\n\n }\n if (System.currentTimeMillis() - lastHealthSpawn >= SpawnTimerHealth) {\n speed = 500;\n lastHealthSpawn = System.currentTimeMillis();\n if (stageId == 4) {\n speed = speed / 2;\n where = Utils.doRandom(0, 1);\n if (where < 50) {\n spawnRight = true;\n } else {\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages));\n } else {\n int x = 0 - BlueBulletItem.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width * 2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages, false));\n }\n }\n //TODO\n }\n }\n }\n\n //run .update(delta) on all objects\n for (int i=0; i<screen.entities.size();i++){\n screen.entities.get(i).update(delta);\n }\n\n for (int i=0; i<screen.items.size();i++){\n screen.items.get(i).update(delta);\n }\n\n //labels set:\n screen.labelHealth.setText(\"Health: \" + screen.player.health + \"/\" + screen.player.maxHealth);\n if (scoreBased) {\n screen.labelInfo.setText(\"Score: \" + screen.player.score + \"/\" + scoreGoal);\n }else{\n if (killCount>0){\n screen.labelInfo.setText(\"Score: \" + screen.player.score + \"/\" + killCount);\n }else{\n if (boss){\n screen.labelInfo.setText(\"Boss: \"+screen.player.score + \"/\" + Boss.bossHealth);\n }else{\n screen.labelInfo.setText(\"\");\n }\n\n }\n }\n if (this.stageId == 999) {\n screen.labelInfo.setText(\"Score: \" + screen.player.score);\n }\n\n\n }", "private void enemyEncounter()\n {\n currentEnemies = currentRoom.getEnemies();\n \n if(currentEnemies.size() > 0)\n {\n for(Enemy e : currentEnemies)\n {\n System.out.println(\"\\n\" + \"A \" + e.getName() + \" stares menacingly!\" + \"\\n\");\n enemyName = e.getName();\n \n }\n enemyPresent = true;\n clearExits();\n }\n else{\n setExits(); \n }\n }", "public static void init()\n {\n \tSpriteSheet sheet = new SpriteSheet(ImageLoader.loadImage(\"/sprites/spritesheet.png\"));\n BufferedImage img;\n /*for(int y = 0;y<4;y++)\n \t{\n \t\t\n \timg = sheet.crop(width*y,0,width,height);\n \t\t\n \t\tplayer.add(img);\n \t}*/\n hero = sheet.crop(0,0,width,height);\n heroUp = sheet.crop(width,0,width,height);\n heroLeft = sheet.crop(width*2,0,width,height);\n heroRight = sheet.crop(width*3,0,width,height);\n \n heroDown1 = sheet.crop(0,height+32,width+1,height);\n heroDown2 = sheet.crop(width+1,height+32,width+1,height);\n heroUp1 = sheet.crop(width*2+2,height+32,width,height);\n heroUp2 = sheet.crop(width*3+2,height+32,width,height);\n heroLeft1 = sheet.crop(width*4+2,height+32,width,height);\n heroLeft2 = sheet.crop(width*5+2,height+32,width,height);\n heroRight1 = sheet.crop(width*6+2,height+32,width,height);\n heroRight2 = sheet.crop(width*7+2,height+32,width,height);\n \n /*for(int i = 0;i<4;i++)\n {\n \tfor(int y = 0;y<4;y++)\n \t{\n \t\tif(y==1)\n \t\t{\n \t\t\timg = sheet.crop(width*y,height*i,width,height);\n \t\t}\n \t\telse\n \t\t{\n \t\t\timg = sheet.crop(width*y+1,height*i+1,width,height);\n \t\t}\n \t\tplayer.add(img);\n \t}\n }*/\n sheet = new SpriteSheet(ImageLoader.loadImage(\"/sprites/PokemonTileSet.png\"));\n for(int i = 0;i<50;i++)\n {\n \tfor(int y = 0;y<8;y++)\n \t{\n \t\timg = sheet.crop(tileW*y,tileH*i,tileW,tileH);\n \t\tassets.add(img);\n \t}\n }\n \n /*\n hero = sheet.crop(0,0,width,height);\n heroUp = sheet.crop(width,0,width,height);\n heroLeft = sheet.crop(width*2,0,width,height);\n heroRight = sheet.crop(width*3,0,width,height);\n \n treeTopLeft = sheet.crop(0,firstRow,tWidth,tHeight);\n treeTopRight = sheet.crop(tWidth,firstRow,tWidth,tHeight);\n treeMidLeft = sheet.crop(tWidth*2,firstRow,tWidth,tHeight);\n treeMidRight = sheet.crop(tWidth*3,firstRow,tWidth,tHeight);\n treeBotLeft = sheet.crop(tWidth*4,firstRow,tWidth,tHeight);\n treeBotRight = sheet.crop(tWidth*5,firstRow,tWidth,tHeight);\n treeTopLeftGrass = sheet.crop(tWidth*6,firstRow,tWidth,tHeight);\n treeTopRightGrass = sheet.crop(tWidth*7,firstRow,tWidth,tHeight);\n treeTopLeftMushroom = sheet.crop(tWidth*8,firstRow,tWidth,tHeight);\n grass = sheet.crop(tWidth*9,firstRow,tWidth,tHeight);\n \n wildGrass = sheet.crop(0,secondRow,tWidth,tHeight);\n mushroom = sheet.crop(tWidth,secondRow,tWidth,tHeight);\n logLeft = sheet.crop(tWidth*2,secondRow,tWidth,tHeight);\n logRight = sheet.crop(tWidth*3,secondRow,tWidth,tHeight);\n ledgeLeft = sheet.crop(tWidth*4,secondRow,tWidth,tHeight);\n ledgeMid = sheet.crop(tWidth*5,secondRow,tWidth,tHeight);\n ledgeRight = sheet.crop(tWidth*6,secondRow,tWidth,tHeight);\n treeLeftOverlap = sheet.crop(tWidth*7,secondRow,tWidth,tHeight);\n treeRightOverlap = sheet.crop(tWidth*8,secondRow,tWidth,tHeight);\n \n heroWalkingDown1 = sheet.crop(0,thirdRow,width+1,height);\n heroWalkingDown2 = sheet.crop(width+1,thirdRow,width+1,height);\n heroWalkingUp1 = sheet.crop(width*2+1,thirdRow,width,height);\n heroWalkingUp2 = sheet.crop(width*3+1,thirdRow,width,height);\n heroWalkingLeft1 = sheet.crop(width*4+1,thirdRow,width,height);\n heroWalkingLeft2 = sheet.crop(width*5+1,thirdRow,width,height);\n heroWalkingRight1 = sheet.crop(width*6+1,thirdRow,width,height);\n heroWalkingRight2 = sheet.crop(width*7+1,thirdRow,width,height);\n */\n }", "public void createCharacters()\n {\n Item item_chambermaid = new Item(\"Broom\",\"The brush that she uses\");\n Item item_bob_taylor = new Item(\"Toys\",\"Bob Taylor toys\");\n Item item_mr_Cunningham = new Item(\"Black hat\",\"The nice hat of Mr Cunningham\");\n Item item_ms_Wellington = new Item(\"Ring\", \"This is the wedding ring\");\n \n // Neutral characters creation //\n mr_Taylor = new Neutral(\"Mr Taylor\",\" \", poolroom, \"..\\\\pictures\\\\Characters\\\\MrTaylor2.png\");\n ms_Taylor = new Neutral(\"Ms Taylor\",\"Oh no ! My poor husband is dead ! What am I going to do now ?!\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsTaylor2.png\");\n ms_Cunningham = new Neutral(\"Ms Cunningham\",\"My husband was the best old friend of Mr Taylor\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsCunningham2.png\");\n \n // Ally characters creation //\n chambermaid = new Ally(\"Chambermaid\",\"I was in the dancing room to serve the guests.I was not with the master\", poolroom, item_chambermaid, \"..\\\\pictures\\\\Characters\\\\Chambermaid.png\");\n bob_Taylor = new Ally(\"Bob Taylor\",\"What happened to my father ? \", poolroom, item_bob_taylor, \"..\\\\pictures\\\\Characters\\\\BobTaylor2.png\");\n mr_Cunningham = new Ally(\"Mr Cunningham\", \"I was in my bedroom when I heard someone screaming. So I went down stairs quickly\", poolroom, item_mr_Cunningham, \"..\\\\pictures\\\\Characters\\\\MrCunningham2.png\");\n ms_Wellington = new Ally(\"Ms Wellington\", \"I was in the dancing room with my husband. The chambermaid served us.\", poolroom, item_ms_Wellington, \"..\\\\pictures\\\\Characters\\\\MsWellington2.png\");\n \n // Enemy characters ceration //\n valet = new Enemy(\"Valet\",\"I was in the kitchen. I checked the wine delivery\", poolroom,4,80,12,\"..\\\\pictures\\\\Characters\\\\Valet2.png\"); // damage =4 accuraccy = 80, HP=12\n caretaker = new Enemy(\"Caretaker\",\"I was in my hut to repair the fork\",poolroom, 2,20,5, \"..\\\\pictures\\\\Characters\\\\Caretaker2.png\"); // damage =2 accuraccy = 20, HP=5\n mr_Wellington = new Enemy(\"Mr Wellington\",\"I was in the dancing room with my wife\", poolroom, 1,10,7, \"..\\\\pictures\\\\Characters\\\\MrWellington2.png\"); // damage =1 accuraccy = 10, HP=7\n nina_Taylor = new Enemy(\"Nina Taylor\", \"I was in the library and I read a good book\", poolroom, 2, 30, 8,\"..\\\\pictures\\\\Characters\\\\NinaTaylor2.png\"); // damage =2 accuraccy = 30, HP=8\n skeleton = new Enemy(\"Oscar the skeleton\",\"A human skeleton\", laboratory, 2, 80, 5,\"..\\\\pictures\\\\Characters\\\\skeleton.png\");\n ghost = new Enemy(\"Casper the Ghost\", \"A little green ghost\", livingroom, 1, 50, 4, \"..\\\\pictures\\\\Characters\\\\ghost.png\");\n \n listOfPNG = new ArrayList();\n listOfPNG.add(ms_Taylor);\n listOfPNG.add(ms_Cunningham);\n listOfPNG.add(chambermaid);\n listOfPNG.add(bob_Taylor);\n listOfPNG.add(mr_Cunningham);\n listOfPNG.add(ms_Wellington);\n //listOfPNG.add(valet);\n //listOfPNG.add(caretaker);\n listOfPNG.add(mr_Wellington);\n listOfPNG.add(nina_Taylor);\n \n \n }", "private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }", "private void generateItemEntities(){\n final int NUM_POTIONS = 6;\n final int NUM_IRON_ARMOUR = 1;\n final int NUM_CHESTS = 2;\n final String ITEM_BOX_STYLE = \"volcano\";\n\n\n for (int i = 0; i < NUM_POTIONS; i++) {\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n HealthPotion potion = new HealthPotion(tile,false,\n (PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE);\n entities.add(potion);\n this.allVolcanoDialogues.add(potion.getDisplay());\n } else {\n i--;\n }\n }\n for (int i =0; i < NUM_IRON_ARMOUR; i++){\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n IronArmour ironArmour = new IronArmour(tile, false,\n (PlayerPeon) getPlayerEntity(),ITEM_BOX_STYLE,200);\n entities.add(ironArmour);\n this.allVolcanoDialogues.add(ironArmour.getDisplay());\n } else {\n i--;\n }\n }\n for (int i = 0; i <NUM_CHESTS; i++){\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n Treasure chest = new Treasure(tile, false,\n (PlayerPeon) getPlayerEntity(),ITEM_BOX_STYLE);\n entities.add(chest);\n this.allVolcanoDialogues.add(chest.getDisplay());\n } else {\n i--;\n }\n }\n\n Tile cooldownring = getTile(20,-7);\n CooldownRing cdring = new CooldownRing(cooldownring, false,\n (PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,0.5f);\n entities.add(cdring);\n this.allVolcanoDialogues.add(cdring.getDisplay());\n\n Tile attackAmuletTile = getTile(2,14);\n Amulet attackAmulet = new Amulet(attackAmuletTile, false,\n (PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,10);\n entities.add(attackAmulet);\n this.allVolcanoDialogues.add(attackAmulet.getDisplay());\n\n }", "private void createPlayers(LogicEngine in_logicEngine)\r\n\t{\n\t\tfor(int i=0 ; i < 4 ;i++)\r\n\t\t{\r\n\t\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/tinyship.png\",(LogicEngine.rect_Screen.getWidth()/2) - (32*i) + 64,50,20);\r\n\t\t\tship.i_animationFrame=0;\r\n\t\t\tship.i_animationFrameSizeWidth=16;\r\n\t\t\tship.i_animationFrameSizeHeight=16;\r\n\t\t\tship.allegiance = GameObject.ALLEGIANCES.PLAYER;\r\n\t\t\tship.collisionHandler = new PlayerCollision(ship);\r\n\t\t\tship.stepHandlers.add(new PlayerStep(i,ship));\r\n\t\t\tship.shotHandler = new StraightLineShot(\"data/\"+GameRenderer.dpiFolder+\"/bullet.png\",7.0f,new Vector2d(0,9));\r\n\t\t\t\r\n\t\t\tship.stepHandlers.add(new AnimateRollStep());\r\n\t\t\t\t\r\n\t\t\tship.str_name = \"player\";\r\n\t\t\t\r\n\t\t\tship.c_Color = new Color(1.0f,1.0f,1.0f,1.0f);\r\n\t\t\t\r\n\t\t\tship.v.setMaxForce(3);\r\n\t\t\tship.v.setMaxVel(20.0);\r\n\t\t\tin_logicEngine.objectsPlayers.add(ship);\r\n\t\t\t\r\n\t\t\t//double firing speed on hell\r\n\t\t\tif(Difficulty.isHard())\r\n\t\t\t\tship.shootEverySteps = (int) (ship.shootEverySteps * 0.75); \r\n\t\t\t\r\n\t\t\t//for each advantage if it is enabled apply it\r\n\t\t\tfor(int j=Advantage.b_advantages.length-1 ;j>=0;j--)\r\n\t\t\t\tif(Advantage.b_advantages[j])\r\n\t\t\t\t\tAdvantage.applyAdvantageToShip(j,ship,i,in_logicEngine);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void initGhosts() {\n\t\tghosts[0] = new Ghost(maze, \"pinky\", Cell.positionOfCell(4, 1));\n\t\tghosts[1] = new Ghost(maze, \"blinky\", Cell.positionOfCell(4, 26));\n\t\tghosts[2] = new Ghost(maze, \"clyde\", Cell.positionOfCell(32, 1));\n\t\tghosts[3] = new Ghost(maze, \"inky\", Cell.positionOfCell(32, 26));\n\t\tghosts[4] = new Ghost(maze, \"orson\", Cell.positionOfCell(11, 1));\n\t\tghosts[5] = new Ghost(maze, \"spooky\", Cell.positionOfCell(11, 26));\n\t}", "private void createSpritesList() {\n\t\tArrayList<PartyMember> pmList = player.getPartyMembers();\n\t\tfor (int i = 0; i < pmList.size(); i++) {\n\t\t\tSprite as = pmList.get(i);\n\t\t\tsprites.put(as.hashCode(), as);\n\t\t}\n\t\telements = new SortingElement[sprites.size()];\n\t\tIterator<Integer> it = sprites.keySet().iterator();\n\t\tint i = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tint index = it.next();\n\t\t\tSprite as = sprites.get(index);\n\t\t\telements[i++] = new SortingElement(as.pos[Values.Y], index);\n\t\t}\n\t}", "private void createAllGames() {\n\t\t// Create a melee game for each melee arena\n\t\tmeleeArenaManager.loadArenas();\n\t\tmeleeArenaManager.getArenas().forEach(meleeArena -> {\n\t\t\tMeleeGame game = new MeleeGame(meleeArena);\n\t\t\tmeleeGameManager.addGame(meleeArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.MELEE_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Create a rabbit game for each rabbit arena\n\t\trabbitArenaManager.loadArenas();\n\t\trabbitArenaManager.getArenas().forEach(rabbitArena -> {\n\t\t\tRabbitGame game = new RabbitGame(rabbitArena);\n\t\t\trabbitGameManager.addGame(rabbitArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.RABBIT_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Log out what games were created\n\t\tString meleeGamesList = meleeGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Melee Games for arenas : \" + meleeGamesList);\n\n\t\tString rabbitGamesList = rabbitGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Rabbit Games for arenas : \" + rabbitGamesList);\n\t}", "protected void putMonsters() {\n\t\tRandom rand = new Random();\n\t\tfor (int monsterCount = 0; monsterCount < 4; monsterCount++){\n\t\t\tint x, y;\n\t\t\tdo {\n\t\t\t\tx = rand.nextInt(xSize);\n\t\t\t\ty = rand.nextInt(ySize);\n\t\t\t} while((levelSetup[x][y] instanceof SimpleRoom) && (x == 0 & y == 0) && !levelSetup[x][y].hasItem());\n\t\t\tlevelSetup[x][y].putMonster(new BasicMonster());\n\t\t}\n\t}", "public void spawn(Integer spawnSize) {\n for (Integer i = 0; i < spawnSize; i++) {\n Enemy enemy = new Enemy(mainPlayerPosX, mainPlayerPosY);\n enemies.put(i, enemy);\n }\n initEnemiesSpawned = spawnSize;\n enemiesSize = spawnSize;\n }", "public void addPlayer(HeroClass newJob){job.add(newJob);}", "public void init() {\n\t\tfor(int i = 0; i < roamingAliens; ++i) {\n\t\t\tAlien alien = new Alien(ColorUtil.MAGENTA, screenHeight, screenWidth, speed, speedMulti);\n\t\t\tgameObject.add((GameObject) alien); \n\t\t}\n\t\tfor(int i = 0; i < roamingAstronauts; ++i) {\n\t\t\tAstronaut astronaut = new Astronaut(ColorUtil.GREEN, screenHeight, screenWidth, speed, speedMulti);\n\t\t\tgameObject.add((GameObject) astronaut);\n\t\t}\n\t\tgameObject.add((Spaceship.getSpaceship()));\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t\tthis.clearChanged();\n\t}", "private void setupEnemySpawnPoints() {\n float ring = ProtectConstants.VIEWPORT_WIDTH / 2 + (ProtectConstants.GAME_OBJECT_SIZE * 2);\n float angle = 18; // start angle\n for(int i = 1; i < ProtectConstants.COLUMNS + 1; i++){\n enemySpawnPoints.add(divideCircle(ring, angle));\n angle += 360 / ProtectConstants.COLUMNS;\n }\n enemySpawnPoints.shuffle();\n }", "public static void loadCreatures() {\r\n\t \tregisterEntity(EntityZertum.class, \"Zertum\", 0);\r\n\t \tEntityRegistry.addSpawn(EntityZertum.class, 10, 2, 5, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityRedZertum.class, \"RedZertum\", 1);\r\n\t \tEntityRegistry.addSpawn(EntityRedZertum.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityDestroZertum.class, \"DestroZertum\", 2);\r\n\t \tEntityRegistry.addSpawn(EntityDestroZertum.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityJakan.class, \"Jakan\", 3);\r\n\t \tEntityRegistry.addSpawn(EntityJakan.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityJakanPrime.class, \"JakanPrime\", 4);\r\n\t \tEntityRegistry.addSpawn(EntityJakanPrime.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t}", "private void buildSprites() {\n\t\tSpriteRotatable sprite = new SpriteRotatable(new Vec2f(0, 0), 1);\n\t\tsprite.setCentered(true);\n\t\tspriteManager.addSprite(sprite, \"avenger.png\");\n\t\tsprite.setVisible(true);\n\t\ttarget = new SpriteRotatable(new Vec2f(2, 2), 1);\n\t\ttarget.setCentered(true);\n\t\tspriteManager.addSprite(target, \"fighter.png\");\n\t\ttarget.setVisible(true);\n\n\t}", "public void setupGame() {\n\t\t// Re-spawn the appropriate number of sheep\n\t\tint numSheep = 31;\n\t\t\n\t\tif (!SheepPhysicsState.PRODUCTION) {\n\t\t\tnumSheep = 1;\n\t\t}\n\t\t\n\t\t// It takes half the sheep to win.\n\t\t_scoreToWin = numSheep / 2;\n\t\tp(\"It takes \" + _scoreToWin + \" sheep to win.\");\n\t\t\n\t\t_hasBeenWon = false;\n\t\t\n\t\t// Non-infrastructural entities.\n\t\t//////////////////////////\n\t\t\n\t\t// Don't create this stuff if I'm replaying.\n\t\tint mod = 1;\n\t\tfor (int i = 0; i < numSheep; i++) {\n\t\t\t//int x = _generator.nextInt(40) - 20;\n\t\t\t//int z = _generator.nextInt(80) - 40;\n\t\t\tmod *= -1;\n\t\t\tint x = i/2 * mod;\n\t\t\tint z = 0;\n\n\t\t\tSheep s = new Sheep(\"sheep-\" + i + \"[\" + _sheepID + \"]\", x, 2, z);\n\t\t\t\n\t\t\tif (!SheepPhysicsState.PRODUCTION) {\n\t\t\t\ts.setBehaviorActive(false);\n\t\t\t}\n\t\t\t\n\t\t\t_sheepID++;\n\t\t}\n\t\t\n\t\t// Add a wubble for testing.\n\t\tif (!_isJimboSpawned && !SheepPhysicsState.PRODUCTION) {\n\t\t\tSystem.out.println(\"Adding Jimbo.\");\n\t\t\t_isJimboSpawned = true;\n\t\t\taddWubble(\"Jimbo\", (short)100, (Integer)1);\n\t\t\taddSidekick(\"Jimbo\");\n\t\t\t//addWubble(\"Bimbo\", (short)101, (Integer)0);\n\t\t}\n\t\t\n\t\t//////////////////////////\n\n\t\t// Add some wrenches in the appropriate spots.\n\t\tnew Wrench(\"blueWrench1\", -8, 5, -20);\n\t\tnew Wrench(\"blueWrench2\", 8, 5, -20);\n\t\tnew Wrench(\"redWrench1\", -8, 5, 20);\n\t\tnew Wrench(\"redWrench2\", 8, 5, 20);\n\t\t\n\t\t// Save the start of the me.\n\t\t_gameStart = System.currentTimeMillis();\n\t\tSystem.out.println(\"Started game at \" + _gameStart);\n\t\t\n\t\t// Make some predicates.\n\t\t//Predicate p = new Predicate(\"baseClassPred\");\n\t\t//GoPred g = new GoPred(\"derivedGoClass\", 1);\n\t\t\n\t\t//new PowerUp(\"PowerUpS\", -1, PowerUpInfo.PowerUpType.SPEEDY, new Vector3f(0, 0.4f, 0));\n\t\t//new PowerUp(\"PowerUpE\", -1, PowerUpInfo.PowerUpType.EATER, new Vector3f(2, 0.4f, 0));\n\t\t//new PowerUp(\"PowerUpS\", -1, PowerUpInfo.PowerUpType.STICKY, new Vector3f(2, 0.4f, 2));\n\t}", "public void printHeroes(List<Hero> list,HeroClass heroClass) {\n\t\tSystem.out.println(heroClass.toString() + \" List\");\n\t\tprintHeroes(list);\n\t\t\n\t}", "public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }", "public static Collection<Enemy> generateEnemies(int numberOfEnemies) {\n if (numberOfEnemies > 0) {\n\n Collection<Enemy> enemies = new Stack<>();\n\n for (int i = 0; i < numberOfEnemies; i++) {\n if (i == 0) {\n enemies.add(new Enemy(ENEMY_LEVEL_ONE_HEALTH, ENEMY_LEVEL_ONE_ATTACK_POWER, ENEMY_LEVEL_ONE_DEFENSE_POWER));\n } else if (i == 1) {\n enemies.add(new Enemy(ENEMY_LEVEL_TWO_HEALTH, ENEMY_LEVEL_TWO_ATTACK_POWER, ENEMY_LEVEL_TWO_DEFENSE_POWER));\n } else if (i == 2) {\n enemies.add(new Enemy(ENEMY_LEVEL_THREE_HEALTH, ENEMY_LEVEL_THREE_ATTACK_POWER, ENEMY_LEVEL_THREE_DEFENSE_POWER));\n }\n }\n return enemies;\n }\n return null;\n }", "public void initialHeroCastle() {\n Pair<Integer, Integer> heroCastlePosition = world.getHeroCastlePosition();\n SimpleIntegerProperty x2 = new SimpleIntegerProperty();\n SimpleIntegerProperty y2 = new SimpleIntegerProperty();\n x2.set(heroCastlePosition.getValue0());\n y2.set(heroCastlePosition.getValue1());\n String type = \"HeroCastle\";\n Building heroBuilding = new HeroCastleBuilding(x2, y2, type, 0);\n ImageView view = new ImageView(heroBuilding.getImage());\n addEntity(heroBuilding, view);\n squares.getChildren().add(view);\n }", "@Override\n\tpublic void create () {\n\t\tmBatch = new SpriteBatch();\n mFont = new BitmapFont();\n\t\tmCamera = new OrthographicCamera();\n\t\tmCamera.setToOrtho(false, 800, 480); // Regardless of resolution, project screen onto 800 x 480 orthographic matrix\n\n\t\tmGameBackgrounds = new Texture[6]; // Six frames describing six states of damage to the castle, from pristine to broken\n\t\tmGameBackgrounds[0] = new Texture(\"castle_v1.png\");\n\t\tmGameBackgrounds[1] = new Texture(\"castle_v1_dam1.png\");\n\t\tmGameBackgrounds[2] = new Texture(\"castle_v1_dam2.png\");\n\t\tmGameBackgrounds[3] = new Texture(\"castle_v1_dam3.png\");\n\t\tmGameBackgrounds[4] = new Texture(\"castle_v1_dam4.png\");\n\t\tmGameBackgrounds[5] = new Texture(\"castle_v1_dam5.png\");\n\n\t\t// Assign value to list so it may be given objects to store\n\t\tmAttackers = new Attacker[ATTACKER_ARRAY_SIZE];\n\t\tmButtons = new DefenderButtons[7];\n\t\tmButtons[0] = new DefenderButtons(DefenderButtons.TYPE_NEW_GAME);\n\t\tmButtons[1] = new DefenderButtons(DefenderButtons.TYPE_RESUME_SAVED_GAME);\n\t\tmButtons[2] = new DefenderButtons(DefenderButtons.TYPE_PAUSE_GAME);\n\t\tmButtons[3] = new DefenderButtons(DefenderButtons.TYPE_RESUME_PAUSED_GAME);\n\t\tmButtons[4] = new DefenderButtons(DefenderButtons.TYPE_REPAIR_CASTLE);\n\t\tmButtons[5] = new DefenderButtons(DefenderButtons.TYPE_CONTINUE_NEXT_ROUND);\n\t\tmButtons[6] = new DefenderButtons(DefenderButtons.TYPE_SAVE_GAME);\n\n\t\tmButtons[0].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[1].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[2].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[3].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[4].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[5].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[6].setTexture(new Texture(\"button3.png\"));\n\n\t\t// Create the object that tracks the touch coordinates\n\t\tmLastTouch = new Vector3();\n\n // Assign value to miscellaneous game variables\n mRoundTimeElapsed = 0;\n mRoundMaxTime = 25f; // Counted in SECONDS\n\t\tmCastleMaxHealth = 1000f;\n mCastleHealth = mCastleMaxHealth; // Will last 1,000 frames if attacked by one single standard attacker constantly\n\t\tmCastleDamageStage = 0;\n mRoundScore = 0f;\n mTotalScore = 0f;\n mRoundNumber = 1;\n\t\tmGameState = STATE_PRE_GAME;\n\t\tmAttackerDelay = 0;\n mRoundMaxAttackers = 5;\n\t\tmRepairCost = 1000f;\n\t\tmLivingAttackerCount = 0;\n\t\tmKnightSpawnChance = 0.35f; // 35% chance to spawn a knight instead of normal under regular circumstances\n mPaused = false;\n\t\tmRoundSaved = false;\n mHealthText = \"Castle Strength: \" + mCastleHealth;\n mRoundScoreText = \"This Round Score: \" + mRoundScore;\n\t\tmTotalScoreText = \"Total Game Score: \" + mTotalScore;\n\t\tmGameTitle = \"Castle Defender\";\n\t\tmGameSavedText = \"Game Saved!\";\n\t\tmRoundText = \"Round :\" + mRoundNumber;\n\t\tmRandom = new Random();\n\t\t//TEMPORARY! Will change the logic later\n mSpawnTime = 100;\n\t\tmMonsterHouseSpawn = 10;\n\n\t\t// Pull out the normal attacker's frames through temporary objects\n\t\tTexture walkTexture = new Texture(\"attackerSheet.png\");\n\t\tTextureRegion[][] walkTempArray = TextureRegion.split(walkTexture, 64, 64);\n\t\tTextureRegion[] walkFrames = new TextureRegion[16];\n\n\t\tint index = 0; // Cut the animation's frames up using this temporary jagged array (8 by 2 matches the image file rows / cols)\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tfor (int j = 0; j < 8; j++) {\n\t\t\t\twalkFrames[index++] = walkTempArray[i][j];\n\t\t\t}\n\t\t}\n\n\t\tmStandardAttackerWalk = new Animation(0.055f, walkFrames);\n\n\t\t// Do the same process for the knight animations\n\t\tTexture knightWalk = new Texture(\"knight_sheet_walk.png\");\n\t\tTexture knightAttack = new Texture(\"knight_sheet_attack.png\");\n\n\t\tTextureRegion[][] knightWalkTemp = TextureRegion.split(knightWalk, 64, 128);\n\t\tTextureRegion[][] knightAtkTemp = TextureRegion.split(knightAttack, 64, 128);\n\n\t\tTextureRegion[] knightWalkFrames = new TextureRegion[8];\n\t\tTextureRegion[] knightAtkFrames = new TextureRegion[4];\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 2; i++) {\n\t\t\tfor(int j = 0; j < 4; j++) {\n\t\t\t\tknightWalkFrames[index++] = knightWalkTemp[i][j];\n\t\t\t}\n\t\t}\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 4; i++) {\n\t\t\tknightAtkFrames[index++] = knightAtkTemp[0][i];\n\t\t}\n\n\t\tmKnightAttackerAttack = new Animation(0.25f, knightAtkFrames);\n\t\tmKnightAttackerWalk = new Animation(0.125f, knightWalkFrames);\n\n\t\t// Populate the mAttackers array with 50 total attackers, 25 of each\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++){\n\t\t\t// Grab a walk speed between constant minimum and maximum\n\t\t\tfloat walkSpeed = mRandom.nextFloat() * MAX_SPEED_VARIANCE;\n\t\t\twalkSpeed += MIN_SPEED; // Ensures the speed is AT LEAST 60 \"units\"\n\t\t\t// Spawn at a random y coordinate starting at MIN_SPAWN_Y, varying by MAX_SPAWN_Y_VARIANCE\n\t\t\tfloat spawnY = mRandom.nextFloat() * MAX_SPAWN_Y_VARIANCE;\n\t\t\tspawnY += MIN_SPAWN_Y;\n\n\t\t\tif(i < ATTACKER_HALF_SIZE) {\n\t\t\t\t// The first half of the array are normal attackers\n\t\t\t\tmAttackers[i] = new Attacker(1f, walkSpeed, -100f, spawnY, 64f, 64f, \"normal\");\n\t\t\t\tmAttackers[i].addAnimation(mStandardAttackerWalk, \"walk\");\n\t\t\t} else {\n\t\t\t\t// The second half of the array are \"knight\" attackers\n\t\t\t\tmAttackers[i] = new Attacker(2f, walkSpeed * 0.75f, -100f, spawnY, 64f, 128f, \"knight\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerWalk, \"walk\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerAttack, \"attack\");\n\t\t\t}\n\t\t}\n\t}", "public void setUpAnimations(){\n //Vertical movement animation\n this.verticalMovement = new Animation[NUMBER_OF_VERTICAL_FRAMES]; //Number of images\n TextureRegion[][] heroVerticalSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_vertical.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_VERTICAL_FRAMES; i++)\n verticalMovement[i] = new Animation(ANIMATION_SPEED, heroVerticalSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n //Jump animation\n this.jumpMovement = new Animation[NUMBER_OF_JUMP_FRAMES];\n TextureRegion[][] heroJumpSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_jump.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_JUMP_FRAMES; i++)\n jumpMovement[i] = new Animation(ANIMATION_SPEED, heroJumpSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n }", "void createWorld(Scanner console){\r\n\t\tRandom r = new Random();\r\n\t // System.out.println(\"Welcome to Sushi Time!\");\r\n\t\t//System.out.println(\"Number of fish: \"); \r\n\t\tint fish = r.nextInt(40)+1;\r\n\t\t//System.out.println(\"Number of sharks: \"); \r\n\t\tint shark = r.nextInt(10)+1;\r\n\t\t//create random int for creating random number of seaweed\r\n\t\tint seaweed=r.nextInt(3)+1;\r\n\t\t//create fish, sharks, seaweed, net and sushibar, add them to GameCollection\r\n\t\tSystem.out.println(\"Creating \"+fish+\" fish\");\r\n\t\tfor(int i=0; i<fish; i++){\r\n\t\t\tSystem.out.println(\"Creating fish\");\r\n\t\t\tFish f = new Fish(this);\r\n\t\t\taddToWorldList(f);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+shark+\" sharks\");\r\n\t\tfor(int i=0; i<shark; i++){\r\n\t\t\tSystem.out.println(\"Creating shark\");\r\n\t\t\tShark s = new Shark(this);\r\n\t\t\taddToWorldList(s);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+seaweed+\" seaweed\");\r\n\t\tfor(int i=0; i<seaweed; i++){\r\n\t\t\tSystem.out.println(\"Creating seaweed\");\r\n\t\t\tSeaweed sw=new Seaweed(this);\r\n\t\t\taddToWorldList(sw);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating net\");\r\n\t\t\tNet n = new Net();\r\n\t\t\taddToWorldList(n);\r\n\t\tSystem.out.println(\"Creating sushibar\");\r\n\t\t Sushibar sb = new Sushibar();\r\n\t\t\taddToWorldList(sb);\r\n\t }", "private void createChildren() {\n\t\t\n\t\tfor(int i=0;i<horizontal;i++) {\n\t\t\t\n\t\t\tAction a = new Action(i);\n\t\t\tif(!gameOver && actionIsValid(a)) {\n\t\t\t\t\n\t\t\t\tPlayer otherPlayer;\n\t\t\t\t\n\t\t\t\tif(player == Player.PLAYER_BLUE) {\n\t\t\t\t\totherPlayer = Player.PLAYER_RED;\n\t\t\t\t}else {\n\t\t\t\t\totherPlayer = Player.PLAYER_BLUE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPosition newPosition;\n\t\t\t\tnewPosition = new Position(a, ++moveCounter, otherPlayer, this);\n\t\t\t\tchildren.add(newPosition);\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void generateMonsters()\n {\n generateWeakEnemies(2);\n generateStrongEnemies(12);\n generateElites(10);\n }", "void moveHero(int x, int y) {\n setOnTile(heroC.getX(), heroC.getY(), false);\n // vector needed to aim\n setVector(x, y, heroC);\n setLastXYArray(heroC);\n //Log.i(\"dan\", \"SET VECTOR TO : \" + heroC.getVector());\n creatures.get(0).setX(x);\n creatures.get(0).setY(y);\n setOnTile(x, y, true);\n paintSquare(-1, -1);\n checkHeroHarrasing();\n checkEnemyDeath();\n addTurn();\n enemyTurn();\n saveGame(context, level, turn, creatures);\n }" ]
[ "0.7195196", "0.7181735", "0.66577", "0.6606973", "0.65257144", "0.6458522", "0.6294697", "0.6283487", "0.6275812", "0.6218037", "0.62012804", "0.6181131", "0.616708", "0.6161108", "0.6155302", "0.61437404", "0.61336404", "0.61256677", "0.60748255", "0.6047377", "0.60447764", "0.6033777", "0.59272146", "0.5720772", "0.56961215", "0.5684487", "0.56778824", "0.56370896", "0.56262803", "0.5611251", "0.5606749", "0.5517288", "0.5516614", "0.5516053", "0.5513082", "0.5495564", "0.54948425", "0.5484081", "0.5482801", "0.5468346", "0.546507", "0.54613", "0.5457547", "0.545038", "0.5447237", "0.5426301", "0.5423051", "0.54221714", "0.5421181", "0.54188186", "0.54157805", "0.54092103", "0.5399416", "0.53899914", "0.5387273", "0.53746456", "0.53519124", "0.5347613", "0.53419816", "0.53387886", "0.53278655", "0.5327436", "0.5314646", "0.530201", "0.53009665", "0.52994764", "0.52993006", "0.52840835", "0.52794164", "0.52724487", "0.5270457", "0.5267739", "0.526062", "0.5253921", "0.5251112", "0.52449816", "0.523137", "0.52262855", "0.52177244", "0.5208649", "0.52059716", "0.51962465", "0.5195137", "0.5191988", "0.51858556", "0.51852655", "0.5180175", "0.5162472", "0.51605666", "0.5159089", "0.51553637", "0.51545423", "0.51514256", "0.5150862", "0.51449424", "0.5143224", "0.51354444", "0.51326376", "0.5127857", "0.5127749" ]
0.5843735
23
Method to print results to both console, and the output file.
public void printResults() { getUtl().getOutput().add("~~ Results ~~\n"); for (int i = 0; i < getHeroes().size(); i++) { if (getHeroes().get(i).isDead()) { getUtl().getOutput().add(getHeroes().get(i).getName(). toCharArray()[0] + " dead\n"); } else { getUtl().getOutput().add(getHeroes().get(i).getName(). toCharArray()[0] + " " + getHeroes().get(i).getLevel() + " " + getHeroes().get(i).getXp() + " " + getHeroes().get(i).getHp() + " " + getHeroes().get(i).getPosX() + " " + getHeroes().get(i).getPosY() + "\n"); } } // Write output to given outputPath. getGameFileWriter().write(getUtl().getOutput()); for (int i = 0; i < getUtl().getOutput().size(); i++) { // Write output to console as well. System.out.print(getUtl().getOutput().get(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printer() throws Exception{\n File outputFile = new File(\"output.txt\");\n FileOutputStream is = new FileOutputStream(outputFile);\n OutputStreamWriter osw = new OutputStreamWriter(is);\n Writer w = new BufferedWriter(osw);\n w.write(this.result());\n w.close();\n }", "public void printToStdout() {\n\t\tfor (int i = 0; i < results.size(); i++) {\n\t\t\tSystem.out.println(results.get(i).toString());\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n PrintWriter outputFile = new PrintWriter(\"ResultFile.txt\");\n\n outputFile.println(\"Line 1\");\n outputFile.println(\"Line 2\");\n outputFile.println(\"Line 3\");\n outputFile.println(\"Line 4\");\n\n\n outputFile.close();\n\n }", "private static void consoleOutput() {\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n airportFlightCounter.toConsole();\n flightInventory.toConsole();\n flightPassengerCounter.toConsole();\n mileageCounter.toConsole();\n }", "public void printResults(String fileName) {\n\t\ttry {\n\t\t\tPrintWriter writer = new PrintWriter(fileName, \"UTF-8\");\n\t\t\tfor (int i = 0; i < results.size(); i++) {\n\t\t\t\twriter.println(results.get(i).toString());\n\t\t\t}\n\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"Error while writing to output file\");\n\t\t} finally {\n\t\t\t/*try {\n\t\t\t\twriter.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.err.println(\"Error while reading input file\");\n\t\t\t}*/\n\t\t}\t\t\n\t}", "private void printResults() {\n\t\tfor (Test test : tests) {\n\t\t\ttest.printResults();\n\t\t}\n\t}", "public static void stdout(){\n\t\tSystem.out.println(\"Buildings Found: \" + buildingsFound);\n\t\tSystem.out.println(\"Pages searched: \"+ pagesSearched);\n\t\tSystem.out.println(\"Time Taken: \" + (endTime - startTime) +\"ms\");\t\n\t}", "public void writeOutput()\n\t{\n\t\tSystem.out.println(this.toString());\n\t}", "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "public static void printResults() {\n resultMap.entrySet().stream().forEach((Map.Entry<File, String> entry) -> {\n System.out.println(String.format(\"%s processed by thread: %s\", entry.getKey(), entry.getValue()));\n });\n System.out.println(String.format(\"processed %d entries\", resultMap.size()));\n }", "public void printResults() {\n\t System.out.println(\"BP\\tBR\\tBF\\tWP\\tWR\\tWF\");\n\t System.out.print(NF.format(boundaryPrecision) + \"\\t\" + NF.format(boundaryRecall) + \"\\t\" + NF.format(boundaryF1()) + \"\\t\");\n\t System.out.print(NF.format(chunkPrecision) + \"\\t\" + NF.format(chunkRecall) + \"\\t\" + NF.format(chunkF1()));\n\t System.out.println();\n }", "public void printFile() {\n\t\t\n\t\tfor(String[] line_i: linesArray) {\n\t\t\tSystem.out.println( Arrays.toString(line_i) );\n\t\t}\n\t}", "ProcessRunner print();", "public static void main(String[] args)\n {\n\n try {\n PrintStream printStreamFile = new PrintStream(new BufferedOutputStream(new FileOutputStream(folderInput + \"btc_result_triple.nt\")));\n\n System.setOut(printStreamFile);\n\n fromQuadToTriple(folderInput + \"result.nt\");\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n\n }", "private static void textFilesOutput() {\n\n // make output directory if it doesn't already exist\n new File(\"output\").mkdirs();\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n try {\n airportFlightCounter.toTextFile();\n flightInventory.toTextFile();\n flightPassengerCounter.toTextFile();\n mileageCounter.toTextFile();\n } catch (FileNotFoundException e) {\n logger.error(\"Could not write to one or more text files - please close any open instances of that file\");\n e.printStackTrace();\n }\n\n logger.info(\"Output to text files completed\");\n }", "public void writeResults() {\n gfmBroker.storeResults(this.responses, fileOutputPath);\n }", "private static PrintStream determineOutputSource(String[] args) throws FileNotFoundException {\n if (args.length == 2) {\n //Writing to file\n return new PrintStream(new File(args[1]));\n } else {\n //Writing to standard Output\n return System.out;\n }\n\n }", "private static void writeResults() {\n\t\t//Sort hashMap before sending to file\n\t\tTreeSet<Word> mySet = new TreeSet<>(hm.values());\n\n\t\t//Create result.txt file and write treeMap out to it\n\t\tWriter writer = null;\n\t\ttry {\n\t\t\t//System.out.println(\"Here\");\n\t\t\twriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"output\\\\results.txt\")));\n\t\t\tfor (Word word : mySet) {\n\t\t\t\twriter.write(word.getValue() + \"\\t\" + word.getCount() + \"\\n\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\twriter.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void outputToConsole() {\r\n for (String line : data) {\r\n System.out.println(line);\r\n }\r\n }", "public static void RedirectOutput() {\t\n\t\ttry {\n\t\t\tPrintStream out = new PrintStream(new FileOutputStream(\"ybus.txt\"));\n\t\t\tSystem.setOut(out); //Re-assign the standard output stream to a file.\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void dump() {\n for(Object object : results) {\n System.out.println( object );\n }\n }", "public void printBoxTestResults(File outputFile) {\n\t\tString output = \"Input File;SecretA < SecretB;Optimal Box;Smallest Size;Confidence Interval;Graphic Overlaps Subset A;valid;invalid;Graphic Overlaps Subset B;valid;invalid;Graphic Significant Difference;valid;invalid;\";\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(outputFile));\n\t\t\tfor (int i=0; i < output.length(); i++){\n\t\t\t\tbw.write(output.charAt(i));\n\t\t\t}\n\t\t\tbw.write('\\n');\n\t\t\tbw.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.warning(\"Error while writing the box test result csv.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tfor (BoxTestResults boxTest : this.boxTestResults) {\n\t\t\tboxTest.printBoxTestResult(outputFile);\n\t\t}\n\t}", "private void printOut(String[] printerMakerResult)\n {\n //shows user the printerMaker result\n\n for(int i=0;i<printerMakerResult.length;i++)\n {\n outVideo.println(printerMakerResult[i]);\n outVideo.flush();\n }\n }", "void printout() {\n\t\tprintstatus = idle;\n\t\tanyprinted = false;\n\t\tfor (printoldline = printnewline = 1;;) {\n\t\t\tif (printoldline > oldinfo.maxLine) {\n\t\t\t\tnewconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (printnewline > newinfo.maxLine) {\n\t\t\t\toldconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newinfo.other[printnewline] < 0) {\n\t\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\t\tshowchange();\n\t\t\t\telse\n\t\t\t\t\tshowinsert();\n\t\t\t} else if (oldinfo.other[printoldline] < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse if (oldinfo.other[printoldline] == printnewline)\n\t\t\t\tshowsame();\n\t\t\telse\n\t\t\t\tshowmove();\n\t\t}\n\t\tif (anyprinted == true)\n\t\t\tprintln(\">>>> End of differences.\");\n\t\telse\n\t\t\tprintln(\">>>> Files are identical.\");\n\t}", "public static void printResults() {\n System.out.println(\" Results: \");\n Crawler.getKeyWordsHits().forEach((keyWord, hitsNumber) -> System.out.println(keyWord + \" : \" + hitsNumber + \";\"));\n System.out.println(\" Total hits: \" + Crawler.getTotalHits());\n\n }", "private void outputResults()\n{\n try {\n PrintWriter pw = new PrintWriter(new FileWriter(output_file));\n pw.println(total_documents);\n for (Map.Entry<String,Integer> ent : document_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n }\n pw.println(START_KGRAMS);\n pw.println(total_kdocuments);\n for (Map.Entry<String,Integer> ent : kgram_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n } \n pw.close();\n }\n catch (IOException e) {\n IvyLog.logE(\"SWIFT\",\"Problem generating output\",e);\n }\n}", "public void logResult() {\r\n resTime = resTime * 1000;\r\n int b = (int) Math.round(resTime);\r\n resTime = (double) b / 1000;\r\n double averageTime = resTime / countTESTS;\r\n averageTime = averageTime * 1000;\r\n int i = (int) Math.round(averageTime);\r\n averageTime = (double) i / 1000;\r\n try (FileWriter writer = new FileWriter(\".//result.txt\")) {\r\n writer.write(resultOpen);\r\n writer.write(resultTitle);\r\n writer.write(resultSource);\r\n writer.write(resultLinkByName);\r\n writer.write(resultLinkByHref);\r\n writer.write(\"Total tests: \" + countTESTS + \"\\n\");\r\n writer.write(\"Passed/Failed: \" + PASSED_TEST + \"/\" + FAILED_TEST + \"\\n\");\r\n writer.write(\"Total time: \" + resTime + \"\\n\");\r\n writer.write(\"Average time: \" + averageTime + \"\\n\");\r\n writer.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void searchAndWriteQueryResultsToOutput() {\n\n List<String> queryList = fu.textFileToList(QUERY_FILE_PATH);\n\n for (int queryID = 0; queryID < queryList.size(); queryID++) {\n String query = queryList.get(queryID);\n // ===================================================\n // 4. Sort the documents by the BM25 scores.\n // ===================================================\n HashMap<String, Double> docScore = search(query);\n List<Map.Entry<String, Double>> rankedDocList =\n new LinkedList<Map.Entry<String, Double>>(docScore.entrySet());\n Collections.sort(rankedDocList, new MapComparatorByValues());\n\n // ===================================================\n // 5. Write Query Results to output\n // =================================================== \n String outputFilePath =\n RANKING_RESULTS_PATH + \"queryID_\" + (queryID + 1) + \".txt\";\n StringBuilder toOutput = new StringBuilder();\n // display results in console\n System.out.println(\"Found \" + docScore.size() + \" hits.\");\n int i = 0;\n for (Entry<String, Double> scoreEntry : rankedDocList) {\n if (i >= NUM_OF_RESULTS_TO_RETURN)\n break;\n String docId = scoreEntry.getKey();\n Double score = scoreEntry.getValue();\n String resultLine =\n (queryID + 1) + \" Q0 \" + docId + \" \" + (i + 1) + \" \" + score + \" BM25\";\n toOutput.append(resultLine);\n toOutput.append(System.getProperty(\"line.separator\"));\n System.out.println(resultLine);\n i++;\n }\n fu.writeStringToFile(toOutput.toString(), outputFilePath);\n }\n }", "private void output(FileWriter outputFile, Map<Query, List<Evaluation>> evalData, FactDatabase source, FactDatabase target) {\n\t\tPrintWriter out = new PrintWriter(outputFile, true);\n\t\tif(source != null && target != null){\n\t\t\tfor(Query rule: evalData.keySet()){\n\t\t\t\tfor(Evaluation eval: evalData.get(rule)){\n\t\t\t\t\tout.print(rule.getRuleString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.first);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.second);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.third);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tdetermineSource(eval, source, target);\n\t\t\t\t\tout.print(eval.source.toString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.println(eval.result.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tfor(Query rule: evalData.keySet()){\n\t\t\t\tfor(Evaluation eval: evalData.get(rule)){\n\t\t\t\t\tout.print(rule.getRuleString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.first);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.second);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.println(eval.fact.third);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tout.close();\n\t}", "void mainOutput(int[][] matrixCID, int[][] valuesChunk, int SLOC, int TCL, int refactoredSize, float PR, String fileName){\n\t\tif(output){\t\n\t\t\tString outputName = \"Results-\";\n\t\t\tif(verbose)\n\t\t\t\toutputName = \"VerboseResults-\";\n\t\t\tString[] temp = fileName.split(\"\\\\\\\\\");\n\t\t\ttemp = temp[temp.length-1].split(\"\\\\.nw\");\n\t\t\toutputName += temp[0] + \".tsv\";\n\t\t\ttry {\n\t\t\t\tsetOutput(outputName);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(verbose){\n\t\t\t//print out full table\n\t\t\tdisplayValues(matrixCID);\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t\tSystem.out.println(\"Initial Size:\\t\\t\" + SLOC + \"\\t|S|\");\n\t\t\tSystem.out.println(\"Total Clone Length:\\t\" + TCL + \"\\tTCL\");\n\t\t\tSystem.out.println(\"Refactored Size:\\t\" + refactoredSize + \"\\t|S'|\");\n\t\t\tSystem.out.println(\"Percent Refactored:\\t\" + PR + \"\\tPR\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"|S|\\tTCL\\t|S'|\\tPR\");\n\t\t\tSystem.out.println(SLOC + \"\\t\" + TCL + \"\\t\" + refactoredSize + \"\\t\" + PR);\n\t\t}\n\t\t\n\t\tif(calc){\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t\tshowCalculation(valuesChunk, SLOC, TCL, matrixCID);\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t}\n\t\t\n\t\tresetOutput();\n\t}", "@Before\n\tpublic void loadOutput() {\n\t\tSystem.setOut(new PrintStream(this.out));\n\t}", "public static void printOut()\n\t{\n\t\t//int dms[];\n\t\t//int deg, min, sec;\n\t\t//double\tdd;\n\t\ttime = new Date();\t\n\n//\t\tif (GeoDis_GUI.outputfile == null)\n\t\tif (!printToFile)\n\t\t{\t\t\n\t\t\tGeoDis_GUI.outWindow();\n\t\t\toutfile = new TextOutputStream(GeoDis_GUI.outdoc);\n\t\t\t//outfile = Console.out;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//File outputfile = GeoDis_GUI.outputfile;\n\t\t\t//outfilename = GeoDis_GUI.outputfile.getPath();\n\t\t\toutfile = new TextOutputStream(GeoDis.outfilename);\n\t\t\tif(GeoDis.outfilename.endsWith(\".gdout\")){\n\t\t\t\tMediator.setGeoDisOutputFile(GeoDis.outfilename);\n\t\t\t} else {\n\t\t\t\t// Unsafe assumption\n\t\t\t\tMediator.setGeoDisOutputFile_MatrixFormat(GeoDis.outfilename);\n\t\t\t}\n\t\t}\t\n\n\t\toutfile.print(\"Differentiating population structure from history - \" + PROGRAM_NAME);\n\t\toutfile.print(\" \" + VERSION_NUMBER);\n\t\toutfile.print(\"\\n(c) Copyright, 1999-2006 David Posada and Alan Templeton\");\n\t\toutfile.print(\"\\nContact: David Posada, University of Vigo, Spain ([email protected])\");\n\t\t//outfile.print(\"\\nUniversity of Vigo\");\n\t\t//outfile.print(\"\\[email protected]\");\n\t\toutfile.print(\"\\n________________________________________________________________________\\n\\n\");\n\t\toutfile.print(\"Input file: \" + infilename);\n\t\toutfile.print(dataName);\n\t\toutfile.print(\"\\n\\n\" + time.toString());\n\n\t\tif (doingDistances)\n\t\toutfile.print(\"\\n\\nCalculations from USER-defined distances\");\n\n\n\t\tfor(k=0; k<numClades; k++)\n\t\t{\n\n\t\t\toutfile.print(\"\\n\\n\\n\\n\\nPERMUTATION ANALYSIS OF \" + clad[k].cladeName);\n\t\t\toutfile.print(\"\\n BASED ON \" + GeoDis.numPermutations + \" RESAMPLES\");\n\t\t\toutfile.println(\"\\n\\n\\nPART I. PERMUTATIONAL CONTINGENCY TEST:\");\n\n\t\t\tif(clad[k].numSubClades != 1) \n\t\t\t{\n\t\t\t\toutfile.print(\"\\n\\n OBSERVED CHI-SQUARE STATISTIC = \");\n\t\t\t\toutfile.printf(\"%10.4f\",clad[k].obsChi);\n\t\t\t\toutfile.print(\"\\n\\n THE PROBABILITY OF A RANDOM CHI-SQUARE BEING GREATER THAN\");\n\t\t\t\toutfile.print(\"\\n OR EQUAL TO THE OBSERVED CHI-SQUARE = \");\n\t\t\t\toutfile.printf(\"%10.4f\",clad[k].chiPvalue);\n\t\t\t}\t\t\n\n\t\t\telse\n\t\t\t\toutfile.println(\"\\nNO. OF CLADES = 1, CHI-SQUARE N.A.\");\n\t\t\t \n\n\t\t\toutfile.println(\"\\n\\n\\nPART II. GEOGRAPHIC DISTANCE ANALYSIS:\");\n\n\t\t\t// print geographical centers\n\t\t\t\n\t\n\t\t\tif (usingDecimalDegrees)\n\t\t\t{\n\t\t\t\toutfile.print(\"\\nGEOGRAPHICAL CENTERS LATITUDE LONGITUDE\");\n\t\t\t\toutfile.printf(\"\\n%16s\", clad[k].cladeName);\n\t\t\t\toutfile.printf(\"%16.4f\", clad[k].meanLatNest / D2R);\n\t\t\t\toutfile.printf(\"%16.4f\", clad[k].meanLonNest / D2R);\n\t\t\t\tfor(i = 0; i < clad[k].numSubClades; i++)\n\t\t\t\t{\n\t\t\t\t\toutfile.printf(\"\\n%16s\", clad[k].subCladeName[i]);\n\t\t\t\t\toutfile.printf(\"%16.4f\", clad[k].meanLatitude[i] / D2R);\n\t\t\t\t\toutfile.printf(\"%16.4f\", clad[k].meanLongitude[i] / D2R);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!doingDistances)\n\t\t\t{\n\t\t\t\toutfile.print(\"\\nGEOGRAPHICAL CENTERS LATITUDE LONGITUDE\");\n\t\t\t\toutfile.printf(\"\\n%16s\", clad[k].cladeName);\n\n\t\t\t\tint dms[] = DDtoDMS (clad[k].meanLatNest / D2R);\n\t\t\t\toutfile.printf(\" % 4d\"+ \" \", dms[0]);\n\t\t\t\toutfile.printf(\"%02d\" + \"'\", dms[1]);\n\t\t\t\toutfile.printf(\"%02d\" +\"\\\"\", dms[2]);\n\t\t\t\t/*outfile.printf(\"(%6.4f)\", clad[k].meanLatNest / D2R);*/\n\n\t\t\t\tdms = DDtoDMS (clad[k].meanLonNest / D2R);\n\t\t\t\toutfile.printf(\" % 4d\"+ \" \", dms[0]);\n\t\t\t\toutfile.printf(\"%02d\" + \"'\", dms[1]);\n\t\t\t\toutfile.printf(\"%02d\" +\"\\\"\", dms[2]);\n\t\t\t\t/*outfile.printf(\"(%6.4f)\", clad[k].meanLonNest / D2R);*/\n\n\t\t\t\tfor(i = 0; i < clad[k].numSubClades; i++)\n\t\t\t\t{\n\t\t\t\t\toutfile.printf(\"\\n%16s\", clad[k].subCladeName[i]);\n\t\t\n\t\t\t\t\tdms = DDtoDMS (clad[k].meanLatitude[i] / D2R);\n\t\t\t\t\toutfile.printf(\" % 4d\"+ \" \", dms[0]);\n\t\t\t\t\toutfile.printf(\"%02d\" + \"'\", dms[1]);\n\t\t\t\t\toutfile.printf(\"%02d\" +\"\\\"\", dms[2]);\n\t\t\t\t\t/* outfile.printf(\"(%6.4f)\", clad[k].meanLatitude[i] / D2R);*/\n\n\t\t\t\t\tdms = DDtoDMS (clad[k].meanLongitude[i] / D2R);\n\t\t\t\t\toutfile.printf(\" % 4d\"+ \" \", dms[0]);\n\t\t\t\t\toutfile.printf(\"%02d\" + \"'\", dms[1]);\n\t\t\t\t\toutfile.printf(\"%02d\" +\"\\\"\", dms[2]);\n\t\t\t\t\t/*outfile.printf(\"(%6.4f)\", clad[k].meanLongitude[i] / D2R);*/\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(i = 0; i < clad[k].numSubClades; i++)\n\t\t\t{\n\n\t\t\t\toutfile.print(\"\\n\\nCLADE \" + clad[k].subCladeName[i] + \" (\" + clad[k].subCladePosition[i] + \")\");\t\t\t\t\t\t\n\t\t\t\toutfile.print(\"\\n TYPE OF DISTANCE DISTANCE PROB.<= PROB.>=\");\n\n\t\t\t\tif(clad[k].numSubClades == 1)\n\t\t\t\t{\n\t\t\t\t\toutfile.print(\"\\n WITHIN CLADE \");\n\t\t\t\t\toutfile.printf(\"%12.4f\",clad[k].Dc[i]);\n\t\t\t\t\toutfile.print(\"N.A N.A\");\n\t\t\t\t\toutfile.print(\"\\n NESTED CLADE \");\n\t\t\t\t\toutfile.printf(\"%12.4f\",clad[k].Dn[i]);\n\t\t\t\t\toutfile.print(\"N.A N.A\");\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\toutfile.print(\"\\n WITHIN CLADE \");\n\t\t\t\t\toutfile.printf(\"%12.4f\",clad[k].Dc[i]);\n\t\t\t\t\toutfile.print(\" \");\n\t\t\t\t\toutfile.printf(\"%10.4f\",clad[k].DcPvalue[i][0]);\n\t\t\t\t\toutfile.print(\" \");\n\t\t\t\t\toutfile.printf(\"%10.4f\",clad[k].DcPvalue[i][1]);\n\t\t\t\t\t\n\n\t\t\t\t\toutfile.print(\"\\n NESTED CLADE \");\n\t\t\t\t\toutfile.printf(\"%12.4f\",clad[k].Dn[i]);\n\t\t\t\t\toutfile.print(\" \");\n\t\t\t\t\toutfile.printf(\"%10.4f\",clad[k].DnPvalue[i][0]);\n\t\t\t\t\toutfile.print(\" \");\n\t\t\t\t\toutfile.printf(\"%10.4f\",clad[k].DnPvalue[i][1]);\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif(GeoDis.weights)\n\t\t\t{\n\t\t\t\toutfile.print(\"\\n\\n\\nCORRELATIONS OF DISTANCES WITH OUTGROUP WEIGHTS:\\n\");\n\t\t\t\toutfile.print(\"\\n TYPE OF DISTANCE CORR. COEF. PROB.<= PROB.>=\");\n\n\t\t\t\tif(clad[k].numSubClades == 1)\n\t\t\t\t\toutfile.print(\" N.A. -- ONLY 1 CLADE IN NESTING GROUP\");\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\tif(clad[k].corrDcWeights == NA)\n\t\t\t\t\t\toutfile.print(\"\\n FROM CLADE MIDPT. -- N.A. -- NO DISTANCE OR WEIGHT VARIATION\");\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toutfile.print(\"\\n FROM CLADE MIDPT. \");\n\t\t\t\t\t\toutfile.printf(\"%12.4f\",clad[k].corrDcWeights);\n\t\t\t\t\t\toutfile.print(\" \");\n\t\t\t\t\t\toutfile.printf(\"%10.4f\",clad[k].corrDcWPvalue[0]);\n\t\t\t\t\t\toutfile.print(\" \");\n\t\t\t\t\t\toutfile.printf(\"%10.4f\",clad[k].corrDcWPvalue[1]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(clad[k].corrDnWeights == NA)\n\t\t\t\t\t\toutfile.print(\"\\n FROM NESTING MIDPT. -- N.A. -- NO DISTANCE OR WEIGHT VARIATION\");\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toutfile.print(\"\\n FROM NESTING MIDPT.\");\n\t\t\t\t\t\toutfile.printf(\"%12.4f\",clad[k].corrDnWeights);\n\t\t\t\t\t\toutfile.print(\" \");\n\t\t\t\t\t\toutfile.printf(\"%10.4f\",clad[k].corrDnWPvalue[0]);\n\t\t\t\t\t\toutfile.print(\" \");\n\t\t\t\t\t\toutfile.printf(\"%10.4f\",clad[k].corrDnWPvalue[1]);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\n\t\t\tif(clad[k].check == (double) clad[k].numSubClades || clad[k].check == 0)\n\t\t\t\t outfile.print(\"\\n\\n\\nNO INTERIOR/TIP CLADES EXIST IN THIS GROUP\"); \n\t\t\telse\n\t\t\t{\n\t\t\t\toutfile.print(\"\\n\\n\\nPART III. TEST OF INTERIOR VS. TIP CLADES:\");\n\t\t\t\toutfile.print(\"\\n\\n TYPE OF DISTANCE I-T DISTANCE PROB.<= PROB.>=\");\n\t\t\t\toutfile.print(\"\\n WITHIN CLADE \");\n\t\t\t\toutfile.printf(\"%12.4f\",clad[k].tipIntDistance);\n\t\t\t\toutfile.print(\" \");\n\t\t\t\toutfile.printf(\" %10.4f\",clad[k].ITcPvalue[0]);\n\t\t\t\toutfile.print(\" \");\n\t\t\t\toutfile.printf(\" %10.4f\",clad[k].ITcPvalue[1]);\n\n\t\t\t\toutfile.print(\"\\n NESTED CLADE \");\n\t\t\t\toutfile.printf(\"%12.4f\",clad[k].tipIntDisNested);\n\t\t\t\toutfile.print(\" \");\n\t\t\t\toutfile.printf(\" %10.4f\",clad[k].ITnPvalue[0]);\n\t\t\t\toutfile.print(\" \");\n\t\t\t\toutfile.printf(\" %10.4f\",clad[k].ITnPvalue[1]);\n\t\t\t}\n\n\t\t} // 1 clade loop\n\t\n\t\tlong total_time = end-start;\n\t\tdouble seconds = (double) total_time / 1000.0;\n\t\t//long minutes = seconds / 60;\n\t\toutfile.print(\"\\n\\n\\n** ANALYSIS FINISHED **\\nIt took \");\n\t\t//outfile.printf(\"%5d\", minutes);\n\t\t//outfile.print(\" minutes\\n\");\n\t\toutfile.printf(\"%5.4f\", seconds);\n\t\toutfile.print(\" seconds.\\n\");\n\n\t\t\n\t\toutfile.close();\n\t\t//System.err.println(\"\\nDONE Printing out\");\n\n\t}", "private void printResults() {\n\t\tdouble percentCorrect = (double)(correctAnswers/numberAmt) * 100;\n\t\tSystem.out.println(\"Amount of number memorized: \" + numberAmt +\n\t\t\t\t \"\\n\" + \"Amount correctly answered: \" + correctAnswers +\n\t\t\t\t \"\\n\" + \"Percent correct: \" + (int)percentCorrect);\n\t}", "@Test\n public void testPrintRoster() {\n System.out.println(\"Roster.printRoster\");\n System.setOut(new PrintStream(outContent));\n allStudents.printRoster();\n String expectedResult = \"\" +\n \"Alice A Anderson is majoring in Anthropology with a GPA of 3.0\\n\" +\n \"Bob Black is majoring in Biology with a GPA of 3.2\\n\" +\n \"Charles Chuck Chamberlain is majoring in Computer Science with a GPA of 3.5\\n\" +\n \"Dave Deer is majoring in Dance with a GPA of 2.5\\n\" +\n \"Eve Edelstein is majoring in Environmental Studies with a GPA of 2.5\\n\" +\n \"Fred F Flinstone is majoring in French with a GPA of 3.2\\n\" +\n \"George Giannopulos is majoring in German with a GPA of 2.0\\n\" +\n \"Hillary Humble is majoring in History with a GPA of 2.8\\n\" +\n \"Ivan Iverson is majoring in Information Technology with a GPA of 3.3\\n\" +\n \"Juan is majoring in Journalism with a GPA of 3.5\\n\";\n assertEquals(expectedResult, outContent.toString());\n System.setOut(System.out);\n }", "public void print() {\n\t\tSystem.out.println(word0 + \" \" + word1 + \" \" + similarity);\n\t}", "@Test\n\tpublic void whenExecuteMainThenPrintToConsole() {\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tSystem.setOut(new PrintStream(out));\n\t\tCalculate.main(null);\n\t\tassertThat(out.toString(), is(\"Hello World\\r\\n\"));\n\t}", "private static void printToFile(FrequencyCounter<Integer> freqCounter, ArrayList<Pair<Integer, Float>> plot) {\r\n\t\tPrintWriter writer;\r\n\t\ttry {\r\n\t\t\tString fName = \"experimentalResults\" + File.separator + \"results\" + freqCounter.getname() + \".txt\";\r\n\t\t\twriter = new PrintWriter(new File(fName));\r\n\t\t\tfor (Pair<Integer, Float> p : plot)\r\n\t\t\t\twriter.println(p);\r\n\r\n\t\t\twriter.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void displayResults() {\r\n Preferences.debug(\" ******* FitMultiExponential ********* \\n\\n\", Preferences.DEBUG_ALGORITHM);\r\n dumpTestResults();\r\n }", "static void print (Object output){\r\n \t\tSystem.out.println(output);\r\n \t}", "private void writeOutput() {\n\n textMergeScript.setCurrentDirectoryFromFile (chosenOutputFile);\n tabFileOutput = new TabDelimFile (chosenOutputFile);\n tabFileOutput.setLog (log);\n tabFileOutput.setDataLogging (false);\n boolean outputOK = true;\n try {\n tabFileOutput.openForOutput (list.getRecDef());\n } catch (IOException e) {\n outputOK = false;\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem opening Output File\",\n false);\n }\n if (outputOK) {\n list.openForInput();\n DataRecord inRec;\n int count = 0;\n do {\n inRec = list.nextRecordIn ();\n if (inRec != null) {\n try {\n tabFileOutput.nextRecordOut (inRec);\n count++;\n } catch (IOException e) {\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem writing to Output File\",\n true);\n }\n } // end if in rec not null\n } while (list.hasMoreRecords());\n\n list.close();\n\n try {\n tabFileOutput.close();\n } catch (IOException e) {\n }\n\n log.recordEvent(LogEvent.NORMAL,\n String.valueOf(count) + \" records output\",\n false);\n\n tabNameOutput = chosenOutputFile.getName();\n openOutputDataName.setText (tabNameOutput);\n if (usingDictionary) {\n tabFileName =\n new FileName (chosenOutputFile.getAbsolutePath());\n dictFile =\n new TabDelimFile (textMergeScript.getCurrentDirectory(),\n tabFileName.replaceExt(DICTIONARY_EXT));\n dictFile.setLog (log);\n try {\n dataDict.store (dictFile);\n } catch (IOException e) {\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem writing Output Dictionary\",\n true);\n }\n } // end if using dictionary\n\n textMergeScript.recordScriptAction (\n ScriptConstants.OUTPUT_MODULE,\n ScriptConstants.OPEN_ACTION,\n ScriptConstants.NO_MODIFIER,\n ScriptConstants.NO_OBJECT,\n chosenOutputFile.getAbsolutePath());\n\n } // end if output ok\n\n }", "public void printResults(){\n\t\tSystem.out.println(\"The area of the triangle is \" + findArea());\n\t\tSystem.out.println(\"The perimeter of the triangle is \"+ findPerimeter());}", "public static void main(String[] args) {\n\t\tjava.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();\n\t\tjava.io.PrintStream ps = new java.io.PrintStream(baos);\n\t // IMPORTANT: Save the old System.out!\n\t\tjava.io.PrintStream old = System.out;\n\t // Tell Java to use your special stream\n\t System.setOut(ps);\n\t // Print some output: goes to your special stream\n\t System.out.println(\"Foofoofoo!\");\n\t // Put things back\n\t System.out.flush();\n\t System.setOut(old);\n\t // Show what happened\n\t System.out.println(\"Here: \" + baos.toString());\n\t}", "private static void printResults(Map<Path, Double> resultFiles2) {\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Najboljih 10 rezultata: \");\r\n\t\tint i = 0;\r\n\t\tfor (Map.Entry<Path, Double> e : resultFiles.entrySet()) {\r\n\t\t\tif (i==10) break;\r\n\t\t\tif (e.getValue() < 1E-9) break;\r\n\t\t\tSystem.out.printf(\"[%d] (%.4f) %s %n\", i, e.getValue(), e.getKey().toString());\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t}", "public void writeOut(PrintWriter pw){}", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "@VisibleForTesting\n void print();", "private static void LOG() {\n if (!RESULTFILE.exists()) {\n\n if (!RESULTFILE.getParentFile().exists()) {\n RESULTFILE.getParentFile().mkdirs();\n }\n\n try {\n RESULTFILE.createNewFile();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't create file \" + RESULTFILE.getName());\n System.err.println(\"ERROR\" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(RESULTFILE, true));\n bw.write(\"rank\" + \"\\t\" + \"DBID\" + \"\\n\");\n bw.close();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't write to file \" + RESULTFILE.getName());\n System.err.println(\"ERROR: \" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(RESULTFILE));\n out.writeObject(RESULTS);\n out.close();\n\n } catch (IOException ioe) {\n System.err.println(\"Couldn't write to file \" + RESULTFILE.getName());\n System.err.println(\"ERROR: \" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n }\n\n /**\n * print also SQL query into a sql file\n *\n */\n if (!SQLFILE.exists()) {\n if (!SQLFILE.getParentFile().exists()) {\n SQLFILE.getParentFile().mkdirs();\n }\n try {\n SQLFILE.createNewFile();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't create file \" + SQLFILE.getName());\n System.err.println(\"ERROR\" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(SQLFILE, true));\n bw.write(UNKNOWN.getSortedQuery() + \"\\n\");\n bw.close();\n } catch (Exception e) {\n System.err.println(\"Konnte nicht in Datei \" + SQLFILE + \" schreiben!\");\n }\n }\n }", "void redirectOutput() {\n Process process = _vm.process();\n _errThread = new StreamRedirectThread(\"error reader\", process.getErrorStream(), System.err);\n _outThread = new StreamRedirectThread(\"output reader\", process.getInputStream(), System.out);\n _errThread.start();\n _outThread.start();\n }", "public static void main(String[] args) { \n processDataFile();\n realtorLogImpl.traverseDisplay();\n System.out.println();\n propertyLogImpl.traverseDisplay();\n System.out.println();\n generateReport();\n }", "void printToConsole() {\n\t\tSystem.out.println(\"PROVIDER DIRECTORY:\");\n\t\tfor (int i = 0; i < services.size(); i++) {\n\t\t\tString service = services.get(i).getServiceName() + \" (\" + services.get(i).getServiceNumber() + \") for $\" + services.get(i).getServiceFee();\n\t\t\tSystem.out.println(\"\\t\" + service);\n\t\t}\n\t}", "public String printfull(){\r\n\t\tString ans = this.toString() + \" \\n\";\r\n\t\t\r\n\t\tArrayList <String> details = getOpDetails();\r\n\t\tfor(String d: details){\r\n\t\t\tans = ans + d + \" \\n\";\r\n\t\t}\r\n\t\t\r\n\t\tans = ans + \"Input Files:\\n\" ;\r\n\t\tFileInfo fileIndex = (FileInfo)input.getFirstChild();\r\n\t\twhile(fileIndex != null){\r\n\t\t\tans = ans + fileIndex.toString() + \"\\n\";\r\n\t\t\tfileIndex = (FileInfo)fileIndex.getNextSibling();\r\n\t\t}//end input while\r\n\t\t\r\n\t\t\r\n\t\tans = ans + \"Output Files:\\n\";\r\n\t\tfileIndex = (FileInfo)output.getFirstChild();\r\n\t\twhile(fileIndex != null){\r\n\t\t\tans = ans + fileIndex.toString() + \"\\n\";\r\n\t\t\tfileIndex = (FileInfo) fileIndex.getNextSibling();\r\n\t\t}//end output while\r\n\t\treturn ans;\r\n\t}", "public static void print() {\r\n System.out.println();\r\n }", "public void writeOutput() {\n\t\tint lineNumber = 0;\n\t\ttry {\n\t\t\tfor (; lineNumber < outputFileCont.size(); lineNumber++) {\n\t\t\t\t// pobranie i zapisanie kolejnego zapamiêtanego wiersza\n\t\t\t\tString line = (String) outputFileCont.get(lineNumber);\n\t\t\t\toutputBuffer.write(line);\n\t\t\t\t// zapisanie znaku nowego wiersza\n\t\t\t\toutputBuffer.newLine();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"B³¹d zapisu do pliku: \" + outputFileName + \" \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\t// niezbêdne\n\t\t\toutputBuffer.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"B³¹d zamkniêcia pliku: \" + outputFileName\n\t\t\t\t\t+ \" \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Zapisano \"\n\t\t\t\t+ lineNumber\n\t\t\t\t+ \" wiersz\"\n\t\t\t\t+ (lineNumber == 1 ? \"\"\n\t\t\t\t\t\t: (lineNumber > 1 && lineNumber < 5 ? \"e\" : \"y\"))\n\t\t\t\t+ \" do pliku \" + outputFileName);\n\t}", "private static void printOutput (int[][] results)\n {\n for (int i=0; i<=results[0].length-1; i++)\n {\n System.out.println(results[0][i] +\",\"+ results[1][i]);\n }\n System.out.println();\n }", "void setOutput(String filename) throws FileNotFoundException{\n\t\tSystem.out.println(\"Created file: \" + filename);\t\n\t\ttry {\n\t\t\tout = new PrintStream(new FileOutputStream(filename));\n\t\t\tSystem.setOut(out);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveResult() {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(new FileOutputStream(resultFile));\n\t\t\tout.println(record.resultToString());\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void print() {\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.info(\">> print()\");\n\t\t}\n\t\tSystem.out.println(p + \"/\" + q);\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.info(\"<< print()\");\n\t\t}\n\t}", "public void dumpMyData() {\n\t PrintStream output=null;\n\t try{\n\t\t output=new PrintStream(new FileOutputStream(\"/Users/saigeetha/Documents/School Documents/Fall 2016/Assignments/CSCI_572_HW2/CrawlReport.txt\"));\n\t\t System.setOut(output);\n\t\t System.out.println(\"Name: Sai Geetha Kandepalli Cherukuru\");\n\t\t System.out.println(\"USC ID : 7283210853\");\n\t\t System.out.println(\"News site crawled: nytimes.com\");\n\t\t System.out.println();\n\t\t System.out.println(\"Fetch Statistics\");\n\t\t System.out.println(\"================\");\n\t\t System.out.println(\"# fetches attempted: \"+fetchesAttempted);\n\t\t System.out.println(\"# fetches succeeded: \"+fetchesSucceeded);\n\t\t System.out.println(\"# fetches aborted: \"+fetchesAborted);\n\t\t System.out.println(\"# fetches failed: \"+fetchesFailed);\n\t\t System.out.println();\n\t\t System.out.println(\"Outgoing URLs:\");\n\t\t System.out.println(\"================\");\n\t\t System.out.println(\"Total URLs extracted:\"+urlsExtracted);\n\t\t System.out.println(\"# unique URLs extracted: \"+uniqueUrlsExtracted.size());\n\t\t System.out.println(\"# unique URLs within News Site: \"+uniqueUrlsWithinNews.size());\n\t\t System.out.println(\"# unique URLs outside News Site: \"+uniqueUrlsOutsideNews.size());\n\t\t System.out.println();\n\t\t System.out.println(\"Status Codes:\");\n\t\t System.out.println(\"================\");\n\t\t \n\t\t for(Integer k: statusCodes.keySet()) {\n\t\t\t Integer value=statusCodes.get(k);\n\t\t\t System.out.println(k+\": \"+value);\n\t\t }\n\t\t \n\t\t System.out.println();\n\t\t System.out.println(\"File Sizes:\");\n\t\t System.out.println(\"================\");\n\t\t \n\t\t for(String k: fileSizes.keySet()) {\n\t\t\t Integer value=fileSizes.get(k);\n\t\t\t System.out.println(k+\": \"+value);\n\t\t }\n\t\t \n\t\t System.out.println();\n\t\t System.out.println(\"Content Types:\");\n\t\t System.out.println(\"================\");\n\t\t \n\t\t for(String k: contentTypes.keySet()) {\n\t\t\t Integer value=contentTypes.get(k);\n\t\t\t System.out.println(k+\": \"+value);\n\t\t }\n\t\t \n\t } catch(FileNotFoundException e) {\n\t\t e.printStackTrace();\n\t }\n }", "public void setOut(PrintStream out);", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "public void print();", "public void print();", "public void print();", "public void print();", "private boolean exportResult(){\n System.out.println(\"Writing to \" + \"out_\" + inputFile);\n return true;\n }", "private void outputfile() {\n\n ConnectDB dbconnect = new ConnectDB();\n\n try {\n PrintWriter writer = new PrintWriter(\"memberoutput.txt\");\n\n try {\n dbconnect.pst = dbconnect.con.prepareStatement(\"select * from members\");\n dbconnect.rs = dbconnect.pst.executeQuery();\n\n while (dbconnect.rs.next()) {\n writer.println(dbconnect.rs.getString(1) + \",\"\n + dbconnect.rs.getString(2) + \",\"\n + dbconnect.rs.getString(3) + \",\"\n + dbconnect.rs.getString(4) + \",\"\n + dbconnect.rs.getString(5) + \",\"\n + dbconnect.rs.getString(6) + \",\"\n + dbconnect.rs.getString(7) + \",\"\n + dbconnect.rs.getString(8) + \",\"\n + dbconnect.rs.getString(9));\n }\n\n writer.flush();\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n }\n writer.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n JOptionPane.showMessageDialog(null, \"File exported\");\n }", "private static void pdfFilesOutput() {\n\n // make output directory if it doesn't already exist\n new File(\"output\").mkdirs();\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n try {\n airportFlightCounter.toPDFFile();\n flightInventory.toPDFFile();\n flightPassengerCounter.toPDFFile();\n mileageCounter.toPDFFile();\n } catch (DocumentException | FileNotFoundException e) {\n logger.error(\"Could not write to one or more PDF files - please close any open instances of that file\");\n e.printStackTrace();\n }\n\n logger.info(\"Output to PDF files completed\");\n }", "public void printResults() {\r\n System.out.printf(\"\\nHistory\\n\\n\");\r\n String format = \"%-25s %s from %s\\n\";\r\n Collections.sort(results);\r\n for(Data data : results) {\r\n System.out.printf(format, data.getName(),\r\n defaultFormatter.format(data.getDate()), data.getComputer());\r\n }\r\n }", "private void print(List<String> list, int fileNum, String dir){\n\n //controlling existance of results directory\n File resDir = new File(dir+\"/A_results/\");\n resDir.mkdir();\n\n try {\n PrintWriter resWriter = new PrintWriter(dir+\"/A_results/result\"+fileNum+\".\"+writeExtention, \"UTF-8\");\n for(String s : list) {\n resWriter.println(s);\n resWriter.flush();\n }\n\n resWriter.close();\n } catch (FileNotFoundException | UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "void print(String fileName)\n\t{\n\t\t//Print the elements and also write them into a file if the array is initialized\n\t\tif(inputArray != null)\n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\t//Create a file output.txt\n\t\t\t\tPrintWriter writer = new PrintWriter(fileName);\n\t\t\t\tfor(int i=0; i < inputArray.length; i++)\n\t\t\t\t{\n\t\t\t\t\t//Print the elements and also write them into a file\n\t\t\t\t\tSystem.out.print(inputArray[i] + \" \");\n\t\t\t\t\twriter.print(inputArray[i] + \" \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Close the file\n\t\t\t\twriter.close();\n\t\t\t} \n\t\t\tcatch (FileNotFoundException e) \n\t\t\t{\n\t\t\t\t//Printing the Stack Trace if an exception has occurred\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "private void printReport() {\n\t\tSystem.out.println(getReport());\n\t}", "public void println();", "private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}", "private void _debugSystemOutAndErr() {\n try {\n File outF = new File(System.getProperty(\"user.home\") +\n System.getProperty(\"file.separator\") + \"out.txt\");\n FileWriter wo = new FileWriter(outF);\n final PrintWriter outWriter = new PrintWriter(wo);\n File errF = new File(System.getProperty(\"user.home\") +\n System.getProperty(\"file.separator\") + \"err.txt\");\n FileWriter we = new FileWriter(errF);\n final PrintWriter errWriter = new PrintWriter(we);\n System.setOut(new PrintStream(new edu.rice.cs.util.OutputStreamRedirector() {\n public void print(String s) {\n outWriter.print(s);\n outWriter.flush();\n }\n }));\n System.setErr(new PrintStream(new edu.rice.cs.util.OutputStreamRedirector() {\n public void print(String s) {\n errWriter.print(s);\n errWriter.flush();\n }\n }));\n }\n catch (IOException ioe) {}\n }", "public void println()\n\t{\n\t\tSystem.out.println();\n\t}", "private void printLines() {\n for (String L: testLines) {\n print.write(L);\n }\n }", "public void print() {\n for (int i=0; i<lines.size(); i++)\n {\n System.out.println(lines.get(i));\n }\n }", "ProcessRunner print(PrintStream out, PrintStream err);", "public void processOutput() {\n\n\t}", "public String toString(){\n\t\tFileHandler fw = new FileHandler(); //Create new object for file write\n \tformatText(title);\n \tformatText(snippet);\n \tsnippet = removeLineBreak(snippet);\n \t\n \t//Print out contents to screen\n \tSystem.out.println(urlLabel + link);\n \tSystem.out.println(titleLabel + title);\n\t\tSystem.out.println(snippetLabel + snippet);\n\t\t\n\t\t//Write contents to file\n\t\tfw.writeToFile(urlLabel, link, fw.file, false);\n\t\tfw.writeToFile(titleLabel, title, fw.file, false);\n\t\tfw.writeToFile(snippetLabel, snippet, fw.file, false);\n\t\tfw.writeToFile(\"---------- END OF RESULT -----------\",\"\", fw.file, false);\n\t return \"\";\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "private PrintStream getOutput(String name) {\n try {\n return new PrintStream(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }", "public void print() {\n System.out.println(toString());\n }", "private void printResultsData(BattleCompletedEvent event) {\n\t\tif ((setup.resultsFilename == null && (!setup.exitOnComplete || windowManager.isGUIEnabled()))) {\n\t\t\treturn;\n\t\t}\n\n\t\tPrintStream out = null;\n\t\tFileOutputStream fos = null;\n\n\t\ttry {\n\t\t\tif (setup.resultsFilename == null) {\n\t\t\t\tout = Logger.realOut;\n\t\t\t} else {\n\t\t\t\tFile f = new File(setup.resultsFilename);\n\t\n\t\t\t\ttry {\n\t\t\t\t\tfos = new FileOutputStream(f);\n\t\t\t\t\tout = new PrintStream(fos);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tLogger.logError(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (out != null) {\n\t\t\t\tBattleResultsTableModel resultsTable = new BattleResultsTableModel(event.getSortedResults(),\n\t\t\t\t\t\tevent.getBattleRules().getNumRounds());\n\n\t\t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\n\t\t\t\tresultsTable.print(new PrintStream(baos));\n\t\t\t\tout.append(StringUtil.toBasicLatin(baos.toString()));\n\t\t\t}\n\t\t} finally {\n\t\t\tFileUtil.cleanupStream(out);\n\t\t\tFileUtil.cleanupStream(fos);\t\t\t\n\t\t}\n\t}", "@Override\n public void show(ResultComponent results) throws TrecEvalOOException {\n System.out.println(\"************************************************\");\n System.out.println(\"*************** Topic \" + topicId + \" output ****************\");\n System.out.println(\"************************************************\");\n\n if (results.getType() == ResultComponent.Type.GENERAL) {\n\n for (ResultComponent runResult : results.getResults()) {\n\n List<Result> resultList = runResult.getResultsByIdTopic(topicId);\n\n System.out.println(\"\\nResults for run: \" + runResult.getRunName());\n if (resultList.isEmpty()) {\n System.out.println(\"No results for topic \" + topicId);\n }\n\n for (Result result : resultList) {\n System.out.print(result.toString());\n }\n }\n }\n }", "public PrintStreamCommandOutput()\n {\n this( System.out );\n }", "public abstract String FileOutput();", "public void displayTextToConsole();", "private void writeFinalReports() {\n\t\tSystem.out.println(\"Printing data to output files ...\");\n\t\twritePropertyData();\n\t\twriteClassData();\n\t\tSystem.out.println(\"Finished printing data.\");\n\t}", "public void outputToFile(String filemame)\n {\n }", "public void output(PrintWriter p) {\n if (compositions == null) {\n p.println(this);\n } else {\n compositions.stream().forEach(p::println);\n }\n }", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "public void writeOutput() {\n // Create json object to be written\n Map<String, Object> jsonOutput = new LinkedHashMap<>();\n // Get array of json output objects for consumers\n List<Map<String, Object>> jsonConsumers = writeConsumers();\n // Add array for consumers to output object\n jsonOutput.put(Constants.CONSUMERS, jsonConsumers);\n // Get array of json output objects for distributors\n List<Map<String, Object>> jsonDistributors = writeDistributors();\n // Add array for distributors to output objects\n jsonOutput.put(Constants.DISTRIBUTORS, jsonDistributors);\n // Get array of json output objects for producers\n List<Map<String, Object>> jsonProducers = writeProducers();\n // Add array for producers to output objects\n jsonOutput.put(Constants.ENERGYPRODUCERS, jsonProducers);\n // Write to output file and close\n try {\n ObjectMapper mapper = new ObjectMapper();\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(Paths.get(outFile).toFile(), jsonOutput);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String printResult() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(printStartNumberAndName() + \"; \");\n\t\tsb.append(printInfo());\n\n\t\tsb.append(printTotalTime() + \"; \");\n\n\t\tsb.append(getStartTime() + \"; \");\n\t\tsb.append(getFinishTime());\n\t\n\t\tsb.append(errorHandler.print());\n\t\t\n\t\treturn sb.toString();\n\t}", "private void showFinalResults(){\r\n\r\n System.out.println(\"Player\\t\\t:\\t\\tPoints\");\r\n for(Player player : this.sortedPlayers){\r\n System.out.println(player.toString());\r\n }\r\n System.out.println();\r\n }", "void print() {\n for (Process process : workload) {\n System.out.println(process);\n }\n }", "private void printAnswerResults(){\n\t\tSystem.out.print(\"\\nCorrect Answer Set: \" + q.getCorrectAnswers().toString());\n\t\tSystem.out.print(\"\\nCorrect Answers: \"+correctAnswers+\n\t\t\t\t\t\t \"\\nWrong Answers: \"+wrongAnswers);\n\t}", "public void printData() {\n\t\ttry {\n\t\t\tFiles.lines(new File(PAYROLL_FILE_NAME).toPath())\n\t\t\t.forEach(System.out::println); \n\t\t}catch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.7296627", "0.70874953", "0.68632054", "0.6735694", "0.6682317", "0.6567568", "0.6470079", "0.642646", "0.63616997", "0.63398856", "0.63020456", "0.6269999", "0.6199159", "0.61945224", "0.61574525", "0.6137488", "0.61056197", "0.6075407", "0.60741335", "0.60691434", "0.59943324", "0.59759533", "0.5967003", "0.5964542", "0.5941194", "0.59194", "0.5914724", "0.5897858", "0.58968085", "0.5892994", "0.58926827", "0.5874778", "0.5859298", "0.5858129", "0.5849949", "0.58491904", "0.58442926", "0.5843163", "0.58251256", "0.5821847", "0.5801753", "0.57936287", "0.57925", "0.5786087", "0.5785873", "0.57804805", "0.5773951", "0.57653517", "0.5761994", "0.57570153", "0.5753249", "0.5751207", "0.5748409", "0.5741873", "0.5737944", "0.57337093", "0.57320917", "0.5725847", "0.5716975", "0.57160705", "0.57152957", "0.5707319", "0.5707319", "0.5707319", "0.5707319", "0.5707139", "0.5702461", "0.5702415", "0.5701558", "0.57012004", "0.5700815", "0.56984526", "0.5695854", "0.5689386", "0.56775844", "0.5671241", "0.5661999", "0.56617236", "0.56581503", "0.56580055", "0.5648853", "0.5644061", "0.5637365", "0.56305146", "0.5630125", "0.5622436", "0.56223506", "0.56199116", "0.5617273", "0.5616217", "0.5608277", "0.56001407", "0.55942124", "0.5587965", "0.5585954", "0.55858505", "0.5583695", "0.55787873", "0.5577602", "0.5577211" ]
0.7042826
2
TODO Autogenerated method stub
public static void main(String[] args) { List <String> color = new ArrayList<String>(5); color.add("Red"); color.add("Green"); color.add("Orange"); color.add("white"); color.add("black"); List<String>color2 =new ArrayList<String>(5); color2.add("red"); color2.add("Green"); color2.add("orange"); color2.add("White"); color2.add("Black"); ArrayList<String>color3 = new ArrayList<String>(); for(String temp:color) color3.add(color2.contains(temp)? "Yes" : "No"); System.out.println(color3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
only applies to JDO entities; ignore any view models
@Override public void process(final ProcessMethodContext processMethodContext) { final Class<?> cls = processMethodContext.getCls(); if(!JdoMetamodelUtil.isPersistenceEnhanced(cls)) { return; } final FacetedMethod holder = processMethodContext.getFacetHolder(); final MandatoryFacet existingFacet = holder.getFacet(MandatoryFacet.class); if(existingFacet != null) { if (existingFacet instanceof OptionalFacetDerivedFromJdoPrimaryKeyAnnotation) { // do not replace this facet; // we must keep an optional facet here for different reasons return; } if (existingFacet instanceof MandatoryFacetForPropertyAnnotation.Required) { // do not replace this facet; // an explicit @Property(optional=FALSE) annotation cannot be overridden by @Column annotation return; } } val jdoColumnAnnotation = processMethodContext.synthesizeOnMethod(Column.class) .orElse(null); boolean required = whetherRequired(processMethodContext, jdoColumnAnnotation); MandatoryFacet facet = jdoColumnAnnotation != null ? new MandatoryFacetDerivedFromJdoColumn(holder, required) : new MandatoryFacetInferredFromAbsenceOfJdoColumn(holder, required); // as a side-effect, will chain any existing facets. // we'll exploit this fact for meta-model validation (see #refineMetaModelValidator(), below) FacetUtil.addFacet(facet); // however, if a @Column was explicitly provided, and the underlying facet // was the simple MandatoryFacetDefault (from an absence of @Optional or @Mandatory), // then don't chain, simply replace. if(facet instanceof MandatoryFacetDerivedFromJdoColumn && facet.getUnderlyingFacet() instanceof MandatoryFacetDefault) { facet.setUnderlyingFacet(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public default boolean shouldHideEntity(){ return false; }", "public interface CreateEntityView<E extends SerializableEntity> extends EntityView {\r\n\r\n\t/**\r\n\t * Make save handler enabled\r\n\t * \r\n\t * @param enabled\r\n\t */\r\n\tvoid setSaveHandlerEnabled(boolean enabled);\r\n\t\r\n}", "@Override\n\tpublic Class<Object> getEntityClass() {\n\t\treturn null;\n\t}", "public MuseologicalObjectDO getEntity(){\r\n\t\tMuseologicalObjectDO objDO = new MuseologicalObjectDO();\r\n\t\tif(objectId != null) objDO.setId(objectId);\r\n\t\tobjDO.setName(name);\r\n\t\tobjDO.setDate(date.getTime());\r\n\t\tobjDO.setObjectType(objectType);\r\n\t\treturn objDO;\r\n\t}", "public interface InternalEntity {\n\t/**\n\t * Returns true if the entity should be visible in the entities view.\n\t * \n\t * @return\n\t */\n\tboolean isVisible();\n}", "@Override\n\tpublic TenantsEntity getModel() {\n\t\treturn null;\n\t}", "public boolean supportsEntityComments() { return true; }", "@Override\n\tpublic boolean ignoreForeignItems() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean model() {\n\t\treturn false;\n\t}", "protected void validateEntity() {\n super.validateEntity();\n }", "@Override\n\tpublic boolean ignoreForeignItems() {\n\t\treturn true;\n\t}", "protected abstract Entity getEditedEntity();", "@Override\n public boolean isMapped() {\n return false;\n }", "@Override\n public Entity getEntity() {\n return super.getEntity();\n }", "@Override\n\tprotected boolean canBeRidden(Entity entityIn)\n\t{\n\t\treturn false;\n\t}", "public boolean requiresViewEntityCacheInvalidation() {\n return !tableToViewDescMap.isEmpty();\n }", "@Override\n\tpublic String getEntityModelName() {\n\t\treturn null;\n\t}", "Object toDomain(Object entity, Settings settings);", "public void toEntity(){\n\n }", "public PersistableBusinessObject manageReadOnly(PersistableBusinessObject bo) {\r\n\t\treturn bo;\r\n\t}", "private <T extends Model> QuerySet<T> all(Class<T> modelClass) {\n QuerySet<T> querySet = new QuerySet<T>();\n querySet.setEntity((Class<T>) this.entity);\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n OneToOneField oneToOneFieldAnnotation = null;\n ForeignKeyField foreignKeyFieldAnnotation = null;\n ManyToManyField manyToManyFieldAnnotation = null;\n try {\n String sql = \"SELECT * FROM\";\n tableName = TableUtil.getTableName(modelClass);\n sql = String.format(\"%s %s\", sql, tableName);\n if (JediEngine.DEBUG) {\n System.out.println(sql + \";\\n\");\n }\n connect();\n statement = connection.prepareStatement(sql);\n resultSet = statement.executeQuery();\n if (!resultSet.next()) {\n return querySet;\n }\n resultSet.beforeFirst();\n while (resultSet.next()) {\n Object obj = entity.newInstance();\n Field id = jedi.db.models.Model.class.getDeclaredField(\"id\");\n id.setAccessible(true);\n // Oracle returns BigDecimal object.\n if (connection.toString().startsWith(\"oracle\")) {\n id.set(\n obj,\n ((java.math.BigDecimal) resultSet.getObject(id.toString().substring(id.toString().lastIndexOf('.') + 1))).intValue());\n } else {\n // MySQL and PostgreSQL returns a Integer object.\n id.set(obj, resultSet.getObject(id.toString().substring(id.toString().lastIndexOf('.') + 1)));\n }\n List<Field> _fields = JediEngine.getAllFields(this.entity);\n for (Field field : _fields) {\n field.setAccessible(true);\n if (!JediEngine.isJediField(field)) {\n continue;\n }\n if (field.toString().substring(field.toString().lastIndexOf('.') + 1).equals(\"serialVersionUID\")) {\n continue;\n }\n if (field.getName().equalsIgnoreCase(\"objects\")) {\n continue;\n }\n oneToOneFieldAnnotation = field.getAnnotation(OneToOneField.class);\n foreignKeyFieldAnnotation = field.getAnnotation(ForeignKeyField.class);\n manyToManyFieldAnnotation = field.getAnnotation(ManyToManyField.class);\n FetchType fetchType = JediEngine.FETCH_TYPE;\n Manager manager = null;\n if (manyToManyFieldAnnotation != null) {\n fetchType = fetchType.equals(FetchType.NONE) ? manyToManyFieldAnnotation.fetch_type() : fetchType;\n if (fetchType.equals(FetchType.EAGER)) {\n String packageName = this.entity.getPackage().getName();\n String model = manyToManyFieldAnnotation.model().getSimpleName();\n model = Model.class.getSimpleName().equals(model) ? \"\" : model;\n Class superClazz = null;\n Class clazz = null;\n if (model.isEmpty()) {\n ParameterizedType genericType = null;\n if (ParameterizedType.class.isAssignableFrom(field.getGenericType().getClass())) {\n genericType = (ParameterizedType) field.getGenericType();\n superClazz = ((Class) (genericType.getActualTypeArguments()[0])).getSuperclass();\n if (superClazz == Model.class) {\n clazz = (Class) genericType.getActualTypeArguments()[0];\n model = clazz.getSimpleName();\n }\n }\n }\n String references = manyToManyFieldAnnotation.references();\n if (references == null || references.trim().isEmpty()) {\n if (clazz != null) {\n references = TableUtil.getTableName(clazz);\n } else {\n references = TableUtil.getTableName(model);\n }\n }\n String intermediateModelclassName = String.format(\"%s.%s\", packageName, model);\n Class associatedModelClass = Class.forName(intermediateModelclassName);\n manager = new Manager(associatedModelClass);\n QuerySet querySetAssociatedModels = null;\n String intermediateModelName = manyToManyFieldAnnotation.through().getSimpleName();\n intermediateModelName = Model.class.getSimpleName().equals(intermediateModelName) ? \"\" : intermediateModelName;\n if (intermediateModelName != null && !intermediateModelName.trim().isEmpty()) {\n intermediateModelclassName = String.format(\"%s.%s\", packageName, intermediateModelName);\n Class intermediateModelClass = Class.forName(intermediateModelclassName);\n String intermediateTableName = ((Model) intermediateModelClass.newInstance()).getTableName();\n querySetAssociatedModels = manager.raw(\n String.format(\n \"SELECT * FROM %s WHERE id IN (SELECT %s_id FROM %s WHERE %s_id = %d)\",\n TableUtil.getTableName(references),\n TableUtil.getColumnName(model),\n intermediateTableName,\n TableUtil.getColumnName(obj.getClass()),\n ((Model) obj).getId()),\n associatedModelClass);\n } else {\n querySetAssociatedModels = manager.raw(\n String.format(\n \"SELECT * FROM %s WHERE id IN (SELECT %s_id FROM %s_%s WHERE %s_id = %d)\",\n TableUtil.getTableName(references),\n TableUtil.getColumnName(model),\n tableName,\n TableUtil.getTableName(references),\n TableUtil.getColumnName(obj.getClass()),\n ((Model) obj).getId()),\n associatedModelClass);\n }\n field.set(obj, querySetAssociatedModels);\n } else {\n field.set(obj, null);\n }\n } else if (oneToOneFieldAnnotation != null || foreignKeyFieldAnnotation != null) {\n if (oneToOneFieldAnnotation != null) {\n fetchType = fetchType.equals(FetchType.NONE) ? oneToOneFieldAnnotation.fetch_type() : fetchType;\n } else {\n fetchType = fetchType.equals(FetchType.NONE) ? foreignKeyFieldAnnotation.fetch_type() : fetchType;\n }\n if (fetchType.equals(FetchType.EAGER)) {\n // Recovers the attribute class.\n Class associatedModelClass = Class.forName(field.getType().getName());\n manager = new Manager(associatedModelClass);\n String s = String.format(\"%s_id\", TableUtil.getColumnName(field));\n Object o = resultSet.getObject(s);\n Model associatedModel = manager.get(\"id\", o);\n // References a model associated by a foreign key.\n field.set(obj, associatedModel);\n } else {\n field.set(obj, null);\n }\n } else {\n // Sets the fields that aren't Model instances.\n if ((field.getType().getSimpleName().equals(\"int\") || field.getType().getSimpleName().equals(\"Integer\")) &&\n connection.toString().startsWith(\"oracle\")) {\n if (resultSet.getObject(TableUtil.getColumnName(field)) == null) {\n field.set(obj, 0);\n } else {\n String columnName = TableUtil.getColumnName(field);\n BigDecimal bigDecimal = (BigDecimal) resultSet.getObject(columnName);\n field.set(obj, bigDecimal.intValue());\n }\n } else {\n Object columnValue = resultSet.getObject(TableUtil.getColumnName(field));\n columnValue = convertZeroDateToNull(columnValue);\n if (columnValue instanceof java.sql.Date) {\n java.sql.Date date = (java.sql.Date) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(date.getTime());\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n columnValue = calendar.getTime();\n }\n if (columnValue instanceof java.sql.Time) {\n java.sql.Time time = (java.sql.Time) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(time.getTime());\n calendar.set(Calendar.YEAR, 0);\n calendar.set(Calendar.MONTH, 0);\n calendar.set(Calendar.DAY_OF_MONTH, 0);\n columnValue = calendar.getTime();\n }\n if (columnValue instanceof Timestamp) {\n Timestamp timestamp = (Timestamp) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(timestamp.getTime());\n columnValue = calendar.getTime();\n }\n field.set(obj, columnValue);\n }\n }\n manager = null;\n }\n T model = (T) obj;\n if (model != null) {\n model.setPersisted(true);\n }\n querySet.add(model);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n close(resultSet, statement, connection);\n }\n return querySet;\n }", "@Override\n public Preparation mapToEntity(PreparationDto dto) {\n return null;\n }", "public boolean isFalsey() {\n Entity e = null;\n if (parent != null) {\n e = parent.get(ContentType.EntityType, null);\n } else if (root != null) {\n e = root;\n }\n \n if (e != null) {\n \n if (isIndexSelector()) {\n if (!(e instanceof EntityList)) {\n return true;\n }\n EntityList el = (EntityList)e;\n return index.isFalsey(el);\n \n }\n \n Property prop = property;\n if (prop == null) {\n prop = e.getEntity().getEntityType().findProperty(tags);\n }\n if (prop != null) {\n return e.getEntity().isFalsey(prop);\n }\n }\n return true;\n }", "@Override\n public ModelDAO getModelDAO() {\n return null;\n }", "public interface Model {\n /** {@code Predicate} that always evaluate to true */\n Predicate<ReadOnlyPerson> PREDICATE_SHOW_ALL_PERSONS = unused -> true;\n Predicate<ReadOnlyEvent> PREDICATE_SHOW_ALL_EVENTS = unused -> true;\n\n\n //@@author low5545\n /** Adds extra data to the existing model */\n void addData(ReadOnlyAddressBook newData);\n //@@author\n\n /** Clears existing backing model and replaces with the provided new data. */\n void resetData(ReadOnlyAddressBook newData);\n\n /** Returns the AddressBook */\n ReadOnlyAddressBook getAddressBook();\n\n //=========== Model support for property component =============================================================\n\n //@@author yunpengn\n /** Adds a new customize property */\n void addProperty(String shortName, String fullName, String message, String regex)\n throws DuplicatePropertyException, PatternSyntaxException;\n //@@author\n\n //=========== Model support for contact component =============================================================\n\n /** Adds the given person */\n void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;\n\n /** Replaces the given person {@code target} with {@code editedPerson} */\n void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)\n throws DuplicatePersonException, PersonNotFoundException;\n\n /** Deletes the given person. */\n void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;\n\n /** Adds or updates the avatar of the selected person. */\n void setPersonAvatar(ReadOnlyPerson target, Avatar avatar);\n\n //@@author dennaloh\n /** Gets URL for google maps. */\n String getGMapUrl(ReadOnlyPerson target);\n\n /** Gets URL to search on facebook. */\n String getFbUrl (ReadOnlyPerson target);\n\n /** Opens URL in default browser. */\n void openUrl (String url);\n //@@author\n\n //=========== Model support for tag component =============================================================\n\n /** Removes the specific tag (from all persons with that tag) */\n void removeTag(Tag tags) throws DuplicatePersonException, PersonNotFoundException;\n\n /** Checks whether there exists a tag (with the same tagName) */\n boolean hasTag(Tag tag);\n\n //@@author yunpengn\n /** Changes the color of an existing tag (through TagColorManager) */\n void setTagColor(Tag tag, String color);\n\n //@@author\n\n\n\n //@@author junyango\n //=========== Model support for activity component =============================================================\n\n /** Adds an event */\n void addEvent(ReadOnlyEvent event) throws DuplicateEventException;\n\n /** Updates the given event */\n void updateEvent(ReadOnlyEvent target, ReadOnlyEvent editedEvent)\n throws DuplicateEventException, EventNotFoundException;\n /** Deletes the given event */\n void deleteEvent(ReadOnlyEvent target) throws EventNotFoundException;\n\n\n\n //@@author\n\n //@@author\n\n //=========== Filtered Person/Activity List support =============================================================\n\n /** Returns an unmodifiable view of the filtered person list */\n ObservableList<ReadOnlyPerson> getFilteredPersonList();\n\n /** Returns an unmodifiable view of the filtered event list */\n ObservableList<ReadOnlyEvent> getFilteredEventList();\n\n /** Updates the filter of the filtered person list to filter by the given {@code predicate}. */\n void updateFilteredPersonList(Predicate<ReadOnlyPerson> predicate);\n\n /** Updates the filter of the filtered event list to filter by the given {@code predicate}. */\n void updateFilteredEventsList(Predicate<ReadOnlyEvent> predicate);\n\n}", "@Override\r\n public BlogEntity toEntity() {\r\n BlogEntity entity = super.toEntity();\r\n if(cliente !=null) entity.setCliente(this.cliente.toEntity());\r\n if(evento !=null) entity.setEvento(this.evento.toEntity());\r\n \r\n return entity;\r\n }", "GraphQLEntityViewSupport() {\n this(null, null, null, null, null, null, null, null, null, null, null);\n }", "private int singleUpdateView(GenericEntity entity, ModelViewEntity modelViewEntity, List<ModelField> fieldsToSave, Connection connection) throws GenericEntityException {\n GenericDelegator delegator = entity.getDelegator();\n\n int retVal = 0;\n ModelEntity memberModelEntity = null;\n\n // Construct insert/update for each model entity\n Iterator<? extends Map.Entry<?, ModelViewEntity.ModelMemberEntity>> meIter = modelViewEntity.getMemberModelMemberEntities().entrySet().iterator();\n\n while (meIter != null && meIter.hasNext()) {\n Map.Entry<?, ModelViewEntity.ModelMemberEntity> meMapEntry = meIter.next();\n ModelViewEntity.ModelMemberEntity modelMemberEntity = meMapEntry.getValue();\n String meName = modelMemberEntity.getEntityName();\n String meAlias = modelMemberEntity.getEntityAlias();\n\n if (Debug.verboseOn())\n Debug.logVerbose(\"[singleUpdateView]: Processing MemberEntity \" + meName + \" with Alias \" + meAlias);\n try {\n memberModelEntity = delegator.getModelReader().getModelEntity(meName);\n } catch (GenericEntityException e) {\n throw new GenericEntityException(\"Failed to get model entity for \" + meName, e);\n }\n\n Map<String, Object> findByMap = new Hashtable<String, Object>();\n\n // Now iterate the ModelViewLinks to construct the \"WHERE\" part for update/insert\n Iterator<ModelViewEntity.ModelViewLink> linkIter = modelViewEntity.getViewLinksIterator();\n\n while (linkIter != null && linkIter.hasNext()) {\n ModelViewEntity.ModelViewLink modelViewLink = linkIter.next();\n\n if (modelViewLink.getEntityAlias().equals(meAlias) || modelViewLink.getRelEntityAlias().equals(meAlias)) {\n\n Iterator<ModelKeyMap> kmIter = modelViewLink.getKeyMapsIterator();\n\n while (kmIter != null && kmIter.hasNext()) {\n ModelKeyMap keyMap = kmIter.next();\n\n String fieldName = \"\";\n\n if (modelViewLink.getEntityAlias().equals(meAlias)) {\n fieldName = keyMap.getFieldName();\n } else {\n fieldName = keyMap.getRelFieldName();\n }\n\n if (Debug.verboseOn())\n Debug.logVerbose(\"[singleUpdateView]: --- Found field to set: \" + meAlias + \".\" + fieldName);\n Object value = null;\n\n if (modelViewEntity.isField(keyMap.getFieldName())) {\n value = entity.get(keyMap.getFieldName());\n if (Debug.verboseOn())\n Debug.logVerbose(\"[singleUpdateView]: --- Found map value: \" + value.toString());\n } else if (modelViewEntity.isField(keyMap.getRelFieldName())) {\n value = entity.get(keyMap.getRelFieldName());\n if (Debug.verboseOn())\n Debug.logVerbose(\"[singleUpdateView]: --- Found map value: \" + value.toString());\n } else {\n throw new GenericNotImplementedException(\"Update on view entities: no direct link found, unable to update\");\n }\n\n findByMap.put(fieldName, value);\n }\n }\n }\n\n // Look what there already is in the database\n List<GenericValue> meResult = null;\n\n try {\n meResult = delegator.findByAnd(meName, findByMap);\n } catch (GenericEntityException e) {\n throw new GenericEntityException(\"Error while retrieving partial results for entity member: \" + meName, e);\n }\n if (Debug.verboseOn())\n Debug.logVerbose(\"[singleUpdateView]: --- Found \" + meResult.size() + \" results for entity member \" + meName);\n\n // Got results 0 -> INSERT, 1 -> UPDATE, >1 -> View is nor updatable\n GenericValue meGenericValue = null;\n\n if (meResult.size() == 0) {\n // Create new value to insert\n try {\n // Create new value to store\n meGenericValue = delegator.makeValue(meName, findByMap);\n } catch (Exception e) {\n throw new GenericEntityException(\"Could not create new value for member entity\" + meName + \" of view \" + modelViewEntity.getEntityName(), e);\n }\n } else if (meResult.size() == 1) {\n // Update existing value\n meGenericValue = meResult.iterator().next();\n } else {\n throw new GenericEntityException(\"Found more than one result for member entity \" + meName + \" in view \" + modelViewEntity.getEntityName() + \" - this is no updatable view\");\n }\n\n // Construct fieldsToSave list for this member entity\n List<ModelField> meFieldsToSave = new Vector<ModelField>();\n Iterator<ModelField> fieldIter = fieldsToSave.iterator();\n\n while (fieldIter != null && fieldIter.hasNext()) {\n ModelField modelField = fieldIter.next();\n\n if (memberModelEntity.isField(modelField.getName())) {\n ModelField meModelField = memberModelEntity.getField(modelField.getName());\n\n if (meModelField != null) {\n meGenericValue.set(meModelField.getName(), entity.get(modelField.getName()));\n meFieldsToSave.add(meModelField);\n if (Debug.verboseOn())\n Debug.logVerbose(\"[singleUpdateView]: --- Added field to save: \" + meModelField.getName() + \" with value \" + meGenericValue.get(meModelField.getName()));\n } else {\n throw new GenericEntityException(\"Could not get field \" + modelField.getName() + \" from model entity \" + memberModelEntity.getEntityName());\n }\n }\n }\n\n /*\n * Finally, do the insert/update\n * TODO:\n * Do the real inserts/updates outside the memberEntity-loop,\n * only if all of the found member entities are updatable.\n * This avoids partial creation of member entities, which would mean data inconsistency:\n * If not all member entities can be updated, then none should be updated\n */\n if (meResult.size() == 0) {\n retVal += singleInsert(meGenericValue, memberModelEntity, memberModelEntity.getFieldsCopy(), connection);\n } else {\n if (meFieldsToSave.size() > 0) {\n retVal += singleUpdate(meGenericValue, memberModelEntity, meFieldsToSave, connection, null);\n } else {\n if (Debug.verboseOn())\n Debug.logVerbose(\"[singleUpdateView]: No update on member entity \" + memberModelEntity.getEntityName() + \" needed\");\n }\n }\n }\n\n return retVal;\n }", "@Test\n\tpublic void testNotRestricted() throws Exception {\n\t\titemService.findById(1L);\n\t}", "public abstract V getEntity();", "List<IViewEntity> getEntities();", "public Saver saveWithoutBackup() {\n return new AugmentedSaver() {\n @Override\n protected void handleSave(Iterable<?> entities) {\n checkProhibitedAnnotations(entities, VirtualEntity.class);\n }\n };\n }", "public void preDoRetrieve(T entity)\n {\n }", "@Override\n\tpublic Class<E> getEntityClass() {\n\t\treturn null;\n\t}", "public interface EntityViewManager {\n\n /**\n * Returns the metamodel for this entity view manager.\n *\n * @return The metamodel for this entity view manager\n */\n public ViewMetamodel getMetamodel();\n\n /**\n * Applies the entity view setting to the given criteria builder.\n *\n * @param setting The setting that should be applied\n * @param criteriaBuilder The criteria builder on which the setting should be applied\n * @param <T> The type of the entity view\n * @param <Q> {@linkplain PaginatedCriteriaBuilder} if paginated, {@linkplain CriteriaBuilder} otherwise\n * @return {@linkplain PaginatedCriteriaBuilder} if paginated,\n * {@linkplain CriteriaBuilder} otherwise\n */\n public <T, Q extends QueryBuilder<T, Q>> Q applySetting(EntityViewSetting<T, Q> setting, CriteriaBuilder<?> criteriaBuilder);\n\n /**\n * Applies an object builder for the given entity view class to the given {@link PaginatedCriteriaBuilder}\n *\n * @param <T> The type of the entity view class\n * @param clazz The entity view class\n * @param criteriaBuilder The criteria build on which the object build should be applied to\n * @return A paginated criteria builder with an object builder applied\n */\n public <T> PaginatedCriteriaBuilder<T> applyObjectBuilder(Class<T> clazz, PaginatedCriteriaBuilder<?> criteriaBuilder);\n\n /**\n * Applies an object builder for the given entity view class to the given {@link CriteriaBuilder}\n *\n * @param <T> The type of the entity view class\n * @param clazz The entity view class\n * @param criteriaBuilder The criteria build on which the object build should be applied to\n * @return A paginated criteria builder with an object builder applied\n */\n public <T> CriteriaBuilder<T> applyObjectBuilder(Class<T> clazz, CriteriaBuilder<?> criteriaBuilder);\n\n /**\n * Applies an object builder for the given entity view class and the given mapping constructor name to the given {@link PaginatedCriteriaBuilder}\n *\n * @param <T> The type of the entity view class\n * @param clazz The entity view class\n * @param mappingConstructorName The name of the constructor that should be used in the object builder\n * @param criteriaBuilder The criteria build on which the object build should be applied to\n * @return A paginated criteria builder with an object builder applied\n */\n public <T> PaginatedCriteriaBuilder<T> applyObjectBuilder(Class<T> clazz, String mappingConstructorName, PaginatedCriteriaBuilder<?> criteriaBuilder);\n\n /**\n * Applies an object builder for the given entity view class and the given mapping constructor name to the given {@link CriteriaBuilder}\n *\n * @param <T> The type of the entity view class\n * @param clazz The entity view class\n * @param mappingConstructorName The name of the constructor that should be used in the object builder\n * @param criteriaBuilder The criteria build on which the object build should be applied to\n * @return A paginated criteria builder with an object builder applied\n */\n public <T> CriteriaBuilder<T> applyObjectBuilder(Class<T> clazz, String mappingConstructorName, CriteriaBuilder<?> criteriaBuilder);\n}", "public abstract P toEntity();", "@Override\n public void loadEntityDetails() {\n \tsuper.loadEntityDetails();\n }", "@Override\n\tpublic void setModel(TenantsEntity model) {\n\t\t\n\t}", "@PrePersist @Restrict\n public void prePersist() {}", "@Override\n\tpublic Class<?> getEntityClass() {\n\t\treturn null;\n\t}", "protected abstract Serializable getEntity();", "@Test\n public void newInstanceHasNoPrimaryKey() {\n TdPicture model = new TdPicture();\n assertFalse(model.isIdSet());\n }", "@Override\n protected void preconditions(Object entity) throws Exception {\n }", "@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}", "@Exclude\n public abstract void save();", "@ModelEntity\n\tpublic static interface ModelObject {\n\n\t\tpublic static final String CHILDREN = \"children\";\n\t\tpublic static final String PARENT = \"parent\";\n\n\t\t@Getter(value = PARENT, inverse = CHILDREN)\n\t\tpublic ModelObject getParent();\n\n\t\t@Setter(PARENT)\n\t\tpublic void setParent(ModelObject parent);\n\n\t\t@Getter(value = CHILDREN, cardinality = Cardinality.LIST, inverse = PARENT)\n\t\tpublic List<ModelObject> getChildren();\n\n\t\t@Setter(CHILDREN)\n\t\tpublic void setChildren(List<ModelObject> children);\n\n\t\t@Adder(CHILDREN)\n\t\tpublic void addToChildren(ModelObject child);\n\n\t\t@Remover(CHILDREN)\n\t\tpublic void removeFromChildren(ModelObject child);\n\t}", "@Override\r\n\tpublic Object getModel() {\n\t\treturn null;\r\n\t}", "protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}", "@ApiStatus.Internal\n default boolean isMappable() {\n \n return false;\n }", "@Override\n\tpublic boolean shouldSkipField(FieldAttributes classe) {\n\t\t\n\t\tfinal Expose expose = classe.getAnnotation(Expose.class);\n return expose != null && !expose.serialize();\n\t\t\n/*\t\tString className = classe.getDeclaringClass().getName();\n\t\tString fieldName = classe.getName();\n\t\t\n\t\t\t\n\t\t\n\t\treturn \n\t className.equals(Produto.class.getName())\n\t && (fieldName.equals(\"versoes\") || fieldName.equals(\"clientes\"));*/\n\t}", "public boolean isPersistenceCapable(Object object)\n{\n\treturn true;\n}", "protected abstract boolean keepEntities(boolean attribute);", "public E getEntity();", "public Vector<HibernateEntity> getEntitiesAllowedAsParent() {\n\t\tVector<HibernateEntity> result = new Vector<HibernateEntity>();\n\t\tfor (HibernateEntity entity : getHibernateModel().getEntities()) {\n\t\t\tif (entity != this && entity.getFather() == null) {\n\t\t\t\tresult.add(entity);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n protected void commitView(ViewImpl view)\n {\n boolean oldValue = view.setAllowHiddenEntities( true );\n\n ObjectInstance oi = view.getObjectInstance();\n\n // TODO: implement optimistic locking check.\n\n EntityInstanceImpl lastEntityInstance = oi.getLastEntityInstance();\n\n commitExcludes( view, oi, lastEntityInstance );\n commitDeletes( view, oi, lastEntityInstance );\n commitIncludes( view, oi );\n commitUpdates( view, oi );\n\n view.setAllowHiddenEntities( oldValue );\n }", "@Test\n public void getViajeroTest() {\n ViajeroEntity entity = data.get(0);\n ViajeroEntity newEntity = vp.find(entity.getId());\n Assert.assertNotNull(newEntity);\n Assert.assertEquals(entity.getId(), newEntity.getId());\n }", "EntityType getEntity();", "private Permit saveToPermitObject() {\n\n\n\n return null;\n\n }", "protected void prepareEntityToNodeMap()\r\n\t{\n\t}", "protected abstract void showEditedEntity(Entity e);", "public interface OwnedModel {\n\n\t/**\n\t * Returns the owner id.\n\t * \n\t * @return {@link String}. Can be {@code null}.\n\t */\n\tpublic String getOwnerId();\n\n}", "protected void entityInit() {}", "@Override\n public boolean insertjsonobject(ModelPerson person) {\n return false;\n }", "public void generate(Object entity, Context ormContext) throws AAException;", "@Override\n public boolean hasEntityShapes() { return true; }", "public interface DinaEntity {\n\n Integer getId();\n\n UUID getUuid();\n\n /**\n * The group represents the group owning the entity. group is optional and null\n * is return if an entity doesn't support it.\n *\n * @return the name of the group or null\n */\n default String getGroup() {\n return null;\n }\n\n /**\n * Is the entity considered publicly releasable?\n * Optional.empty() means inapplicable or unknown and needs to be interpreted by the caller.\n *\n * @return Optional with the isPubliclyReleasable flag or Optional.empty() if inapplicable or unknown\n */\n default Optional<Boolean> isPubliclyReleasable() {\n return Optional.empty();\n }\n\n String getCreatedBy();\n\n OffsetDateTime getCreatedOn();\n\n}", "@Override\n public boolean isDisableMetadataField() {\n return false;\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingNonPersistentFields() {\n }", "public CopyEntityAttributes()\n\t{\n\t\tsetMandatory(ENTITY_PARAM, COPY_MODE);\n\t}", "public interface JPAEdmComplexTypeView extends JPAEdmBaseView {\n\n /**\n * The method returns an EDM complex type that is currently being processed.\n * \n * @return an instance of type {@link org.apache.olingo.odata2.api.edm.provider.ComplexType}\n */\n public ComplexType getEdmComplexType();\n\n /**\n * The method returns an JPA embeddable type that is currently being\n * processed.\n * \n * @return an instance of type {@link javax.persistence.metamodel.EmbeddableType}\n */\n public javax.persistence.metamodel.EmbeddableType<?> getJPAEmbeddableType();\n\n /**\n * The method returns a consistent list of EDM complex types.\n * \n * @return a list of {@link org.apache.olingo.odata2.api.edm.provider.ComplexType}\n */\n public List<ComplexType> getConsistentEdmComplexTypes();\n\n /**\n * The method searches for the EDM complex type with in the container for\n * the given JPA embeddable type name.\n * \n * @param embeddableTypeName\n * is the name of JPA embeddable type\n * @return a reference to EDM complex type if found else null\n */\n public ComplexType searchEdmComplexType(String embeddableTypeName);\n\n /**\n * The method add a JPA EDM complex type view to the container.\n * \n * @param view\n * @param isReferencedInKey\n * is the complex type referenced in an Entity as a key property\n * is an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmComplexTypeView}\n */\n public void addJPAEdmCompleTypeView(JPAEdmComplexTypeView view);\n\n /**\n * The method searches for the EDM complex type with in the container for\n * the given EDM complex type's fully qualified name.\n * \n * @param type\n * is the fully qualified name of EDM complex type\n * @return a reference to EDM complex type if found else null\n */\n public ComplexType searchEdmComplexType(FullQualifiedName type);\n\n /**\n * The method expands the given EDM complex type into a list of EDM simple\n * properties.\n * \n * @param complexType\n * is the EDM complex type to expand\n * @param expandedPropertyList\n * is the list to be populated with expanded EDM simple\n * properties\n * @param embeddablePropertyName\n * is the name of the complex property. The name is used as the\n * qualifier for the expanded simple property names.\n */\n public void expandEdmComplexType(ComplexType complexType, List<Property> expandedPropertyList,\n String embeddablePropertyName);\n\n /**\n * The method checks if the given EDM complex type is referenced as a Key property in any Entity\n * @param complexTypeName\n * EDM complex type name\n * @return\n * <ul><li><b>true</b> : if the complex type is referenced as an entity's key property</li>\n * <li><b>false</b> : if the complex type is not referenced as an entity's key property</li>\n * </ul>\n * \n */\n public boolean isReferencedInKey(String complexTypeName);\n\n /**\n * The method sets the given EDM complex type as referenced in an Entity as a key property\n * @param complexTypeName\n * EDM complex Type name\n */\n public void setReferencedInKey(String complexTypeName);\n\n}", "@Override\n\tpublic Object getModel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object getModel() {\n\t\treturn null;\n\t}", "@Override\n\tprotected void cutOffLazyCollections(Direction entity) {\n\t}", "@Override\n\tpublic String entityClassName() {\n\t\treturn null;\n\t}", "@Override\r\n public void testGettingEntityManager() { debug(\"overriddenTestGettingEntityManager - noop\"); }", "private void checkModels()\n {\n if (myDataType != null)\n {\n SpecialKey specialKey = myDataType.getMetaDataInfo().getSpecialTypeForKey(myField.get());\n if (specialKey instanceof TimeKey)\n {\n if (!(myCriterionValue instanceof DateModel))\n {\n switchValueModels(DateModel.class);\n }\n }\n else\n {\n if (myCriterionValue instanceof DateModel)\n {\n switchValueModels(GhostTextModel.class);\n }\n }\n }\n }", "public ModelBean provideModel();", "boolean canRender(IModel model, Entity entity);", "public sealed interface EntityMapper<D, E>permits CarMapper,\n ModelMapper, ModelOptionMapper, PricingClassMapper, UserInfoMapper,\n TownMapper, AddressMapper, RoleMapper, BookingMapper, RentMapper {\n\n E toEntity(D dto);\n\n D toDto(E entity);\n\n Collection<E> toEntity(Collection<D> dtoList);\n\n Collection<D> toDto(Collection<E> entityList);\n\n @Named(\"partialUpdate\")\n @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)\n void partialUpdate(@MappingTarget E entity, D dto);\n}", "protected abstract TransactionalEditingDomain getEditingDomain();", "public ZEntity getEntity() {\r\n return entity;\r\n }", "public void preDoSave(T entity)\n {\n }", "public default boolean isAffectingEntity(SpellData dataIn, LivingEntity entityIn){ return false;}", "@Override\n public void update(EntityModel model) {\n super.update(model);\n\n }", "protected T getEntity() {\r\n\t\treturn entity;\r\n\t}", "List<IViewEntity> getConstraintEntities();", "public interface EHR_Entity extends Data_Entity {\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#agent_id\r\n String getAgent_id();\r\n\r\n RDFProperty getAgent_idProperty();\r\n\r\n boolean hasAgent_id();\r\n\r\n void setAgent_id(String newAgent_id);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#object_ids\r\n Collection getObject_ids();\r\n\r\n RDFProperty getObject_idsProperty();\r\n\r\n boolean hasObject_ids();\r\n\r\n Iterator listObject_ids();\r\n\r\n void addObject_ids(String newObject_ids);\r\n\r\n void removeObject_ids(String oldObject_ids);\r\n\r\n void setObject_ids(Collection newObject_ids);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#type\r\n String getType();\r\n\r\n RDFProperty getTypeProperty();\r\n\r\n boolean hasType();\r\n\r\n void setType(String newType);\r\n}", "public interface EditViewHandler<T extends DomainObject> extends Serializable {\n\t\n\t/**\n\t * Saves the data in the back-end.\n\t * \n\t * @param entity Object containing the data to be saved in the back-end\n\t * @param editMode Indicates whether the operation is an update or not\n\t * \n\t * @throws PersistenceException if the operation could not be processed in the back-end\n\t */\n\tvoid save(T entity, boolean editMode) throws PersistenceException;\n\t\n\t/**\n\t * Cancels the operation of either an record update or creation\n\t * \n\t * @param entity The entity being edited when the operation is cancelled.\n\t * @param editMode Indicates whether the operation is an update or creation\n\t */\n\tvoid cancel(T entity, boolean editMode);\n\t\n\t/**\n\t * Defines the view to be managed and presented by the view handler.\n\t * \n\t * @param view The view to present data processed by the handler\n\t */\n\tvoid setView(PopupView<T> view);\n\t\n\t/**\n\t * Registers a handler to track changes performed in a given entity. \n\t * \n\t * @param changeListener The object to be defined as the change handler\n\t */\n\tvoid setChangeListener(EntityChangeListener<T> changeListener);\n}", "void makeTransient(T entity);", "public interface Entity {\n}", "@Override\n public boolean isValidEntity(Entity entity, IGame game, \n boolean useValidNonInfantryCheck) {\n return super.isValidEntity(entity, game, useValidNonInfantryCheck)\n && (entity.getId() == entityId);\n }", "E mapToEntity(D dto);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "@Override\n public boolean isObject() {\n return false;\n }", "Collection<T> getSimpleModelObjects();", "@objid (\"0fc4a30a-9083-11e1-81e9-001ec947ccaf\")\npublic interface IModel {\n @objid (\"158ef48a-aed6-4746-a113-8d9f740481b4\")\n public static final IMObjectFilter ISVALID = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) {\n\t\t\treturn obj != null && obj.isValid();\n\t\t}\n\t};\n\n @objid (\"899f8ec3-25d4-4441-b499-c889c4e125a7\")\n public static final IMObjectFilter NOSHELL = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) {\n\t\t\treturn obj != null && ! obj.isShell();\n\t\t}\n\t};\n\n @objid (\"f85615e6-6ad2-4a7a-9784-cf8d466faa65\")\n public static final IMObjectFilter NODELETED = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) { \n\t\t\treturn obj != null && ! obj.isDeleted();\n\t\t}\n\t};\n\n /**\n * Find elements by a metaclass an an attribute value.\n * @param cls the metaclass.\n * @param att the attribute to search\n * @param val the attribute value\n * @return the found elements.\n */\n @objid (\"17c23aa0-9083-11e1-81e9-001ec947ccaf\")\n Collection<? extends MObject> findByAtt(MClass cls, final String att, Object val, IMObjectFilter filter);\n\n /**\n * Get all elements of a given class and the class descendants.\n * @param cls a metaclass.\n * @return all elements of this class.\n */\n @objid (\"17c23aa1-9083-11e1-81e9-001ec947ccaf\")\n Collection<? extends MObject> findByClass(MClass cls, IMObjectFilter filter);\n\n /**\n * Find an element from its MClass and its identifier.\n * @param cls a metaclass\n * @param siteIdentifier an UUID\n * @return the found element or <code>null</code>.\n */\n @objid (\"17c23aa2-9083-11e1-81e9-001ec947ccaf\")\n MObject findById(MClass cls, final UUID siteIdentifier, IMObjectFilter filter);\n\n /**\n * Find an element from a reference.\n * @param ref an element reference\n * @return the found element or <code>null</code>.\n * @throws org.modelio.vcore.session.UnknownMetaclassException if the referenced metaclass does not exist.\n */\n @objid (\"10a41285-16e7-11e2-b24b-001ec947ccaf\")\n MObject findByRef(MRef ref, IMObjectFilter filter) throws UnknownMetaclassException;\n\n /**\n * Get the generic factory.\n * @return the generic factory.\n */\n @objid (\"0078ca26-5a20-10c8-842f-001ec947cd2a\")\n GenericFactory getGenericFactory();\n\n @objid (\"00955b82-61a5-10c8-842f-001ec947cd2a\")\n Collection<? extends MObject> findByClass(MClass cls);\n\n @objid (\"0096d304-61a5-10c8-842f-001ec947cd2a\")\n Collection<? extends MObject> findByAtt(MClass cls, final String att, Object val);\n\n @objid (\"009711de-61a5-10c8-842f-001ec947cd2a\")\n MObject findById(MClass cls, final UUID siteIdentifier);\n\n @objid (\"33fb2113-b8a3-4b3b-95ed-3481c65d2881\")\n MObject findByRef(MRef ref) throws UnknownMetaclassException;\n\n @objid (\"261fe5dc-cfbf-40ee-886d-fc3c529c0e47\")\n <T extends MObject> Collection<T> findByClass(Class<T> metaclass, IMObjectFilter filter);\n\n @objid (\"e46abe41-187e-4d12-b565-c9e92df02519\")\n <T extends MObject> Collection<T> findByAtt(Class<T> metaclass, final String att, Object val, IMObjectFilter filter);\n\n @objid (\"83ef71a2-04ef-4e59-bf55-2bffe3069024\")\n <T extends MObject> T findById(Class<T> metaclass, final UUID siteIdentifier, IMObjectFilter filter);\n\n @objid (\"610f2f86-624b-469c-9c0c-6bf78147fba1\")\n <T extends MObject> Collection<T> findByClass(Class<T> metaclass);\n\n @objid (\"1540131b-bdd6-466c-a417-9e0efd220dda\")\n <T extends MObject> Collection<T> findByAtt(Class<T> metaclass, final String att, Object val);\n\n @objid (\"1b63d157-9858-4691-8636-7c625e97c65e\")\n <T extends MObject> T findById(Class<T> metaclass, final UUID siteIdentifier);\n\n}", "@Override\n\tpublic CalEntity getModel() {\n\t\treturn model;\n\t}", "EntityData<?> getEntityData();", "@Override\n public D entityToDTO( final E entity )\n {\n //final String methodName = \"cachedDataToDTO\";\n //logMethodBegin( methodName, entity );\n Objects.requireNonNull( entity, \"entity argument cannot be null\" );\n D dto = super.entityToDTO( entity );\n /*\n * I think this is a good use of instanceof...although I am not convinced, I'll have to think about this...\n * If any stock DTO is a stock company container, it will be populated automatically with the stock company\n * information. No need for any sub cvl\n *\n * NEED TO SERIOUSLY THINK ABOUT A BETTER SOLUTION HERE....5/9/2017 Mike.\n *\n * Need to develop some sort of \"conversion\" registration so that subclasses can register \"converters\" to be\n * run on entity.\n *\n /*\n * StockPriceQuoteContainers contain everything in a StockPriceContainer so get that instead\n */\n /*\n if ( dto instanceof StockQuoteDTOContainer )\n {\n this.stockQuoteEntityService\n .setQuoteInformation( dto );\n }\n */\n /*\n * The quote contains the company name\n */\n /*\n else if ( dto instanceof StockCompanyEntityContainer )\n {\n this.stockCompanyEntityService\n .setCompanyInformation( (StockCompanyDTOContainer) dto );\n }\n if ( dto instanceof StockPriceQuoteDTOContainer )\n {\n this.stockPriceQuoteService\n .setStockPriceQuote( dto, ASYNCHRONOUS );\n }\n */\n\n /*\n * Convert the UUID to a string and get the notes source name for the UUID\n */\n if ( entity instanceof NotesSourceUuidContainer &&\n dto instanceof NotesSourceIdContainer )\n {\n final NotesSourceUuidContainer notesSourceUuidContainer = (NotesSourceUuidContainer)entity;\n if ( notesSourceUuidContainer.getNotesSourceEntity().isPresent() )\n {\n final NotesSourceIdContainer notesSourceIdContainer = (NotesSourceIdContainer)dto;\n final StockNoteSourceEntity stockNoteSourceEntity = notesSourceUuidContainer.getNotesSourceEntity().get();\n notesSourceIdContainer.setNotesSourceName( stockNoteSourceEntity.getName() );\n notesSourceIdContainer.setNotesSourceId( stockNoteSourceEntity.getUuid().toString() );\n }\n }\n\n if ( dto instanceof TagsContainer )\n {\n final TagsContainer tagsContainer = (TagsContainer)dto;\n tagsContainer.setTags( this.stockTagService.findStockTags( UUIDUtil.uuid( tagsContainer.getCustomerId() ),\n StockTagEntity.StockTagReferenceType.STOCK_TO_BUY,\n UUIDUtil.uuid( tagsContainer.getEntityId() ) ) );\n }\n //logMethodEnd( methodName, dto );\n return dto;\n }", "public boolean hasModel() {\n return false;\r\n }", "@Override\n protected Class<LineEntity> getEntityClass() {\n return null;\n }" ]
[ "0.6614222", "0.61538786", "0.5648632", "0.56089944", "0.5599456", "0.55884653", "0.55849725", "0.5583739", "0.5570995", "0.5556187", "0.55396247", "0.5532778", "0.5494008", "0.54608285", "0.5452658", "0.54482746", "0.5424289", "0.5381088", "0.53808", "0.5352147", "0.5321035", "0.53131276", "0.5284971", "0.5266834", "0.5258478", "0.5256405", "0.52416176", "0.52330786", "0.5205609", "0.5203439", "0.51790726", "0.51712316", "0.5164654", "0.51633394", "0.5152433", "0.51464164", "0.5127998", "0.5127906", "0.5126073", "0.5120078", "0.5113715", "0.511113", "0.5107946", "0.51007557", "0.5096098", "0.5085459", "0.5081997", "0.5073193", "0.5065236", "0.50631475", "0.5056012", "0.50484324", "0.50474393", "0.5044725", "0.5044169", "0.50399303", "0.503592", "0.50312245", "0.502872", "0.5023141", "0.50231016", "0.50224453", "0.50153834", "0.5009113", "0.49856883", "0.49839407", "0.49827805", "0.49819577", "0.49814034", "0.49792883", "0.49785417", "0.49785417", "0.49758747", "0.4974043", "0.49739495", "0.49656293", "0.49638864", "0.49604425", "0.49601367", "0.4953917", "0.49511963", "0.4940221", "0.49391788", "0.4935896", "0.49331406", "0.49274585", "0.492594", "0.4916545", "0.49111158", "0.490267", "0.48997125", "0.4897995", "0.48970383", "0.4890512", "0.48822242", "0.48788914", "0.48773137", "0.4873945", "0.48730347", "0.48691466", "0.48677608" ]
0.0
-1
Create an empty linked list
public static void main(String[] args) { LinkedList<String> l_list=new LinkedList<String>(); // use add() method to add values in the linked list l_list.add("Elsa"); l_list.add("Anna"); l_list.add("Olaf"); l_list.add("Kristoff"); l_list.add("Sven"); // print the list System.out.println("The linked list : "+l_list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LinkedList createEmpty(){\n return new LinkedList();\n }", "public linkedList() { // constructs an initially empty list\r\n\r\n }", "public LinkedList()\n\t{\n\t\tthis.head = new Node(null);\n\t\tsize = 0;\n\t}", "public MyLinkedList() {\n this.size = 0;\n this.head = new ListNode(0);\n }", "public LinkedList() {\n\t\thead = new Node(null, null);\n\t\tsize = 0;\n\t\titerator = null;\n\t}", "public LinkedListDemo() {\n\t\tlength = 0;\n\t\thead = new ListNode();\n\t\n\t}", "public LinkedList() {\n\t\titems = lastNode = new DblListnode<E>(null);\n\t\tnumItems=0;\n\t}", "public LinkedList() {\n\t\thead = null;\n\t\tsize = 0;\n\t}", "public LinkList() {\n this.head = null;\n this.tail = null;\n }", "public List() {\n\t\tthis.head = null; \n\t}", "public Lista()\n {\n empty=true;\n next = null;\n }", "public LinkedList() {\n this.head = null;\n this.tail = null;\n }", "public DLList() {\n head = null;\n tail = null;\n }", "public MyLinkedList() {\n dummyHead = new Node();\n size = 0;\n }", "public MyLinkedList() {\n size = 0;\n head = null;\n tail = null;\n }", "public SkipListNode() {\n\t// construct a dummy node\n\tdata = null;\n\tnext = new ArrayList<SkipListNode<K>>();\n\tnext.add(null);\n }", "public LinkedList(){\n this.head = null;\n this.numNodes = 0;\n }", "public LinkedList() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t}", "public SLList()\n {\n head = tail = null;\n }", "public LinkedList() {\r\n front = new ListNode(null);\r\n back = new ListNode(null, front, null);\r\n front.next = back;\r\n size = 0;\r\n }", "public LinkedList() {\n head = null;\n numElement = 0;\n }", "public MyLinkedList() {\n \thead = null;\n \ttail = null;\n }", "public LinkedList()\n\t{\n\t\thead = null;\n\t}", "public LinkedLists() {\n }", "public LinkedList()\r\n {\r\n head = null;\r\n tail = null;\r\n }", "public LinkedList () {\n\t\thead = null;\n\t\tcount = 0;\n\t}", "public LinkedList()\n {\n head = null;\n tail = null;\n }", "public LinkedList() \n\t{\n\t\thead = null;\n\t\ttail = head;\n\t}", "public LinkedList () {\n\t\tMemoryBlock dummy;\n\t\tdummy = new MemoryBlock(0,0);\n\t\ttail = new Node(dummy);\n\t\tdummy = new MemoryBlock(0,0);\n\t\thead = new Node(dummy);\n\t\ttail.next = head;\n\t\thead.previous = tail;\n\t\tsize = 2;\n\t}", "public CircularlyLinkedList() { }", "public LinkedList(){\n\t\thead = null;\n\t\ttail = null;\n\t}", "public LinkedList() {\n\t\tfirst = null;\n\t}", "public MyLinkedList()\n {\n head = new Node(null, null, tail);\n tail = new Node(null, head, null);\n }", "public LinkedList(){\n this.size = 0;\n first = null;\n last = null;\n }", "public MyLinkedList() {\r\n // when the linked list is created head will refer to null\r\n head = null;\r\n }", "public LinkedList() {\n\t\tthis(\"list\");\n\t}", "public MyLinkedList() {\n first = null;\n n = 0;\n }", "public DoublyLinkedList() \r\n {\r\n sentinel = new Node<T>(null,null,null);\r\n sentinel.next = sentinel.prev = sentinel;\r\n size = 0;\r\n }", "public MyLinkedList() {\n length = 0;\n }", "public ListADTImpl() {\r\n head = new GenericEmptyNode();\r\n }", "public LL() {\n head = null;\n }", "@Test\r\n public void test_nonEmptyList_newNodePointsToNull()\r\n {\r\n System.out.println(\"> Test5 - test_nonEmptyList_newNodePointsToNull(): new node should point to null\");\r\n int obj = 7;\r\n System.out.print(\"creating a non-empty list with an arbitrary number of nodes...\");\r\n int[] a = {0, 0, 0, 0, 0};\r\n LinkedList instance = new LinkedList(a);\r\n // get to and mark end of list\r\n ListNode current = instance.getHead();\r\n int nodesInList = a.length;\r\n for (int i = 1; i < nodesInList; i++)\r\n current = current.getLink();\r\n System.out.println(\"inserting a new node at end of non-empty list...\");\r\n instance.addLast(obj);\r\n // test node insertion\r\n assertNull(\"new node does not point to null\", current.getLink().getLink());\r\n System.out.println(\"As expected, new node points to null\");\r\n }", "private void init() {\r\n head = new DLList.Node<T>(null);\r\n head.setNext(tail);\r\n tail = new DLList.Node<T>(null);\r\n tail.setPrevious(head);\r\n size = 0;\r\n }", "public SingleLinkedList() {\r\n start = null;\r\n System.out.println(\"A List Object was created\");\r\n }", "public LinkedList(){\n size=0;\n }", "public LinkedList() {\n size = 0;\n head = new DoublyLinkedNode<E>(null);\n tail = new DoublyLinkedNode<E>(null);\n\n head.setNext(tail);\n tail.setPrevious(head);\n }", "public static <T> LinkedList<T> createLinkedList() {\n \t\treturn new LinkedList<T>();\n \t}", "@Test\r\n public void test_emptyList_newNodePointsToNull()\r\n {\r\n System.out.println(\"> Test2 - test_emptyList_newNodePointsToNull(): new node should point to null\");\r\n int obj = 7;\r\n System.out.print(\"creating an empty list...\");\r\n LinkedList instance = new LinkedList();\r\n System.out.println(\"inserting a new node at end of empty list...\");\r\n instance.addLast(obj);\r\n // test node insertion\r\n assertNull(\"new node does not point to null\", instance.getHead().getLink());\r\n System.out.println(\"As expected, new node successfully points to null\");\r\n }", "public WordLinkedList() {\r\n\r\n head = new Node(null, null);\r\n listSize = 0;\r\n //constructor for a dummy node with nothing in the linked list\r\n\r\n }", "public ListNode() {\n\t\tthis(0, null);\n\t}", "public MySinglyLinkedList() { }", "@Override\n public void makeEmpty() {\n this.head = null;\n this.tail = null;\n }", "PublicLinkedList() {\n\t\tfront = back = null;\n\t}", "public void makeEmpty() {\n System.out.println(\"List is now empty\");\n head = null;\n tail = null;\n\n }", "public LinkedListDemo() {\r\n }", "public DesignLinkedList() {\n head = null;\n tail = head;\n len = 0;\n }", "public LinkedList()\r\n {\r\n front = null;\r\n rear = null;\r\n numElements = 0;\r\n }", "public SingleLinkedList()\n {\n head = null;\n tail = null;\n size=0;\n }", "public GenLinkedList() {\r\n\t\thead = curr = prev = null;\r\n\t}", "public MyLinkedList() \n\t{\n\t\t\n\t}", "public UtillLinkList() {\n\t\tlist = new LinkedList<String>();\n\t}", "public SLL() {\n\t\tsuper();\n\t\tthis.head = null;\n\t\tthis.size = 0;\n\t}", "public DLList() {\r\n init();\r\n }", "private static ListNode initializeListNode() {\n\n\t\tRandom rand = new Random();\n\t\tListNode result = new ListNode(rand.nextInt(10)+1);\n\t\t\n\t\tresult.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next.next.next = new ListNode(rand.nextInt(10)+1);\n\t\t\n\t\treturn result;\n\t}", "public LinkedList()\n { \n first = null;\n \n }", "public ObjectListNode() {\n info = null;\n next = null;\n }", "public CustomSinglyLinkedList()\n {\n head = null;\n tail = head;\n size = 0;\n }", "public SinglyLinkedList() {\n this.head = null; \n }", "public LinkedListGeneric() {\n head = null;\n }", "public SortedLinkedList() {\n\t\thead = null;\n\t}", "public CircularLinkedList() {\n head = new Node();\n head.next = head;\n size = 0;\n }", "public SinglyLinkedList() {\n this.head = null;\n this.tail = null;\n this.size = 0;\n }", "public CLinkedList() {\n \tthis.sentinel = new Node();\n \tthis.sentinel.succ = sentinel;\n \tthis.sentinel.pred = sentinel;\n \tthis.size = 0;\n }", "public LinkedList(){\n count = 0;\n front = rear = null;\n }", "public CircularLinkedList()\n {\n current = null;\n size = 0;\n }", "SkipList()\r\n {\r\n head = new Node<T>(1); //Create a new head of our skip list and give it height 1.\r\n }", "public SinglyLinkedList() {\n this.len = 0;\n }", "public ListNode createList(int len) {\r\n\t\tListNode head = null;\r\n\t\tRandom r = new Random(10);\r\n\t\tfor (int i = 0; i < len; ++i) {\r\n\r\n\t\t\thead = createNode(head, r.nextInt(20) + 1);\r\n\t\t}\r\n\r\n\t\treturn head;\r\n\t}", "public DLListIterator() {\r\n node = head;\r\n nextCalled = false;\r\n }", "public WCLinkedList(){\n size=0;\n head = null;\n tail = null;\n }", "private void createNodes() {\n head = new ListNode(30);\n ListNode l2 = new ListNode(40);\n ListNode l3 = new ListNode(50);\n head.next = l2;\n l2.next = l3;\n }", "public Stack()\n {\n ll = new LinkedList<>();\n }", "DListNode() {\n item[0] = 0;\n item[1] = 0;\n item[2] = 0;\n prev = null;\n next = null;\n }", "public SinglyLinkedList()\n {\n first = null; \n last = null;\n }", "public MyDoublyLinkedList() {\n head.data = null;\n head.next = tail;\n tail.data = null;\n tail.prev = head;\n }", "public CircularDoublyLinkedList() {\r\n\t\tnumItems = 0;\r\n\r\n\t\t// create a dummy head node\r\n\t\thead = new DoublyNode(null);\r\n\t\thead.setPrev(head);\r\n\t\thead.setNext(head);\r\n\t}", "public LinkedListStructureofaSinglyLinkedListClass() {\n\t\theadNode=null;\n\t\tsize=0;\n\t\t\n\t}", "public SinglyLinkedList(){\n this.first = null;\n }", "public TreeList()\n {\n\t this.lst = new AVLTree();\n\t this.length = 0;\n }", "public DoublyLinkedList() {\r\n\t\tinitializeDataFields();\r\n\t}", "public DoublyLinkedList(){\r\n\r\n\t\thead = null;\r\n\t\ttail = null;\r\n\t\tcount = 0;\r\n\t}", "public void testEmptyList() {\n SortedLinkedList s = new SortedLinkedList();\n assertEquals(s.getName(0), null);\n assertEquals(s.getQuantity(0), -1);\n assertEquals(s.length(), 0);\n assertTrue(s.isMember(null)); \n }", "myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}", "public List()\n\t{\n\t\tthis(null, null);\n\t}", "public Linked_list() {\n pre = new Node();\n post = new Node();\n pre.next = post;\n post.prev = pre;\n }", "public LinkedJList() {\n this(DEFAULT_CAPACITY);\n }", "public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }", "public MovieList() {\r\n\t\thead = null;\r\n\t\ttail = null;\r\n\t\tsize = 0;\r\n\t}", "public ListReferenceBased() {\r\n\t numItems = 0; // declares numItems is 0\r\n\t head = null; // declares head is null\r\n }", "public InputLinkedList() \n\t{\n\t\thead = null;\n\t}", "public CS228LinkedList() {\r\n\t\thead = new Node();\r\n\t\ttail = new Node();\r\n\t\thead.next = tail;\r\n\t\ttail.prev = head;\r\n\r\n\t\t// TODO - any other initialization you need\r\n\t}" ]
[ "0.83044136", "0.8013522", "0.7601059", "0.757973", "0.75515", "0.7474208", "0.74570006", "0.73786324", "0.7371807", "0.7358599", "0.73552686", "0.7343956", "0.7343327", "0.73238015", "0.7318552", "0.7302489", "0.7288595", "0.7287276", "0.7250483", "0.72292864", "0.72179246", "0.718956", "0.7187651", "0.718402", "0.71838063", "0.7173699", "0.716631", "0.7163238", "0.71586573", "0.71403915", "0.7134699", "0.713286", "0.712692", "0.7113262", "0.710115", "0.7099432", "0.70838857", "0.7080408", "0.70637333", "0.7051787", "0.7041694", "0.703765", "0.7033074", "0.7029251", "0.7024477", "0.6979389", "0.6975146", "0.6972966", "0.69645023", "0.6959546", "0.6954068", "0.6928898", "0.69099045", "0.6903696", "0.6898367", "0.6898078", "0.68951017", "0.6892735", "0.68871295", "0.68789077", "0.68750083", "0.68724716", "0.68616486", "0.6842238", "0.6818117", "0.68031627", "0.6802026", "0.67937005", "0.678629", "0.6773576", "0.67625815", "0.6734298", "0.6728456", "0.6725968", "0.67221445", "0.6699635", "0.668988", "0.66853184", "0.6667235", "0.66660714", "0.6656786", "0.6630468", "0.66275936", "0.6624668", "0.66163445", "0.66107595", "0.6603766", "0.6588134", "0.65865815", "0.65781975", "0.6564367", "0.65551853", "0.6545281", "0.65431106", "0.65399486", "0.6524289", "0.6522302", "0.6504562", "0.6499498", "0.6498418", "0.64876604" ]
0.0
-1
Check if the existing view is being reused, otherwise inflate the view
@Override public View getView(int position, View convertView, ViewGroup parent) { View listItemView = convertView; if(listItemView == null) { listItemView = LayoutInflater.from(getContext()).inflate( R.layout.activity_list_of_comments, parent, false); } Comment comment = (Comment) getItem(position); TextView commentView = (TextView) listItemView.findViewById(R.id.comment); commentView.setText(comment.getContent()); TextView nameView = (TextView) listItemView.findViewById(R.id.name); nameView.setText(comment.getOwnerName()); ImageView img = (ImageView) listItemView.findViewById(R.id.profilePicture); if(!(((Comment)getItem(position)).url.equals(""))) { Glide.with(context).load(((Comment) getItem(position)).getUrl()).into(img); } return listItemView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void recycleCheck(){\n getScreenRect();\n\n //ok...seriously, I have no idea why I need to wrap it in post()\n //but if I don't, it won't be able to setHtml() again (the second time)\n //TODO investigate what the fuck is going on\n post(new Runnable() {\n @Override\n public void run() {\n for (int i = 0, l = overlay.getChildCount(); i < l; i++) {\n //TODO check whether it is visible inside the view bound instead of inside the screen bound\n View v = overlay.getChildAt(i);\n v.getLocationOnScreen(coordinate);\n\n viewRect.set(coordinate[0], coordinate[1], coordinate[0] + v.getMeasuredWidth(), coordinate[1] + v.getMeasuredHeight());\n\n boolean isVisible = viewRect.intersect(screenRect);\n Integer index = (Integer) v.getTag(R.id.htmltextview_viewholder_index);\n Integer type = (Integer) v.getTag(R.id.htmltextview_viewholder_type);\n if (index == null || type == null){\n //WTF?\n continue;\n }\n\n Container container = null;\n switch (type){\n case VIEWHOLDER_TYPE_IMG:\n default:\n container = imgContainerMap.get(index);\n break;\n }\n if (isVisible){\n if (container.visible){\n //fine\n }else{\n //was invisible, make it visible\n container.attachChild();\n container.visible = true;\n }\n }else{\n if (container.visible){\n //was visible, recycle it\n container.detachChild();\n container.visible = false;\n }else{\n //fine\n }\n }\n }\n }\n });\n }", "private void isPopulateView() {\n if (!isPopulate) {\n llHeader.setVisibility(View.GONE);\n CoordinatorLayout.LayoutParams relativeParams = new CoordinatorLayout.LayoutParams(CoordinatorLayout.LayoutParams.MATCH_PARENT, CoordinatorLayout.LayoutParams.WRAP_CONTENT);\n relativeParams.setMargins(0, 0, 0, 0);\n rlMain.setLayoutParams(relativeParams);\n }\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n String status = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n // Lookup view for data population\n // Populate the data into the template view using the data object\n\n //if (!wodata.status.equals(null))\n\n // Return the completed view to render on screen\n return convertView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\tif (view != null) {\n\t\t\tLog.i(\"222222\", \"11111111\");\n\t\t\tViewGroup parent = (ViewGroup) view.getParent();\n\t\t\tif (parent != null)\n\t\t\t\tparent.removeView(view);\n\t\t}\n\t\ttry {\n\t\t\tview = inflater.inflate(R.layout.f_mine, container, false);\n\t\t\tinitView();\n\t\t} catch (InflateException e) {\n\n\t\t}\n\n\t\treturn view;\n\t}", "public void refreshView(){\n\t\tView v = getView();\n\t\tif(v != null){\n\t\t\tv.invalidate();\n\t\t}\n\t}", "private View getWorkingView(final View convertView) {\n\t\tView workingView = null;\n\n\t\tif(convertView == null) {\n\t\t\tfinal Context context = getContext();\n\t\t\tfinal LayoutInflater inflater = (LayoutInflater)context.getSystemService\n\t\t (Context.LAYOUT_INFLATER_SERVICE);\n\n\t\t\tworkingView = inflater.inflate(checkOptionLayoutResource, null);\n\t\t} else {\n\t\t\tworkingView = convertView;\n\t\t}\n\n\t\treturn workingView;\n\t}", "public boolean getViewMissing() {\n return view == null;\n }", "private void refreshView() {\n if (!wasInvalidatedBefore) {\n wasInvalidatedBefore = true;\n invalidate();\n }\n }", "public void reuse() {}", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.select_game, container, false);\n }", "@Override\n\tpublic boolean updateView(View contentView) {\n\t\treturn false;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n activity = (InitializeDineOrderActivity) getActivity();\n View view = inflater.inflate(R.layout.fragment_items_added_success, container, false);\n unbinder = ButterKnife.bind(this, view);\n //animate(imageView);\n return view;\n\n }", "private View getCachedView()\n\t{\n\t\tif (_cachedItemViews.size() != 0)\n\t\t{\n\t\t\treturn _cachedItemViews.removeFirst();\n\t\t}\n\t\treturn null;\n\t}", "private boolean imageViewReused(LoadDataHolder loadDataHolder) {\n String url = relationsMap.get(loadDataHolder.getImageView());\n // Check is url exist in relationsMap and equals to url from holder\n return url == null || !url.equals(loadDataHolder.getUrl());\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n \tthis.setRetainInstance(true);\n \treturn super.onCreateView(inflater, container, savedInstanceState);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n\t{\n \t\tif (v != null) \n \t\t{\n \t ViewGroup parent = (ViewGroup) v.getParent();\n \t if (parent != null)\n \t parent.removeView(v);\n \t }\n \t\t\n \t try \n \t {\n \t v = inflater.inflate(R.layout.tab3_fragment, container, false);\n \t } \n \t catch (InflateException e)\n \t {\n \t /* map is already there, just return view as it is */\n \t \te.printStackTrace();\n \t }\n \t return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), R.style.AppTheme_Nav);\n\n // clone the inflater using the ContextThemeWrapper\n LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);\n View view = localInflater.inflate(R.layout.fragment_master_list, container, false);\n Log.v(\"Is view null\", Boolean.toString(view == null));\n initializeView(view);\n addButtonListener(view);\n return view;\n }", "protected View getCachedView(){\n\t\tif (mCachedItemViews.size() != 0) {\n\t\t\tView v;\n\t\t\tdo{\n\t v = mCachedItemViews.removeFirst().get();\n\t\t\t}\n while(v == null && mCachedItemViews.size() != 0);\n\t\t\treturn v;\n }\n return null;\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tLog.d(\"CookFragment\", \"onCreateView\");\n\t\treturn inflater.inflate(R.layout.pull_to_refresh, container, false);\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onCreateView---------\");\n\t\tview = inflater.inflate(getContentViewId(),container,false);\n\t\tunbinder = ButterKnife.bind(this,view);\n\t\tinitView(savedInstanceState);\n\t\treturn view;\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater,\n\t\t\t@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.one, null);\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (view == null) {\n view = inflater.inflate(R.layout.fragment_last_askitem, container, false);\n }\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = getThisView(inflater,container);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ctx = getActivity();\n View view = inflater.inflate(getLayoutID(),null);\n mPreenter = createPresenter();\n loading = new MyProgressLoading(ctx, R.style.DialogStyle);\n sp = ctx.getSharedPreferences(SpUtiles.SP_Mode,Context.MODE_PRIVATE);\n HideUtil.init(getActivity());\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_new_game, container, false);\n\n mUnbinder = ButterKnife.bind(this, rootView);\n\n mButtonContinue.setVisibility(MainActivity.isContinueVisible ? View.VISIBLE : View.GONE);\n\n return rootView;\n }", "@Nullable\n @Override\n @CallSuper\n public View onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) {\n View view = getView();\n if (view == null) {\n view = inflater.inflate(getContentLayout(), container, false);\n }\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "protected abstract void onInflated(View view);", "@Override\n\tprotected View initView(LayoutInflater arg0, ViewGroup arg1, Bundle arg2) {\n\t\treturn arg0.inflate(R.layout.fragment_find, arg1, false);\n\t}", "@Override\n\t\tpublic boolean OnRepeat(View view, int... param) {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean OnRepeat(View view, int... param) {\n\t\t\treturn false;\n\t\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tViewGroup p = (ViewGroup) mMainView.getParent();\r\n\t\tif (p != null) {\r\n\t\t\tp.removeAllViewsInLayout();\r\n\t\t}\r\n\t\treturn mMainView;\r\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tViewGroup p = (ViewGroup) mMainView.getParent();\r\n\t\tif (p != null) {\r\n\t\t\tp.removeAllViewsInLayout();\r\n\t\t}\r\n\t\treturn mMainView;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_map_second, container, false);\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n Log.v(\"MeInfoEdit\",\"onCreateView\");\n if(view==null){\n view =inflater.inflate(R.layout.fragment_me_info_edit, container, false);\n }\n ((MainActivity)getActivity()).unBindDrawer();\n ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);\n swipLayout=new SwipLayout(getContext());\n swipLayout.setLayoutParams(params);\n swipLayout.setBackgroundColor(Color.TRANSPARENT);\n swipLayout.removeAllViews();\n swipLayout.addView(view);\n if(CoreApplication.newInstance().getRoot()!=null){\n Log.v(\"MeinfoEdit\",\"rootView not null\");\n }\n swipLayout.setParentView(getTargetFragment().getView()).setFragment(MeInfoEdit.this);\n return swipLayout;\n }", "private void inflateView() {\n\t\tLog.v(T, \"inflateView\");\n\t\tif (!isInEditMode()) {\n\t\t\tString inflaterService = Context.LAYOUT_INFLATER_SERVICE;\n\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) getContext()\n\t\t\t\t\t.getSystemService(inflaterService);\n\t\t\tlayoutInflater.inflate(R.layout.dms_coordinate, this, true);\n\n\t\t\t// Get child control references\n\t\t\teditDegrees = (EditText) findViewById(R.id.editDegrees);\n\t\t\teditMinutes = (EditText) findViewById(R.id.editMinutes);\n\t\t\teditSeconds = (EditText) findViewById(R.id.editSeconds);\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.layout_true_false_row, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_ongoing, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_data_visible, container, false);\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.live_layout, null);\r\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.main, container,false);\n\n\t\t//Update this view's content\n\t\tupdate();\n\n\t\t//Return this view to the adapter\n\t\treturn view;\n\t}", "@Override\n public View onCreateView( LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState ) {\n return inflater.inflate( R.layout.fragment_turn_over, container, false );\n }", "private View getCachedView() {\n if (mCachedItemViews.size() != 0) {\n return mCachedItemViews.removeFirst();\n }\n return null;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n convertView = inflater.inflate(R.layout.fragment_homecircles, container, false);\n init();\n return convertView;\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n if (!isInEditMode()) {\n this.mAdjustRelockTimePadLockPresenter = new AdjustRelockTimePadLockPresenter(this);\n ButterKnife.inject((View) this);\n }\n }", "@Override\n\tpublic View getCurrView(View convertView) {\n\t\tif(curr_content!=null){\n\t\t\tconvertView=getPageView(convertView,curr_content);\n\t\t}\n\t\treturn convertView;\n\t}", "@Override\n\tprotected int getViewId() {\n\t\treturn R.layout.layout_square_live;\n\t}", "static public View inflateLayout(int Presid,View PlayoutView) //~1410I~\r\n { //~1410I~\r\n if (Dump.Y) Dump.println(\"AView:inflateLayout2 res=\"+Integer.toHexString(Presid)+\",view=\"+PlayoutView.toString());//~@@@@R~\r\n \tAG.setCurrentView(Presid,PlayoutView); //~1410I~\r\n return PlayoutView; //~1410I~\r\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.xxh_gamelayout3, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater,\n @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n layout = inflater.inflate(R.layout.fragment_checkme_update, container, false);\n initUI();\n new GetPatchsThread(checkmeInfo, wantLanguage, updatePatch).start();\n return layout;\n }", "protected View inflateRow(ViewHolder holder){\n View row = null;\n switch (type)\n {\n case TYPE_TEXT_USER:\n row = inflater.inflate(textUserRowResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.txtContent = (TextView) row.findViewById(R.id.txt_content);\n\n break;\n\n case TYPE_TEXT_FRIEND:\n\n row = inflater.inflate(textFriendRowResId, null);\n\n holder.txtContent = (TextView) row.findViewById(R.id.txt_content);\n\n break;\n\n case TYPE_IMAGE_USER:\n row = inflater.inflate(imageUserRowResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n\n case TYPE_IMAGE_FRIEND:\n row = inflater.inflate(imageFriendRowResId, null);\n\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n break;\n\n case TYPE_LOCATION_USER:\n row = inflater.inflate(locationUserResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n\n case TYPE_LOCATION_FRIEND:\n row = inflater.inflate(locationFriendRowResId, null);\n\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n }\n\n return row;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_favorite, container, false);\n database = AppDatabase.getInstance(getActivity().getApplicationContext());\n\n tvNotFound = view.findViewById(R.id.tv_no_favorite_found);\n tvNotFound.setVisibility(View.INVISIBLE);\n\n recyclerView = view.findViewById(R.id.rv_tv_show);\n recyclerView.setLayoutManager(new GridLayoutManager(getActivity(), 2));\n loadData();\n return view;\n }", "@Override\n public boolean isViewFromObject(View view, Object object) {\n return view == (RelativeLayout) object;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_fragment__branches__ecet, container, false);\n recyclerView = view.findViewById(R.id.recyclebranch);\n\n p=view.findViewById(R.id.progress);\n retry=view.findViewById(R.id.retry);\n r=(SwipeRefreshLayout)view.findViewById(R.id.refreshcollege);\n\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n\n retry.setVisibility(View.INVISIBLE);\n\n r.setColorSchemeResources(R.color.cutdown);\n r.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n start(view);\n r.setRefreshing(false);\n }\n },2000);\n }\n });\n\n start(view);\n\n\n return view;\n }", "@Override\r\n\t\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\t\t\t LayoutInflater inflater = LayoutInflater.from(arg2.getContext());\r\n\t\t\t View retView = inflater.inflate(R.layout.report_listitems, arg2, false);\r\n\t\t\t int j=i%2;\r\n\t\t\t retView.setBackgroundColor(colors[j]);\r\n\t\t\t i++;\r\n\t\t\t bindView(retView,arg0,arg1);\r\n\t\t\t return retView;\r\n\t\t\t \r\n\t\t}", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n Log.d(SecondView.class.getSimpleName(), String.valueOf(System.currentTimeMillis()));\n ButterKnife.inject(this, this);\n secondPresenter.takeView(this);\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tViewGroup viewgproup = (ViewGroup) mView.getParent();\n\t\tif (viewgproup != null) {\n\t\t\tviewgproup.removeAllViewsInLayout();\n\t\t}\n\t\treturn mView;\n\t}", "private void initView(Context context) {\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0);\n\t\tmContainer = (LinearLayout)LayoutInflater.from(context).inflate(R.layout.pullable_refresh, null);\n\t\taddView(mContainer, params);\n\t\tsetGravity(Gravity.BOTTOM);\n\t\t\n\t\trefreshArrowView = (ImageView)findViewById(R.id.pull_down_arrow);\n\t\trefreshingView = (ImageView)findViewById(R.id.pull_down_refreshing_view);\n\t\trefreshStateTextView = (TextView)findViewById(R.id.pull_down_state_text);\n\t\t\n\t\trotateAnimation = (RotateAnimation)AnimationUtils.loadAnimation(context, R.anim.reverse_anim);\n\t\trefreshingAnimation = (RotateAnimation)AnimationUtils.loadAnimation(context, R.anim.rotating);\n\t\tLinearInterpolator lir = new LinearInterpolator();\n\t\trotateAnimation.setInterpolator(lir);\n\t\trefreshingAnimation.setInterpolator(lir);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n theView = inflater.inflate(R.layout.what_case_fragment, container, false);\n\n theView.findViewById(R.id.buttonNominative).setOnClickListener(this);\n theView.findViewById(R.id.buttonAccusative).setOnClickListener(this);\n theView.findViewById(R.id.buttonGenitive).setOnClickListener(this);\n theView.findViewById(R.id.buttonDative).setOnClickListener(this);\n theView.findViewById(R.id.buttonInstrumental).setOnClickListener(this);\n theView.findViewById(R.id.buttonPrepositional).setOnClickListener(this);\n\n if (foundTarget) {\n foundTarget = false;\n setNewWord();\n } else {\n setWord();\n }\n\n return theView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n if (mInflate == null) {\n mInflate = inflater.inflate(R.layout.fragment_fa_xian, container, false);\n init();\n }\n //缓存的rootView需要判断是否已经被加过parent, 如果有parent需要从parent删除,要不然会发生这个rootview已经有parent的错误。\n ViewGroup parent = (ViewGroup) mInflate.getParent();\n if (parent != null) {\n parent.removeView(mInflate);\n }\n return mInflate;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n Fabric.with(getContext(), new Crashlytics());\r\n View view = inflater.inflate(R.layout.fragment_open_ticket_general_enquiries_department, container, false);\r\n unbinder = ButterKnife.bind(this, view);\r\n\r\n\r\n intialize();\r\n return view;\r\n }", "public boolean wantsView(T aView, View aView2) { return aView.getContent()==null; }", "public boolean wantsView(T aView, View aView2) { return aView.getContent()==null; }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n HashMap<String, String> report = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.fillup_line, parent, false);\n }\n // Lookup view for data population\n TextView vId = (TextView) convertView.findViewById(R.id.idFld);\n TextView rDate = (TextView) convertView.findViewById(R.id.dateFld);\n TextView vName = (TextView) convertView.findViewById(R.id.vehicleFld);\n TextView rMiles = (TextView) convertView.findViewById(R.id.milesFld);\n TextView rGallons = (TextView) convertView.findViewById(R.id.gallonsFld);\n TextView rCost = (TextView) convertView.findViewById(R.id.costFld);\n TextView rMileage = (TextView) convertView.findViewById(R.id.mileageFld);\n // Populate the data into the template view using the data object\n vId.setText(report.get(Fillup.KEY_ID));\n rDate.setText(report.get(Fillup.KEY_DATE));\n vName.setText(report.get(Fillup.KEY_VEHICLE_NAME));\n rMiles.setText(report.get(Fillup.KEY_MILES));\n rGallons.setText(report.get(Fillup.KEY_GALLONS));\n rCost.setText(report.get(Fillup.KEY_COST));\n rMileage.setText(report.get(Fillup.KEY_MILEAGE));\n\n // If the at Position >=1 and previous field date is same hide date\n if(position >= 1){\n HashMap<String, String> prevreport = getItem(position - 1);\n String current = report.get(Fillup.KEY_DATE);\n String prev = prevreport.get(Fillup.KEY_DATE);\n if(current.equals(prev)){\n rDate.setVisibility(View.GONE);\n }\n }\n\n // Return the completed view to render on screen\n return convertView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tcurrentView = inflater.inflate(R.layout.inspect_history_fragment_page_item, container, false);\n\t\tinitial(currentView);\n\t\treturn currentView;\n\t}", "@Override\n public View getView(final int position, View mViews, ViewGroup parent) {\n LayoutInflater mInflater = (LayoutInflater)\n searchPollCommentsAdapterContext.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);\n mCampaignCommentsPollView=mViews;\n // The old view to reuse, if possible.If convertView is NOT null, we can simple re-use the convertView as the new View.\n // It will happen when a new row appear and a old row in the other end roll out.\n if (mCampaignCommentsPollView == null) {\n /* create a new view of my layout and inflate it in the row */\n mCampaignCommentsPollView = mInflater.inflate(searchPollCommentsLayoutId, parent, false);\n holder = new ViewHolder();\n holder.campaignImageSearch = (ImageView) mCampaignCommentsPollView.findViewById(R.id.imgProfile);\n holder.userNameSearch = (TextView) mCampaignCommentsPollView.findViewById(R.id.txtProfileName);\n holder.searchComments = (TextView) mCampaignCommentsPollView.findViewById(R.id.txtChatDetails);\n holder.imgMore = (ImageView) mCampaignCommentsPollView.findViewById(R.id.imgMore);\n holder.txtCommentTime=(TextView)mCampaignCommentsPollView.findViewById(R.id.txtCommentTime);\n mCampaignCommentsPollView.setTag(holder);\n } else {\n holder = (ViewHolder) mCampaignCommentsPollView.getTag();\n }\n //Geting the particular object from the response based on the position\n searchPollCommentsData = getItem(position);\n //If the user id matches from the response then the edit icon will be visible\n //else edit icon wont be visivble\n if (searchPollCommentsData.getUserId().equals(MApplication.getString(searchPollCommentsAdapterContext, Constants.USER_ID))) {\n holder.imgMore.setVisibility(View.VISIBLE);\n } else {\n holder.imgMore.setVisibility(View.INVISIBLE);\n }\n //Getting the user profiel image\n searchPollCommentsUserProfile = searchPollCommentsData.getUserInfo().getUserProfileImg();\n Utils.loadImageWithGlideProfileRounderCorner(searchPollCommentsAdapterContext,searchPollCommentsUserProfile,holder.campaignImageSearch,R.drawable.placeholder_image);\n //Getting the user name from the response\n holder.userNameSearch.setText(searchPollCommentsData.getUserInfo().getUserName());\n //Getting the COMMENTS and setting in the text view\n holder.searchComments.setText(MApplication.getDecodedString(searchPollCommentsData.getComments()));\n //comment time\n holder.txtCommentTime.setText(MApplication.getHours(searchPollCommentsData.getUpdatedAt()));\n //Interface definition for a callback to be invoked when a view is clicked.\n holder.imgMore.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //Clcik position\n int clickPosition = position;\n //Geting the particular object from the response based on the position\n searchPollCommentsData = getItem(clickPosition);\n //Comments from the response\n String comments = MApplication.getDecodedString(searchPollCommentsData.getComments());\n //COMMENTS id from the response\n String commentId = MApplication.getDecodedString(searchPollCommentsData.getId());\n //Custom dialog to edit and delete the comment\n customCampaignPollCustomDialog(searchPollCommentsAdapterContext, comments, clickPosition, commentId);\n }\n });\n //returning the views\n return mCampaignCommentsPollView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_p1_one, container, false);\n unbinder = ButterKnife.bind(this, v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if(container == null)\n return null;\n\n Boolean isNew = getArguments().getBoolean(\"isNew\");\n View view = inflater.inflate(R.layout.fragment_diary_detail, container, false);\n loadEntry(view, isNew);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n MainActivity activity = (MainActivity) getActivity();\n countryLocation = activity.country();\n\n\n return inflater.inflate(R.layout.fragment_shuffle, container, false);\n\n }", "@Override\n public void invalidateChildRegion(SlidingPaneLayout slidingPaneLayout, View view) {\n if (this.mGetDisplayList != null && this.mRecreateDisplayList != null) {\n try {\n this.mRecreateDisplayList.setBoolean((Object)view, true);\n this.mGetDisplayList.invoke((Object)view, null);\n }\n catch (Exception var3_3) {\n Log.e((String)\"SlidingPaneLayout\", (String)\"Error refreshing display list state\", (Throwable)var3_3);\n }\n super.invalidateChildRegion(slidingPaneLayout, view);\n return;\n }\n view.invalidate();\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t// cityIntent = new Intent(AppContext.curActivity,\n\t\t// EventSearchInitialActivity.class);\n\t\tif (null == contentView) {\n\t\t\tloader = OriginalImageAsyncLoader.getInstance();\n\t\t\tinitRequestModel();\n\t\t\tcontentView = inflater.inflate(R.layout.frag_venue, container,\n\t\t\t\t\tfalse);\n\t\t\tvHeader = inflater.inflate(R.layout.header_hot_venue, null);\n\t\t\tvHeader.setVisibility(View.INVISIBLE);\n\t\t\tinitView();\n\t\t\tinitDate();\n\t\t\tvHeader.setVisibility(View.VISIBLE);\n\t\t} else {\n\t\t\t((ViewGroup) contentView.getParent()).removeView(contentView);\n\t\t}\n\t\tif (pagerAdapter != null) {\n\t\t\tpagerAdapter.notifyDataSetChanged();\n\t\t}\n\t\tif (null != mAdapter) {\n\t\t\tmAdapter.notifyDataSetChanged();\n\t\t}\n\t\treturn contentView;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n intialFragment();\n // return inflater.inflate(R.layout.fragment_old_ordered, container, false);\n oldOrderedBinding = DataBindingUtil.inflate(\n inflater, R.layout.fragment_orederd_recycler, container, false);\n View view = oldOrderedBinding.getRoot();\n\n return view;\n }", "private boolean isFirstTime() {\n SharedPreferences preferences = getActivity().getPreferences(MODE_PRIVATE);\n boolean ranBefore = preferences.getBoolean(\"RanBefore\", false);\n if (!ranBefore) {\n\n SharedPreferences.Editor editor = preferences.edit();\n editor.putBoolean(\"RanBefore\", true);\n editor.apply();\n mBind.topLayout.setVisibility(View.VISIBLE);\n mBind.topLayout.setOnTouchListener(new View.OnTouchListener() {\n\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n mBind.topLayout.setVisibility(View.INVISIBLE);\n return false;\n }\n\n });\n }\n return ranBefore;\n\n }", "public void initView() {\n ((TextView) _$_findCachedViewById(R.id.tvCancelResv)).setOnClickListener(new MyResvDetailActivity$initView$1(this));\n getResvDetail();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n if (view == null) {\n view = inflater.inflate(R.layout.fragment_bao_yang_scx, container, false);\n unbinder = ButterKnife.bind(this, view);\n init();\n }\n return view;\n }", "private void initViews() {\n\n if (blockListAdapter != null) {\n blockListAdapter = null;\n }\n\n swipeRefreshLayout.setColorSchemeResources(\n R.color.witkey_orange,\n R.color.witkey_orange,\n R.color.witkey_orange);\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n firstNetworkCall();\n }\n });\n\n rv_swipe_refresh_tv.setColorSchemeResources(\n R.color.witkey_orange,\n R.color.witkey_orange,\n R.color.witkey_orange);\n\n rv_swipe_refresh_tv.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n firstNetworkCall();\n }\n });\n\n noResultRefreshTextView.setOnClickListener(this);\n\n if (swipeRefreshLayout != null) {\n swipeRefreshLayout.post(new Runnable() {\n @Override\n public void run() {\n swipeRefreshLayout.setRefreshing(true);\n firstNetworkCall();\n }\n });\n }\n\n btnBack.setOnClickListener(this);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.layoutview3, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_latest, container, false);\n\n articlesRecycle = view.findViewById(R.id.articlesRecycle);\n emptyView = view.findViewById(R.id.emptyView);\n\n getNews();\n\n\n\n return view;\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recently_viewed, container, false);\n }", "@Override\n public View newView(final Context context, Cursor cursor, ViewGroup parent) {\n View view = LayoutInflater.from(context).inflate(R.layout.activity_item, parent, false);\n Button positiveButton = (Button) view.findViewById(R.id.add_time);\n positiveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Object o = v.getTag();\n if (o == null || !(o instanceof ViewObjectTag)) {\n Toast.makeText(context, \"Cannot update time\", Toast.LENGTH_SHORT).show();\n }\n\n int id = ((ViewObjectTag) o).activityId;\n new IncrementActivityTimeAsyncTask(mDbHelper, id, 10)\n .executeOnExecutor(mBackgroundExecutor);\n if (mRefreshFuture == null || mRefreshFuture.isDone()) {\n mRefreshFuture = mBackgroundExecutor.schedule(\n mRefreshCursorRunnable, 2000, TimeUnit.MILLISECONDS);\n }\n }\n });\n\n Button negativebutton = (Button) view.findViewById(R.id.subtract_time);\n negativebutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Object o = v.getTag();\n if (o == null || !(o instanceof ViewObjectTag)) {\n Toast.makeText(context, \"Cannot update time\", Toast.LENGTH_SHORT).show();\n }\n int id = ((ViewObjectTag) o).activityId;\n new IncrementActivityTimeAsyncTask(mDbHelper, id, -10).executeOnExecutor(\n mBackgroundExecutor);\n if (mRefreshFuture == null || mRefreshFuture.isDone()) {\n mRefreshFuture = mBackgroundExecutor.schedule(\n mRefreshCursorRunnable, 2000, TimeUnit.MILLISECONDS);\n }\n }\n });\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_last_map, container, false);\n }", "@Override\n public void prepareView() {\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@NonNull\n View buildView(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent);", "public void reloadView() {\n container.revalidate();\n container.repaint();\n }", "public boolean onPreDraw() {\n\t\t\t\t//Remove the listener after the 1 frame\n\t\t\t\tobserver.removeOnPreDrawListener(this);\n\t\t\t\tboolean firstAnimation = true;\n\t\t\t\tint firstVisiblePosition = listview.getFirstVisiblePosition();\n\t\t\t\t//Cycle through all current children of the list frame\n\t\t\t\tfor (int i = 0; i < listview.getChildCount(); ++i) {\n\t\t\t\t\tfinal View child = listview.getChildAt(i);\n\t\t\t\t\tint position = firstVisiblePosition + i;\n\t\t\t\t\tlong itemId = mAdapter.getItemId(position);\n\t\t\t\t\tInteger startTop = mItemIdTopMap.get(itemId);\n\t\t\t\t\t//Where is the child now, get the top position\n\t\t\t\t\tint top = child.getTop();\n\t\t\t\t\tif (startTop != null) { //This means the view used to be somewhere else in the container\n\t\t\t\t\t\t//If the child was somewhere else in the container, run an animation to move it\n\t\t\t\t\t\tif (startTop != top) {\n\t\t\t\t\t\t\t//Set a Y Value and animate to it\n\t\t\t\t\t\t\tint delta = startTop - top;\n\t\t\t\t\t\t\tchild.setTranslationY(delta);\n\t\t\t\t\t\t\tchild.animate().setDuration(MOVE_DURATION).translationY(0);\n\t\t\t\t\t\t\t//If this is the first time it's been run, restore values\n\t\t\t\t\t\t\tif (firstAnimation) {\n\t\t\t\t\t\t\t\tchild.animate().withEndAction(new Runnable() {\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tmBackgroundContainer.hideBackground();\n\t\t\t\t\t\t\t\t\t\tmSwiping = false;\n\t\t\t\t\t\t\t\t\t\tmListView.setEnabled(true);\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\tfirstAnimation = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Animate new views along with the others. The catch is that they did not\n\t\t\t\t\t\t// exist in the start state, so we must calculate their starting position\n\t\t\t\t\t\t// based on neighboring views.\n\t\t\t\t\t\tint childHeight = child.getHeight() + listview.getDividerHeight();\n\t\t\t\t\t\tstartTop = top + (i > 0 ? childHeight : -childHeight);\n\t\t\t\t\t\tint delta = startTop - top;\n\t\t\t\t\t\tchild.setTranslationY(delta); //Again, set Y value to where it is going\n\t\t\t\t\t\tchild.animate().setDuration(MOVE_DURATION).translationY(0);\n\t\t\t\t\t\tif (firstAnimation) {\n\t\t\t\t\t\t\tchild.animate().withEndAction(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tmBackgroundContainer.hideBackground();\n\t\t\t\t\t\t\t\t\tmSwiping = false;\n\t\t\t\t\t\t\t\t\tmListView.setEnabled(true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tfirstAnimation = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//When finished, clear the item IDs associated with positions\n\t\t\t\tmItemIdTopMap.clear();\n\t\t\t\treturn true;\n\t\t\t}", "@Override\n\tprotected void refreshView() {\n\t\t\n\t}", "public final void onBindView(View view) {\n AppMethodBeat.m2504i(107165);\n super.onBindView(view);\n ImageView imageView = (ImageView) view.findViewById(2131822184);\n if (imageView != null) {\n if (this.drawable != null) {\n imageView.setImageDrawable(this.drawable);\n imageView.setVisibility(0);\n } else if (this.f4433ZV != 0) {\n imageView.setImageResource(this.f4433ZV);\n imageView.setVisibility(0);\n } else {\n imageView.setVisibility(8);\n }\n }\n LinearLayout linearLayout = (LinearLayout) view.findViewById(2131822347);\n if (this.height != -1) {\n linearLayout.setMinimumHeight(this.height);\n }\n TextView textView = (TextView) view.findViewById(2131822348);\n if (textView != null) {\n textView.setVisibility(this.qlf);\n textView.setText(this.pnJ);\n if (this.qle != -1) {\n textView.setBackgroundDrawable(C1338a.m2864g(this.context, this.qle));\n }\n }\n this.yBG = (ImageView) view.findViewById(2131822349);\n this.yBG.setVisibility(this.yBD);\n this.yBH = (ViewGroup) view.findViewById(2131822351);\n this.yBH.setVisibility(this.yBE);\n this.yBI = (TextView) view.findViewById(16908310);\n textView = (TextView) view.findViewById(2131826062);\n if (C5046bo.isNullOrNil(this.yBJ)) {\n textView.setVisibility(8);\n AppMethodBeat.m2505o(107165);\n return;\n }\n textView.setVisibility(0);\n textView.setText(this.yBJ);\n AppMethodBeat.m2505o(107165);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_game_over, container, false);\n\n winningTeam = (TextView)view.findViewById(R.id.winnerText);\n\n return view;\n }", "protected void findAndCacheViews(View view) {\n\t SpeakerItemViews views = new SpeakerItemViews();\n\t views.headerView = view.findViewById(R.id.header);\n\t views.headerTextView = (TextView) view.findViewById(R.id.header_text);\n\t views.dividerView = view.findViewById(R.id.session_divider);\n\t views.nameView = (TextView) view.findViewById(R.id.speaker_name);\n\t views.companyView = (TextView) view.findViewById(R.id.speaker_company);\n\t views.starButton = (CheckBox) view.findViewById(R.id.star_button);\n\t view.setTag(views);\n\t }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.game_zipe_observation, container, false);\n settingThingsUp(view);\n\n return view;\n }", "final View obtainView(final int position, final View optScrap) {\n View view = mRecycler.getTransientStateView(position);\n if (view != null) {\n return view;\n }\n\n // Reuse optScrap if it's of the right type (and not null)\n final int optType = optScrap != null\n ? ((LayoutParams) optScrap.getLayoutParams()).viewType : -1;\n final int positionViewType = mAdapter.getItemViewType(position);\n final View scrap = optType == positionViewType\n ? optScrap : mRecycler.getScrapView(positionViewType);\n\n view = mAdapter.getView(position, scrap, this);\n\n if (view != scrap && scrap != null) {\n // The adapter didn't use it; put it back.\n mRecycler.addScrap(scrap);\n }\n\n ViewGroup.LayoutParams lp = view.getLayoutParams();\n\n if (view.getParent() != this) {\n if (lp == null) {\n lp = generateDefaultLayoutParams();\n view.setLayoutParams(lp);\n } else if (!checkLayoutParams(lp)) {\n lp = generateLayoutParams(lp);\n view.setLayoutParams(lp);\n }\n }\n\n final LayoutParams sglp = (LayoutParams) lp;\n sglp.position = position;\n sglp.viewType = positionViewType;\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n \n return this.view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_activity_summary, container, false);\n\n // Transaction party\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction ft = fragmentManager.beginTransaction();\n\n if(fragmentManager.findFragmentById(R.id.frame1)!=null) {\n ft.remove(fragmentManager.findFragmentById(R.id.frame1));\n }\n Fragment fragment = new SummaryFragment();\n ft.replace(R.id.frame1, fragment).commit();\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_gap_fill, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tif (mObjView == null) {\n\t\t\tmObjView = inflater.inflate(R.layout.jeep_airset, container, false);\n\t\t\tinit();\n\t\t}\n\n\t\treturn mObjView;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t\t{\n\t\t\t\tflag = (Page) getArguments().getSerializable(\"flag\");\n\t\t\t\tview = inflater.inflate(R.layout.activity_main, container, false);\n\t\t\t\tfillView();\n\t\t\t\treturn view;\n\t\t\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_number_full,container,false);\n itemView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.item_error, container, false);\n ImageButton b = (ImageButton) v.findViewById(R.id.button_reload_feed);\n\n if (mParent != null) {\n b.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n mParent.launchParser();\n }\n });\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_walk__two, container, false);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Purchase purchase = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n ViewHolder viewHolder; // view lookup cache stored in tag\n\n final View result;\n\n if (convertView == null) {\n\n viewHolder = new ViewHolder();\n LayoutInflater inflater = LayoutInflater.from(getContext());\n convertView = inflater.inflate(R.layout.history_purchase, parent, false);\n viewHolder.purchaseID = (TextView) convertView.findViewById(R.id.purchase_id);\n viewHolder.purchaseDate = (TextView) convertView.findViewById(R.id.purchase_date);\n viewHolder.totalPrice = (TextView) convertView.findViewById(R.id.purchase_price);\n viewHolder.paidPrice = (TextView) convertView.findViewById(R.id.purchase_paid_price);\n viewHolder.purchaseProducts = (LinearLayout) convertView.findViewById(R.id.purchase_prdsucts);\n viewHolder.item = (LinearLayout) convertView.findViewById(R.id.item);\n\n result=convertView;\n\n convertView.setTag(viewHolder);\n } else {\n viewHolder = (ViewHolder) convertView.getTag();\n result=convertView;\n }\n\n viewHolder.purchaseID.setText(purchase.getUuid().toString().substring(0, 6));\n viewHolder.purchaseDate.setText(purchase.getDateString());\n viewHolder.totalPrice.setText(String.format (\"%.2f\", purchase.getTotalPrice()) +\"€\");\n viewHolder.paidPrice.setText(String.format (\"%.2f\", purchase.getPaidPrice()) +\"€\");\n viewHolder.purchaseProducts.removeAllViews();\n\n for(int i = 0; i < purchase.getProducts().size(); i++){\n TextView textView = new TextView(this.mContext);\n textView.setText(purchase.getProducts().get(i).getName() + \" - \" + String.format (\"%.2f\", purchase.getProducts().get(i).getPrice())+\"€\");\n textView.setTextSize((float) 17);\n textView.setTextColor(Color.parseColor(\"#003845\"));\n Typeface font = Typeface.createFromAsset(mContext.getAssets(), \"raleway.ttf\");\n textView.setTypeface(font);\n\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n params.setMargins(0,0,0,10);\n textView.setLayoutParams(params);\n\n viewHolder.purchaseProducts.addView(textView);\n }\n\n //EXTRA FEATURE\n viewHolder.item.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n LinearLayout itemView = (LinearLayout) v;\n TextView objectID = (TextView) itemView.findViewById(R.id.purchase_id);\n\n Toast.makeText(mContext, \"ID: \" + objectID.getText(), Toast.LENGTH_SHORT).show();\n\n Preferences preferences = new Preferences(mContext);\n ArrayList<Purchase> history = new ArrayList<>();\n try {\n history = preferences.getPurchases();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Product> newProducts = new ArrayList<>();\n for(int i=0; i<history.size(); i++){\n String id = history.get(i).getUuid().toString().substring(0, 6);\n if(objectID.getText().equals(id)){\n newProducts = history.get(i).getProducts();\n break;\n }\n }\n\n try {\n ArrayList<Product> basketP = null;\n basketP = preferences.getBasket();\n\n if (basketP.size() + newProducts.size() <= 10) {\n for (int i = 0; i < newProducts.size(); i++) {\n basketP.add(newProducts.get(i));\n }\n\n preferences.saveBasket(basketP);\n Toast.makeText(mContext, \"Products added to your basket with success.\", Toast.LENGTH_SHORT).show();\n }\n else{\n Toast.makeText(mContext, \"You can only have 10 items in basket.\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (JSONException e) {\n Toast.makeText(mContext, \"There was a problem adding products to basket, please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n return convertView;\n }" ]
[ "0.6012694", "0.58779305", "0.58611715", "0.58438414", "0.5720961", "0.57065964", "0.56830007", "0.5644921", "0.56100196", "0.5607899", "0.559502", "0.5574792", "0.5554565", "0.5554324", "0.5546893", "0.5541707", "0.55289835", "0.5515837", "0.5509366", "0.54928625", "0.54893184", "0.54839605", "0.547881", "0.54783297", "0.5465324", "0.5462174", "0.5460623", "0.54554844", "0.5443407", "0.5443407", "0.54350805", "0.54350805", "0.5433246", "0.5431382", "0.5427275", "0.54116917", "0.5411182", "0.5410448", "0.5403906", "0.5401109", "0.5389145", "0.5379264", "0.53770256", "0.53696156", "0.53640026", "0.53613895", "0.5356786", "0.5350593", "0.5347499", "0.53448546", "0.533976", "0.53375465", "0.53351", "0.5333201", "0.53326684", "0.5332379", "0.5322727", "0.53021777", "0.52966857", "0.52898943", "0.52898496", "0.52898496", "0.5276906", "0.5266825", "0.5264197", "0.52569234", "0.52561796", "0.5250054", "0.52456146", "0.5238416", "0.5236098", "0.5224427", "0.5211492", "0.5207583", "0.5207325", "0.5206854", "0.5199154", "0.5198795", "0.5186568", "0.5182312", "0.51780874", "0.5177864", "0.51761854", "0.51724625", "0.5171226", "0.51523423", "0.5151234", "0.5148057", "0.51464087", "0.51456916", "0.5141958", "0.51350784", "0.5129324", "0.51229334", "0.5122237", "0.5118237", "0.5117757", "0.5114851", "0.51144886", "0.51106894", "0.51080734" ]
0.0
-1
for each hierarchy of the underlying axis compute the number of levels (maxRootDistance minRootDistance).
void computeLevelCount() { Hierarchy[] hiers = axis.getHierarchies(); int hierarchyCount = axis.getHierarchies().length; levelCount = new int[hierarchyCount]; skipAllMember = new boolean[hierarchyCount]; for (int i = 0; i < hiers.length; i++) { levelCount[i] = Integer.MIN_VALUE; skipAllMember[i] = hiers[i].hasAll(); } Iterator it = axis.getPositions().iterator(); while (it.hasNext()) { Position p = (Position) it.next(); Member[] members = p.getMembers(); for (int i = 0; i < members.length; i++) { int count = members[i].getRootDistance() + 1; levelCount[i] = Math.max(levelCount[i], count); if (members[i].isAll()) skipAllMember[i] = false; } } // if the ALL member is not on the axis, we will not add it for (int i = 0; i < hierarchyCount; i++) { if (skipAllMember[i]) levelCount[i] -= 1; } // the number of members per position is the sum of all deltas totalLevelCount = 0; for (int i = 0; i < hierarchyCount; i++) totalLevelCount += levelCount[i]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int howManyLevels()\r\n\t{\r\n\t\t// Formula is the ceiling of the log base 2 of (the current number of nodes + 1)\r\n\t\treturn (int) Math.ceil(Math.log(getCounter() + 1) / Math.log(2));\r\n\t}", "public int my_leaf_count();", "@Override\r\n\tpublic double getDepth()\r\n\t{\r\n\r\n\t\tList<Entity> roots = new Stack<Entity>();\r\n\t\troots.addAll(getRoots());\r\n\r\n\t\tif (roots.size() == 0) {\r\n\t\t\tlogger.error(\"There is no root for this lexical semantic resource.\");\r\n\t\t\treturn Double.NaN;\r\n\t\t}\r\n\t\telse if (roots.size() > 1) {\r\n\t\t\tlogger.error(\"There are several roots for this lexical semantic resource.\");\r\n\t\t\treturn Double.NaN;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tEntity root = roots.get(0);\r\n\t\t\t// return getEccentricity(root);\r\n\r\n\t\t\tdouble maxPathLength = 0.0;\r\n\t\t\tdouble[] returnValues = computeShortestPathLengths(root, 0.0,\r\n\t\t\t\t\tmaxPathLength, new HashSet<Entity>());\r\n\t\t\tmaxPathLength = returnValues[1];\r\n\t\t\treturn maxPathLength;\r\n\t\t}\r\n\t}", "public int countLevels() {\n return levels.size();\n }", "public int getChildCount();", "int getChildCount();", "public int countLeaves(){\n return countLeaves(root);\n }", "public int numLeaves() {\n return numLeaves(root);//invokes helper method\n }", "public static int getLevelCount() {\n return levels.size();\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\n\t\tint leftNumber=0;\r\n\t\tint rightNumber=0;\r\n\t\tif(left!=null){\r\n\t\t\tleftNumber=left.getNumberOfNodes();\r\n\t\t}\r\n\t\tif(right!=null)\r\n\t\t\trightNumber=right.getNumberOfNodes();\r\n\t\treturn leftNumber+rightNumber+1;\r\n\t}", "public abstract int getNumChildren();", "public static int DimNum() {\n\t\treturn root_map.size();\n\t}", "public int getChildCount()\n/* */ {\n/* 500 */ return this.children.size();\n/* */ }", "public int countAllSpecies() {\n if(overallRoot == null)\n return 0;\n return (overallRoot.getNumLeafs());\n }", "int getPlanarAxisCount();", "DataTree getMetricsHierarchy();", "abstract long calculateChildCount() throws TskCoreException;", "public int numberOfLeaves() {\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t} // if\r\n\t\treturn numberOfLeaves(root.left) + numberOfLeaves(root.right);\r\n\t}", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "int getLength() {\n return levels.length;\n }", "int computeHeight() {\n Node<Integer>[] nodes = new Node[parent.length];\n for (int i = 0; i < parent.length; i++) {\n nodes[i] = new Node<Integer>();\n }\n int rootIndex = 0;\n for (int childIndex = 0; childIndex < parent.length; childIndex++) {\n if (parent[childIndex] == -1) {\n rootIndex = childIndex;\n } else {\n nodes[parent[childIndex]].addChild(nodes[childIndex]);\n }\n }\n return getDepth(nodes[rootIndex]);\n }", "private int countLeafs(TreeNode temp) {\n\t\tif (temp == null)\n\t\t\treturn 0;\n\t\tif (temp.left == null && temp.right == null)\n\t\t\treturn 1;\n\t\treturn countLeafs(temp.left) + countLeafs(temp.right);\n\t}", "@Override\n\tpublic int height() {\n\t\tif (this.valCount == 0) { // if empty leaf\n\t\t\treturn 0;\n\t\t}\n\t\tint max = 1; \n\t\tfor (int i = 0; i < childCount; ++i) { // finds longest route among children\n\t\t\tmax = Math.max(max, children[i].height() + 1);\n\t\t}\n\t\treturn max;\n\t}", "public int getChildCount()\n {\n return mChildren.length; // The indexes and constraints\n }", "public int size() {\n if(root == null){\n return 0;\n }\n else{\n return 1 + size(root.lc) + size(root.rc);\n }\n }", "public int[] sumDepths_numLeaves(){\r\n\t\t\tint[] sumDepths_numLeaves_low, sumDepths_numLeaves_high;\r\n\t\t\tint[] return_sumDepths_numLeaves = new int[2];\r\n\t\t\t\r\n\t\t\t/* \r\n\t\t\t * The sum of the depths of the leaves is the sum of the depth of the leaves of the subtrees, \r\n\t\t\t * plus the number of leaves (size) since each leaf defines a path and the depth of each leaf \r\n\t\t\t * is one greater than the depth of each leaf in the subtree.\r\n\t\t\t */\r\n\t\t\t\r\n\t\t\tif (this.leaf) { // base case\r\n\t\t\t\treturn_sumDepths_numLeaves[0] = 0;\r\n\t\t\t\treturn_sumDepths_numLeaves[1] = 1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tsumDepths_numLeaves_low = this.lowChild.sumDepths_numLeaves();\r\n\t\t\t\tsumDepths_numLeaves_high = this.highChild.sumDepths_numLeaves();\r\n\t\t\t\treturn_sumDepths_numLeaves[0] = sumDepths_numLeaves_low[0] + sumDepths_numLeaves_high[0] + sumDepths_numLeaves_low[1] + sumDepths_numLeaves_high[1];\r\n\t\t\t\treturn_sumDepths_numLeaves[1] = sumDepths_numLeaves_low[1] + sumDepths_numLeaves_high[1];\r\n\t\t\t}\t\r\n\t\t\treturn return_sumDepths_numLeaves;\r\n\t\t}", "int getDimensionsCount();", "public int getMaxLevel() {\r\n int maxLev = 0;\r\n for (final Category name : map.keySet()) {\r\n if (name.categories.size() > maxLev) {\r\n maxLev = name.categories.size();\r\n }\r\n }\r\n return maxLev;\r\n }", "public int getTotalLevel() {\r\n int level = 0;\r\n for (int i = 0; i < staticLevels.length; i++) {\r\n level += getStaticLevel(i);\r\n }\r\n return level;\r\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}", "public int shapeCount()\n {\n // return the number of children in the list\n return children.size();\n }", "public int countNodes(){\r\n \treturn count(root);\r\n }", "int getScaleCount();", "public int depth() {\n\t\treturn depthHelp(root);\r\n\t}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "public static int getLevels(TreeNode node){ //pass root to this\n\t\t if(node == null){\n\t\t\t return 0; \n\t\t }\n\t\t \n\t\t return 1+Math.max(getLevels(node.left),getLevels(node.right));\n\t }", "int count() {\n\t\tArrayList<Integer> checked = new ArrayList<Integer>();\r\n\t\tint count = 0;\r\n\t\tfor (int x = 0; x < idNode.length; x++) {// Order of N2\r\n\t\t\tint rootX = getRoot(x);\r\n\t\t\tif (!checked.contains(rootX)) {// Order of N Access of Array\r\n\r\n\t\t\t\tSystem.out.println(\"root x is \" + rootX);\r\n\t\t\t\tcount++;\r\n\t\t\t\tchecked.add(rootX);// N Access of Array\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int size() {\r\n\t\tint i = 0;\r\n\t\tif (this.value != 0) {\r\n\t\t\ti++;\r\n\t\t\tif(this.leftChild != null) {\r\n\t\t\t\ti = i + this.leftChild.size();\r\n\t\t\t}\r\n\t\t\tif(rightChild != null){\r\n\t\t\t\ti = i + this.rightChild.size();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn i; \r\n\t}", "public double getDepth();", "public int numNodes()\r\n {\r\n\tint s = 0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t s += nt.numNodes();\r\n\treturn s;\r\n }", "public int getDiscreteLevelCount() {\n\t\tif (this.isNumeric()) {\n\t\t\tthrow new RuntimeException(\"Parameter \" + this.name + \" is numeric!\");\n\t\t} else {\n\t\t\treturn this.discreteLevels.size();\n\t\t}\n\t}", "public double getTreeSize()\n {\n return treesize; \n }", "public int size()\r\n\t {\r\n\t\t if(root == null)\r\n\t\t {\r\n\t\t\t return 0;\r\n\t\t }\r\n\t\t return root.getSubTreeSize();\r\n\t }", "private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}", "public int getWidth(){\n return this.baseLevel.getWidth();\n }", "private int getVariablesNumberInTree() {\n\t\tList<Node> l = getFirstLevelSubnodes();\n\n\t\treturn l != null ? l.size() : 0;\n\t}", "private int calcHeight(ChartOptions options) {\n Node n = this; // current node in the level\n int realHeight = 0;\n boolean samelevel = true; // next node in same level?\n while (n != null && samelevel) {\n int tmpHeight = 0;\n if (n.typ.matches(NodeType.TERM, NodeType.NONTERM, NodeType.EXCEPTION)) {\n tmpHeight = n.size.getHeight();\n } else if (n.typ == NodeType.ITER) {\n tmpHeight = n.sub.calcHeight(options);\n } else if (n.typ == NodeType.OPT) {\n tmpHeight = n.sub.calcHeight(options);\n } else if (n.typ == NodeType.PREDICATE) {\n tmpHeight = n.size.getHeight();\n } else if (n.typ == NodeType.RERUN) {\n tmpHeight = n.sub.calcHeight(options);\n } else if (n.typ == NodeType.ALT) {\n tmpHeight = n.sub.calcHeight(options);\n } else if (n.typ == NodeType.EPS) {\n tmpHeight = options.fontHeight() * 3 / 2;\n if (realHeight < tmpHeight) {\n tmpHeight = options.fontHeight()\n + options.componentGapHeight();\n } else {\n tmpHeight = 0;\n }\n }\n realHeight = Math.max(realHeight, tmpHeight);\n if (n.up) {\n samelevel = false;\n }\n n = n.next;\n }\n return realHeight;\n }", "public int depth ();", "private int numberOfNodes(Node root){\n if(root==null){\n return 0;\n }\n return 1 + numberOfNodes(root.getLeft()) + numberOfNodes(root.getRight());\n }", "public int size(){\n return size(root);\n }", "public int getChildCount() {return children.size();}", "int childrenSize();", "int getDepth();", "long[] getAxesLengthsPlanar();", "long[] getAxesLengths(final List<CalibratedAxis> axes);", "int maxDepth();", "int depth();", "int depth();", "public int countNodes(TreeNode root) {\n int leftHeight = getLeftHeight(root);\n int rightHeight = getRightHeight(root);\n if (leftHeight == rightHeight) {\n return (1 << leftHeight) - 1;\n }\n return countNodes(root.left) + countNodes(root.right) + 1;\n }", "public static int size(Node root){\r\n int count = 0;\r\n for(int i=0; i<root.children.size(); i++){\r\n Node child = root.children.get(i);\r\n count += size(child);\r\n }\r\n return count + 1;\r\n }", "public abstract int getMaxChildren();", "int getMax_depth();", "int size() \n { \n return size(root); \n }", "public int getChildCount() { return data.length; }", "private int countRootScan(SearchContext ctx) {\n\t\tfinal int dimension = numDim;\n\t\tfinal int[] mins = ctx.qmins;\n\t\tfinal int[] maxs = ctx.qmaxs;\n\t\tfinal SearchNode curNode = ctx.current();\n\t\tfinal int contained = curNode.contained;\n\t\tfinal int rootStart = curNode.rootStart;\n\t\tfinal int rootEnd = rootStart + curNode.width;\n\t\tfinal int notContained = dimension - Integer.bitCount(contained);\n\t\tint freqResult = 0;\n\t\tif (notContained == 1) {\n\t\t\t// sequential-scan on final dimension\n\t\t\tfinal int last1d = Integer.numberOfLeadingZeros(~contained);\n\t\t\tfinal int[] basearray = zoPoints[last1d];\n\t\t\tfinal int min = mins[last1d];\n\t\t\tfinal int max = maxs[last1d];\n\t\t\tfor (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tfinal int val = basearray[j];\n\t\t\t\tif (val >= min && val <= max) {\n\t\t\t\t\tfreqResult++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// sequential-scan on not contained dimensions\n\t\t\tint[] dims = ctx.work1;\n\t\t\tfor (int ptr = 0, d = 0; d < dimension; d++) {\n\t\t\t\tif (contained << d < 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdims[ptr++] = d;\n\t\t\t}\n\t\t\tJLOOP: for (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tfor (int ptr = 0; ptr < notContained; ptr++) {\n\t\t\t\t\tfinal int d = dims[ptr];\n\t\t\t\t\tfinal int val = zoPoints[d][j];\n\t\t\t\t\tif (val < mins[d] || val > maxs[d]) {\n\t\t\t\t\t\tcontinue JLOOP;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfreqResult++;\n\t\t\t}\n\t\t}\n\t\treturn freqResult;\n\t}", "int getNodesCount();", "int getNodesCount();", "public int getChildCount() {\r\n if (_children == null) {\r\n return 0;\r\n }\r\n return _children.size();\r\n }", "int sumRootToLeafNumbers();", "int size()\r\n\t{\r\n\t\treturn size(root);\r\n\t}", "@Override\n public int getNumberOfNodes() {\n int numNodes = 0;\n\n if (!isEmpty()) {\n numNodes = root.getNumberOfNodes();\n }\n\n return numNodes;\n }", "public int getChildCount() { return 0; }", "private static int heightOfTree(Tree tree) {\n\n if(tree == null){\n return 0;\n }\n int leftHeight = 0;\n if(tree.left!=null){\n leftHeight = heightOfTree(tree.left);\n }\n int rightHeight = 0;\n if(tree.right!=null){\n rightHeight = heightOfTree(tree.right);\n }\n return (Math.max(leftHeight, rightHeight))+1;\n\n }", "public int countElemsLevel(int level){\n //if is empty, has no elements\n if(this.isEmpty()){\n return 0;\n \n }else{\n //if is the level where i want to count, count this node\n if(level==1){\n return 1;\n \n }else{\n //decrease the level and recursively count the element of the childs\n level--;\n return left.countElemsLevel(level) + right.countElemsLevel(level);\n }\n }\n }", "@Override\n\tpublic int getNumberOfDimensions(final IEntityLogic parent) {\n\t\tint number = 0;\n\t\tfinal Iterator<IFieldLogic> camposPKItera = parent.getFieldKey().getPkFieldSet().iterator();\n\t\twhile (camposPKItera.hasNext()) {\n\t\t\tfinal IFieldLogic campoPKParent = camposPKItera.next();\n\t\t\tfinal int maximoPorEsteCampo = this.getFkFields(campoPKParent).size();\n\t\t\tif (maximoPorEsteCampo > number) {\n\t\t\t\tnumber = maximoPorEsteCampo;\n\t\t\t}\n\t\t}\n\t\treturn number;\n\t}", "public int getDepth();", "public int sizeAboveDepth(int k) {\n\t\t// TODO\n\t\t return sizeAboveDepth(root, k , 0);\n\t }", "public int height() { return height(root); }", "public int levelWidth() {\r\n\t\treturn left_map_width + \r\n\t\t\t\tmap[r()].getProperties().get(\"width\", Integer.class);\r\n\t}", "protected int numChildren() {\r\n return 3;\r\n }", "public int getHeight(){\n\t\tint h=maxDepth(root);\n\t\treturn h;\n\t}", "private int countNodes(TreeNode root) {\n int count = 1;\n if (root.left != null) {\n count += countNodes(root.left);\n }\n if (root.right != null) {\n count += countNodes(root.right);\n }\n return count;\n }", "private static int calculateNodeDepths(Node root, int depth) {\n\t\tif(root == null)\n\t\t\treturn 0;\n//\t\tSystem.out.println(root.data);\n\t\treturn depth + calculateNodeDepths(root.left, depth + 1) + calculateNodeDepths(root.right, depth + 1); \n\t}", "public int countNodes()\r\n {\r\n return countNodes(root);\r\n }", "int depth(Node root) {\n\t\tif (root == null) return 0;\n\t\treturn Math.max(depth(root.left), depth(root.right)) + 1 ;\n\t}", "private int count1D(SearchContext ctx) {\n\t\tfinal SearchNode curNode = ctx.current();\n\n\t\tfinal int last1d = Integer.numberOfLeadingZeros(~curNode.contained);\n\t\tWaveletMatrix wm = zoWM[last1d];\n\t\tfinal WMNode wmNode = curNode.wmNodes[last1d];\n\t\tfinal int lv = wmNode.level;\n\t\tfinal int start = wmNode.start;\n\t\tfinal int end = start + curNode.width;\n\n\t\t// query range\n\t\tfinal int qmin = ctx.qmins[last1d];\n\t\tfinal int qmax = ctx.qmaxs[last1d];\n\n\t\t// path range (possible range of WaveletMatrix node)\n\t\tfinal int pmin = wmNode.path;\n\t\tfinal int pmax = pmin | ((1 << (lv+1)) - 1);\n\n\t\t// relation of query range and path range intersection\n\t\t// [qmin , qmax] query range\n\t\t// [pmin,pmax] path range contain minimum of query range\n\t\t// [pmin,pmax] path range contain maximum of query range\n\t\t// [pmin , pmax] path range fully contain query range\n\n\t\tif (pmax <= qmax) {\n\t\t\treturn end - start - little1D(lv, start, end, qmin, wm);\n\t\t}\n\t\telse if (qmin <= pmin) {\n\t\t\treturn little1D(lv, start, end, qmax + 1, wm);\n\t\t}\n\t\telse {\n\t\t\treturn little1D(lv, start, end, qmax + 1, wm) - little1D(lv, start, end, qmin, wm);\n\t\t}\n\t}", "public int size() \n {\n return size(root);\n }", "public int size() \r\n\t{\r\n\t\treturn size(root);\r\n\t}", "public int size() {\n if (root == null) return 0;\n if (root.left == null && root.right == null) return 1;\n else {\n int treeSize = 0;\n treeSize = size(root, treeSize);\n return treeSize;\n }\n }", "public int size()\n {\n return _root.size();\n }", "public int numberOfFullNodes() {\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t} // if\r\n\t\treturn numberOfFullNodes(root);\r\n\t}", "@Override\n public int size() {\n return size(root); }", "private int getDepthRaw(TreeNode root){\n if (root == null) {\n return 0;\n }\n\n int left = getDepthRaw(root.left);\n int right = getDepthRaw(root.right);\n if (left == -1 || right == -1) {\n return -1;\n }else{\n if (Math.abs(left - right) > 1) {\n return -1;\n }else{\n return Math.max(left, right) + 1;\n }\n }\n }", "public int height(){\n return height(root);\n }", "public int depth(){\n if(root!=null){ // มี node ใน tree\n return height(root);\n }\n else {return -1;}\n }", "public int getChildCount() {\n return this.children.size();\n }", "long[] getAxesLengthsNonPlanar();", "public int size() \n\t {\n\t\t return size(root);\n\t }", "public int geomDim();", "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }" ]
[ "0.6806952", "0.66247195", "0.6463324", "0.6347308", "0.6293308", "0.6292142", "0.6219339", "0.6101192", "0.6100711", "0.6035371", "0.60250765", "0.60235417", "0.5996644", "0.5980305", "0.5959059", "0.5952967", "0.59233546", "0.591472", "0.59113514", "0.5903417", "0.5881717", "0.58808476", "0.5877909", "0.58687043", "0.58544105", "0.5839396", "0.58383924", "0.5822625", "0.5817333", "0.581592", "0.58010596", "0.579817", "0.5785487", "0.5777136", "0.5768799", "0.5765893", "0.576426", "0.57625824", "0.5744741", "0.57420236", "0.5741196", "0.5741188", "0.57296836", "0.5716959", "0.5715704", "0.57144135", "0.570411", "0.56995624", "0.5688334", "0.56803215", "0.56796366", "0.5671229", "0.5670355", "0.56662387", "0.5665447", "0.566154", "0.5650432", "0.5650432", "0.56459737", "0.5635637", "0.56298506", "0.56282824", "0.56208485", "0.5617846", "0.56141967", "0.5605493", "0.5605493", "0.559663", "0.5596103", "0.5594838", "0.55930734", "0.5592451", "0.55917144", "0.5591114", "0.5589392", "0.5586165", "0.55849713", "0.5580216", "0.55783594", "0.556986", "0.5567043", "0.5561544", "0.55602944", "0.5559516", "0.55512846", "0.55478805", "0.5541135", "0.55306226", "0.5525851", "0.5524797", "0.5523267", "0.55159116", "0.55152893", "0.5505078", "0.5502998", "0.5500432", "0.5499483", "0.5494667", "0.54940784", "0.5491022" ]
0.7932527
0
adds members to result array from right to left, starting at offset
private void addParents(Member[] result, int offset, int totalCount, int memberCount, Member member) { int fillCount = totalCount - memberCount; // fill from right to left because we want the parents to appear left offset = offset + totalCount - 1; for (int i = 0; i < fillCount; i++) result[offset--] = member; for (int i = 0; i < memberCount; i++) { result[offset--] = member; member = tree.getParent(member); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void shiftElements() {\n RadarContent[] tempArr = new RadarContent[length - 1];\n for (int i = 0; i < length - 1; i++) {\n tempArr[i] = arrProfiles[i + 1];\n }\n arrProfiles = tempArr;\n length--;\n }", "public void addAll(T[] arr, int from, int length);", "static void rvereseArray(int arr[], int start, int end)\r\n {\r\n int temp;\r\n while(start < end){\r\n \r\n temp = arr[start];\r\n arr[start] = arr[end];\r\n arr[end] = temp;\r\n //rvereseArray(arr, start+1, end-1);\r\n // move the left and right index pointers in toward the center\r\n start++;\r\n end--;\r\n }\r\n }", "void addToEnd(Object[] by);", "public void getArrayAt(double[] result, int resultOffset, int indexStart, int len) {\n final int indexEnd = indexStart + len;\n int destIndex = resultOffset;\n for (int i = indexStart; i < indexEnd; i++,destIndex++) {\n result[destIndex] = getAt(i);\n }\n }", "public void extendArray() {\n int index = size();\n Object[] temp = new Object[index + 1];\n for (int i=0; i < index; i++) {\n temp[i] = AL[i];\n }\n AL = temp;\n }", "protected abstract int localOffsetTransform(int outOffset, boolean inclusive);", "private int[] shiftRight(int start, int[] mag, int n)\n {\n int nInts = (n >>> 5) + start;\n int nBits = n & 0x1f;\n int magLen = mag.length;\n\n if (nInts != start)\n {\n int delta = (nInts - start);\n\n for (int i = magLen - 1; i >= nInts; i--)\n {\n mag[i] = mag[i - delta];\n }\n for (int i = nInts - 1; i >= start; i--)\n {\n mag[i] = 0;\n }\n }\n\n if (nBits != 0)\n {\n int nBits2 = 32 - nBits;\n int m = mag[magLen - 1];\n\n for (int i = magLen - 1; i >= nInts + 1; i--)\n {\n int next = mag[i - 1];\n\n mag[i] = (m >>> nBits) | (next << nBits2);\n m = next;\n }\n\n mag[nInts] >>>= nBits;\n }\n\n return mag;\n }", "void setFirstResult(int offset);", "public void addLeft(T obj) {\r\n if (offset == 0) {\r\n set(uc.getMem().ensureCapacity(objects, count + 2, increment));\r\n //shift them all up by 2 and\r\n ArrayUtils.shiftUp(objects, 2, offset, offset + count - 1, false);\r\n offset += 2;\r\n }\r\n objects[offset - 1] = obj;\r\n count++;\r\n }", "@Override\n public void unshift_native(ThreadContext tc) {\n if (start < 1) {\n int n = 8;\n int i;\n\n /* grow the array */\n int origElems = elems;\n set_size_internal(tc, elems + n);\n\n /* move elements and set start */\n memmove(slots, n, 0, origElems);\n start = n;\n elems = origElems;\n\n /* clear out beginning elements */\n for (i = 0; i < n; i++)\n slots[i] = 0.0;\n }\n\n /* Now do the unshift */\n start--;\n tc.native_type = ThreadContext.NATIVE_NUM;\n slots[start] = tc.native_n;\n elems++;\n }", "private void moveRight(int index) {\n if (index != dataSize)\n for (int i = dataSize; i >= index; i--)\n array[i+1] = array[i];\n }", "private static void shiftRightInPlace(int start, int[] mag, int n)\n {\n int nInts = (n >>> 5) + start;\n int nBits = n & 0x1f;\n int magEnd = mag.length - 1;\n\n if (nInts != start)\n {\n int delta = (nInts - start);\n\n for (int i = magEnd; i >= nInts; i--)\n {\n mag[i] = mag[i - delta];\n }\n for (int i = nInts - 1; i >= start; i--)\n {\n mag[i] = 0;\n }\n }\n\n if (nBits != 0)\n {\n int nBits2 = 32 - nBits;\n int m = mag[magEnd];\n\n for (int i = magEnd; i >= nInts + 1; i--)\n {\n int next = mag[i - 1];\n\n mag[i] = (m >>> nBits) | (next << nBits2);\n m = next;\n }\n\n mag[nInts] >>>= nBits;\n }\n }", "void append(E[] elements, int off, int len);", "void shiftAndAddToRight(BitField fieldToAddToTheRight);", "private void expand() { \n\t\tComparable[] temp = new Comparable[ _data.length * 2 ];\n\t\tfor( int i = 0; i < _data.length; i++ )\n\t \ttemp[i] = _data[i];\n\t\t_data = temp;\n }", "private void fillListRight(int rightEdge, final int offset)\n\t{\n\t\t// Log.v(TAG, \".fillListRight: rightEdge = \" + rightEdge + \", offset = \"\n\t\t// + offset + \", _lastItemPosition = \"\n\t\t// + _lastItemPosition);\n\n\t\tint numItems = _adapter.getCount();\n\t\twhile (rightEdge + offset < getWidth() && _lastItemPosition < numItems - 1)\n\t\t{\n\t\t\t_lastItemPosition++;\n\t\t\tfinal View newRightChild = _adapter.getView(_lastItemPosition, getCachedView(), this);\n\t\t\taddAndMeasureChild(newRightChild, LAYOUT_MODE_RIGHT);\n\t\t\trightEdge += newRightChild.getMeasuredWidth();\n\t\t}\n\t}", "private int[] shiftRightOne(int start, int[] mag)\n {\n int magLen = mag.length;\n\n int m = mag[magLen - 1];\n\n for (int i = magLen - 1; i >= start + 1; i--)\n {\n int next = mag[i - 1];\n\n mag[i] = (m >>> 1) | (next << 31);\n m = next;\n }\n\n mag[start] >>>= 1;\n\n return mag;\n }", "private static void shiftRightOneInPlace(int start, int[] mag)\n {\n int magEnd = mag.length - 1;\n\n int m = mag[magEnd];\n\n for (int i = magEnd; i > start; i--)\n {\n int next = mag[i - 1];\n\n mag[i] = (m >>> 1) | (next << 31);\n m = next;\n }\n\n mag[start] >>>= 1;\n }", "@Test\r\n\tpublic void moveFieldUpZero() {\r\n\t\ttestObj.addNativeField(0);\r\n\t\ttestObj.addNativeField(1);\r\n\t\ttestObj.addRelatedTable(0);\r\n\t\ttestObj.addRelatedTable(1);\r\n\t\ttestObj.makeArrays();\r\n\t\ttestObj.moveFieldUp(0);\r\n\t\ttestObj.makeArrays();\r\n\t\tassertEquals(\"nativeFields should have 0 at position 0\", 0, testObj.getNativeFieldsArray()[0]);\r\n\t\tassertEquals(\"nativeFields should have 1 at position 1\", 1, testObj.getNativeFieldsArray()[1]);\r\n\t\tassertEquals(\"relatedFields should have 0 at position 0\", 0, testObj.getRelatedFieldsArray()[0]);\r\n\t\tassertEquals(\"relatedFields should have 0 at position 1\", 0, testObj.getRelatedFieldsArray()[1]);\r\n\t}", "public void incOffset( Integer increment ) {\n offset += increment;\n }", "private static byte[] get(byte[] array, int offset, int length) {\n byte[] result = new byte[length];\n System.arraycopy(array, offset, result, 0, length);\n return result;\n }", "@Test\r\n\tpublic void moveFieldUpOne() {\r\n\t\ttestObj.addNativeField(0);\r\n\t\ttestObj.addNativeField(1);\r\n\t\ttestObj.addRelatedTable(0);\r\n\t\ttestObj.addRelatedTable(1);\r\n\t\ttestObj.makeArrays();\r\n\t\ttestObj.moveFieldUp(1);\r\n\t\ttestObj.makeArrays();\r\n\t\tassertEquals(\"nativeFields should have 1 at position 1\", 1, testObj.getNativeFieldsArray()[1]);\r\n\t\tassertEquals(\"nativeFields should have 0 at position 0\", 0, testObj.getNativeFieldsArray()[0]);\r\n\t\tassertEquals(\"relatedFields should have 0 at position 1\", 0, testObj.getRelatedFieldsArray()[1]);\r\n\t\tassertEquals(\"relatedFields should have 0 at position 0\", 0, testObj.getRelatedFieldsArray()[0]);\r\n\t}", "public static <E> void rightShift (E[] array, int shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// save items displaced off of right end\r\n\t\t\tArrayList<E> temp = new ArrayList<E>();\r\n\t\t\tint length = array.length;\r\n\t\t\tfor (int i = length - shift ; i < length; i++) {\r\n\t\t\t\ttemp.add(array[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// copy in place\r\n\t\t\tfor (int i = length - 1; i > shift - 1; i--) {\r\n\t\t\t\tarray[i] = array[i - shift];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// copy displaced items to left end\r\n\t\t\tfor (int i = 0; i < shift; i++) {\r\n\t\t\t\tarray[i] = temp.get(i);\r\n\t\t\t}\r\n\t\t} else return;\r\n\t}", "private void rearrangeRestOfDatabase(byte[] startRecord, int start) {\n int totalRecords = Integer.parseInt(getNumberOfRecords(\"normal\"));\n if (start == totalRecords) {\n updateRecords(\"normal\", startRecord, start);\n updateNumRecords(\"normal\", totalRecords + 1);\n } else if (start >= 0 && start <= totalRecords + 1) {\n int i;\n for (i = start; i <= totalRecords; i++) {\n byte [] temp = getRecordBytes(\"normal\", i);\n updateRecords(\"normal\", startRecord, i);\n startRecord = temp;\n }\n totalRecords++;\n updateNumRecords(\"normal\", totalRecords);\n }\n }", "void expand(List<R> results);", "private static void test() {\n\t\tint i = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[++i] = 0;\n\t\tprintArray(arr);\n\t\ti = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[i++] = 0;\n\t\tprintArray(arr);\n\t\t\n\t}", "void add(byte[] data, int offset, int length);", "private void fillList(final int offset)\n\t{\n\t\t// Log.v(TAG, \".fillList: offset = \" + offset);\n\n\t\tfinal int rightEdge = getChildAt(getChildCount() - 1).getRight();\n\t\tfillListRight(rightEdge, offset);\n\n\t\tfinal int leftEdge = getChildAt(0).getLeft();\n\t\tfillListLeft(leftEdge, offset);\n\t}", "private void extendContainer() {\n int newLength = container.length * 2;\n newLength = (newLength % 2 != 0) ? newLength - 1 : newLength;\n Entry<K, V>[] t = new Entry[newLength];\n for (Entry<K, V> e : container) {\n if (e != null) {\n int index = indexFor(e.key);\n t[index] = e;\n }\n }\n container = t;\n }", "public static void main(String[] args) {\n int[] list = {1, 2, 3, 4, 5};\n System.out.println(\"OldList = \" + Arrays.toString(list));\n ShiftArrayRight(list);\n System.out.println(\"NewList = \" + Arrays.toString(list));\n\n }", "public static MappeableContainer[] addOffset(MappeableContainer source, char offsets) {\n // could be a whole lot faster, this is a simple implementation\n if(source instanceof MappeableArrayContainer) {\n MappeableArrayContainer c = (MappeableArrayContainer) source;\n MappeableArrayContainer low = new MappeableArrayContainer(c.cardinality);\n MappeableArrayContainer high = new MappeableArrayContainer(c.cardinality);\n for(int k = 0; k < c.cardinality; k++) {\n int val = (c.content.get(k));\n val += (int) (offsets);\n if(val <= 0xFFFF) {\n low.content.put(low.cardinality++, (char) val);\n } else {\n high.content.put(high.cardinality++, (char) val);\n }\n }\n return new MappeableContainer[] {low, high};\n } else if (source instanceof MappeableBitmapContainer) {\n MappeableBitmapContainer c = (MappeableBitmapContainer) source;\n MappeableBitmapContainer low = new MappeableBitmapContainer();\n MappeableBitmapContainer high = new MappeableBitmapContainer();\n low.cardinality = -1;\n high.cardinality = -1;\n final int b = (int) (offsets) >>> 6;\n final int i = (int) (offsets) % 64;\n if(i == 0) {\n for(int k = 0; k < 1024 - b; k++) {\n low.bitmap.put(b + k, c.bitmap.get(k));\n }\n for(int k = 1024 - b; k < 1024 ; k++) {\n high.bitmap.put(k - (1024 - b),c.bitmap.get(k));\n }\n } else {\n low.bitmap.put(b + 0, c.bitmap.get(0) << i);\n for(int k = 1; k < 1024 - b; k++) {\n low.bitmap.put(b + k, (c.bitmap.get(k) << i) \n | (c.bitmap.get(k - 1) >>> (64-i)));\n }\n for(int k = 1024 - b; k < 1024 ; k++) {\n high.bitmap.put(k - (1024 - b),\n (c.bitmap.get(k) << i) \n | (c.bitmap.get(k - 1) >>> (64-i)));\n }\n high.bitmap.put(b, (c.bitmap.get(1024 - 1) >>> (64-i)));\n }\n return new MappeableContainer[] {low.repairAfterLazy(), high.repairAfterLazy()};\n } else if (source instanceof MappeableRunContainer) {\n MappeableRunContainer c = (MappeableRunContainer) source;\n MappeableRunContainer low = new MappeableRunContainer();\n MappeableRunContainer high = new MappeableRunContainer();\n for(int k = 0 ; k < c.nbrruns; k++) {\n int val = (c.getValue(k));\n val += (int) (offsets);\n int finalval = val + (c.getLength(k));\n if(val <= 0xFFFF) {\n if(finalval <= 0xFFFF) {\n low.smartAppend((char)val,c.getLength(k));\n } else {\n low.smartAppend((char)val,(char)(0xFFFF-val));\n high.smartAppend((char) 0,(char)finalval);\n }\n } else {\n high.smartAppend((char)val,c.getLength(k));\n }\n }\n return new MappeableContainer[] {low, high};\n }\n throw new RuntimeException(\"unknown container type\"); // never happens\n }", "private void merge(T[] array, int beginIndex, int middleIndex, int endIndex) {\n int fst = beginIndex, snd = middleIndex;\n copy(array, beginIndex, endIndex);\n for (int k = beginIndex; k < endIndex; k++) {\n if (fst >= middleIndex)\n assign(array, k, temp[snd++]);\n else if (snd >= endIndex)\n assign(array, k, temp[fst++]);\n else if (compareTo(temp, fst, snd) < 0)\n assign(array, k, temp[fst++]);\n else\n assign(array, k, temp[snd++]);\n }\n }", "public void reallocate()\r\n\t{\r\n\t\tE[] newArray = (E[]) new Object[capacity * 2];\r\n\t\tint i = 0;\r\n\t\tfor(i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tnewArray[i] = innerArray[(front + i) % capacity];\r\n\t\t\tSystem.out.println((front + i) % capacity);\r\n\t\t}\r\n\t\tfront = 0;\r\n\t\trear = this.size() - 1;\r\n\t\tcapacity = capacity * 2;\r\n\t\tinnerArray = newArray;\r\n\t}", "private Register[] createJoinResult(Register[] left, Register[] right) {\n Register[] result = new Register[left.length + right.length - 1]; // -1 because of joining key\n\n int pos = 0;\n for (int i = 0; i < left.length; i++) {\n result[pos++] = left[i];\n }\n\n for (int i = 0; i < right.length; i++) {\n if (i != rightJoinAttributeIndex) {\n result[pos++] = right[i];\n }\n }\n\n return result;\n }", "public abstract double[] roughOffsets();", "@Test\n\tpublic void rotateArrayUsingCalculatePositionAlgorithm_rotateLeftTwoItems() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 2);\n\t\tassertThat(rotatedArray[0], equalTo(3));\n\t\tassertThat(rotatedArray[1], equalTo(4));\n\t\tassertThat(rotatedArray[2], equalTo(5));\n\t\tassertThat(rotatedArray[3], equalTo(1));\n\t\tassertThat(rotatedArray[4], equalTo(2));\n\t}", "private void moveLeft(int index) {\n for (int i = index; i < dataSize; i++) {\n array[i] = array[i + 1];\n }\n\n array[dataSize] = 0;\n }", "public void linearize() {\r\n Object[] temp = new Object[size];\r\n int k = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[i] = cir[k];\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n }", "private <T> void shiftArrayElements(T[] orderedArray, int i) {\n\t\tfor (int j = orderedArray.length - 1; i < j; j--) {\r\n\t\t\torderedArray[j] = orderedArray[j - 1];\r\n\t\t}\r\n\t}", "private void combine( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int mid, int high )\r\n\t{\r\n\t\t//copy the array into auxillary array for scratchwork\r\n\t\tfor (int index = low; index <= high; index++ )\r\n\t\t{\r\n\t\t\tauxillary.set(index, array.get(index));\r\n\t\t}\r\n\t\t\r\n\t\tint lowIndex = low;\r\n\t\tint midIndex= mid + 1;\r\n\t\tfor (int count= low; count <= high; count++)\r\n\t\t{\r\n\t\t\tif (lowIndex > mid)\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(midIndex));\r\n\t\t\t\tmidIndex++;\r\n\t\t\t}\r\n\t\t\telse if (midIndex > high)\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(lowIndex));\r\n\t\t\t\tlowIndex++;\r\n\t\t\t}\r\n\t\t\t// if the element at midIndex is smaller than the element at the lowIndex, place it into the\r\n\t\t\t// real array before the element at lowIndex\r\n\t\t\telse if((auxillary.get(midIndex).compareTo(auxillary.get(lowIndex)) == -1))\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(midIndex));\r\n\t\t\t\tmidIndex++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(lowIndex));\r\n\t\t\t\tlowIndex++;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t}", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n int[] intArray0 = new int[3];\n intArray0[0] = 0;\n intArray0[1] = 1025;\n intArray0[2] = 0;\n int int0 = MethodWriter.getNewOffset(intArray0, intArray0, 187, 1139);\n assertEquals(1977, int0);\n }", "public void getnext9(float x[], float y[], int i, int j) {\n y[j+0] = x[i+0];\n y[j+1] = x[i-1];\n y[j+2] = x[i+1];\n y[j+3] = x[i-cols];\n y[j+4] = x[i+cols];\n y[j+5] = x[i-cols-1];\n y[j+6] = x[i-cols+1];\n y[j+7] = x[i+cols-1];\n y[j+8] = x[i+cols+1];\n }", "private static <T> void backtracking(T[] arr, int index, List<T[]> result) {\n if (index == arr.length) {\n result.add(arr.clone());\n }\n for (int i = index; i < arr.length; i++) {\n swap(index, i, arr);\n backtracking(arr, index + 1, result);\n swap(index, i, arr);\n }\n }", "public Object[] toArray() {\r\n \tObject[] resultForward = new Object[size];\r\n \tboolean closedForward = true;\r\n \tint iForward = 0;\r\n \tfor (Entry e = header.next; e != header && iForward < size; e = e.next) {\r\n \t\tif (e == null) {\r\n \t\t\tclosedForward = false;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\tresultForward[iForward++] = e.element;\r\n \t}\r\n\r\n \tObject[] resultBackward = new Object[size];\r\n \tboolean closedBackward = true;\r\n \tint iBackward = size;\r\n \tfor (Entry e = header.previous; e != header && iBackward < size; e = e.previous) {\r\n \t\tif (e == null) {\r\n \t\t\tclosedBackward = false;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\tresultBackward[--iBackward] = e.element;\r\n \t}\r\n\r\n \tif (closedForward || (!closedForward && iBackward == size)) {\r\n \t\treturn resultForward;\r\n \t}\r\n \telse if (closedBackward || (!closedBackward && iForward == 0)) {\r\n \t\treturn resultBackward;\r\n \t}\r\n \telse {\r\n \t\tObject[] result = new Object[size];\r\n \t\tList<?> l = Arrays.asList(resultBackward);\r\n \t\tCollections.reverse(l);\r\n \t\tresultBackward = l.toArray();\r\n \t\tSystem.arraycopy(resultForward, 0, result, 0, iForward);\r\n \t\tif (iForward < size)\r\n \t\t\tSystem.arraycopy(resultBackward, 0, result, iForward, (size - iBackward));\r\n \t\treturn result;\r\n \t}\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}", "private void combine( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int mid, int high ){\n\t\tfor(int iterator=low;iterator<high;iterator++){\n\t\t\tauxillary.set(iterator, array.get(iterator));\n\t\t}\n\t\tint arrayPosition=low;\n\t\tint lowPosition=low;\n\t\tint midPosition=mid+1;\n\t\twhile(lowPosition<mid && midPosition<high){\n\t\t\tif(auxillary.get(lowPosition).compareTo(auxillary.get(midPosition))){\n\t\t\t\tarray.set(arrayPosition, auxillary.get(lowPosition));\n\t\t\t\tlowPosition++;\n\t\t\t}else{\n\t\t\t\tarray[arrayPosition]=auxillary[midPosition];\n\t\t\t\tmidPosition++;\n\t\t\t}\n\t\t\tarrayPosition++;\n\t\t}\n\t\tif(lowPosition==mid){\n\t\t\twhile(midPosition<high){\n\t\t\t\tarray[arrayPosition]=auxillary[midPosition];\n\t\t\t\tmidPosition++;\n\t\t\t\tarrayPosition++;\n\t\t\t}\n\t\t}else if(midPosition==high){\n\t\t\twhile(lowPosition<mid){\n\t\t\t\tarray[arrayPosition]=auxillary[lowPosition];\n\t\t\t\tlowPosition++;\n\t\t\t\tarrayPosition++;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "com.walgreens.rxit.ch.cda.IVLPPDPQ addNewOffset();", "public void insertByRightShift(Object elem, int pos){\n if(size==cir.length){\n resizeStartUnchanged(cir.length+3);\n }\n int nshift=size-pos;\n int from=(start+size-1)%cir.length;\n int to=(from+1)%cir.length;\n for(int i=0;i<nshift;i++){\n cir[to]=cir[from];\n to=from;\n from--;\n if(from==-1){\n from=cir.length-1;\n }\n }\n int index=(start+pos)%cir.length;\n cir[index]=elem;\n size++;\n }", "private void grow() {\n T[] arr_temp = (T[]) new Object[arr.length*2];\n for (int i=0; i<arr.length; i++){\n arr_temp[i] = arr[i];\n }\n arr = arr_temp;\n }", "private static int flipArray(char [] dest, int start, int e, int w){\n int r;\n if (w > start) {\n // shift, assume small buffer size so don't use arraycopy\n r = w;\n w = start;\n while (r < e) {\n dest[w++] = dest[r++];\n }\n } else {\n w = e;\n }\n return w;\n }", "int[] populateArray(int[] firstArr,int[] secondArr){\n\t\tlength = firstArr.length + secondArr.length; //Getting length of the resultant array\n\t\tresultArr = new int[length]; //set resultant array length\n\t\tfor(kCounter = 0 ; kCounter < length; kCounter++){\n\t\t\t//checking index of the array is even or odd\n\t\t\tif(kCounter % 2 == 0){\n\t\t\t\tresultArr[kCounter] = secondArr[iCounter]; //if position is even then add element to even index\n\t\t\t\tiCounter++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tresultArr[kCounter] = firstArr[jCounter]; //if position is odd then add element to odd index\n\t\t\t\tjCounter++;\n\t\t\t}\n\t\t}\n\t\treturn resultArr;\n\t}", "public static void shift(){\n int[] x= {1, 5, 10, 7, -2};\n \n for (int i =0; i<x.length-1; i++){\n x[i]=x[i+1];\n }\n x[x.length-1]=0;\n for (int j=0; j<x.length; j++){\n System.out.println(x[j]);\n }\n\n\n\n }", "private static void zoomInArrayElmnt(\n String curPath,\n Object curObj,\n String idxStr,\n int curIndex,\n ArrayList<String> accessors,\n HashSet<Variable> variables) {\n int nextIndex = curIndex + 1;\n int elementIndex = 0;\n int target = Integer.parseInt(idxStr);\n String nextPath = curPath + \".[\" + idxStr + \"]\";\n Object nextObj = null;\n\n String typeString = curObj.getClass().getComponentType().toString();\n switch (typeString) {\n case \"boolean\":\n for (boolean element : (boolean[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"byte\":\n for (byte element : (byte[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"short\":\n for (short element : (short[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"int\":\n for (int element : (int[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"long\":\n for (long element : (long[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"char\":\n for (char element : (char[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"float\":\n for (float element : (float[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"double\":\n for (double element : (double[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n default:\n for (Object element : (Object[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n }\n zoomInAndGetVars(nextObj, accessors, nextIndex, nextPath, variables);\n }", "private void expand() {\n\n intElements = copyIntArray(intElements, intElements.length * 2);\n doubleElements = copyDoubleArray(doubleElements, doubleElements.length * 2);\n stringElements = copyStringArray(stringElements, stringElements.length * 2);\n typeOfElements = copyIntArray(typeOfElements, typeOfElements.length * 2);\n }", "private long newBufferAndOffset(E[] nextBuffer, long index)\r\n/* 222: */ {\r\n/* 223:475 */ this.consumerBuffer = nextBuffer;\r\n/* 224:476 */ this.consumerMask = (LinkedArrayQueueUtil.length(nextBuffer) - 2 << 1);\r\n/* 225:477 */ return LinkedArrayQueueUtil.modifiedCalcElementOffset(index, this.consumerMask);\r\n/* 226: */ }", "private int[] appendArray(int[] array, int x) {\n int[] result = new int[array.length + 1];\n\n for (int i = 0; i < array.length; i++)\n result[i] = array[i];\n\n result[result.length - 1] = x;\n\n return result;\n }", "private void grow()\n\t{\n\t\tint temp[] = new int[count * 2];\n\t\tfor(int index = 0; index < count; index = index + 1)\n\t\t\ttemp[index] = array1[index];\n\t\tarray1 = temp;\n\t}", "private static void rotate(int[][] a, start, end){\n for (int current = 0; start+current < end; current++){\n int temp = a[start][start+current]; // save the top \n a[start][start+current] = a[end-current][start]; // left to top moveing left elemnt to top\n a[end-current][start] = a[end][end-current]; // bottom element to left \n a[end][end-current] = a[start+current][end]; // right element to bottom \n a[start+current][end] = temp; // top elemrnt to right\n }\n}", "private static void combinationUtil(Variable arr[], Variable data[], int start,\n int end, int index, int r, List<Variable[]> output) {\n if (index == r) {\n Variable[] temp = new Variable[r];\n temp = data.clone();\n output.add(temp);\n return;\n }\n\n // replace index with all possible elements. The condition \n // \"end-i+1 >= r-index\" makes sure that including one element \n // at index will make a combination with remaining elements \n // at remaining positions \n for (int i = start; i <= end && end - i + 1 >= r - index; i++) {\n data[index] = arr[i];\n combinationUtil(arr, data, i + 1, end, index + 1, r, output);\n }\n }", "public Offset add(Offset other) {\n return new Offset(other.X + X, other.Y + Y);\n }", "@Override\n\tprotected T pickPivot(T[] array, int start, int end) {\n\t\treturn array[start];\n\t}", "static void primitiveRightShift(int[] a, int len, int n) {\n int n2 = 32 - n;\n for (int i=len-1, c=a[i]; i > 0; i--) {\n int b = c;\n c = a[i-1];\n a[i] = (c << n2) | (b >>> n);\n }\n a[0] >>>= n;\n }", "private Location[] overrunRight () {\n Location nextLocation;\n Location nextCenter;\n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == ONE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(myCanvasBounds.getWidth(), getY());\n nextCenter = new Location(0, getY());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading();\n if (getHeading() > HALF_TURN_DEGREES) {\n angle = -(getHeading() - THREE_QUARTER_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation =\n new Location(myCanvasBounds.getWidth(), getY() +\n (myCanvasBounds.getWidth() - getX()) /\n Math.tan(angle));\n nextCenter =\n new Location(0, getY() + (myCanvasBounds.getWidth() - getX()) / Math.tan(angle));\n \n return new Location[] { nextLocation, nextCenter };\n }", "public abstract void offset(DataType x, DataType y, DataType z);", "protected int addInfo(syntaxMap toAdd){\n if(index == 10){\n return 0;\n }\n else if(index < 5) {\n this.array1[index] = toAdd;\n }\n else{\n this.array2[index - 5] = toAdd;\n }\n ++index;\n return 1;\n }", "private byte[] increment(byte[] array) {\n for (int i = array.length - 1; i >= 0; --i) {\n byte elem = array[i];\n ++elem;\n array[i] = elem;\n if (elem != 0) { // Did not overflow: 0xFF -> 0x00\n return array;\n }\n }\n return null;\n }", "private void shiftAndCopyIfNeeded(int newSize, int pos) {\n\t\tif (array.length < newSize) {\n\t\t\t// create new array of desired size, at least newSize big\n\t\t\tObject[] newArray = new Object[newSize + EXTRA_SPACE];\n\t\t\t// copy all elements from array into newArray\n\t\t\tSystem.arraycopy(array, 0, newArray, 0, size);\n\t\t\t// use the newArray instead of the old \n\t\t\tarray = newArray;\n\t\t}\n\t\t// if there are elements above pos\n\t\tif (pos < size) {\n\t\t\t// shift content from pos and above\n\t\t\t// if newSize is greater than size, makes room for (newSize - size) elements at pos\n\t\t\t// in this case, make sure to fill the gap with new elements\n\t\t\t// if newSize is less than size, overwrites (newSize - size) elements below pos\n\t\t\tSystem.arraycopy(array, pos, array, newSize - (size - pos), size - pos);\n\t\t}\n\t\t// finally, use the new size\n\t\tsize = newSize;\n\t}", "static void rotate_right(int[] arr, int rotate){\n for (int j = 0; j < rotate; j++) {\n int temp = arr[j];\n for (int i = j; i < arr.length+rotate; i+=rotate) {\n if(i-rotate < 0)\n temp = arr[i];\n else if(i >= arr.length)\n arr[i-rotate] = temp;\n else\n arr[i-rotate] = arr[i]; \n }\n }\n }", "public void insertByRightShift(Object elem, int pos) {\r\n if (pos > 0 || pos < size) {\r\n if (size == cir.length) {\r\n resizeStartUnchanged(cir.length + 3);\r\n }\r\n int nshift = size - pos;\r\n int from = ((start + size) - 1) % cir.length;\r\n int to = (from + 1) % cir.length;\r\n for (int i = 0; i < nshift; i++) {\r\n cir[to % cir.length] = cir[from % cir.length];\r\n to = from;\r\n from--;\r\n if (from < 0) {\r\n from = cir.length - 1;\r\n }\r\n }\r\n cir[(start + pos) % cir.length] = elem;\r\n // System.out.println(size);\r\n size++;\r\n }\r\n }", "public void align() {\n // get min values\n int x = Integer.MAX_VALUE;\n int y = x;\n for (int i = 0; i < nodeCount; i++) {\n if (xs[i] < x)\n x = xs[i];\n if (ys[i] < y)\n y = ys[i];\n }\n for (int i = 0; i < buildingCount; i++) {\n if (buildingXs[i] < x)\n x = buildingXs[i];\n if (buildingYs[i] < y)\n y = buildingYs[i];\n for (int j = 0; j < buildingApi[i].length; j++) {\n if (buildingApi[i][j][0] < x)\n x = buildingApi[i][j][0];\n if (buildingApi[i][j][1] < y)\n y = buildingApi[i][j][1];\n }\n }\n // now alter them all\n int dx = x - 1;\n int dy = y - 1;\n System.out.println(\"Shifting by (\" + (-dx) + \",\" + (-dy) + \").\");\n for (int i = 0; i < nodeCount; i++) {\n xs[i] -= dx;\n ys[i] -= dy;\n }\n for (int i = 0; i < buildingCount; i++) {\n buildingXs[i] -= dx;\n buildingYs[i] -= dy;\n for (int j = 0; j < buildingApi[i].length; j++) {\n buildingApi[i][j][0] -= dx;\n buildingApi[i][j][1] -= dy;\n }\n }\n }", "@Test\r\n\tpublic void moveFieldDownOne() {\r\n\t\ttestObj.addNativeField(0);\r\n\t\ttestObj.addNativeField(1);\r\n\t\ttestObj.addRelatedTable(0);\r\n\t\ttestObj.addRelatedTable(1);\r\n\t\ttestObj.makeArrays();\r\n\t\ttestObj.moveFieldDown(1);\r\n\t\ttestObj.makeArrays();\r\n\t\tassertEquals(\"nativeFields should have 0 at position 0\", 0, testObj.getNativeFieldsArray()[0]);\r\n\t\tassertEquals(\"nativeFields should have 1 at position 1\", 1, testObj.getNativeFieldsArray()[1]);\r\n\t\tassertEquals(\"relatedFields should have 0 at position 0\", 0, testObj.getRelatedFieldsArray()[0]);\r\n\t\tassertEquals(\"relatedFields should have 0 at position 1\", 0, testObj.getRelatedFieldsArray()[1]);\r\n\t}", "public interface Groups {\n\n //region Arrays\n static <T> boolean isNullOrEmpty(T[] original) {\n return original == null || original.length == 0;\n }\n\n /**\n * expend a Array\n *\n * @param origin the source\n * @param prepend elements to prepend\n * @param append elements to append\n * @param <T> type\n * @return array\n */\n static <T> T[] expend(T[] origin, T[] prepend, T[] append) {\n if (isNullOrEmpty(origin)) return append(prepend, append);\n if (isNullOrEmpty(prepend)) return append(origin, append);\n if (isNullOrEmpty(append)) return prepend(origin, prepend);\n val x = java.util.Arrays.copyOf(origin, prepend.length + origin.length + append.length);\n System.arraycopy(prepend, 0, x, 0, prepend.length);\n System.arraycopy(origin, 0, x, prepend.length, origin.length);\n System.arraycopy(append, 0, x, (prepend.length + origin.length), append.length);\n return x;\n\n }\n\n /**\n * prepend a Array\n *\n * @param origin the source\n * @param prepend the element to prepended\n * @param <T> type\n * @return array\n */\n @SafeVarargs\n static <T> T[] prepend(T[] origin, T... prepend) {\n if (isNullOrEmpty(origin)) return prepend;\n if (isNullOrEmpty(prepend)) return origin;\n val x = java.util.Arrays.copyOf(origin, origin.length + prepend.length);\n System.arraycopy(prepend, 0, x, 0, prepend.length);\n System.arraycopy(origin, 0, x, prepend.length, origin.length);\n return x;\n }\n\n /**\n * append a Array\n *\n * @param origin the source\n * @param append the element to append\n * @param <T> type\n * @return array\n */\n @SafeVarargs\n static <T> T[] append(T[] origin, T... append) {\n if (isNullOrEmpty(origin)) return append;\n if (isNullOrEmpty(append)) return origin;\n val x = java.util.Arrays.copyOf(origin, origin.length + append.length);\n System.arraycopy(append, 0, x, origin.length, append.length);\n return x;\n }\n\n Object[] EMPTY_OBJECT = {};\n\n @SuppressWarnings(\"unchecked\")\n static <T> T[] empty() {\n return (T[]) EMPTY_OBJECT;\n }\n\n @SuppressWarnings(\"unchecked\")\n static <T> T[] create(Class<T> component, int size) {\n return (T[]) Array.newInstance(component, size);\n }\n\n @SuppressWarnings(\"unchecked\")\n static <T, R> R[] createGeneric(Class<T> component, int size) {\n return (R[]) Array.newInstance(component, size);\n }\n\n //endregion\n\n //region List\n @SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n List<I> castUp(List<T> src) {\n if (src == null || src.isEmpty()) return Collections.emptyList();\n return ((List<I>) src);\n }\n\n /**\n * cast or convert list to a sub type list\n *\n * @param type the target type\n * @param src the source list\n * @param converter converter method\n * @param every dose convert everyone or just check first\n * @param <T> target type\n * @param <I> source type or interface\n * @return list\n */\n @SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n List<T> castDown(Class<T> type, List<I> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptyList();\n if (type.isAssignableFrom(src.get(0).getClass()) && !every) {\n return ((List<T>) src);\n }\n val list = new ArrayList<T>();\n for (I i : src) {\n T t = converter.apply(i);\n list.add(t);\n }\n return list;\n }\n //endregion\n\n //region Set\n @SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n Set<I> castUp(Set<T> src) {\n if (src == null || src.isEmpty()) return Collections.emptySet();\n return ((Set<I>) src);\n }\n\n /**\n * cast or convert list to a sub type list\n *\n * @param type the target type\n * @param src the source list\n * @param converter converter method\n * @param every dose convert everyone or just check first\n * @param <T> target type\n * @param <I> source type or interface\n * @return list\n */\n @SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n Set<T> castDown(Class<T> type, Set<I> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptySet();\n val first = src.iterator().next();\n if (type.isAssignableFrom(first.getClass()) && !every) {\n return ((Set<T>) src);\n }\n val list = new HashSet<T>();\n for (I i : src) {\n T t = converter.apply(i);\n list.add(t);\n }\n return list;\n }\n //endregion\n\n //region Map\n @SuppressWarnings(\"unchecked\")\n static <K, T extends I, I>\n Map<K, I> castUp(Map<K, T> src) {\n if (src == null || src.isEmpty()) return Collections.emptyMap();\n return ((Map<K, I>) src);\n }\n\n @SuppressWarnings(\"unchecked\")\n static <V, T extends I, I>\n Map<I, V> castUpKey(Map<T, V> src) {\n if (src == null || src.isEmpty()) return Collections.emptyMap();\n return ((Map<I, V>) src);\n }\n\n @SuppressWarnings(\"unchecked\")\n static <K, T extends I, I>\n Map<K, T> castDown(Class<T> type, Map<K, I> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptyMap();\n val first = src.values().iterator().next();\n if (type.isAssignableFrom(first.getClass()) && !every) {\n return ((Map<K, T>) src);\n }\n val list = new HashMap<K, T>();\n src.forEach((k, v) -> list.put(k, converter.apply(v)));\n return list;\n }\n\n @SuppressWarnings(\"unchecked\")\n static <V, T extends I, I>\n Map<T, V> castDownKey(Class<T> type, Map<I, V> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptyMap();\n val first = src.values().iterator().next();\n if (type.isAssignableFrom(first.getClass()) && !every) {\n return ((Map<T, V>) src);\n }\n val list = new HashMap<T, V>();\n src.forEach((k, v) -> list.put(converter.apply(k), v));\n return list;\n }\n\n @SafeVarargs\n static <K, V> Map<K, V> hashMapOf(Map.Entry<K, V>... entries) {\n val m = new HashMap<K, V>();\n for (Map.Entry<K, V> e : entries) {\n if (m.containsKey(e.getKey()))\n throw new IllegalStateException(\"key '\" + e.getKey() + \"' is already exists !\");\n m.put(e.getKey(), e.getValue());\n }\n return m;\n }\n\n @SafeVarargs\n static <K, V> Map<K, V> unmodifiableMapOf(Map.Entry<K, V>... entries) {\n return Collections.unmodifiableMap(hashMapOf(entries));\n }\n //endregion\n\n\n static <K, V> Map.Entry<K, V> entryOf(K k, V v) {\n return new AbstractMap.SimpleEntry<>(k, v);\n }\n}", "public void customLoadMoreDataFromApi(int offset) {\n }", "static long[] riddle(long[] arr) {\n // complete this function\n return arr;\n }", "int getOffset();", "int getOffset();", "int getOffset();", "public int add(T[] newData, int offset, int newLength) {\n\t\tif(newLength < 1 || newData == null || offset+newLength > newData.length) {\n\t\t\treturn 0;\n\t\t}\n\t\t// If there is more data to add then available space in the array\n\t\tif(newLength > (array.length - length)) {\n\t\t\t// Double the array size\n\t\t\texpandArray(array.length);\n\t\t}\n\n\t\t// If the new data will wrapping around, add the new data and wrap around to fit\n\t\tif((index + length) < array.length && newLength > (array.length - (index + length))) {\n\t\t\t// The number of elements available up to the end of the array before needing to wrap around\n\t\t\tint tailLength = array.length - (index + length);\n\t\t\t// Copy data up to the end of the array\n\t\t\tSystem.arraycopy(newData, offset, array, index + length, tailLength);\n\t\t\t// Copy rest of data 'wrapped around' to the beginning of the array\n\t\t\tSystem.arraycopy(newData, offset+tailLength, array, 0, newLength-tailLength);\n\t\t}\n\t\t// Else if the data fits without wrapping around, add the new data\n\t\telse {\n\t\t\tSystem.arraycopy(newData, offset, array, (index + length) % array.length, newLength);\n\t\t}\n\t\t// Adjust the length\n\t\tlength += newLength;\n\t\t// Return the number of elements successfully added\n\t\treturn newLength;\n\t}", "@Override\r\n\tpublic void addToken(char[] array, int start, int end, int tokenType, int startOffset) {\r\n\t\tsuper.addToken(array, start,end, tokenType, startOffset);\r\n\t\tzzStartRead = zzMarkedPos;\r\n\t}", "public abstract void reverseRange(int index, int count, int stride);", "private Position[] concatArrays(Position[] first, Position[] second)\r\n {\r\n int size = first.length + second.length;\r\n Position[] a = new Position[size];\r\n int pt = 0;\r\n\r\n for (Position tmpPos : first)\r\n {\r\n a[pt] = tmpPos;\r\n pt++;\r\n }\r\n\r\n for (Position tmpPos : second)\r\n {\r\n a[pt] = tmpPos;\r\n pt++;\r\n }\r\n\r\n return a;\r\n }", "@Test\n\tpublic void forwardCopy_test2() {\n\t\tSystem.out.println(\"copy前:\" + Arrays.toString(intArr));\t\n\t\tint index = 1;\n//\t\tArrayUtil.forwardCopy(intArr, index, 2);\n//\t\t//[2, 8, 3, 6, 0, 0, 0, 0]\n//\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\n//\t\tint len = intArr.length;\n//\t\tfor(int i = index; i< intArr.length - 1; i++){\n//\t\t\tintArr[i] = intArr[i+1];\n//\t\t}\n//\t\t//[2, 4, 3, 6, 0, 0, 0, 0]\n\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\t\n\t}", "public abstract void startArray();", "public int[] increaseBy2(int[] arr) {\n return null;\n }", "private void rmerge(int[] arr, int a, int l, int r) {\n\t\tfor (int i = 0; i < l; i += r) {\n\t\t\t// select smallest arr[p0+n*r]\n\t\t\tint q = i;\n\t\t\tfor (int j = i + r; j < l; j += r) {\n\t\t\t\tif (this.reads.compare(arr[a + q], arr[a + j]) > 0) {\n\t\t\t\t\tq = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (q != i) {\n\t\t\t\taswap(arr, a + i, a + q, r); // swap it with current position\n\t\t\t}\n\t\t\tif (i != 0) {\n\t\t\t\taswap(arr, a + l, a + i, r); // swap current position with buffer\n\t\t\t\tbackmerge(arr, a + (l + r - 1), r, a + (i - 1), r); // buffer :merge: arr[i-r..i) -> arr[i-r..i+r)\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void removeThenAdd() {\n String[] expect = new String[] {\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\"};\n ard.addFirst(\"k\");\n ard.addFirst(\"j\");\n ard.addFirst(\"i\");\n ard.addFirst(\"h\");\n ard.addFirst(\"g\");\n ard.addFirst(\"f\");\n ard.addFirst(\"e\");\n ard.addFirst(\"d\");\n ard.addFirst(\"c\");\n ard.addFirst(\"b\");\n ard.addFirst(\"a\");\n\n ard.removeLast();\n ard.addFirst(\"first last element\");\n expect[10] = \"first last element\";\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n System.out.println(\"WRAPAROUND BEHAVIOR TEST\");\n System.out.println(\"removelast then addfirst\");\n System.out.println(\"should look like this after resize: \" + Arrays.toString(expect)); //print expect\n System.out.println(\"yours looks like this: \" + Arrays.toString(ard.getBackingArray()));\n assertEquals(\"j\", ard.removeLast());\n\n ard.addLast(\"j\");\n ard.removeFirst();\n ard.addLast(\"k\");\n expect[10] = \"k\";\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n System.out.println(\"resetting\");\n System.out.println(\"should look like this after resize: \" + Arrays.toString(expect)); //print expect\n System.out.println(\"yours looks like this: \" + Arrays.toString(ard.getBackingArray()));\n\n ard.removeFirst();\n ard.addLast(\"last first element\");\n expect[0] = \"last first element\";\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n System.out.println(\"removefirst then addlast\");\n System.out.println(\"should look like this after resize: \" + Arrays.toString(expect)); //print expect\n System.out.println(\"yours looks like this: \" + Arrays.toString(ard.getBackingArray()));\n assertEquals(\"b\", ard.removeFirst());\n }", "Offset createOffset();", "public void toArray(Object[] a) {\n int index = 0;\n int size = count;\n int i = (front + 1) % maxSize;\n while(size > 0){\n a[index++] = queue[i++];\n i %= maxSize;\n size--;\n }\n }", "@Override\n\tpublic void addToken(char[] array, int start, int end, int tokenType, int startOffset) {\n\t\tsuper.addToken(array, start,end, tokenType, startOffset);\n\t\tzzStartRead = zzMarkedPos;\n\t}", "public IRubyObject subseq(long beg, long len) {\n if (beg < 0 || beg > getSize() || len < 0) {\n getRuntime().getNil();\n }\n \n if (beg + len > getSize()) {\n len = getSize() - beg;\n }\n if (len < 0) {\n len = 0;\n }\n if (len == 0) {\n return getRuntime().newArray();\n }\n \n RubyArray arr = getRuntime().newArray(0);\n for (long i = beg; i < beg + len; i++) {\n arr.append(group(i));\n }\n return arr;\n }", "public void resetToOffset(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.icu.impl.coll.CollationDataBuilder.DataBuilderCollationIterator.resetToOffset(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.DataBuilderCollationIterator.resetToOffset(int):void\");\n }", "private int advance(int[] n, int i) {\n i += n[i];\n i%=len;\n while (i<0) i+=len;\n return i;\n }", "protected boolean advance()\n/* */ {\n/* 66 */ while (++this.m_offset < this.m_array.length) {\n/* 67 */ if (this.m_array[this.m_offset] != null) {\n/* 68 */ return true;\n/* */ }\n/* */ }\n/* 71 */ return false;\n/* */ }", "public void compact()\n\t{\n\t\tif (addIndex == size())\n\t\t\treturn;\n\t\t\n\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), addIndex );\n\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\tarray = narray;\n\t}", "private void fillList(final int offset) {\n final int bottomEdge = getChildBottom(getChildAt(getChildCount() - 1));\n fillListDown(bottomEdge, offset);\n\n final int topEdge = getChildTop(getChildAt(0));\n fillListUp(topEdge, offset);\n }", "public void merge(paintIntegers[] arr, int lidx, int midx, int ridx){\n int leftn = midx - lidx + 1;\n int rightn = ridx - midx;\n\n //instantiating the left and right arrays\n int Left[] = new int [leftn];\n int Right[] = new int [rightn];\n\n //copies the data from original to the left and right\n for (int i=0; i < leftn; ++i) {\n Left[i] = arr[lidx + i].val;\n }\n for (int j=0; j < rightn; ++j) {\n Right[j] = arr[midx + 1 + j].val;\n }\n\n //merges the two arrays and updates the original array\n //initializes leftIndex and rightIndex to iterate over the left and right arrays\n //if it is added to the original array, then where it came from, it would increment\n int leftIndex = 0;\n int rightIndex = 0;\n int k = lidx; //to properly align where the elements to go, left\n //System.out.println(k);\n //while it hasnt gone through all the elements in the left and right array\n //between the two arrays check which one is lowest, and then updates original array\n while (leftIndex < leftn && rightIndex < rightn)\n {\n if (Left[leftIndex] <= Right[rightIndex])\n {\n arr[k].val = Left[leftIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n leftIndex++;\n }\n else\n {\n arr[k].val = Right[rightIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n rightIndex++;\n }\n k++;\n }\n //if there are some left on the left array then just adds to original array\n //possible because all the elements in right array have been added\n //all thats left is the sorted elements from the left array\n while (leftIndex < leftn)\n {\n arr[k].val = Left[leftIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n leftIndex++;\n k++;\n }\n //same explanation as above but with the right array\n while (rightIndex < rightn)\n {\n arr[k].val = Right[rightIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n rightIndex++;\n k++;\n }\n }", "private static int[][] AddToArr(int[][] arr, int[][] symbol, int length, int offset) {\n\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tfor (int j = 0; j < length; j++) {\r\n\t\t\t\tif (symbol[i][j] > 0) {\r\n\r\n\t\t\t\t\tarr[i][j + offset] = 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}", "private void shiftPartialRowToBeginning() {\n if(true)\n throw new UnsupportedOperationException(\"Need to step through this method\");\n// // Get the length to shift from the beginning of the partial row.\n// int length = lastValidBytePosition_ - currentRowPosition_;\n//\n// // shift the data in the dataBufferStream\n// dataBufferStream_.reset();\n// if (dataBuffer_ != null) {\n// dataBufferStream_.write(dataBuffer_, currentRowPosition_, length);\n// }\n//\n// for (int i = 0; i < length; i++) {\n// dataBuffer_[i] = dataBuffer_[currentRowPosition_ + i];\n// }\n//\n// position_ = length - (lastValidBytePosition_ - position_);\n// lastValidBytePosition_ = length;\n }", "public void adjustRight() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].x = tiles[x][y].x + 4;\n backGroundTiles[x][y].x = backGroundTiles[x][y].x + 4;\n grassTiles[x][y].x = grassTiles[x][y].x + 4;\n }\n\n }" ]
[ "0.5951128", "0.54875064", "0.5486829", "0.5300673", "0.52373326", "0.5218501", "0.52056766", "0.5190524", "0.5179603", "0.51365083", "0.5131984", "0.51286364", "0.51159096", "0.50851816", "0.5044657", "0.5027547", "0.50217056", "0.49824125", "0.49350595", "0.49129406", "0.48903656", "0.48794618", "0.48574778", "0.4849101", "0.4841113", "0.4834549", "0.48338553", "0.48234656", "0.48048753", "0.47933564", "0.4779477", "0.47702095", "0.47700348", "0.47455782", "0.47361016", "0.4730344", "0.47182092", "0.47101757", "0.4701328", "0.46990713", "0.4686311", "0.46762988", "0.46752688", "0.46468768", "0.46385366", "0.4637831", "0.46354634", "0.46309558", "0.46277216", "0.46243042", "0.4620906", "0.4619741", "0.46173614", "0.4604718", "0.4598733", "0.45977977", "0.4593036", "0.45917606", "0.45895863", "0.4585641", "0.45818788", "0.45796812", "0.45726737", "0.457162", "0.45700118", "0.45589346", "0.4558383", "0.45578992", "0.45575294", "0.45520407", "0.45485836", "0.454354", "0.454326", "0.45330283", "0.45291287", "0.45254317", "0.45254317", "0.45254317", "0.45238087", "0.4522226", "0.45190513", "0.45156258", "0.45145786", "0.45064327", "0.4494567", "0.44913727", "0.44894445", "0.44885135", "0.44858214", "0.4485545", "0.4478444", "0.44767827", "0.44731444", "0.44661546", "0.4462096", "0.44576892", "0.44526586", "0.44485644", "0.44378793", "0.44362953" ]
0.5861666
1
returns the hierarchies of the underlying axis.
public Hierarchy[] getHierarchies() { return axis.getHierarchies(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DataTree getMetricsHierarchy();", "public String hierarchy();", "public final List<Integer> getHierarchyGaps() {\r\n\t\tList<Integer> gaps = new ArrayList<Integer>();\r\n\t\tgaps.add(0);\r\n\t\tHeaderItem root = header.getFirstRoot();\r\n\t\tif(root == null)\r\n\t\t\treturn gaps;\r\n\t\twhile(root.hasRootsInNextLevel()) {\r\n\t\t\troot = root.getFirstRootInNextLevel();\r\n\t\t\tgaps.add(header.getWidgetTop(root));\r\n\t\t}\r\n\t\treturn gaps;\r\n\t}", "public HierarchyManager getHierarchyManager() {\n return hierMgr;\n }", "int getSplitAxis();", "public java.util.List<Dimension> getDimensionsAll();", "DataTree getDatatypeHierarchy();", "public List<IndicatorUnitSubgroupModel> getIndicators();", "public ArrayList getDimensions(String grpId) {\r\n ArrayList finalList = new ArrayList();\r\n// PbBussGrpResourceBundle resBundle = new PbBussGrpResourceBundle();\r\n try {\r\n\r\n PbReturnObject retObj = null;\r\n String finalQuery = null;\r\n String[] colNames = null;\r\n Object obj[] = new Object[1];\r\n obj[0] = grpId;\r\n String sql = getResourceBundle().getString(\"getBusinessGroupDimList\");\r\n finalQuery = buildQuery(sql, obj);\r\n retObj = execSelectSQL(finalQuery);\r\n colNames = retObj.getColumnNames();\r\n for (int i = 0; i < retObj.getRowCount(); i++) {\r\n BusinessGrpsTreeTable dimension = new BusinessGrpsTreeTable();\r\n dimension.setDimensionName(retObj.getFieldValueString(i, colNames[1]));\r\n dimension.setDimensionId(String.valueOf(retObj.getFieldValueInt(i, colNames[0])));\r\n ArrayList tableList = new ArrayList();\r\n\r\n tableList = getTableList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimTableList(tableList);\r\n ArrayList membersList = new ArrayList();\r\n membersList = getMembersList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimMembersList(membersList);\r\n ArrayList hierarchyList = new ArrayList();\r\n hierarchyList = getHeirarchyList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimHierarchyList(hierarchyList);\r\n //.println.println(\"hierarchy list==\" + hierarchyList.size());\r\n finalList.add(dimension);\r\n }\r\n } catch (Exception e) {\r\n logger.error(\"Exception:\", e);\r\n }\r\n\r\n return finalList;\r\n }", "Relations getGroupOfRelations();", "public int[] getChildOrientations() {return childOrientations;}", "String[] getDimensionNames();", "Collection<DendrogramNode<T>> getChildren();", "public List getInheritedGroups()\n\t\t{\n\t\t\tif(m_oldInheritedGroups == null)\n\t\t\t{\n\t\t\t\tm_oldInheritedGroups = new Vector();\n\t\t\t}\n\t\t\treturn new Vector(m_oldInheritedGroups);\n\t\t}", "public Vector<GraphicalLatticeElement> getChildren() {\n\t\tVector<GraphicalLatticeElement> children = new Vector<GraphicalLatticeElement>();\n\t\tif (childrenEdges != null)\n\t\t\tfor (int i = 0; i < childrenEdges.size(); i++) {\n\t\t\t\tEdge edge = childrenEdges.elementAt(i);\n\t\t\t\tchildren.add(edge);\n\t\t\t\tchildren.add(edge.getDestination());\n\t\t\t}\n\t\t\n\t\treturn children;\n\t}", "public Map<OntologyNode, List<OntologyNode>> getHierarchyMap(List<OntologyNode> selectedOntologyNodes) {\n HashMap<OntologyNode, List<OntologyNode>> hierarchyMap = new HashMap<OntologyNode, List<OntologyNode>>();\n for (OntologyNode node : selectedOntologyNodes) {\n hierarchyMap.put(node, getAllChildren(node));\n }\n return hierarchyMap;\n }", "Iterator getAncestorAxisIterator(Object contextNode) throws UnsupportedAxisException;", "default List<SemanticRegion<T>> children() {\n List<SemanticRegion<T>> result = new LinkedList<>();\n for (SemanticRegion<T> r : this) {\n if (equals(r.parent())) {\n result.add(r);\n }\n }\n return result;\n }", "public String getHierarchyString()\n {\n if (this.hierarchy == null) {\n synchronized (this.parentTables) {\n if (this.hierarchy == null) {\n String utableName = this.getUntranslatedTableName();\n String parentHier = StringTools.join(this.getParentTables(),\"/\");\n this.hierarchy = (!StringTools.isBlank(parentHier)?(parentHier+\"/\"):\"\") + utableName;\n }\n }\n }\n return this.hierarchy; // never null\n }", "public final Object [] getVisibleElements() {\r\n\t\tfinal List<XElementNode> roots = new ArrayList<XElementNode>();\t\t\t\t\r\n\t\tStringBuffer paths = new StringBuffer();\r\n\r\n\t\t//if right side is empty, we take selection of left side:\r\n\t\tif(targetHierarchyTree.isEmpty()) {\r\n//\t\t\tfinal Map <FastMSTreeItem, XElementNode> parents = new HashMap<FastMSTreeItem, XElementNode>();\r\n\t\t\tfinal LinkedHashSet <FastMSTreeItem> currentSelection = sourceHierarchyTree.getSelection(); \r\n\t\t\tfor (FastMSTreeItem it: currentSelection) {\r\n\t\t\t\tpaths.append(it.getModel().getPath());\r\n\t\t\t\tpaths.append(\",\");\r\n\t\t\t}\r\n\t\t\tsourceHierarchyTree.traverse(new FastMSTreeItemVisitor() {\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXElementNode elNode = getElementNodeCopyFrom(item);\r\n//\t\t\t\t\telNode.removeChildren();\r\n//\t\t\t\t\tparents.put(item, elNode);\r\n\t\t\t\t\titem.setElementNode(elNode);\r\n\t\t\t\t\tXElementNode xParent = getParent(parent); //, parents); //parents.get(parent);\r\n\t\t\t\t\tif(xParent == null)\r\n\t\t\t\t\t\troots.add(elNode);\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\txParent.forceAddChild(elNode);\r\n\t\t\t\t\t\telNode.setParent(xParent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\txAxisHierarchy.addProperty(\"filterPaths\", paths.toString());\r\n\t\t} else {\r\n\t\t\tfinal Map<FastMSTreeItem, XElementNode> parents = new HashMap<FastMSTreeItem, XElementNode>();\r\n\t\t\tfinal List <String> filterPaths = new ArrayList <String>();\r\n\t\t\ttargetHierarchyTree.traverse(new FastMSTreeItemVisitor(){\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXObjectModel node = item.getXObjectModel();\r\n\t\t\t\t\tString path = node.get(\"filterPath\");\r\n\t\t\t\t\tif (path != null) {\r\n\t\t\t\t\t\tfilterPaths.add(path);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn item.getChildCount() > 0;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tfor (String f: filterPaths) {\r\n\t\t\t\tpaths.append(f);\r\n\t\t\t\tpaths.append(\",\");\r\n\t\t\t}\r\n\t\t\ttargetHierarchyTree.traverse(new FastMSTreeItemVisitor() {\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXElementNode elNode = getElementNodeCopyFrom(item);\r\n\t\t\t\t\telNode.removeChildren();\r\n\t\t\t\t\titem.setElementNode(elNode);\r\n\t\t\t\t\tXElementNode xParent = getParent(parent); //parents.get(parent);\r\n\t\t\t\t\tif(xParent == null)\r\n\t\t\t\t\t\troots.add(elNode);\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\txParent.forceAddChild(elNode);\r\n\t\t\t\t\t\telNode.setParent(xParent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t});\t\t\t\r\n\t\t\txAxisHierarchy.addProperty(\"filterPaths\", paths.toString());\r\n\t\t}\r\n\t\treturn new Object [] {roots.toArray(new XElementNode[0]), paths.toString()};\r\n\t}", "public Symbol[] getLeaves() {\n\t\tif (leaves == null) {\n\t\t\tif (numChildren == 0) {\n\t\t\t\tleaves = new Symbol[] {label};\n\t\t\t\treturn leaves;\n\t\t\t}\n\t\t\tSymbol[][] leafSets = new Symbol[numChildren][];\n\t\t\tint numItems = 0;\n\t\t\t// gather the arrays\n\t\t\tfor (int i = 0; i < numChildren; i++) {\n\t\t\t\tleafSets[i] = ((TreeItem)children[i]).getLeaves();\n\t\t\t\tnumItems += leafSets[i].length; \n\t\t\t}\n\t\t\t// compress them into one, then give it to the above\n\t\t\tleaves = new Symbol[numItems];\n\t\t\tint currItem = 0;\n\t\t\tfor (int i = 0; i < numChildren; i++) {\n\t\t\t\tfor (int j = 0; j < leafSets[i].length; j++) {\n\t\t\t\t\tleaves[currItem++] = leafSets[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn leaves;\n\t}", "@Override\n\tpublic Vector<Handle> handles() {\n Vector<Handle> handles = new Vector<Handle>();\n handles.addElement(new GroupHandle(this, RelativeLocator.northWest()));\n handles.addElement(new GroupHandle(this, RelativeLocator.northEast()));\n handles.addElement(new GroupHandle(this, RelativeLocator.southWest()));\n handles.addElement(new GroupHandle(this, RelativeLocator.southEast()));\n return handles;\n }", "public Object[] getGroupList() {\n return grouptabs.keySet().toArray();\n }", "@Override\r\n public Set<String> getContainers()\r\n {\r\n assert(true);\r\n \tSet<String> toReturn = new TreeSet<String>();\r\n for (ProductContainer container : groups)\r\n {\r\n toReturn.add(container.getName());\r\n }\r\n return toReturn;\r\n }", "EList getAxisName();", "@Override\n public Set<LocationHierarchy> findEnclosingLocationHierarchies(LocationHierarchyLevel entity) {\n Set<LocationHierarchy> onLevel = new HashSet<>();\n onLevel.addAll(locationHierarchyService.findByLevel(entity));\n return onLevel;\n }", "public Vector3d[] getAxes()\n {\n return new Vector3d[] { getRight(), getUp(), getDir() };\n }", "public Iterable<Point2D> hull() {\r\n Stack<Point2D> s = new Stack<Point2D>();\r\n for (Point2D p : hull) s.push(p);\r\n return s;\r\n }", "public interface Ancestors extends Serializable, Comparable<Ancestors> {\n\n\t/**\n\t * @return the tree path of the node. This contains the path in the form of indexes. e.g. 50.1.2.2\n\t */\n\tTreePath getTreePath();\n\n\t/**\n\t * @return the ancestor matrices. This contains all path matrix from root path matrix to this path matrix.\n\t */\n\tList<PathMatrix> getAncestorMatrices();\n\n\t/**\n\t * @return the reference path matrix\n\t */\n\tPathMatrix getPathMatrix();\n}", "@JsonIgnore\n public List<String> getAncestorTypeNames() {\n if(ancestorDefs != null && !ancestorDefs.isEmpty()) {\n return ancestorDefs.values().stream().map(type -> type.asTypeString()).collect(Collectors.toList());\n } else if (ancestors != null) {\n return ancestors;\n } else {\n return new ArrayList<>();\n }\n }", "public String[] getTreeNames();", "public List<String> getHierarchicalClass() {\r\n \t\treturn hierarchicalClass;\r\n \t}", "public List<Grid> getGrids() {\n\tList<Grid> grids = new ArrayList<Grid>();\n\tList<Line> currentLines = _path;\n\twhile(currentLines.size()>1) {\n\t Grid grid = new Grid();\n\t grids.add(grid);\n\t List<Line> nonOverlappingLines = grid.overlapping(currentLines);\n\t \t \n\t Double[] xs = grid.xs();\n\t Double[] ys = grid.ys();\n\t \n\t if (xs.length>3 && ys.length>3) {\n\t\tDouble minx = xs[0];\n\t\tDouble maxx = xs[xs.length-1];\n\t\t\n\t\tDouble miny = ys[0];\n\t\tDouble maxy = ys[ys.length-1];\n\t\t\n\t\tfor(int i=0; i<xs.length; i++) {\n\t\t System.out.println(\"Line: \" + xs[i].toString() + \",\" + miny.toString() + \",\" + xs[i].toString() + \",\" + maxy.toString());\n\t\t}\n\t\tfor(int i=0; i<ys.length; i++) {\n\t\t System.out.println(\"Line: \" + minx.toString() + \",\" + ys[i].toString() + \",\" + maxx.toString() + \",\" + ys[i].toString());\n\t\t}\n\t }\n\n\t currentLines = nonOverlappingLines;\n\t}\n\treturn grids;\n }", "public String[] getChildList() {\n if (this.children == null) {\n return this.pointsByChild.keySet().toArray(new String[this.pointsByChild.size()]);\n } else {\n return this.children.clone();\n }\n }", "public Node[] getChildren() {\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\treturn nextLayer;\n\t}", "default List<SemanticRegion<T>> allChildren() {\n List<SemanticRegion<T>> result = new LinkedList<>();\n for (SemanticRegion<T> r : this) {\n result.add(r);\n }\n return result;\n }", "public List<ModuleHierarchy> getModuleHierarchies(Long moduleId) {\n\t\treturn dslContext.select(field(\"id\"), field(\"cms_module_id\"), field(\"cms_module2_id\"), field(\"mandatory\"))\n\t\t\t\t.from(table(CmsTable.MODULE_HIERARCHY.getTableName()))\n\t\t\t\t.where(field(\"cms_module2_id\").equal(moduleId))\n\t\t\t\t.orderBy(field(\"id\"))\n\t\t\t\t.fetch(new ModuleHierarchyMapper());\n\t}", "public List<Component> getAllTree() {\n\t\tList<Component> ret = new ArrayList<>();\n\t\tret.add(this);\n\t\tfor (Component c : getChilds()) {\n\t\t\tList<Component> childs = c.getAllTree();\n\t\t\t// retire les doublons\n\t\t\tfor (Component c1 : childs) {\n\t\t\t\tif (!ret.contains(c1)) {\n\t\t\t\t\tret.add(c1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public HierarchyInformation hierarchyInformation() {\n return this.innerProperties() == null ? null : this.innerProperties().hierarchyInformation();\n }", "public List<String> getHierarchicalId() {\r\n \t\treturn hierarchicalId;\r\n \t}", "Iterator getDescendantAxisIterator(Object contextNode) throws UnsupportedAxisException;", "public Vector<Nodo> getHijos() {\n if (!this.isExpanded()) {\n this.expand();\n }\n return this.hijos;\n }", "protected abstract Level[] getLevelSet();", "public List getAncestors() {\n\t\tif (this.ancestors == null) {\n\t\t\tancestors = new ArrayList();\n\t\t\tTeachersDomainStandardsNode myParent = parent;\n\t\t\twhile (myParent != null && myParent.getLevel() > 0) {\n\t\t\t\tancestors.add(myParent);\n\t\t\t\tmyParent = myParent.getParent();\n\t\t\t}\n\t\t}\n\t\treturn ancestors;\n\t}", "Iterator getParentAxisIterator(Object contextNode) throws UnsupportedAxisException;", "public double[][] getLevelSet() {\r\n\t\treturn _levelSet;\r\n\t}", "@Override\n public List<SKOSConceptNode> getConceptHierarchy(SKOSConceptScheme conceptScheme, SKOSCollection skosCollection, HierarchyMethod hierarchyMethod) {\n HierarchyMethod hm = hierarchyMethod;\n if (hm == null) hm = HierarchyMethod.DEFAULT_METHOD;\n \n JenaSKOSConceptScheme jConceptScheme = null;\n JenaSKOSCollection jCollection = null;\n \n JenaSKOSResource csRes = this.getSKOSResource(conceptScheme);\n if (csRes!=null && (csRes instanceof JenaSKOSConceptScheme)) jConceptScheme = (JenaSKOSConceptScheme)csRes;\n JenaSKOSResource collRes = this.getSKOSResource(skosCollection);\n if (collRes!=null && (collRes instanceof JenaSKOSCollection)) jCollection = (JenaSKOSCollection)collRes;\n \n List<SKOSConceptNode> conceptHierarchy = new ArrayList<>();\n \n //Make sure that the matched Jena SKOS resources are correct\n if ((conceptScheme==null || jConceptScheme!=null) && (skosCollection==null || jCollection!=null)) {\n \n TreeSet<JenaSKOSConcept> rootConcepts = new TreeSet<>();\n \n CloseableIterator<SKOSConcept> topConcepts;\n List<SKOSConcept> broadestConcepts;\n switch (hm.getRootType()) {\n case BOTH:\n topConcepts = this.listTopConcepts(jConceptScheme, jCollection);\n while (topConcepts.hasNext()) {\n SKOSConcept topConcept = topConcepts.next();\n if (topConcept != null) rootConcepts.add((JenaSKOSConcept) topConcept);\n }\n case BROADEST_CONCEPTS:\n broadestConcepts = this.getBroadestConcepts(jConceptScheme, jCollection);\n for (SKOSConcept broadConcept: broadestConcepts) rootConcepts.add((JenaSKOSConcept) broadConcept);\n break;\n default:\n topConcepts = this.listTopConcepts(jConceptScheme, jCollection);\n while (topConcepts.hasNext()) {\n SKOSConcept topConcept = topConcepts.next();\n if (topConcept != null) rootConcepts.add((JenaSKOSConcept) topConcept);\n }\n break;\n }\n \n for (JenaSKOSConcept concept:rootConcepts) {\n conceptHierarchy.add(this.getHierarchyOfConcept(concept, jConceptScheme, jCollection, hm.getRelationshipType(), hm.getSortLanguage()));\n }\n }\n \n return conceptHierarchy;\n }", "public abstract Collection getGroups();", "@Override\n\t/**\n\t * returns the abstract or final or neither modifiers for the specific\n\t * class\n\t * \n\t * @return abstract or final or neither modifiers \n\t */\n\tpublic String getHierarchy() {\n\t\treturn hierarchy;\n\t}", "public static XPerformanceProblem createHierarchy() {\n\t\tXPerformanceProblem hierarchy = RawHierarchyFactory.getInstance().createEmptyHierarchy();\n\n\t\treturn hierarchy;\n\t}", "@Override\n\tpublic <K extends BasePojo> List<K> getTreeViewList() throws Exception {\n\t\treturn null;\n\t}", "private EmployeeHierarchy getHierarchyObject(Employee processedCEO) {\n if (processedCEO.getClass()!= Manager.class) // does not have any subordinates\n throw new RuntimeException(\"CEO Does not have any subordinates\");\n return new EmployeeHierarchy((Manager) processedCEO);\n }", "public List getChildren(){\n List result = new ArrayList();\n Iterator it = getSpecialisation().iterator();\n while(it.hasNext()){\n Generalization g = (Generalization)it.next(); \n result.add(g.getChild());\n //System.out.println(\" \"+getName()+\" Parent:\" +g.getParent().getName());\n }\n return result;\n }", "void computeLevelCount() {\r\n Hierarchy[] hiers = axis.getHierarchies();\r\n int hierarchyCount = axis.getHierarchies().length;\r\n levelCount = new int[hierarchyCount];\r\n skipAllMember = new boolean[hierarchyCount];\r\n for (int i = 0; i < hiers.length; i++) {\r\n levelCount[i] = Integer.MIN_VALUE;\r\n skipAllMember[i] = hiers[i].hasAll();\r\n }\r\n\r\n Iterator it = axis.getPositions().iterator();\r\n while (it.hasNext()) {\r\n Position p = (Position) it.next();\r\n Member[] members = p.getMembers();\r\n for (int i = 0; i < members.length; i++) {\r\n int count = members[i].getRootDistance() + 1;\r\n levelCount[i] = Math.max(levelCount[i], count);\r\n if (members[i].isAll())\r\n skipAllMember[i] = false;\r\n }\r\n }\r\n\r\n // if the ALL member is not on the axis, we will not add it\r\n for (int i = 0; i < hierarchyCount; i++) {\r\n if (skipAllMember[i])\r\n levelCount[i] -= 1;\r\n }\r\n\r\n // the number of members per position is the sum of all deltas\r\n totalLevelCount = 0;\r\n for (int i = 0; i < hierarchyCount; i++)\r\n totalLevelCount += levelCount[i];\r\n }", "public List <RMShape> getShapesToDescendant(RMShape aShape)\n{\n List list = aShape.getShapesToAncestor(this); Collections.reverse(list); return list;\n}", "public List getParents()\n {\n \tList result = new ArrayList();\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n\n \tif (instance != null)\n \t{\n \t if (instance.isRepresentative(this.refMofId())&&\n \t instance.hasRefObject(this.refMofId()))\n \t {\n \t if (getGeneralization().isEmpty() && !(this instanceof Interface) && !(this instanceof Enumeration))\n \t {\n \t \tresult.add(OclLibraryHelper.getInstance(this).\n \t\t\t\t\t\t\t\t\t\t\tgetAny());\n \t return result;\n \t \t }\n \t } \t \n \t \n\t \tif (equals(OclLibraryHelper.getInstance(this).getVoid()))\n\t \t{\n\t \t\tModel topPackage = ModelHelper.\n\t \t\t\t\t\t\t \t\tgetInstance(\n\t \t\t\t\t\t\t \t\t\t\t(Uml15Package) this.refOutermostPackage()).\n\t \t\t\t\t\t\t \t\t\t\t\t\tgetTopPackage();\n\t \t\tresult.addAll(((NamespaceImpl)topPackage).getAllClassesWithoutSpez());\n\t \t\treturn result;\n\t \t}\n \t} \n \tIterator it = getGeneralization().iterator();\n\n \twhile(it.hasNext())\n \t{\n \t Generalization g = (Generalization)it.next(); \n \t result.add(g.getParent());\n \t}\n \treturn result;\n }", "private List<Shape> getEdges(int dimCanvasX, int dimCanvasY, int thinknessEdges) {\r\n\t\tList<Shape> res = new ArrayList<>();\r\n\t\tShape left = new Rectangle(0, 0, thinknessEdges, dimCanvasY);\r\n\t\tShape right = new Rectangle(dimCanvasX - thinknessEdges, 0, thinknessEdges, dimCanvasY);\r\n\t\tShape top = new Rectangle(0, 0, dimCanvasX, thinknessEdges);\r\n\t\tShape bot = new Rectangle(0, dimCanvasY - thinknessEdges, dimCanvasX, thinknessEdges);\r\n\t\tres.add(top);\r\n\t\tres.add(bot);\r\n\t\tres.add(right);\r\n\t\tres.add(left);\r\n\t\treturn res;\r\n\t}", "Iterator getAncestorOrSelfAxisIterator(Object contextNode) throws UnsupportedAxisException;", "public int[][] findGroups()\n\t{\n\t\treturn findGroupMap().findGroups();\n\t}", "Iterator getChildAxisIterator(Object contextNode) throws UnsupportedAxisException;", "public List<EntityHierarchyItem> children() {\n return this.innerProperties() == null ? null : this.innerProperties().children();\n }", "List<IShape> getVisibleShapes();", "public List<TreeNode> getChildrenNodes();", "public java.util.List getOrderedAncestors();", "Dimension getDimensions();", "@Override\n public final SortedSet<Node<N>> getWells() {\n return new Wells(this);\n }", "List<Axis> getxAxisValues() {\n\t\tfinal List<Axis> values = new ArrayList<Axis>();\n\t\ttry {\n\t\t\tfor (String param : analysisModel.getParameterNames()) {\n\t\t\t\tvalues.add(AxisType.PARAMETER.newAxis(AxisName.X1, param));\n\t\t\t}\n\t\t\tfor (String result : analysisModel.getResultNames()) {\n\t\t\t\tvalues.add(AxisType.RESULT.newAxis(AxisName.X1, result));\n\t\t\t}\n\t\t\tfor (MetaData.Type type : MetaData.Type.values()) {\n\t\t\t\tvalues\n\t\t\t\t\t\t.add(AxisType.META_DATA.newAxis(AxisName.X1, type\n\t\t\t\t\t\t\t\t.name()));\n\t\t\t}\n\t\t} catch (DatabaseException ex) {\n\t\t\tLOG.error(\"Failed to get parameter name list\", ex);\n\t\t}\n\t\treturn values;\n\t}", "List<Axis> getyAxisValues() {\n\t\tfinal List<Axis> values = new ArrayList<Axis>();\n\t\ttry {\n\t\t\tfor (String result : analysisModel.getResultNames()) {\n\t\t\t\tvalues.add(AxisType.RESULT.newAxis(AxisName.Y1, result));\n\t\t\t}\n\t\t\tfor (Pair<String, DerivedData> pair : analysisModel\n\t\t\t\t\t.getDerivedDataModel().getDerivedData()) {\n\t\t\t\tfinal String name = pair.getFirst();\n\t\t\t\tfinal DerivedData derivedData = pair.getSecond();\n\t\t\t\tvalues.add(Axis.newDerivedAxis(AxisName.Y1, name, derivedData));\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLOG.error(\"Failed to get result name list\", ex);\n\t\t}\n\t\treturn values;\n\t}", "public Iterable<Integer> levelOrder() {\n Queue<Integer> keys = new Queue<Integer>();\n Queue<TreeNode> queue = new Queue<TreeNode>();\n queue.enqueue(root);\n while (!queue.isEmpty()) {\n TreeNode x = queue.dequeue();\n if (x == null) {\n\t\t\t\t/* -1 stands for null node. */\n\t\t\t\tkeys.enqueue(-1);\n\t\t\t\tcontinue;\n\t\t\t}\n keys.enqueue(x.val);\n queue.enqueue(x.left);\n queue.enqueue(x.right);\n }\n return keys;\n }", "public List getAncestors() {\n\t\treturn new ArrayList();\n\t}", "@NotNull\n public Map<String, SkinLayoutDefinition> getChildren() {\n return myChildren;\n }", "public List<PafDimMember> getIChildren() {\r\n\t\t\r\n\t\tList<PafDimMember> childList = new ArrayList<PafDimMember>();\r\n\t\tchildList.add(this);\r\n\t\tif (children != null) {\r\n\t\t\tchildList.addAll(children);\r\n\t\t}\r\n\t\treturn childList;\r\n\t}", "int getPivotDimensionHeadersCount();", "@Override\r\n\tpublic synchronized String toString(){\r\n\r\n\t\tString result = String.valueOf(numberOfSplittedGroups);\r\n\r\n\t\tif(!hierarchy.isEmpty()){\r\n\t\t\tresult = result + Constants.A3_SEPARATOR + hierarchy.get(0);\r\n\t\t\tfor(int i = 1; i < hierarchy.size(); i ++){\r\n\t\t\t\tresult = result + Constants.A3_SEPARATOR + hierarchy.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "List<CalibratedAxis> getAxesNonPlanar();", "@RequestMapping(value = \"getData/{dataName}\", method = RequestMethod.GET, produces = {\"application/json;charset=UTF-8\"})\n\tpublic String getHierarchy(@PathVariable final String dataName){\n\n\t\tlogger.info(\"Entered NeoJSON_getHier Request Mapping\");\n\t\t\n\t\n\t\tStatementResult result = NeoBolt.getResults_multiple(dataName);\n\t\tList<JSONObject> ljo = new ArrayList<JSONObject>();\n\t\n\t\twhile(result.hasNext()){\n\t\t\tRecord record = result.next();\n\t\t\tJSONObject jsonObject = new JSONObject();\n\t\t\tjsonObject.put(record.get(0).toString(),record.asMap().toString());\n\t\t\tljo.add(jsonObject);\n\t\t}\n\n\t\treturn ljo.toString();\n\t}", "public List<Collection> getContainingCollections() {\n // TODO implement this\n List<Collection> containingCollections = new ArrayList<>();\n Collection c = this.getParentCollection();\n while (c != null) {\n containingCollections.add(c);\n c = c.getParentCollection();\n }\n return containingCollections;\n }", "public HierarchicalLayoutAlgorithm(UndoSupport undoSupport) {\n\t\tsuper(undoSupport, \"hierarchical\", \"Hierarchical Layout\",true);\t\t\n\t}", "protected abstract String[] getBaseFolders();", "public java.lang.String HR_GetEmployeeHierarchy4(java.lang.String accessToken, java.lang.String hie3) throws java.rmi.RemoteException;", "Group[] getParents() throws AccessManagementException;", "@Override @Basic\r\n\tpublic List<SquareDungeon> getLevelsAndShafts() {\r\n\t\tArrayList<SquareDungeon> res = new ArrayList<SquareDungeon>(1);\r\n\t\tres.add(this);\r\n\t\treturn res;\r\n\t}", "public SortedSet<WLightpathUnregenerated> getInOutOrTraversingLigtpaths () { return n.getAssociatedRoutes(getNet().getWdmLayer().getNe()).stream().map(ee->new WLightpathUnregenerated(ee)).collect(Collectors.toCollection(TreeSet::new)); }", "Collection<Tree<V, E>> getTrees();", "public int geomDim();", "public Collection<RelationshipType> getHierarchicalRelationshipTypes() throws OEClientException {\r\n\t\treturn getRelationshipTypes(\"skos:broader\");\r\n\t}", "public abstract AxisInfo getAxis( int dimension );", "private void createAggLevels() {\n\t\t\tAoiLevel aggTableLevel\t\t= errorTable.getAoiLevel();\n\t\t\tAoiHierarchy aoiHierarchy \t= aggTableLevel.getHierarchy();\n\t\t\tAoiDimension aoiDim \t\t= getAoiDimension( aoiHierarchy );\n//\t\t\tField<Integer> aoiField \t= errorTable.getAoiField();\n\t\t\t\n//\t\t\tAggLevel aggLevel = new AggLevel( aoiDim.getHierarchy().getName() , aoiLevel.getName() , aoiField.getName() );\n//\t\t\taggLevels.add(aggLevel);\n//\t\t\t\n\t\t\t\n//\t\t\tAoiDimension aoiDim = getAoiDimension(aoiHierarchy);\n\t\t\tfor ( AoiLevel level : aoiHierarchy.getLevels() ) {\n\t\t\t\tif ( level.getRank() <= aggTableLevel.getRank() ) {\n\t\t\t\t\tField<Integer> field = errorTable.getAoiIdField( level );\n\t\t\t\t\tAggLevel aggLevel = new AggLevel(aoiDim.getHierarchy().getName(), level.getName(), field.getName());\n\t\t\t\t\taggLevels.add(aggLevel);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public SubjectHierarchy getSubjectHierarchy();", "public List <RMShape> getChildren() { return Collections.emptyList(); }", "public String hierarchyEntityName() {\n return this.hierarchyEntityName;\n }", "public GMap<Integer, Stack> getStacks();", "public java.lang.String HR_GetEmployeeHierarchy5(java.lang.String accessToken, java.lang.String hie3, java.lang.String hie4) throws java.rmi.RemoteException;", "public Set<Taxon> getChildren() {\n\t\treturn children;\n\t}", "@Override\n\tpublic List<Knoten> getChilds() {\n\t\treturn null;\n\t}", "private static <T> Collection<Class<?>> getClassHierarchy(T instance) {\n Collection<Class<?>> hierarchy = new LinkedList<>();\n Class<?> clazz = (Class<?>) instance;\n while (clazz != null) {\n hierarchy.add(clazz);\n clazz = clazz.getSuperclass();\n }\n return hierarchy;\n }", "public IStatus[] getChildren() {\n\t\treturn adaptee.getChildren();\n\t}", "public ArrayList<GUIObject> getChildObjects() {\n return new ArrayList<>();\n }", "Set<Group> getGroups();", "public static String[] getLevels() {\n\t\treturn levels;\n\t}" ]
[ "0.64909345", "0.63334984", "0.59500694", "0.5677999", "0.56751466", "0.5554575", "0.55479187", "0.54099196", "0.54028094", "0.538225", "0.53423697", "0.53395164", "0.53248286", "0.5314858", "0.53127533", "0.52934265", "0.52657455", "0.5241315", "0.5211135", "0.5193195", "0.5191329", "0.51884776", "0.5179655", "0.516164", "0.51366824", "0.5121916", "0.51016027", "0.50910145", "0.5088544", "0.5080206", "0.5072812", "0.50431633", "0.5028688", "0.5026842", "0.5020714", "0.5020705", "0.5015251", "0.50107634", "0.49999306", "0.49881706", "0.49784768", "0.49723282", "0.49591777", "0.4954743", "0.492375", "0.49082538", "0.490277", "0.4885551", "0.48844087", "0.48834214", "0.4879345", "0.48762307", "0.4875309", "0.48732564", "0.4863647", "0.48262662", "0.4825542", "0.4823593", "0.48118943", "0.48082006", "0.48069334", "0.48066586", "0.48050684", "0.47956577", "0.47880062", "0.47869474", "0.47811148", "0.47793996", "0.47608238", "0.47524494", "0.4752149", "0.47490022", "0.4745853", "0.47445828", "0.47383994", "0.4738204", "0.47352615", "0.473168", "0.4725669", "0.47242254", "0.47210756", "0.47174755", "0.4713328", "0.4705295", "0.46999028", "0.46958822", "0.46949583", "0.4694274", "0.4694042", "0.4684854", "0.46840638", "0.4681963", "0.4680665", "0.46786436", "0.46757054", "0.46750915", "0.4671499", "0.46711454", "0.4659182", "0.46586603" ]
0.88967526
0
===================================================================================// / Get Streams ===================================================================================//
public static Hessian2Output getOutputStream(String fileName) { FileOutputStream fos; try { fos = new FileOutputStream(fileName); BufferedOutputStream bos = new BufferedOutputStream(fos); Hessian2Output hos = new Hessian2Output(bos); Deflation dos = new Deflation(); return dos.wrap(hos); } catch (Exception e) { MessageGenerator.briefError("Problem opening stream for file: " + fileName); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Stream> getStreams() {\n return streams;\n }", "public List<String> streams() {\n return this.streams;\n }", "public static void streams() {\n\t\ttry {\n\t\t\tList<Stream> streams = PlatformClient.streams(getUser());\n\t\t\trender(streams);\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Can not get streams : %s\", e.getMessage());\n\t\t\trender();\n\t\t}\n\t}", "@GetMapping(\"/ref-categories-streams\")\n public List<RefCategoriesStream> getAllRefCategoriesStreams() {\n log.debug(\"REST request to get all RefCategoriesStreams\");\n return refCategoriesStreamRepository.findAll();\n }", "public synchronized int activeStreams() {\n return streams.size();\n\n }", "public int getStreamCount()\n {\n return _streams.size();\n }", "public int getNumStreams()\r\n {\r\n return this.numStreams;\r\n }", "public int getNumStreams() {\n return numStreams;\n }", "public Request<List<LogStream>> list() {\n String url = baseUrl\n .newBuilder()\n .addPathSegments(LOG_STREAMS_PATH)\n .build()\n .toString();\n\n CustomRequest<List<LogStream>> request = new CustomRequest<>(client, url, \"GET\", new TypeReference<List<LogStream>>() {\n });\n request.addHeader(AUTHORIZATION_HEADER, \"Bearer \" + apiToken);\n return request;\n }", "public long getStream();", "DataStreams createDataStreams();", "public Collection<NamedStreamSymbol> getStreams() {\r\n final Collection<NamedStreamSymbol> allStreams = new ArrayList<>();\r\n allStreams.addAll(locallyDefinedStreams.resolveLocally(NamedStreamSymbol.KIND));\r\n \r\n allStreams.addAll(this.getEnclosingScope().resolveMany(\r\n this.getFullName(), NamedStreamSymbol.KIND));\r\n return allStreams.stream()\r\n .sorted(\r\n (e1, e2) -> {\r\n int i = Integer.compare(e1.getId(), e2.getId());\r\n if (i != 0)\r\n return i;\r\n \r\n return Boolean.compare(\r\n !e1.isExpected(),\r\n !e2.isExpected());\r\n })\r\n .collect(Collectors.toList());\r\n }", "public Set<String> getStreamPaths() {\n\t\t// todo: instead of returning a set here, perhaps\n\t\t// we can return Iterator<String>\n\t\tSet<String> streamSet = new HashSet<String>();\n\t\tif (streams != null) {\n\t\t\tfor (ChildData child : streams.getCurrentData()) {\n\t\t\t\tstreamSet.add(child.getPath());\n\t\t\t}\n\t\t}\n\t\treturn Collections.unmodifiableSet(streamSet);\n\t}", "DataStreamApi getDataStreamApi();", "public Stream<T> stream() {\n return items.stream();\n }", "public String getStream(){\n return this.stream;\n }", "@Override\n\tpublic List<StreamDTO> getStreamList() throws DataNotFoundException, DatabaseException {\n\t\tConnection con = DbUtil.getConnection();\n\t\tStudentRegistrationValidationDaoi studentRegistrationValidationDaoi=new StudentRegistrationValidationDaoimpl();\n\t\tList<StreamDTO> sttreamDTOs=studentRegistrationValidationDaoi.getStreamList(con);\n\t\tDbUtil.closeConnection(con);\n\t\treturn sttreamDTOs;\n\t}", "public Stream getStream(Streamable type){\n return Stream.builder().add(type).build() ;\n }", "@Override\n public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"listStreams request={}\", listStreamsRequest);\n }\n\n checkArgument(mtDynamoDb.getMtContext().getContextOpt().isEmpty(),\n \"listStreams currently does not support calling any tenant context except the empty context\");\n checkArgument(listStreamsRequest.getTableName() == null,\n \"listStreams currently does not support filtering by table name\");\n\n // filter to mt tables\n ListStreamsResult result = dynamoDbStreams.listStreams(listStreamsRequest);\n\n result.setStreams(result.getStreams().stream()\n .filter(stream -> mtDynamoDb.isMtTable(stream.getTableName()))\n .collect(toList()));\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"listStreams #streams={}, lastEvaluatedStreamArn={}\",\n result.getStreams().size(), result.getLastEvaluatedStreamArn());\n }\n return result;\n }", "public StreamInfoList getStreamList(SrvSession sess, TreeConnection tree, String fileName)\n throws IOException {\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Get the file state for the top level file\n \n FileState fstate = getFileState(fileName, dbCtx, true);\n \n // Check if the file state already has the streams list cached\n \n StreamInfoList streamList = (StreamInfoList) fstate.findAttribute(DBStreamList);\n if ( streamList != null)\n return streamList;\n \n // Get the main file information and convert to stream information\n \n DBFileInfo finfo = getFileDetails(fileName,dbCtx, fstate);\n \n // Create the stream list\n \n streamList = new StreamInfoList();\n \n StreamInfo sinfo = new StreamInfo(\"::$DATA\", finfo.getFileId(), 0, finfo.getSize(), finfo.getAllocationSize());\n streamList.addStream(sinfo);\n\n // Get the list of streams\n \n StreamInfoList sList = loadStreamList(fstate, finfo, dbCtx, true);\n if ( sList != null) {\n \n // Copy the stream information to the main list\n \n for ( int i = 0; i < sList.numberOfStreams(); i++) {\n \n // Add the stream to the main list\n\n streamList.addStream(sList.getStreamAt(i));\n }\n }\n\n // Cache the stream list\n \n fstate.addAttribute(DBStreamList, streamList);\n \n // Return the stream list\n \n return streamList;\n }", "private void openStreams() {\n\t\ttry {\n\t\t\t// mostramos un log\n\t\t\tthis.getLogger().debug(\"Opening streams..\");\n\t\t\t// abrimos el stream de salida\n\t\t\tthis.setOutputStream(new ObjectOutputStream(this.getConnection().getOutputStream()));\n\t\t\t// abrimos el stream de entrada\n\t\t\tthis.setInputStream(new ObjectInputStream(this.getConnection().getInputStream()));\n\t\t} catch (final IOException e) {}\n\t}", "public HashSet<EventDataStream> getDatastreams()\n\t{\n\t\treturn eventDataStreams;\n\t}", "public int getStreamCount() {\n return streamCount;\n }", "public InputStream getStream();", "public static void getStreams() throws IOException {\n // set up output stream for objects\n output = new ObjectOutputStream(client.getOutputStream());\n output.flush(); // flush output buffer to send header information\n\n // set up input stream for objects\n input = new ObjectInputStream(client.getInputStream());\n\n displayMessage(\"\\nGot I/O streams\\n\");\n }", "public KafkaStreams getKafkaStreamsInstance() {\n return kafkaStreams;\n }", "default Stream<T> fullStream() {\n return Stream.empty();\n }", "@Override\n\tpublic List<StreamCounterVO> getStreamCounterList(int startLimit,\n\t\t\tint endLimit) throws DataAccessFailedException {\n\t\treturn null;\n\t}", "public CStream get_stream() {\r\n\t\treturn new CStream(this);\r\n\t}", "public String getStreamContent() {\n return streamContent;\n }", "public File[] listStreamAndLogFiles(String uniqueTimeStamp)\n {\n\t\tFile streamDir = new File(app.getStringPref(GlobalApp.PREF_KEY_ROOT_PATH)+\"/\"+GlobalApp.STREAMS_SUBDIR);\n\t\tFile logDir = new File(app.getStringPref(GlobalApp.PREF_KEY_ROOT_PATH)+\"/\"+GlobalApp.LOGS_SUBDIR);\n\t\tfinal String uid = uniqueTimeStamp;\n\t\tFilenameFilter fnFilter = new FilenameFilter()\n\t\t{\n\t\t public boolean accept(File dir, String name)\n\t\t {\n\t\t return (name.contains(uid) &\n\t\t \t\t(name.contains(\".bin\") | name.contains(\".csv\") | name.contains(\".raw\") | name.contains(\".txt\")))\n\t\t \t | name.contains(\".log\");\n\t\t }\n\t\t};\n\t\tFile[] streamFiles = streamDir.listFiles(fnFilter);\n\t\tFile[] logFiles = logDir.listFiles(fnFilter);\n\t\tif (streamFiles != null && streamFiles.length > 0)\n\t\t{\t\n\t\t\tArrayList<File> list = new ArrayList<File>(Arrays.asList(streamFiles));\n\t\t\tlist.addAll(Arrays.asList(logFiles));\n\t\t\tFile[] all = new File[streamFiles.length + logFiles.length];\n\t\t\tlist.toArray(all);\n\t\t\treturn all;\n\t\t}\n\t\treturn null;\n }", "boolean getStream();", "default Stream<E> stream() {\n return StreamSupport.stream(this.spliterator(), false);\n }", "@Override\n public Cursor<Event> streamEvents() {\n ensureRatingCache();\n return cache.streamEvents();\n }", "public List<String> listDatastreams(String pid) throws FedoraException, IOException {\r\n GetMethod get = new GetMethod(this.fedoraBaseUrl + \"/objects/\" + pid + \"/datastreams?format=xml\");\r\n try {\r\n client.executeMethod(get);\r\n try {\r\n InputStream is = get.getResponseBodyAsStream();\r\n Document dsDoc = null;\r\n try {\r\n DocumentBuilder parser = getDocumentBuilder();\r\n synchronized (parser) {\r\n dsDoc = parser.parse(is);\r\n }\r\n } finally {\r\n is.close();\r\n }\r\n NodeList elements = dsDoc.getDocumentElement().getChildNodes();\r\n List<String> dsNames = new ArrayList<String>(elements.getLength());\r\n for (int i = 0; i < elements.getLength(); i ++) {\r\n if (elements.item(i) instanceof Element) {\r\n Element el = (Element) elements.item(i);\r\n if (el.getNodeName().equals(\"datastream\")) {\r\n dsNames.add(el.getAttribute(\"dsid\"));\r\n }\r\n }\r\n }\r\n return dsNames;\r\n } catch (SAXException ex) {\r\n throw new FedoraResponseParsingException(ex);\r\n } catch (ParserConfigurationException ex) {\r\n throw new FedoraResponseParsingException(ex);\r\n }\r\n } finally {\r\n get.releaseConnection();\r\n }\r\n }", "public InputStream getStream() {\n final CircularByteBuffer cbb = new CircularByteBuffer(1024);\n new Thread(\n new Runnable(){\n public void run(){\n ZipOutputStream zos = new ZipOutputStream(cbb.getOutputStream());\n Utils.zipDir(getVolume(), requestedDirectory.getPath(), zos);\n\n try {\n if (zos != null) {\n zos.flush();\n zos.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n ).start();\n\n return cbb.getInputStream();\n }", "public boolean getStream() {\n return stream_;\n }", "public Stream stream() {\n Preconditions.checkState(prepared);\n Preconditions.checkState(!closed);\n return new Stream();\n }", "default Stream<Token<?>> stream() {\n return stream(true);\n }", "public boolean getStream() {\n return stream_;\n }", "protected abstract List<List<SearchResults>> processStream();", "protected Stream<T> getDataStream() {\n if (nonNull(asyncData)) {\n if (ThreadLocalUtils.isEnableStreamLazy()) {\n return StreamSupport.stream(() ->\n Spliterators.spliterator(getAsyncData(), 0), 0, false);\n } else {\n return getAsyncData().stream();\n }\n }\n this.updateStream();\n return (isNull(dataStream) || streamClosed()) ? dataStreamSupplier.get() : dataStream;\n }", "public static void publish() {\n\t\tList<Stream> streams = null;\n\t\ttry {\n\t\t\tstreams = PlatformClient.streams(getUser());\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Error while getting available streams %s\",\n\t\t\t\t\te.getMessage());\n\t\t\tindex();\n\t\t}\n\t\trender(streams);\n\t}", "public boolean is_set_streams() {\n return this.streams != null;\n }", "public static org.davic.net.Locator[] listTransportStreams()\n {\n // TODO(Todd): This implementation currently assumes a single CABLE\n // transport.\n\n OcapLocator[] locators = null;\n try\n {\n // Get the transport\n TransportExt transport = (TransportExt) SIManager.createInstance().getTransports()[0];\n\n // Get all transport streams on the transport\n javax.tv.service.transport.TransportStream[] streams = transport.getTransportStreams();\n\n // Get the locator for each transport stream\n locators = new OcapLocator[streams.length];\n for (int i = 0; i < streams.length; i++)\n {\n int frequency = ((TransportStreamExt) streams[i]).getFrequency();\n int modFormat = ((TransportStreamExt) streams[i]).getModulationFormat();\n locators[i] = new OcapLocator(frequency, modFormat);\n }\n }\n catch (Exception e)\n {\n SystemEventUtil.logRecoverableError(e);\n }\n\n return locators;\n }", "public Stream getStream(String streamId) {\n\t\tserverLock.lock();\n\t\ttry {\n\t\t\twhile (lookupStreamIds.contains(streamId)) {\n\t\t\t\t// Another thread is looking up this stream - wait for them to get back\n\t\t\t\ttry {\n\t\t\t\t\treturnedFromServer.await();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tStream s = getRobonobo().getDbService().getStream(streamId);\n\t\t\tif (s != null)\n\t\t\t\treturn s;\n\n\t\t\tlookupStreamIds.add(streamId);\n\t\t} finally {\n\t\t\tserverLock.unlock();\n\t\t}\n\n\t\ttry {\n\t\t\tString streamUrl = metadataServer.getStreamUrl(streamId);\n\t\t\ttry {\n\t\t\t\tStreamMsg.Builder sb = StreamMsg.newBuilder();\n\t\t\t\tgetRobonobo().getSerializationManager().getObjectFromUrl(sb, streamUrl);\n\t\t\t\tStream s = new Stream(sb.build());\n\t\t\t\tgetRobonobo().getDbService().putStream(s);\n\t\t\t\treturn s;\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RobonoboException(e);\n\t\t\t} finally {\n\t\t\t\tserverLock.lock();\n\t\t\t\tlookupStreamIds.remove(streamId);\n\t\t\t\treturnedFromServer.signalAll();\n\t\t\t\tserverLock.unlock();\n\t\t\t}\n\t\t} catch (RobonoboException e) {\n\t\t\tlog.error(\"Exception getting stream\", e);\n\t\t\treturn null;\n\t\t}\n\t}", "java.util.List<hr.client.appuser.CouponCenter.StreamCouponHistory> \n getStreamCouponHistoryListList();", "private Stream<File> getFileStreamFromView() {\n // Copy the values out of the UI and into a temp list, so that the UI\n // can be updated without stomping on the grabbed values.\n final List<DirectoryListItem> items = new ArrayList<>(gridView.getItems());\n\n return items.stream().map(DirectoryListItem::getFile);\n }", "Collection<StreamKey> getStreamKeys();", "public void setNumStreams (int streamNum)\r\n {\r\n this.numStreams = streamNum;\r\n }", "public org.davic.net.Locator getStreamLocator()\n\t{return null;\n\t}", "public StreamsConfigData getStreamsConfigData() {\n\t\treturn streamsConfigData;\n\t}", "@GetMapping(\"/ref-categories-streams/{id}\")\n public ResponseEntity<RefCategoriesStream> getRefCategoriesStream(@PathVariable Long id) {\n log.debug(\"REST request to get RefCategoriesStream : {}\", id);\n Optional<RefCategoriesStream> refCategoriesStream = refCategoriesStreamRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(refCategoriesStream);\n }", "public OutputStream getStream()\r\n {\r\n return mStream;\r\n }", "@GetMapping(value = \"/stream/tweets\", produces = MediaType.TEXT_EVENT_STREAM_VALUE)\n\tpublic Flux<Tweet> streamAllTweets() {\n\t\treturn tweetRepository.findAll();\n\t}", "public StreamResponse getFileStream(String fileId) throws IOException {\n final String targetUrl = getTargetUrl(fileId);\n return volumeWrapper.getFileStream(targetUrl, fileId);\n }", "public MediaList getMediaList() {\n \n MediaList mediaList = mediaPlayerFactory.newMediaList();\n for (int i = 0; i < this.moviesByGenre.size(); i++) {\n mediaList.addMedia(this.moviesByGenre.get(i).path, \n formatRtspStream(this.genre),\n \":no-sout-rtp-sap\",\n \":no-sout-standard-sap\",\n \":sout-all\",\n \":sout-keep\",\n \":ttl=128\");\n }\n\n return mediaList;\n }", "public IntStream stream() {\n\treturn StreamSupport.intStream(spliterator(), false);\n }", "public interface IStreamFactory{\n Closeable getStream(Query q);\n }", "public StreamInfo getStreamInformation(SrvSession sess, TreeConnection tree, StreamInfo streamInfo)\n throws IOException {\n\n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"### getStreamInformation() called ###\");\n \n // TODO Auto-generated method stub\n return null;\n }", "@StreamKind\n int getStreamKind();", "@Override\n public IIOMetadata getStreamData() {\n return super.streamData;\n }", "public Map<String, Object> getStreamsConfig() {\n // returns a copy of the original properties\n return streamsConfig.originals();\n }", "public List<MediaFile> list() {\n\t\treturn (doc != null ? listFeed() : listHtml());\n\t}", "String getStreamName();", "InputStream getDataStream();", "public final InputStream returnStream()\n\t{\n\t\treturn stream;\n\t}", "public void setStreamCount(int streamCount) {\n this.streamCount = streamCount;\n }", "private String determineStream() {\r\n\t\tif (stream == null) {\r\n\t\t\tCcLsstream lsstream = new CcLsstream();\r\n\t\t\tlsstream.setProject(getProject());\r\n\t\t\tlsstream.setFormat(FMT_EXTENED_NAME);\r\n\t\t\tlsstream.setViewTag(determineViewTag());\r\n\t\t\tlsstream.execute();\r\n\t\t\tstream = lsstream.getCommandOutput();\r\n\t\t\tlog(\"Using derived stream [\" + stream + \"]\", Project.MSG_VERBOSE);\r\n\t\t}\r\n\t\treturn stream;\r\n\t}", "URL getStreamURL() throws IOException;", "public final List<MediaSession2> getSessions() {\n ArrayList<MediaSession2> arrayList = new ArrayList<MediaSession2>();\n Object object = this.mLock;\n synchronized (object) {\n arrayList.addAll(this.mSessions.values());\n return arrayList;\n }\n }", "public Stream<Tuple<Instance,Document>> instanceStream() {\n\t\treturn docs.stream()\n\t\t\t\t.map((doc)->{\n\t\t\t\t\tInstance instance = asInstance(doc);\n\t\t\t\t\treturn new Tuple<>(instance,doc);\n\t\t\t\t});\n\t}", "protected void openStream ()\n {\n stream = Util.stream (entry, \"Holder.java\");\n }", "@Deprecated\n/* */ public COSStream getStream() {\n/* 290 */ return this.stream;\n/* */ }", "public MediaStream getMediaStream() {\n\t\treturn stream;\n\t}", "List<InventoryVector> getInventory(long... streams);", "public InputStream getStream() {\n\t\treturn new ByteArrayInputStream(os.toByteArray());\n\t}", "public ArrayList<Media> getMediaList(){\r\n LocalUser user = LocalUser.getInstance();\r\n return user.getMediaList();\r\n }", "public @NotNull List<MediaSource> getMediaSources()\n {\n return getChildExtensionsOfType(MediaSource.class);\n }", "private InputStream openContentStream() {\n\t\t// ok, where do we dump our layers to?\n\t\tfinal ByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\t// hmm, now actually output the layers\n\t\tDebriefEclipseXMLReaderWriter.exportThis(_myNewLayers, bos);\n\n\t\t// and return our OS as an IS\n\t\treturn new ByteArrayInputStream(bos.toByteArray());\n\t}", "List<ObjectMessage> getObjects(long stream, long version, ObjectType... types);", "public Collection<StreamDefinition> getAllStreamDefinitionFromStore(Cluster cluster)\n throws StreamDefinitionStoreException {\n\n List<StreamDefinition> streamDefinitions = new ArrayList<StreamDefinition>();\n\n Keyspace keyspace = getKeyspace(BAM_META_KEYSPACE, cluster);\n int row_count = 100;\n // get all stream ids\n RangeSlicesQuery<String, String, String> query =\n HFactory.createRangeSlicesQuery(keyspace, stringSerializer, stringSerializer, stringSerializer);\n query.setColumnFamily(BAM_META_STREAM_DEF_CF);\n String last_key = \"\";\n query.setColumnNames(STREAM_DEF);\n query.setRowCount(row_count);\n\n\n String logMsg = null;\n if (log.isDebugEnabled()) {\n logMsg = \"getAllStreamDefinitions called : \\n\";\n }\n int count = 0;\n while (true) {\n query.setKeys(last_key, \"\");\n QueryResult<OrderedRows<String, String, String>> result = query.execute();\n\n int iter = 0;\n for (Row<String, String, String> row : result.get()) {\n iter++;\n if (row == null) {\n continue;\n }\n\n if (!last_key.equals(\"\") && iter == 1) {\n //since last iteration-last row, and this iteration first ro returns same row.\n continue;\n }\n count++;\n\n last_key = row.getKey();\n\n if (null != row.getColumnSlice().getColumnByName(STREAM_DEF)) {\n String streamDefinitionString = row.getColumnSlice().getColumnByName(STREAM_DEF).getValue();\n\n try {\n StreamDefinition streamDefinition = EventDefinitionConverterUtils.convertFromJson(streamDefinitionString);\n streamDefinitions.add(streamDefinition);\n\n try {\n String indexDefnString = getIndexDefinitionFromCassandra(cluster, streamDefinition.getName());\n if (indexDefnString != null) {\n streamDefinition.createIndexDefinitionFromStore((indexDefnString));\n }\n } catch (Exception ignored) {\n }\n } catch (MalformedStreamDefinitionException e) {\n log.error(\"Malformed StreamDefinition \" + streamDefinitionString);\n }\n }\n\n }\n\n if (result.get().getCount() < row_count) {\n break;\n }\n }\n\n if (log.isDebugEnabled()) {\n log.debug(logMsg);\n log.info(\"Stream Id returned from cassandra: \" + count);\n }\n\n return streamDefinitions;\n }", "public interface Stream {\n /**\n * The mediator of multiple Streams.\n */\n public interface StreamsMediator {\n /**\n * Allows the switching to another Stream.\n * @param streamKind The {@link StreamKind} of the stream to switch to.\n */\n default void switchToStreamKind(@StreamKind int streamKind) {}\n\n /**\n * Request the immediate refresh of the contents of the active stream.\n */\n default void refreshStream() {}\n\n /**\n * Disable the follow button, used in case of an error scenario.\n */\n default void disableFollowButton() {}\n }\n /** Called when the Stream is no longer needed. */\n default void destroy() {}\n\n /** Returns the section type for this stream. */\n @StreamKind\n int getStreamKind();\n\n /**\n * @param scrollState Previous saved scroll state to restore to.\n */\n void restoreSavedInstanceState(FeedScrollState scrollState);\n\n /**\n * Notifies that the header count has changed. Headers are views added to the Recyclerview\n * that the stream should not delete.\n *\n * @param newHeaderCount The new number of headers.\n */\n void notifyNewHeaderCount(int newHeaderCount);\n\n /**\n * @param listener A {@link ContentChangedListener} which activates when the content changes\n * while the stream is bound.\n */\n void addOnContentChangedListener(ContentChangedListener listener);\n\n /**\n * @param listener A previously added {@link ContentChangedListener} to be removed. Will no\n * longer trigger after removal.\n */\n void removeOnContentChangedListener(ContentChangedListener listener);\n\n /**\n * Allow the container to trigger a refresh of the stream.\n *\n * <p>Note: this will assume {@link RequestReason.MANUAL_REFRESH}.\n */\n void triggerRefresh(Callback<Boolean> callback);\n\n /**\n * @return Whether the placeholder is shown.\n */\n boolean isPlaceholderShown();\n\n /**\n * Called when the placeholder is shown and the first batch of articles are about to show.\n */\n void hidePlaceholder();\n\n /** Whether activity logging is enabled for this feed. */\n default boolean isActivityLoggingEnabled() {\n return false;\n }\n\n /** Whether the stream has unread content */\n default ObservableSupplier<Boolean> hasUnreadContent() {\n ObservableSupplierImpl<Boolean> result = new ObservableSupplierImpl<>();\n result.set(false);\n return result;\n }\n\n /** Returns the last content fetch time. */\n default long getLastFetchTimeMs() {\n return 0;\n }\n\n /**\n * Binds the feed to a particular view, manager, and scope.\n * When bound, the feed actively updates views and content. Assumes that whatever\n * views currently shown by manager are headers.\n * @param view The {@link RecyclerView} to which the feed is bound.\n * @param manager The {@link FeedListContentManager} to which we should make updates to.\n * @param savedInstanceState A previously saved instance state to restore to after loading\n * content.\n * @param surfaceScope The {@link FeedSurfaceScope} that is hosting the renderer.\n * @param renderer The {@link HybridListRenderer} that is rendering the feed.\n * @param reliabilityLogger Logger for feed reliability.\n * @param headerCount The number of headers in the RecyclerView that the feed shouldn't touch.\n */\n void bind(RecyclerView view, FeedListContentManager manager, FeedScrollState savedInstanceState,\n FeedSurfaceScope surfaceScope, HybridListRenderer renderer,\n @Nullable FeedReliabilityLogger reliabilityLogger, int headerCount);\n\n /**\n * Unbinds the feed. Stops this feed from updating the RecyclerView.\n *\n * @param shouldPlaceSpacer Whether this feed should place a spacer at the end to\n * prevent abrupt scroll jumps.\n * @param switchingStream Whether another feed is going to be bound right after this.\n */\n void unbind(boolean shouldPlaceSpacer, boolean switchingStream);\n\n /**\n * Whether this stream supports alternate sort options.\n */\n default boolean supportsOptions() {\n return false;\n }\n\n /**\n * Returns a value that uniquely identifies the state of the Stream's content. If this value\n * changes, then scroll state won't be restored.\n */\n String getContentState();\n\n /**\n * Interface users can implement to know when content in the Stream has changed content on\n * screen.\n */\n interface ContentChangedListener {\n /**\n * Called by Stream when content being shown has changed. This could be new cards being\n * created, the content of a card changing, etc...\n * @param feedContents the list of feed contents after the change. Null if the contents are\n * not available.\n */\n void onContentChanged(@Nullable List<FeedContent> feedContents);\n }\n}", "@Override\n protected Collection<Stream> calculateEmittedStreams(\n final Collection<Stream> providedStreams) {\n return null;\n }", "KStream<K, V> toStream();", "@Test\n\tpublic void testGetStreamSourcesByID_02() {\n\t\ttry {\n\t\t\tClass c = Class.forName(\"InternalMemory\");\n\t\t\tMethod method = c.getDeclaredMethod(\"getStreamSourcesByID\", new Class[] { String.class });\n\t\t\tmethod.setAccessible(true);\n\t\t\tObject i = c.newInstance();\n\n\t\t\tConcurrentHashMap<String, ArrayList<String>> map = new ConcurrentHashMap<String, ArrayList<String>>();\n\n\t\t\tField field = c.getDeclaredField(\"_streamerToStreamSourcesMap\");\n\t\t\tfield.setAccessible(true);\n\t\t\tfield.set(i, map);\n\n\t\t\tObject r = method.invoke(i, new Object[] { null });\n\t\t\tassertEquals(r, \"NULL\");\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\n\t}", "protected abstract OutputStream getStream() throws IOException;", "public List<RSSItem> getRSSItems() {\n String SearchURL = FeedContext;\n Log.getInstance().write(Log.LOGLEVEL_VERBOSE, \"RecordingEpisode.getRSSItems FeedContext = \" + FeedContext);\n return RSSHelper.getRSSItems(SearchURL);\n }", "abstract AbstractStreamingAnalyticsConnection createStreamsConnection()\n throws IOException;", "public String getStreamNameString() {\n return streamName;\n }", "@Override\r\n public InputStream getContentStream() throws StreamIOException {\r\n\r\n HttpInputStream contentStream = null;\r\n try {\r\n contentStream = s_http.get(DSLocation, true);\r\n DSSize =\r\n new Long(contentStream\r\n .getResponseHeaderValue(\"content-length\", \"0\"))\r\n .longValue();\r\n } catch (Throwable th) {\r\n throw new StreamIOException(\"Error getting content stream\", th);\r\n }\r\n return contentStream;\r\n }", "default Stream<E> parallelStream() {\n return StreamSupport.stream(spliterator(), true);\n }", "List<MediaMetadata> getAll();", "public InputStream createInputStream(List<String> stopFilters) throws IOException {\n/* 255 */ InputStream is = this.stream.createRawInputStream();\n/* 256 */ ByteArrayOutputStream os = new ByteArrayOutputStream();\n/* 257 */ List<COSName> filters = getFilters();\n/* 258 */ if (filters != null)\n/* */ {\n/* 260 */ for (int i = 0; i < filters.size(); i++) {\n/* */ \n/* 262 */ COSName nextFilter = filters.get(i);\n/* 263 */ if (stopFilters != null && stopFilters.contains(nextFilter.getName())) {\n/* */ break;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 269 */ Filter filter = FilterFactory.INSTANCE.getFilter(nextFilter);\n/* 270 */ filter.decode(is, os, (COSDictionary)this.stream, i);\n/* 271 */ IOUtils.closeQuietly(is);\n/* 272 */ is = new ByteArrayInputStream(os.toByteArray());\n/* 273 */ os.reset();\n/* */ } \n/* */ }\n/* */ \n/* 277 */ return is;\n/* */ }", "BasicSourceStreamHandlers getBasic_ss_handlers();", "public String joinedStream(Stream strm) {\n\t\tString str = \"\";\n\t\tstr += joinStreamInfo(strm);\n\t\tMap<String, Set<String>> joinSet = new HashMap<String, Set<String>>();\n\t\tSet<String> newVal = new HashSet<String>();\n\t\tfor (Window win : strm.getFrom().getList()) { //All streamwindows used in the current stream\n\t\t\tif(streamSet.contains(win.getName()))\n\t\t\t\tcontinue; //if stream is generated by starql -> skip\t\n\t\t\tif(win.getName().contains(\"_\")){\n\t\t\t\tString key = win.getName().substring(0,\n\t\t\t\t\t\twin.getName().indexOf(\"_\"));\n\t\t\t\tif(isHistorical())\n\t\t\t\t\tHelperFunctions.mapToSet(joinSet, key, win.getName().substring(win.getName().indexOf(\"_\")) + \"_stream\");\n\t\t\t\telse\n\t\t\t\t\tHelperFunctions.mapToSet(joinSet, key, win.getName().substring(win.getName().indexOf(\"_\")));\n\t\t\t\tnewVal.clear();\n\t\t\t}else{\n\t\t\t\tif(isHistorical())\n\t\t\t\t\tHelperFunctions.mapToSet(joinSet, win.getName(), win.getName()+\"_stream\");\n\t\t\t\telse\n\t\t\t\t\tHelperFunctions.mapToSet(joinSet, win.getName(), win.getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tstreamSet.clear();\n\t\tstreamSet.addAll(joinSet.keySet());\n\t\tstreamSet.addAll(streamSet2);\n\t\tif(!joinSet.isEmpty()){\t\n\t\t\tIterator it = joinSet.entrySet().iterator();\n\t\t\twhile (it.hasNext()) {\t\t\t\t\n\t\t\t\tMap.Entry mapEntry = (Map.Entry) it.next();\t\t\t\t\n\t\t\t\tstr += \"\\r\\n\"+genTableStr;\n\t\t\t\tstr += mapEntry.getKey() + \" AS WCACHE \\r\\n\";\n\t\t\t\tstr += \"SELECT * FROM\\r\\n \";\n\t\t\t\tboolean first2 = true;\n\t\t\t\tfor (String val : (Set<String>) mapEntry.getValue()) {\n\t\t\t\t\tif(((Set<String>) mapEntry.getValue()).size() == 1 && !mapEntry.getKey().toString().contains(\"_\") ){\n\t\t\t\t\t\tstr += val;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(((Set<String>) mapEntry.getValue()).size() == 1){\n\t\t\t\t\t\t\tstr += mapEntry.getKey() + val;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tif (first2) {\n\t\t\t\t\t\t\t\tstr += \"(mergeunion '\"+mapEntry.getKey() + val;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tstr += \", \"+mapEntry.getKey() + val;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfirst2 = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(((Set<String>) mapEntry.getValue()).size() > 1)\n\t\t\t\t\tstr += \t\"' cols:wid)\";\n\t\t\t\tstr += \";\\r\\n\";\n\t\t\t\tit.remove(); // avoids a ConcurrentModificationException\n\t\t\t}\t\t\t\n\t\t}\t\n\t\t//str += nowVal(strm, hasNative);\n\t\treturn str;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Create Stream of Object\\n\");\n\t\tStream<String> stream= Stream.of(\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\");\n\t stream.forEach(System.out::println);\n\t \n // Create Stream from Objects from Collection\n\t\tSystem.out.println(\" \\n\\nCreate Stream Object from collection\\n\");\n\t Collection<String> collection=Arrays.asList(\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\");\n\t Stream<String> stream2=collection.stream();\n\t stream2.forEach(System.out::println);\n\t \n\t //Create Stream Object from Collection\n\t System.out.println(\"\\n\\nCreate Stream Object from List\");\n\t List<String> list= Arrays.asList(\"Modou\",\"Fatou\",\"Saliou\",\"Samba\");\n\t Stream<String> stream3=list.stream();\n\t stream3.forEach(System.out::println);\n\t \n\t //Create Stream Object from Set\n\t System.out.println(\"\\n Create Stream from Set\");\n\t Set<String> set= new HashSet<>(list);\n\t Stream<String> stream4= set.stream();\n\t stream4.forEach(System.out::println);\n\t \n\t //Create Stream Object from Arrays\n\t System.out.println(\"\\nCreate Stream Object from Arrays\");\n\t ArrayList<String> array= new ArrayList<>(list);\n\t Stream<String> stream5= array.stream();\n\t stream5.forEach(System.out::println);\n\t \n\t //Create Stream from Array of String\n\t System.out.println(\"\\n Create Stream from Array of String\");\n\t String[] strArray= {\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\"};\n\t Stream<String> stream6=Arrays.stream(strArray);\n\t stream6.forEach(System.out::println);\n\t \n\t \n\t}", "public List<DatastreamVersion> listChangedDatastreams();", "public interface StreamsMediator {\n /**\n * Allows the switching to another Stream.\n * @param streamKind The {@link StreamKind} of the stream to switch to.\n */\n default void switchToStreamKind(@StreamKind int streamKind) {}\n\n /**\n * Request the immediate refresh of the contents of the active stream.\n */\n default void refreshStream() {}\n\n /**\n * Disable the follow button, used in case of an error scenario.\n */\n default void disableFollowButton() {}\n }", "private InputStream downloadStream(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\t\treturn stream;\n\t}", "public static ArrayList<DigitalNewspapers> getDigitalNewsSources(){\n\n Uri builtUri = Uri.parse(BASE_NEWSAPI_SOURCES_EP).buildUpon()\n .build();\n\n URL url = null;\n\n try {\n url = new URL(builtUri.toString());\n return doCall(url);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }" ]
[ "0.791386", "0.75775284", "0.7079734", "0.67107254", "0.6619809", "0.656527", "0.6478483", "0.6444843", "0.63799375", "0.6308846", "0.63045466", "0.6258603", "0.6251545", "0.6232803", "0.622128", "0.6205023", "0.6172768", "0.6093357", "0.60668916", "0.6058052", "0.6056789", "0.60547155", "0.5996463", "0.5989111", "0.59824556", "0.59456146", "0.5941757", "0.5903554", "0.5896116", "0.58688986", "0.5826433", "0.5793409", "0.57823616", "0.57408315", "0.57365596", "0.5730758", "0.5689063", "0.5676793", "0.5674853", "0.56662047", "0.56406015", "0.562903", "0.5625532", "0.56121665", "0.56029785", "0.5600929", "0.55877763", "0.5576753", "0.5572739", "0.55407774", "0.5525274", "0.55220556", "0.5503758", "0.54988587", "0.54957134", "0.54900825", "0.5489046", "0.54623556", "0.54590464", "0.54573834", "0.54448503", "0.5441614", "0.54364544", "0.54250884", "0.5424457", "0.541931", "0.541581", "0.5402808", "0.5402479", "0.53958064", "0.5383511", "0.53581613", "0.5346732", "0.5344319", "0.5331651", "0.5318885", "0.53028435", "0.5280917", "0.52663326", "0.5259831", "0.52588016", "0.52475655", "0.52468884", "0.52381355", "0.5232787", "0.52325153", "0.52271956", "0.52231264", "0.5222288", "0.5213189", "0.51911575", "0.5170485", "0.51694316", "0.5169234", "0.51690805", "0.51625395", "0.5155761", "0.51467496", "0.51369476", "0.5132955", "0.5131736" ]
0.0
-1
===================================================================================// / Custom Read/Write File Functions for Device/WireEnumeration Class ===================================================================================//
public static HashMap<String, Integer> readHashMap(Hessian2Input dis, Integer[] allInts) { int count; HashMap<String, Integer> tileMap = null; String[] keys; try { // TODO - The following read is necessary, but could be removed in a future version dis.readInt();//size = dis.readInt(); count = dis.readInt(); tileMap = new HashMap<String, Integer>(count); keys = new String[count]; for (int i = 0; i < keys.length; i++) { keys[i] = dis.readString(); } for (int i = 0; i < count; i++) { tileMap.put(keys[i], allInts[dis.readInt()]); } } catch (IOException e) { MessageGenerator.briefErrorAndExit("Error in readHashMap()"); } return tileMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void writeFile();", "public interface IOAdapter {\n /** Returns the IOAdapter identifier string.\n *\n */\n public String getIdentifierString();\n \n /** Attempts to read an object from the provided input stream.\n *\n * This method attempt to read an object to an input stream. The method\n * should construct an object, if possible, from the stream.\n *\n * @exception IOException Thown if the Stream is not in the correct format.\n *\n * @return Object created from stream.\n */\n public Object readObject(File file, int format) throws IOException, FileNotFoundException;\n \n /** Attempts to write an object to the provided output stream.\n *\n * This method should write the object to the output stream. \n *\n * @exception IOException thrown if the object fails to write for any reason.\n *\n */\n public void writeObject(OutputStream stream, Object object, int format) throws IOException;\n \n /** Returns the number of supported formats.\n\n */\n public int getReadFormatCount();\n \n /** Returns the file extensions of the indicated type. \n *\n */\n public String getReadFileExtension(int formatIndex);\n \n /** Returns the mime type of the indicated type. \n *\n */\n public String getReadMimeType(int formatIndex);\n \n /** Return the class of the indicated type.\n *\n */\n public Class getReadClass(int formatIndex);\n \n /** Returns the Description for the indicated type.\n *\n */\n public String getReadFormatDescription(int formatIndex);\n \n /** Looks up the file extention and returns the type index.\n */\n public int lookupReadFileExtension(String extension);\n \n /** Looks up the mine type and returns the type index.\n */\n public int lookupReadMimeType(String mimeType);\n \n /** Returns the number of supported formats.\n *\n */\n public int getWriteFormatCount();\n \n /** Returns the file extensions of the indicated type. \n *\n */\n public String getWriteFileExtension(int formatIndex);\n \n /** Returns the mime type of the indicated type. \n *\n */\n public String getWriteMimeType(int formatIndex);\n \n /** Return the class of the indicated type.\n *\n */\n public Class getWriteClass(int formatIndex);\n \n /** Returns the Description for the indicated type.\n *\n */\n public String getWriteFormatDescription(int formatIndex);\n \n /** Looks up the file extention and returns the type index.\n */\n public int lookupWriteFileExtension(String extension);\n \n /** Looks up the mine type and returns the type index.\n */\n public int lookupWriteMimeType(String mimeType);\n}", "public interface FilesystemConstants extends Serializable {\n\n /** Read only. */\n int O_RDONLY = 00;\n /** Write only. */\n int O_WRONLY = 01;\n /** Read and write. */\n int O_RDWR = 02;\n}", "protected abstract void readFile();", "public void ownRead();", "abstract void read();", "public void readFile();", "protected void writeRead ()\n {\n stream.println (\" public void _read (org.omg.CORBA.portable.InputStream i)\");\n stream.println (\" {\");\n if (entry instanceof ValueBoxEntry)\n {\n TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;\n SymtabEntry mType = member.type ();\n if (mType instanceof StringEntry)\n stream.println (\" value = i.read_string ();\");\n\n else if (mType instanceof PrimitiveEntry)\n stream.println (\" value = \" + helperClass + \".read (i).value;\");\n\n else\n stream.println (\" value = \" + helperClass + \".read (i);\");\n }\n else\n stream.println (\" value = \" + helperClass + \".read (i);\");\n stream.println (\" }\");\n stream.println ();\n }", "@Test\n public void testWrite() {\n System.out.println(\"write\");\n RecordFile instance = new RecordFile();\n \n String first = \"hello\";\n String second = \"hello 2\";\n String third = \"hello 3\";\n \n instance.write(first.getBytes(), 0);\n instance.write(second.getBytes(), 1);\n instance.write(third.getBytes(), 2);\n \n Assert.assertEquals(first, new String(instance.read(0)));\n Assert.assertEquals(second, new String(instance.read(1)));\n Assert.assertEquals(third, new String(instance.read(2)));\n \n instance.write(third.getBytes(), 1);\n \n Assert.assertEquals(first, new String(instance.read(0)));\n Assert.assertEquals(third, new String(instance.read(1)));\n Assert.assertEquals(third, new String(instance.read(2)));\n }", "public abstract void writeToFile( );", "Read createRead();", "protected abstract E readFile() throws Exception;", "public abstract int mo12583RW(int i);", "public abstract File mo41088k();", "public boolean writeAttributeFile();", "public void readFromFile() {\n\n\t}", "public File getAttributeFile();", "@Override\n\tpublic void read() {\n\n\t}", "public void Write() throws IOException {\n\tRandomAccessFile ancFile = new RandomAccessFile(filename, \"rw\");\n\ttry {\n\t \n\t ancFile.writeInt(numOfControl);\n\t for (int kk=0; kk < numOfControl; kk++ ) {\n\t\tparamFile[kk].Write(ancFile);\n\t }\n\t ancFile.close();\n\t return;\n\t}\n\tcatch ( IOException ex ) {\n\t System.out.println(\"Error writing Ancillary File \" + \n\t\t\t filename );\n\t ex.printStackTrace();\n\t throw new IOException();\n\t}\n\t\n }", "public void test_readXXXAndWriteXXX_basic_BB_FC_io() {\n tezt_readXXXAndWriteXXX_basic_BB_FC_io_impl();\n }", "protected abstract byte getWriteVersion();", "public void fileHexCodeIO(){\n deviceName = MySharedPreferences.readString(mContext, MySharedPreferences.DEVICE_NAME, \"Samsung\");\n\n //open file for reading\n try {\n br = new BufferedReader(new InputStreamReader(mContext.getAssets().open(\"devices/\"+deviceName+ ButtonNames.MUTE)));\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n MuteHexCode = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public RandomAccessFile getFile()\n {\n \treturn f;\n }", "@Override\r\n public void write(int value) throws IOException {\r\n super.write(value);\r\n if (!(inWrite1 || inWrite3)) {\r\n /*if (!Helper.NEW_IO_HANDLING && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, 1);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, 1, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n }", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "@Override\n public int getFile() {\n return file;\n }", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "public abstract File mo41087j();", "public FileAttributes getFileAttributes() {\n\t\tFileAttributes attributes = new FileAttributes();\n\t\tFormatter formatter = new Formatter();\n\t\tfor (short deviceID : deviceList) {\n\t\t\tformatter.format(\"0x%02X \", deviceID);\n\t\t}\n\n\t\tattributes.add(\"Supported Device IDs\", formatter.toString());\n\t\treturn attributes;\n\t}", "public String getReadWriteAttribute();", "@Override\r\n\tpublic void read() {\n\r\n\t}", "public int getFileFlags() { return fileFlags; }", "public interface IMemoriaFile {\r\n \r\n public void append(byte[] data);\r\n \r\n /**\r\n * Releases the write-lock\r\n */\r\n public void close();\r\n \r\n /**\r\n * Returns a stream starting at position 0.\r\n * \r\n * Attention: The stream must be closed!\r\n * \r\n * @return Stream for reading the whole content of the file.\r\n */\r\n public InputStream getInputStream();\r\n \r\n /**\r\n * Returns a stream starting at the given <tt>position</tt>.\r\n * \r\n * Attention: The stream must be closed!\r\n * \r\n * @param position\r\n * @return Stream for reading the whole content of the file.\r\n */\r\n public InputStream getInputStream(long position);\r\n \r\n public long getSize();\r\n\r\n public boolean isEmpty();\r\n\r\n \r\n public void sync();\r\n\r\n /**\r\n * The given offset plus the size of the given byte-array must not exceed the file-site.\r\n * @param data\r\n * @param offset\r\n */\r\n public void write(byte[] data, long offset);\r\n}", "public String getRecordFile();", "public abstract void readFromFile( ) throws Exception;", "@Override\n public int[] getAttributeIndexToRead()\n {\n java.util.ArrayList<Integer> attributes = new java.util.ArrayList<Integer>();\n //LN is static and read only once.\n if (LogicalName == null || LogicalName.compareTo(\"\") == 0)\n {\n attributes.add(1);\n }\n //ScalerUnit\n if (!isRead(3))\n {\n attributes.add(3);\n }\n //Value\n if (canRead(2))\n {\n attributes.add(2);\n } \n return toIntArray(attributes);\n }", "public abstract void readFromFile(String key, String value);", "boolean getBinaryFileAttribute();", "protected void openFiles() {\n\t\tthis.container = fso.openFile(prefix+EXTENSIONS[CTR_FILE],\"rw\");\n\t\tthis.metaData = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\tthis.reservedBitMap = fso.openFile(prefix+EXTENSIONS[RBM_FILE], \"rw\");\n\t\tthis.updatedBitMap = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\tthis.freeList = fso.openFile(prefix+EXTENSIONS[FLT_FILE], \"rw\");\n\t}", "@Override\n public void write() {\n\n }", "public interface VicarInput extends VicarIOBase\n{\n\n/***********************************************************************\n * Low-level read function, returns a byte array for the given record.\n * The most normal call, to read an entire record, would be\n * <code>x.readRecord(data, 0, 0, 0, 1, line, band);</code>\n * @param data The array to read into\n * @param start Starting position in the record. Normally 0 to read the whole\n * record.\n * @param length Number of pixels to read. If 0, the rest of the record is\n * read.\n * @param offset Offset into the data array at which to put the data.\n * @param pixelStride Offset from one pixel to the next in the array. For\n * example, a stride of 1 has all pixels contiguous while a stride of 3\n * allows band interleaved pixels in the array (pixels read from the file\n * will be put 3 elements apart in the array). This has nothing to do with\n * what is read from the file - only where the data is put in the array.\n * Note that this value is measured in pixels or array elements - not bytes.\n * @param n2 \"Line number\" to read (for BSQ organization). (For BIL: band\n * number, for BIP: sample number). The second dimension's index.\n * @param n3 \"Band number\" to read (for BSQ organization). (For BIL or BIP:\n * line number). The third dimension's index.\n * @throws NonSequentialAccessException (subclass of IOException)\n * @throws IOException\n */\n public void readRecord(byte[] data, int start, int length, int offset,\n\t\t\tint pixelStride, int n2, int n3) throws IOException;\n\n/***********************************************************************\n * Low-level read function, returns a short array for the given record.\n * Follow the See Also link for parameters.\n * @see #readRecord(byte[], int, int, int, int, int, int)\n */\n public void readRecord(short[] data, int start, int length, int offset,\n\t\t\tint pixelStride, int n2, int n3) throws IOException;\n\n/***********************************************************************\n * Low-level read function, returns an unsigned short array for the given\n * record. Although unsigned short is not a VICAR data type, it is useful\n * for some other formats which use this library. Note that a short array\n * must be used, although the data should be interepreted as unsigned.\n * For this reason, a different method name is needed.\n * <p>\n * Follow the See Also link for parameters.\n * @see #readRecord(byte[], int, int, int, int, int, int)\n */\n public void readRecordUshort(short[] data, int start, int length,\n\t\tint offset, int pixelStride, int n2, int n3) throws IOException;\n\n/***********************************************************************\n * Low-level read function, returns an int array for the given record.\n * Follow the See Also link for parameters.\n * @see #readRecord(byte[], int, int, int, int, int, int)\n */\n public void readRecord(int[] data, int start, int length, int offset,\n\t\t\tint pixelStride, int n2, int n3) throws IOException;\n\n/***********************************************************************\n * Low-level read function, returns a float array for the given record.\n * Follow the See Also link for parameters.\n * @see #readRecord(byte[], int, int, int, int, int, int)\n */\n public void readRecord(float[] data, int start, int length, int offset,\n\t\t\tint pixelStride, int n2, int n3) throws IOException;\n\n/***********************************************************************\n * Low-level read function, returns a double array for the given record.\n * Follow the See Also link for parameters.\n * @see #readRecord(double[], int, int, int, int, int, int)\n */\n public void readRecord(double[] data, int start, int length, int offset,\n\t\t\tint pixelStride, int n2, int n3) throws IOException;\n\n/***********************************************************************\n * Low-level read function, returns complex data in a float array for the\n * given record. Each complex value is stored in two consecutive float\n * elements in the array, so it must be twice as long as you would normally\n * expect, and <code>offset</code> must be multiplied by 2. <code>length</code>\n * is still measured in <em>pixels</em>, so there are 2*<code>length</code>\n * values filled in the array.\n * <p>\n * Follow the See Also link for parameters.\n * @see #readRecord(byte[], int, int, int, int, int, int)\n */\n public void readRecordComp(float[] data, int start, int length, int offset,\n\t\t\tint pixelStride, int n2, int n3) throws IOException;\n\n////////////////////////////////////////////////////////////////////////\n\n/***********************************************************************\n * Provides access to the binary header, which is NLB records at the beginning\n * of the file. This function returns a <code>VicarBinaryLabel</code> object\n * which contains the entire header. From it, you can get a limited-length\n * stream which implements <code>DataInput</code>. This stream automatically\n * translates data types based on BINTFMT and BREALFMT, so e.g. if you call\n * <code>readFloat()</code>, the stream will either return the next four\n * bytes as a float (BREALFMT=IEEE), byte-swap them (BREALFMT=RIEEE), or\n * convert them from VAX format (BREALFMT=VAX). So a typical binary header\n * might be read like this:\n * <pre>\n * VicarBinaryLabel bh = file.getBinaryHeader();\n * DataInput di = bh.getDataInput();\n * int first = di.readInt();\n * short second = di.readShort();\n * byte b[8];\n * for (i=0; i<8; i++) b[i] = di.readByte();\n * String third(b);\n * ... etc ...\n * </pre>\n * The returned stream will signal EOF when the end of the binary header area\n * is reached. You can also access the label buffer directly via\n * <code>VicarBinaryLabel.getBuffer()</code>, but this is not recommended\n * (because no data type translation is done).\n * <p>\n * Internally, the header is copied to a buffer, so the\n * <code>VicarBinaryLabel</code> object will stay valid as long as you\n * need it (i.e., you can read data from the file and the header will still\n * stay valid).\n * <p>\n * If this routine is used with a strictly sequential file, it must be called\n * before any pixel data (or binary prefixes) are read.\n *\n * @return A VicarBinaryLabel that contains the header, or NULL if there is\n * header.\n * @throws NonSequentialAccessException (subclass of IOException)\n * @throws IOException\n * @see VicarBinaryLabel\n */\n public VicarBinaryLabel getBinaryHeader() throws IOException;\n\n/***********************************************************************\n * Provides access to the binary prefix, which is NBB <em>bytes</em> at the\n * beginning of each record. This function returns a\n * <code>VicarBinaryLabel</code> object which contains the entire prefix.\n * From it, you can get a limited-length stream which implements\n * <code>DataInput</code>, and behaves as described in\n * <code>getBinaryHeader()</code>. The stream will signal EOF at the end\n * of the prefix for this record. A buffer is maintained, as with the\n * header, so the <code>VicarBinaryLabel</code> object will stay valid in\n * the future. Direct access to the buffer is possibly but strongly\n * discouraged.\n * <p>\n * If this routine is used with a strictly sequential file, it must be called\n * before the pixel data for this record is read (and of course, after the\n * previous record's data). For this reason, this routine is incompatible\n * with the Tile read functions for strictly sequential files (unless the\n * tile height is 1).\n *\n * @param n2 \"Line number\" to read (for BSQ organization). (For BIL: band\n * number, for BIP: sample number). The second dimension's index.\n * @param n3 \"Band number\" to read (for BSQ organization). (For BIL or BIP:\n * line number). The third dimension's index.\n * @return A VicarBinaryLabel that contains the prefix, or NULL if there is no\n * prefix.\n * @throws NonSequentialAccessException (subclass of IOException)\n * @throws IOException\n * @see #getBinaryHeader()\n * @see VicarBinaryLabel\n */\n public VicarBinaryLabel getBinaryPrefix(int n2, int n3) throws IOException;\n\n////////////////////////////////////////////////////////////////////////\n\n/***********************************************************************\n * High-level read function. Given an x/y position in the file, read a\n * complete tile (size specified by the SampleModel) into the DataBuffer.\n * Data is placed in the SM starting at its origin. If the file does not\n * contain enough data to fill the SM, then only the parts that can be read,\n * are read. No error is returned in this case (it is up to the caller to\n * check the boundary conditions if needed).\n * @throws IOException if there are problems reading the file\n */\n public void readTile(int x, int y, SampleModel m, DataBuffer b)\n\t\t\tthrows IOException;\n\n/***********************************************************************\n * High-level read function. Given an x/y position in the file, and a\n * width/height, read that portion of the file into the given DataBuffer.\n * Data is placed starting at an origin of x_off/y_off within the SampleModel\n * (i.e. x/y is the position in the file to read, x_off/y_off is the position\n * within the buffer to place the data). If the file does not contain enough\n * data to satisfy width/height, then only the parts that can be read, are\n * read. No error is returned in this case (it is up to the caller to\n * check the boundary conditions if needed). However, if the requested\n * width/height (combined with x_off/y_off) will not fit within the SampleModel,\n * an ArrayIndexOutOfBoundsException is thrown.\n * @throws IOException if there are problems reading the file\n */\n public void readTile(int x, int y, int w, int h, int x_off, int y_off,\n\t\t\tSampleModel m, DataBuffer b)\n\t\t\tthrows IOException;\n\n/***********************************************************************\n * High-level read function. Just like the previous readTile, except that\n * an array of band numbers is also provided. Only bands in this array are\n * read. On output, the number of bands actually read will equal the size\n * of this array, i.e. original band numbers are not preserved. If too many\n * bands, or an out-of-range band number is specified, an\n * ArrayIndexOutOfBoundsException is thrown.\n * <p>\n * bandList may be null, in which case all bands are read. Note that for\n * Complex data, each part (real/imaginary) is treated as a separate band.\n * So, a multi-banded Complex file with have 2*nb bands. The bands requested\n * in bandList take this into account, e.g. band 2 in the list is the real\n * part of the file's band 1 (counting from 0), band 5 in the list is the\n * imaginary part of the file's band 3, etc.\n * <p>\n * For BIP data (Band Interleaved by Pixel), it is much more efficient to\n * read all bands at once (i.e. pass bandList as null).\n * @see #readTile(int,int,int,int,int,int,SampleModel,DataBuffer)\n * @throws IOException if there are problems reading the file\n */\n public void readTile(int x, int y, int w, int h, int x_off, int y_off,\n\t\t\tint bandList[],\n\t\t\tSampleModel m, DataBuffer b)\n\t\t\tthrows IOException;\n}", "protected Object readUnknownData() throws IOException {\r\n byte[] bytesValue;\r\n Byte[] bytesV;\r\n Preferences.debug(\"Unknown data; length is \" + elementLength + \" fp = \" + getFilePointer() + \"\\n\", 2);\r\n\r\n if (elementLength <= 0) {\r\n Preferences.debug(\"Unknown data; Error length is \" + elementLength + \"!!!!!\\n\", 2);\r\n\r\n return null;\r\n }\r\n\r\n bytesValue = new byte[elementLength];\r\n read(bytesValue);\r\n bytesV = new Byte[elementLength];\r\n\r\n for (int k = 0; k < bytesValue.length; k++) {\r\n bytesV[k] = new Byte(bytesValue[k]);\r\n }\r\n\r\n return bytesV;\r\n }", "int getBytesRead() {\n \treturn _read + _o;\n }", "public interface SimpleFile {// extends IFile { \n /**\n * Open the file\n * @param path path to the file\n * @param readOnly if file is readonly\n * @param noFlush whther synchronous flush is needed\n */\n void open(String path, boolean readOnly, boolean noFlush)throws IOException;\n \n /**\n * Delete file\n * @param path path to the file\n */\n void delete(String path);\n \n boolean isOpened();\n String readString()throws IOException;\n void truncate(int nSize)throws IOException;\n InputStream getInputStream()throws IOException;\n OutputStream getOutStream();\n OutputStream getOutStreamEx(long pos)throws IOException; \n long length();\n \n /**\n * \n * @param path\n * @return\n */\n String getDirPath(String path) throws IOException;\n\n /**\n * @param fromClass\n * @param path\n * @return\n */\n public abstract InputStream getResourceAsStream(Class fromClass, String path);\n \n public abstract void renameOverwrite(String oldName, String newName);\n \n public abstract void copyJarFileToMemory(String strFileName, InputStream jarStream)throws IOException;\n \n void write(long pos, byte[] buf)throws IOException;\n\n /**\n * Read data from the file\n * @param pos offset in the file\n * @param buf array to receive readen data (size is always equal to database page size)\n * @return number of bytes actually readen\n */\n int read(long pos, byte[] buf)throws IOException;\n\n /**\n * Flush all fiels changes to the disk\n */\n void sync()throws IOException;\n\n /**\n * Close file\n */\n void close()throws IOException;\n\n /**\n * Length of the file\n */\n //long length();\n \n}", "public File getFileValue();", "@Override\n public void writeDataToTxtFile() {\n\n }", "@Override\n public int ReadStatusByte()\n throws IOException {\n\n int StatusByte;\n ShortByReference pShort = new ShortByReference();\n ByteByReference pByte = new ByteByReference();\n\n\n // read the status byte\n if (USE_4882 == true) {\n m_gpib32.ReadStatusByte(BOARD_NR, (short)m_UnitDescriptor, pShort);\n StatusByte = (int)pShort.getValue();\n } else {\n m_gpib32.ibrsp(m_UnitDescriptor, pByte);\n StatusByte = (int)pShort.getValue();\n }\n\n // error check\n String str = \"Could not read the Status Byte from the Instrument.\\n\";\n checkErrorGPIB(str, false);\n\n // return\n return StatusByte;\n }", "IOStatistics getIOStatistics();", "protected abstract byte[] getTemperatureSetting2();", "public static byte[] readFile(File file, int valueType) {\n if (!file.exists()) {\n Log.e(TAG, \"The file doesn't exist\");\n }\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);\n byte[] buf = new byte[4096];\n switch (valueType) {\n case 0:\n case 1:\n case 2:\n case 3:\n while (bufferedInputStream.read(buf) != -1) {\n byteArrayOutputStream.write(buf, 16 * valueType, 16);\n }\n break;\n case 4:\n if (!file.getName().equals(\"E_SK2\")) {\n if (!file.getName().equals(\"E_PIN2\")) {\n while (true) {\n int len = bufferedInputStream.read(buf);\n if (len == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, (len - 32) - (16 * 1));\n }\n }\n } else {\n while (true) {\n int len2 = bufferedInputStream.read(buf);\n if (len2 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, ((len2 - 32) - (16 * 1)) - PKLENGTH);\n }\n }\n }\n } else {\n while (true) {\n int len3 = bufferedInputStream.read(buf);\n if (len3 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 4, (len3 - 32) - (16 * 4));\n }\n }\n }\n case 5:\n while (true) {\n int len4 = bufferedInputStream.read(buf);\n if (len4 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, len4 - 32, 32);\n }\n }\n case PUBLICKEY /* 7 */:\n while (true) {\n int len5 = bufferedInputStream.read(buf);\n if (len5 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, (len5 - 32) - PKLENGTH, PKLENGTH);\n }\n }\n case 8:\n while (true) {\n int len6 = bufferedInputStream.read(buf);\n if (len6 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 0, len6 - 32);\n }\n }\n }\n byte[] buffer = byteArrayOutputStream.toByteArray();\n bufferedInputStream.close();\n fileInputStream.close();\n byteArrayOutputStream.close();\n return buffer;\n } catch (IOException e) {\n Log.e(TAG, \"read file exception!\" + e.getMessage());\n return new byte[0];\n }\n }", "public static void randomAccessWrite() {\n try {\n RandomAccessFile f = new RandomAccessFile(FILES_TEST_PATH, \"rw\");\n f.writeInt(10);\n f.writeChars(\"test line\");\n f.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void read() {\r\n\t\tbusExt.put(data);\r\n\t}", "@Test\n public void testReadWriteInt() {\n System.out.println(\"readInt\");\n ByteArray instance = new ByteArray();\n \n instance.writeInt(12, 0);\n instance.writeInt(1234, 4);\n instance.writeInt(13, instance.compacity());\n \n assertEquals(12, instance.readInt(0));\n assertEquals(1234, instance.readInt(4));\n assertEquals(13, instance.readInt(instance.compacity() - 4));\n \n instance.writeInt(14, 4);\n assertEquals(14, instance.readInt(4));\n }", "protected FileBasedElementMapping() {\n\t}", "public void write() throws IOException {\n\t\t\tRandomAccessStreamUtils.writeS16(out, FileType); // WMFWORD FileType; /* Type of metafile\n\t\t\t\t\t\t\t\t// (0=memory, 1=disk) */\n\t\t\tRandomAccessStreamUtils.writeS16(out, HeaderSize); // WMFWORD HeaderSize; /* Size of header in\n\t\t\t\t\t\t\t\t\t// WMFWORDS (always 9) */\n\t\t\tRandomAccessStreamUtils.writeS16(out, Version); // WMFWORD Version; /* Version of Microsoft\n\t\t\t\t\t\t\t\t// Windows used */\n\t\t\tRandomAccessStreamUtils.writeS32(out, FileSize); // WMFDWORD FileSize; /* Total size of the\n\t\t\t\t\t\t\t\t// metafile in WMFWORDs */\n\t\t\tRandomAccessStreamUtils.writeS16(out, NumOfObjects); // WMFWORD NumOfObjects; /* Number of\n\t\t\t\t\t\t\t\t\t// objects in the file */\n\t\t\tRandomAccessStreamUtils.writeS32(out, MaxRecordSize); // WMFDWORD MaxRecordSize; /* The size\n\t\t\t\t\t\t\t\t\t\t// of largest record in WMFWORDs\n\t\t\tRandomAccessStreamUtils.writeS16(out, NumOfParams); // WMFWORD NumOfParams; /* Not Used (always\n\t\t\t\t\t\t\t\t\t// 0) */\n\t\t}", "public interface IRasterFile{\r\n\t/**\r\n\t * Obtiene el Tamaño de cada fichero de que consta el raster en bytes. \r\n\t * @return long que representa el tamaño\r\n\t */\r\n\tpublic long[] getFileSize();\r\n\t/**\r\n\t * Obtiene el nombre de de cada fichero de que consta el raster. En caso de estar en disco\r\n\t * debe ofrecerse con la ruta completa.\r\n\t * @return Cadena con el nombre del fichero.\r\n\t */\r\n\tpublic String[] getFileName();\r\n\t/**\r\n\t * Obtiene el número de ficheros de que consta el raster.\r\n\t * @return Número de ficheros.\r\n\t */\r\n\tpublic int getFileCount();\r\n\t/**\r\n\t * Formato del fichero raster. Puede devolver la extensión correspondiente al\r\n\t * fichero\r\n\t * @return String que representa el formato\r\n\t */\r\n\tpublic String getFileFormat();\r\n}", "public void writeToFile(RandomAccessFile fio) {\n try {\n fio.writeInt(number);\n fio.writeUTF(name);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public boolean writeDataFile();", "public boolean writeToDeviceFile(Device dev) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element device = doc.createElement(\"Device\");\n rootElement.appendChild(device);\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(dev.getDeviceID()));\n device.appendChild(id);\n Element names = doc.createElement(\"Names\");\n device.appendChild(names);\n\n for (Map.Entry<Locale, String> entry : dev.getDeviceNames().entrySet()) {\n Element name = doc.createElement(\"Name\");\n Element locale = doc.createElement(\"Locale\");\n Element nameStr = doc.createElement(\"Value\");\n\n locale.appendChild(doc.createTextNode(entry.getKey().toString()));\n nameStr.appendChild(doc.createTextNode(entry.getValue()));\n\n name.appendChild(locale);\n name.appendChild(nameStr);\n names.appendChild(name);\n }\n\n Element type = doc.createElement(\"Type\");\n type.appendChild(doc.createTextNode(dev.getType()));\n device.appendChild(type);\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(dev.getImgName()));\n device.appendChild(image);\n Element capabilities = doc.createElement(\"Capabilities\");\n device.appendChild(capabilities);\n\n for (int j = 0; j < dev.getCapabilities().size(); j++) {\n Element cap = doc.createElement(\"capability\");\n cap.appendChild(doc.createTextNode(dev.getCapabilities().get(j).getCapID()));\n capabilities.appendChild(cap);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.DEV_FILE_DIR + dev.getDeviceID() + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n return true;\n\n } catch (ParserConfigurationException | TransformerException pce) {\n return false;\n }\n }", "private boolean canRead() {\n\t\treturn fileStatus;\n\t}", "@Test\n public void testGetBytes() {\n System.out.println(\"getBytes\");\n RecordFile instance = new RecordFile();\n \n String first = \"hello\";\n String second = \"hello 2\";\n String third = \"hello 3\";\n String meta = \"hello, I'm meta!\";\n \n instance.setMeta(meta.getBytes());\n instance.write(first.getBytes(), 0);\n instance.write(second.getBytes(), 1);\n instance.write(third.getBytes(), 2);\n \n byte[] bytes = instance.getBytes();\n \n instance = new RecordFile(bytes);\n \n Assert.assertEquals(RecordFile.DEFAULT_RECORDS, instance.compacity());\n Assert.assertEquals(meta, new String(instance.getMeta()));\n Assert.assertEquals(first, new String(instance.read(0)));\n Assert.assertEquals(second, new String(instance.read(1)));\n Assert.assertEquals(third, new String(instance.read(2)));\n }", "public IFile getIFile ();", "@Override\r\n\tpublic void onUpdateIO(int device, int type, int code, int value,\r\n\t\t\tint timestamp) {\n\t\t\r\n\t}", "@Override\r\n public void write(byte[] buffer) throws IOException {\r\n inWrite1 = true;\r\n try {\r\n super.write(buffer);\r\n if (!inWrite3) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, buffer.length);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, buffer.length, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite1 = false;\r\n } catch (IOException e) {\r\n inWrite1 = false;\r\n throw e;\r\n }\r\n }", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "protected abstract byte[] getTemperatureSetting1();", "public File getDataFile();", "void read ();", "public File getDrive(){\n return drv;\n }", "public void readEntries() throws FileAccessException;", "@Override\n\tpublic Map<String, Object> read_file_info(int bno) throws Exception {\n\t\treturn boardDao.read_file_info(bno);\n\t}", "@Override\r\n public void write(byte[] buffer, int off, int len) throws IOException {\r\n inWrite3 = true;\r\n try {\r\n super.write(buffer, off, len);\r\n if (!inWrite1) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, len);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, len, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite3 = false;\r\n } catch (IOException e) {\r\n inWrite3 = false;\r\n throw e;\r\n }\r\n }", "public FileDesc getFileDesc();", "@Override\n\tprotected String getFileArress() {\n\t\treturn fileAddress;\n\t}", "public RandomAccessFile getCases() {\n \n return cases;\n}", "interface DmaRequestWrite extends DmaRequest\n{\n\t/**\n\t * Read a byte from the peripheral\n\t */\n\tpublic int getDmaValue();\n}", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "public void saveWorkingDataFile(String rftNo, String fileName, int fileRecordNumber, Connection conn) \n\t\tthrows ReadWriteException, NotFoundException, InvalidDefineException, IllegalAccessException, IOException\n\t{\t\t\n\t\tString id = \"\";\n\t\tMatcher m = Pattern.compile(\"ID(\\\\d\\\\d\\\\d\\\\d).txt\").matcher(fileName);\n\t\tif (m.find())\n\t\t{\n\t\t\tid = m.group(1);\n\t\t}\n\t\t//#CM702621\n\t\t// Generation of instance of work file\n\t\tWorkDataFile workDataFile =\n\t\t (WorkDataFile) PackageManager.getObject(\"Id\"+ id + \"DataFile\");\n\t\tworkDataFile.setFileName(fileName);\n\t\t\n\t\t//#CM702622\n\t\t// Remove the passing part of File Name. \n\t\tFile file = new File(fileName);\n\t\tString registFileName = file.getName();\n\t\ttry\n\t\t{\t\t\t\n\t\t\tWorkingDataHandler wHandler = new WorkingDataHandler(conn);\n\t\t\t//#CM702623\n\t\t\t// Open the made work file. \n\t\t\tworkDataFile.openReadOnly();\n\t\t\tint i = 0;\n\t\t\tfor(workDataFile.next(); i < fileRecordNumber; workDataFile.next())\n\t\t\t{\t\n\t\t\t\tWorkingDataAlterKey akey = new WorkingDataAlterKey();\n\t\t\t\takey.setRftNo(rftNo);\n\t\t\t\takey.setLineNo(i);\n\t\t\t\takey.updateFileName(registFileName);\n\t\t\t\takey.updateContents(workDataFile.getContents());\n\n\t\t\t\tWorkingDataSearchKey skey = new WorkingDataSearchKey();\n\t\t\t\tskey.setRftNo(rftNo);\n\t\t\t\tskey.setFileName(registFileName);\n\t\t\t\tskey.setLineNo(i);\n\t\t\t\tWorkingData[] workingArr= (WorkingData[])wHandler.find(skey);\n\t\t\t\tif (workingArr.length > 0)\n\t\t\t\t{\n\t\t\t\t\twHandler.modify(akey);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tWorkingData workdata = new WorkingData();\n\t\t\t\t\t\tworkdata.setRftNo(rftNo);\n\t\t\t\t\t\tworkdata.setFileName(registFileName);\n\t\t\t\t\t\tworkdata.setLineNo(i);\n\t\t\t\t\t\tworkdata.setContents(workDataFile.getContents());\n\t\t\t\t\t\twHandler.create(workdata);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (DataExistsException e)\n\t\t\t\t\t{\n\t\t\t\t\t\twHandler.modify(akey);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tworkDataFile.closeReadOnly();\n\t\t}\n\t\t\n\t}", "public abstract void readFields(DataInput in) throws IOException;", "File getFile();", "File getFile();", "public int getFile() {\n validify();\n return Client.INSTANCE.pieceGetFile(ptr);\n }", "@Override\n\tpublic int read() {\n\t\treturn super.read();\n\t}", "public interface Files \n{\n\t/**\n\t * Enum describing the three file types, internal, external\n\t * and absolut. Internal files are located in the asset directory\n\t * on Android and are relative to the applications root directory\n\t * on the desktop. External files are relative to the SD-card on Android\n\t * and relative to the home directory of the current user on the Desktop.\n\t * Absolut files are just that, absolut files that can point anywhere.\n\t * @author mzechner\n\t *\n\t */\n\tpublic enum FileType\n\t{\n\t\tInternal,\n\t\tExternal,\n\t\tAbsolut\n\t}\n\t\n\tpublic File getlastFile();\n\t\n\t/**\n\t * Returns an InputStream to the given file. If type is equal\n\t * to FileType.Internal an internal file will be opened. On Android\n\t * this is relative to the assets directory, on the desktop it is \n\t * relative to the applications root directory. If type is equal to\n\t * FileType.External an external file will be opened. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the filename is interpreted as an absolut filename. \n\t * \n\t * @param fileName the name of the file to open.\n\t * @param type the type of file to open.\n\t * @return the InputStream or null if the file couldn't be opened.\n\t */\n\t\n\tpublic InputStream readFile( String fileName, FileType type );\t\n\t\n\t/**\n\t * Returns and OutputStream to the given file. If\n\t * the file does not exist it is created. If the file\n\t * exists it will be overwritten. If type is equal\n\t * to FileType.Internal null will be returned as on Android assets can not be written. If type is equal to\n\t * FileType.External an external file will be opened. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the filename is interpreted as an absolut filename.\n\t * \n\t * @param filename the name of the file to open\n\t * @param type the type of the file to open\n\t * @return the OutputStream or null if the file couldn't be opened.\n\t */\n\tpublic OutputStream writeFile( String filename, FileType type );\n\t\t\n\t/**\n\t * Creates a new directory or directory hierarchy on the external\n\t * storage. If the directory parameter contains sub folders and \n\t * the parent folders don't exist yet they will be created. If type is equal\n\t * to FileType.Internal false will be returned as on Android new directories in the asset directory can not be created. If type is equal to\n\t * FileType.External an external directory will be created. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the directory is interpreted as an absolut directory name.\n\t * \n\t * @param directory the directory\n\t * @param type the type of the directory\n\t * @return true in case the directory could be created, false otherwise\n\t */\n\tpublic boolean makeDirectory( String directory, FileType type );\n\t\n\t\n\t/**\n\t * Lists the files and directories in the given directory. If type is equal\n\t * to FileType.Internal an internal directory will be listed. On Android\n\t * this is relative to the assets directory, on the desktop it is \n\t * relative to the applications root directory. If type is equal to\n\t * FileType.External an external directory will be listed. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the filename is interpreted as an absolut directory.\n\t * \n\t * @param directory the directory\n\t * @param type the type of the directory\n\t * @return the files and directories in the given directory or null if the directory is none existant\n\t */\n\tpublic String[] listDirectory( String directory, FileType type );\n\t\n\t\n\t/**\n\t * Returns a {@link FileDescriptor} object for a file. If type is equal\n\t * to FileType.Internal an internal file will be opened. On Android\n\t * this is relative to the assets directory, on the desktop it is \n\t * relative to the applications root directory. If type is equal to\n\t * FileType.External an external file will be opened. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the filename is interpreted as an absolut filename. \n\t * \n\t * @param filename the name of the file\n\t * @param type the type of the file\n\t * @return the FileDescriptor or null if the descriptor could not be created\n\t */\n\tpublic FileHandle getFileHandle( String filename, FileType type );\t\t\n}", "public boolean readDataFile();", "static void readWrite(FileInputStream raf,BufferedOutputStream bw, long numBytes) throws IOException {\n byte[] buf = new byte[(int) numBytes];\n int val = raf.read(buf);\n if(val != -1) {\n\n bw.write(buf);\n bw.flush();\n }\n else {\n \tSystem.out.println(\"Error read\");\n }\n}", "public abstract void readData(DataInput din) throws IOException;", "public ByteBuffer getFileData() {\n\t\treturn fileData;\n\t}", "private void writeBytes() {\n\t\tint needToWrite = rawBytes.length - bytesWritten;\n\t\tint actualWrit = line.write(rawBytes, bytesWritten, needToWrite);\n\t\t// if the total written is not equal to how much we needed to write\n\t\t// then we need to remember where we were so that we don't read more\n\t\t// until we finished writing our entire rawBytes array.\n\t\tif (actualWrit != needToWrite) {\n\t\t\tCCSoundIO.debug(\"writeBytes: wrote \" + actualWrit + \" of \" + needToWrite);\n\t\t\tshouldRead = false;\n\t\t\tbytesWritten += actualWrit;\n\t\t} else {\n\t\t\t// if it all got written, we should continue reading\n\t\t\t// and we reset our bytesWritten value.\n\t\t\tshouldRead = true;\n\t\t\tbytesWritten = 0;\n\t\t}\n\t}", "public File getFile ();", "alluxio.proto.journal.File.SetAttributeEntry getSetAttribute();", "public Attributes getFileAttributes()\r\n {\r\n return aFileAttributes;\r\n }", "public abstract void write(O value) throws IOException;", "protected abstract int readInternal(int index);", "@Override\n\tpublic void writeToFile(NetworkFileWriter nfw) throws IOException {\n\t\t// write the size of the layer\n\t\tnfw.writeInt(size);\n\t}", "public interface CDFFileWriter {\n\t\n\t/**\n\t * \n\t * @param model\n\t * @param filename\n\t * @return a registry to the cdf components that get written for \"model\"\n\t * @throws IOException\n\t */\n\tpublic void saveFile(ElectricPowerModel model, String filename) throws IOException;\t\n}", "@Override\n public byte[] serialize() throws IOException {\n throw new UnsupportedOperationException(\"Not implemented\");\n }", "static void readWrites(FileInputStream raf,BufferedOutputStream bw, int numBytes,int indice) throws IOException {\n\n // System.out.println(\"frag num \"+ indice +\" Envoyé\");\n int nbsousfrag = numBytes/taillesousfrag; \n System.out.println(\"nombre des sous fragements : \" + nbsousfrag);\n int sousfragrest = numBytes % taillesousfrag;\n System.out.println(sousfragrest);\n for (int i=0; i < nbsousfrag; i++) { \n\t readWrite(raf,bw, taillesousfrag);\n \t System.out.println(\"sous frag num \"+ i +\" Envoyé\");\n\t}\n if (sousfragrest != 0) {\n\t\treadWrite(raf,bw, sousfragrest);\t\n\t}\n\n}", "@Override\r\n\tpublic void Write_text(String CustomerCode, String Device, String Lot, String CP, File DataSorce,String FileName)\r\n\t\t\tthrows IOException {\n\t\tFile[] Filelist=DataSorce.listFiles();\r\n\t\tfor (int k = 0; k < Filelist.length; k++) {\t\t\t\t\t\r\n\t\t\tparseRawdata parseRawdata=new parseRawdata(Filelist[k]);\r\n\t\t\tLinkedHashMap<String, String> properties=parseRawdata.getProperties();\r\n\t\t\t\r\n\t\t\tString Wafer_ID_R=properties.get(\"Wafer ID\");\r\n\t\t\tString waferid=properties.get(\"Wafer ID\");\r\n\t\t\tString[][] MapCell_R=parseRawdata.getAllDiesDimensionalArray();\r\n\t\t\tString Flat_R=null;\r\n\t\t\tString notch=properties.get(\"Notch\");\r\n\t\t\tif (notch.equals(\"0-Degree\")) {\r\n\t\t\t\tFlat_R=\"Up\";\r\n\t\t\t}else if (notch.equals(\"90-Degree\")) {\r\n\t\t\t\tFlat_R=\"Right\";\r\n\t\t\t}else if (notch.equals(\"180-Degree\")) {\r\n\t\t\t\tFlat_R=\"Down\";\r\n\t\t\t}else {\r\n\t\t\t\tFlat_R=\"Left\";\r\n\t\t\t}\r\n\t\t\tInteger PassDie_R=Integer.parseInt(properties.get(\"Pass Die\"));\t\r\n\t\t\tInteger RightID_R=Integer.valueOf(properties.get(\"RightID\"));\r\n\t\t\tInteger Col_R=(Integer.parseInt(properties.get(\"Map Cols\"))) ;\r\n\t\t\tInteger Row_R=(Integer.parseInt(properties.get(\"Map Rows\")));\r\n\t\t\t\r\n\t\t\tMapCell_R=TurnNighteenDegree.turnNegativeNighteen(MapCell_R, Row_R, Col_R);\t\t\r\n\t\t\tInteger temp=Row_R;\r\n\t\t\tRow_R=Col_R;\r\n\t\t\tCol_R=temp;\r\n\t\t\t\r\n\t\t\tString FailDie_R=properties.get(\"Fail Die\");\r\n\t\t\tString FinalID=RightID_R.toString();\r\n\t\t\tString TestStartTime_R=properties.get(\"Test Start Time\");\r\n\t\t\tString Wafer_Load_Time_R=properties.get(\"Test Start Time\");\r\n\t\t\tTreeMap<Integer, Integer> Bin_Summary_R=parseRawdata.getBinSummary();\r\n\t\t\tString OPerater_R=properties.get(\"Operator\");\r\n\t\t\tString Yeild_R=properties.get(\"Wafer Yield\");\r\n\t\t\tString TestEndTime_R=properties.get(\"Test End Time\");\r\n\t\t\tInteger gross_die=Integer.parseInt(properties.get(\"Gross Die\"));\r\n\t\t\tString waferSize_R=properties.get(\"WF_Size\");\r\n\t\t\tString slotId=properties.get(\"Slot\");\r\n\t\t\tTextReportModel9TurnN90 model1=new TextReportModel9TurnN90();\r\n\t\t\tString VERSION=\"NA\";\r\n\t\t\tif (RightID_R<10) {\r\n\t\t\t\tFinalID=\"0\"+RightID_R.toString();\r\n\t\t\t}\r\n\t\t\tHashMap<String, String> NameMap=model1.InitMap(Lot, FinalID, CP, Wafer_Load_Time_R, Device, Wafer_ID_R, VERSION);\r\n\t\t\tSet<String> keyset1=NameMap.keySet();\r\n\t\t\tString FinalName=FileName;\r\n\t\t\tfor (String key : keyset1) {\r\n\t\t\t\tif (FinalName.contains(key)) {\r\n\t\t\t\t\tFinalName=FinalName.replace(key, NameMap.get(key));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tFile Result_Text=new File(reportBath+CustomerCode+\"/\"+Device+\"/\"+Lot+\"/\"+CP+\"/\"+FinalName);\r\n\r\n\t\t\tPrintWriter out=null;\r\n\t\t\ttry {\r\n\t\t\t\tout=new PrintWriter(new FileWriter(Result_Text));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tout.print(\" \");\r\n\t\t\tfor(int i = 1;i<Col_R;i++)\r\n\t\t\t{\r\n\t\t\t\tif (i<10) {\r\n\t\t\t\t\tout.print(\" 0\"+i);\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tout.print(\" \"+i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\" \");\r\n\t\t\tfor(int i = 1;i<Col_R;i++)\r\n\t\t\t{\r\n\t\t\t\tout.print(\"++-\");\r\n\t\t\t}\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tfor (int i = 0; i < Row_R; i++) {\r\n\t\t\t\tif (i<10) {\r\n\t\t\t\t\tout.print(\"00\"+i+\"|\");\r\n\t\t\t\t}else if (i>9&&i<100) {\r\n\t\t\t\t\tout.print(\"0\"+i+\"|\");\r\n\t\t\t\t}else {\r\n\t\t\t\t\tout.print(i+\"|\");\r\n\t\t\t\t}\r\n\t\t\t\tfor (int j = 0; j < Col_R; j++) {\r\n\t\t\t\t\tif (MapCell_R[i][j]==null) {\r\n\t\t\t\t\t\tout.print(String.format(\"%3s\",\" \"));\r\n\t\t\t\t\t}else if (MapCell_R[i][j].equals(\"S\")||MapCell_R[i][j].equals(\"M\")) {\r\n\t\t\t\t\t\tout.print(String.format(\"%3s\",\" \"));\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tif (Integer.valueOf(MapCell_R[i][j])>9) {\r\n\t\t\t\t\t\t\tout.print(String.format(\"%3s\", MapCell_R[i][j]));\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tout.print(String.format(\"%3s\", \"0\"+MapCell_R[i][j]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tout.print(\"\\r\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tout.print(\"============ Wafer Information () ===========\"+\"\\r\\n\");\r\n\t\t\tout.print(\" Device: \"+Device+\"\\r\\n\");\r\n\t\t\tout.print(\" Lot NO: \"+Lot+\"\\r\\n\");\r\n\t\t\tout.print(\" Slot No: \"+(slotId.length()==1?\"0\"+slotId:slotId)+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer ID: \"+waferid+\"\\r\\n\");\r\n\t\t\tout.print(\" Operater: \"+OPerater_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Size: \"+waferSize_R+\" Inch\"+\"\\r\\n\");\r\n\t\t\tout.print(\" Flat Dir: \"+Flat_R+\"\\r\\n\");\r\n//\t\t\tif (Flat_R.equals(\"LEFT\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+270+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"RIGHT\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+90+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"UP\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+0+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"DOWN\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+180+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n\t\t\tout.print(\" Wafer Test Start Time: \"+TestStartTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Test Finish Time: \"+TestEndTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Load Time: \"+TestStartTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Unload Time: \"+TestEndTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Total test die: \"+gross_die+\"\\r\\n\");\r\n\t\t\tout.print(\" Pass Die: \"+PassDie_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Fail Die: \"+FailDie_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Yield: \"+Yeild_R+\"\\r\\n\");\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\" Bin (0~63) Data Deatil Summary\"+\"\\r\\n\");\r\n\t\t\tout.print(\"=======================================================================\"+\"\\r\\n\");\r\n\t\t \r\n\t\t\tString Bin_Sum=\"\";\r\n\t\t\tString Bin_yield_percent=\"\";\r\n\t\t\tfor (int i = 0; i < 64; i++) {\r\n\t\t\t\tString Every_Bininfor=\"\";\r\n\t\t\t\tInteger Sum=0;\r\n\t\t\t\tif (Bin_Summary_R.containsKey(i+1)) {\r\n\t\t\t\t\tSum=Bin_Summary_R.get(i+1);\r\n\t\t\t\t}\r\n\t\t\t\tfor(int j=0;j<5-(\"\"+Sum).length();j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEvery_Bininfor+=\"0\";\r\n\t\t\t\t}\r\n\t\t\t\tBin_Sum+=Every_Bininfor+Sum+\" | \";\r\n\t\t\t\tString percent=String.format(\"%.2f\", ((double)Sum*100/gross_die));\r\n\t\t\t\tif (percent.length()!=5) {\t\t\r\n\t\t\t\t\tpercent=\"0\"+percent;\r\n\t\t\t\t}\r\n\t\t\t\tBin_yield_percent+= percent+\"% | \";\r\n\t\t\t\t\r\n\t\t\t\tif ((i+1)>9) {\r\n\t\t\t\t\tout.print(\"Bin \"+(i+1)+\" | \");\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tout.print(\"Bin \"+(i+1)+\" | \");\r\n\t\t\t\t}\r\n\t\t\t\tif ((i+1)%8==0) {\r\n\t\t\t\r\n\t\t\t\t\tout.print(\"\\r\\n\");\t\t\r\n\t\t\t\t\tout.print(Bin_Sum);\r\n\t\t\t\t\tBin_Sum=\"\";\t\r\n\t\t\t\t\tout.print(\"\\r\\n\");\r\n\t\t\t\t\tout.print(Bin_yield_percent);\r\n\t\t\t\t\tBin_yield_percent=\"\";\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\tif ((i+1)%8==0) {\r\n\t\t\t\t\tout.print(\"\\r\\n\");\r\n\t\t\t\t\tout.print(\"=======================================================================\"+\"\\r\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tout.flush();\r\n\t\t\tout.close();\r\n\t\t\tFTP_Release(CustomerCode, Device, Lot, CP, Result_Text);\r\n\t\t}\r\n\r\n\t}", "public Object readObject(File file, int format) throws IOException, FileNotFoundException;", "public static WireEnumerator loadWireEnumerator(String partName) {\n FamilyType familyType = PartNameTools.getFamilyTypeFromPart(partName);\n return loadWireEnumerator(familyType);\n }" ]
[ "0.5605614", "0.56004566", "0.55125016", "0.5480873", "0.5464527", "0.5403267", "0.53422487", "0.53405386", "0.53222954", "0.5300672", "0.5288892", "0.52545696", "0.5194486", "0.5184162", "0.5181705", "0.5160505", "0.5153376", "0.514312", "0.5126975", "0.5116231", "0.51119", "0.5110472", "0.5101179", "0.5078499", "0.507175", "0.5034255", "0.5029095", "0.50122464", "0.500725", "0.50024056", "0.49881572", "0.4987908", "0.49277356", "0.49229857", "0.49172643", "0.49141613", "0.48957503", "0.4872497", "0.4870006", "0.48677474", "0.4861261", "0.48579448", "0.48545498", "0.4852519", "0.48439386", "0.4842589", "0.484238", "0.48333514", "0.48267305", "0.48261535", "0.4813486", "0.48064828", "0.47958595", "0.47949255", "0.47939", "0.4790352", "0.47882503", "0.47869208", "0.4784094", "0.47729555", "0.47704187", "0.47675604", "0.4760316", "0.4756612", "0.47480384", "0.47476327", "0.47269243", "0.47218525", "0.47186163", "0.47142133", "0.4698038", "0.46831092", "0.4680388", "0.4679513", "0.46786946", "0.46665645", "0.46653298", "0.46490672", "0.46475852", "0.46349072", "0.46349072", "0.46291742", "0.46260184", "0.46166945", "0.4607235", "0.46071297", "0.46022883", "0.45992655", "0.4592294", "0.4590084", "0.45890322", "0.45867503", "0.4584813", "0.45839173", "0.45832148", "0.45791158", "0.45756984", "0.45750013", "0.45683786", "0.45631093", "0.45611715" ]
0.0
-1
===================================================================================// / Generic Read/Write Serialization Methods ===================================================================================// Loads a serialized Java object from fileName.
public static Object loadFromFile(String fileName) { File inputFile = new File(fileName); FileInputStream fis; BufferedInputStream bis; ObjectInputStream ois; Object o; try { fis = new FileInputStream(inputFile); bis = new BufferedInputStream(fis); ois = new ObjectInputStream(bis); o = ois.readObject(); ois.close(); bis.close(); fis.close(); } catch (FileNotFoundException e) { MessageGenerator.briefError("Could not open file: " + fileName + " , does it exist?"); return null; } catch (IOException e) { MessageGenerator.briefError("Trouble reading from file: " + fileName); return null; } catch (ClassNotFoundException e) { MessageGenerator.briefError("Improper file found: "); return null; } catch (OutOfMemoryError e) { MessageGenerator.briefError("The JVM ran out of memory trying to load the object in " + fileName + ". Try using the JVM switch to increase the heap space (" + "ex: java -Xmx1600M)."); return null; } return o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object loadFromFile(String fileName) {\n\t Object obj = null;\n\t try{\n\t\t FileInputStream FIS = new FileInputStream((defaultPath+\"\\\\\" + fileName));\n\t\t ObjectInputStream onjIn = new ObjectInputStream(FIS);\n\t\t obj = onjIn.readObject();\n\t } catch (NoSuchFileException e){\n\t\t saveToFile(fileName, null); \n\t } catch (IOException e) {\n\t } catch (ClassNotFoundException e) {\n\t } \n\t return obj;\n }", "protected Object readObject(String fileName) throws IOException, ClassNotFoundException {\r\n\t\tObject o = null;\r\n\t\tFileInputStream fis = new FileInputStream(fileName);\r\n\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\to = ois.readObject();\r\n\t\tois.close();\r\n\t\tfis.close();\r\n\t\t\r\n\t\treturn (o);\r\n\t}", "public Serializable readObject(){\n Serializable loadedObject = null;\n try {\n FileInputStream fileIn = new FileInputStream(name);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n loadedObject = (Serializable) in.readObject();\n in.close();\n fileIn.close();\n System.out.println(\"Data loaded from: \"+ name);\n } \n catch (IOException i) {\n System.out.println(\"File not found.\");\n } \n catch (ClassNotFoundException c) {\n System.out.println(\"Class not found\");\n }\n return loadedObject;\n }", "public static Object load(String fileName) throws Exception {\r\n\t\ttry (ObjectInputStream in = new ObjectInputStream( Files.newInputStream(Paths.get(fileName)) )) {\r\n\t\t\treturn in.readObject();\r\n\t }\r\n\t}", "public static Object deserialize(String fileName) throws IOException, ClassNotFoundException {\n\t\tFileInputStream fis = new FileInputStream(fileName);\n\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\tObject obj = ois.readObject();\n\t\tois.close();\n\t\treturn obj;\n\t}", "private Object deserializeObject(String filename)\n throws FileNotFoundException, IOException, ClassNotFoundException\n {\n if (filename == null)\n {\n throw new NullPointerException(\"filename\");\n }\n if (filename.isEmpty())\n {\n throw new IllegalArgumentException(\"filename\");\n }\n synchronized(filename)\n {\n FileInputStream fileIn = new FileInputStream(filename);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n Object result = in.readObject();\n in.close();\n fileIn.close();\n return result;\n }\n }", "public static Object objectLoader(String filename) throws IOException, ClassNotFoundException {\r\n\t\t// Creat file input stream\r\n\t\tFileInputStream fileInStr = new FileInputStream(filename);\r\n\t\t// Create object input steam\r\n\t\tObjectInputStream objInStr = new ObjectInputStream(fileInStr);\r\n\t\tObject obj = (Object) objInStr.readObject();\r\n\t\t// Closing all streams\r\n\t\tobjInStr.close();\r\n\t\tfileInStr.close();\r\n\t\tSystem.out.printf(\"Deserialized data - \" + filename); // Printing message plus file name that was saved\r\n\t\treturn obj;\r\n\t}", "public static Object loadObjFromFile(String filePath)\n throws IOException, ClassNotFoundException {\n FileInputStream file = new FileInputStream(filePath);\n ObjectInputStream in = new ObjectInputStream(file);\n Object obj = in.readObject();\n in.close();\n return obj;\n }", "public static Object readObjectFromFile(String filename)\n/* */ throws IOException, ClassNotFoundException\n/* */ {\n/* 122 */ return readObjectFromFile(new File(filename));\n/* */ }", "public Object readObject() throws ClassNotFoundException, IOException;", "public static Object loadObject(String filename) throws XmlParseException, IOException\n {\n return loadObject(new File(filename));\n }", "public void\tload(String fileName) throws IOException;", "public static final Object deserializeFromFile(String filename)\n\t{\n\t\tObject object = null;\n\n\t\t// Define local constants.\n\n\t\tString METHOD_NAME = \"deserializeFromFile\";\n\n\t\t// Check the parameters received and throw the appropriate\n\t\t// exception if necessary.\n\n\t\tif (null == filename)\n\t\t{\n\t\t\tthrow new NullPointerException(Messages.buildErrorMessage(CLASS_NAME,\n\t\t\t METHOD_NAME,\n\t\t\t Messages.NULL_PARAMETER_MSG));\n\t\t}\n\n\t\tif (0 == filename.length())\n\t\t{\n\t\t\tthrow new IllegalArgumentException(Messages.buildErrorMessage(CLASS_NAME,\n\t\t\t METHOD_NAME,\n\t\t\t Messages.ZERO_LENGTH_PARAMETER_MSG));\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tObjectInputStream objectInputStream =\n\t\t\t\tnew ObjectInputStream(new FileInputStream(filename));\n\t\t\tobject = objectInputStream.readObject();\n\t\t\tobjectInputStream.close();\n\t\t}\n\n\t\tcatch (IOException exception)\n\t\t{\n\t\t\tSystem.out.println(\"Caught: \" + exception);\n\t\t}\n\n\t\tcatch (ClassNotFoundException exception)\n\t\t{\n\t\t\tSystem.out.println(\"Caught: \" + exception);\n\t\t}\n\n\t\treturn object;\n\t}", "@Override\n\tpublic void init(String file_name) { deserialize(file_name); }", "public Object readObject(File file, int format) throws IOException, FileNotFoundException;", "private Object loadObjectFromFile(String filename) {\n //engine.logMessage(\"Loading cache data from: \"+filename);\n ObjectInputStream inputStream = null;\n try { \n inputStream = new ObjectInputStream(new BufferedInputStream(new FileInputStream(filename)));\n Object value=inputStream.readObject();\n inputStream.close(); \n return value;\n } catch (InvalidClassException e) {\n // this can happen if a data class has been updated in a never version compared to \n // the version of the data object stored in the cache\n try {if (inputStream!=null) inputStream.close();} catch (Exception x){}\n File file=new File(filename);\n file.delete();\n return null;\n } catch (Exception e) {\n engine.logMessage(\"WARNING: Unable to load data from cache: \"+e.getMessage());\n return null;\n } finally {\n try {if (inputStream!=null) inputStream.close();} catch (Exception x) {engine.logMessage(\"SYSTEM WARNING: Unable to close ObjectInputStream in cache: \"+x.getMessage());}\n } \n }", "private void loadFromFile(String fileName) {\n try {\n InputStream inputStream = this.openFileInput(fileName);\n if (inputStream != null) {\n ObjectInputStream input = new ObjectInputStream(inputStream);\n boardManager = (BoardManager) input.readObject();\n inputStream.close();\n }\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n } catch (ClassNotFoundException e) {\n Log.e(\"login activity\", \"File contained unexpected data type: \" + e.toString());\n }\n }", "public void load(String filename) {\n\t\tsetup();\n\t\tparseOBJ(getBufferedReader(filename));\n\t}", "public void serialize(String fileName)\r\n\t{\r\n\t\ttry (ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(fileName));)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tout.writeObject(this);\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public static Object readObjectFromFile(File file)\n/* */ throws IOException, ClassNotFoundException\n/* */ {\n/* 109 */ ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new GZIPInputStream(new FileInputStream(file))));\n/* 110 */ Object o = ois.readObject();\n/* 111 */ ois.close();\n/* 112 */ return o;\n/* */ }", "@Override\n\tpublic Object load(String file) {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void readFromFile() throws IOException, ClassNotFoundException {\n\t\ttry {\n\t\t\tInputStream file = new FileInputStream(pathName);\n\n\t\t\tInputStream buffer = new BufferedInputStream(file);\n\n\t\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t\ttagToImg = (Map<String, HashSet<String>>) input.readObject();\n\n\t\t\tinput.close();\n\t\t\tfile.close();\n\t\t} catch (EOFException e) {\n\t\t\ttagToImg = new HashMap<String, HashSet<String>>();\n\t\t} catch (InvalidClassException e) {\n\t\t\tSystem.out.println(\"file doesnt match the type\");\n\t\t}\n\t}", "static Employee GetEmployeeObjectFromFile(String filename)\n\t{\n\t\tEmployee e = null;\n\t try\n\t {\n\t FileInputStream fileIn = new FileInputStream(filename);\n\t ObjectInputStream in = new ObjectInputStream(fileIn);\n\t //Main read method\n\t e = (Employee) in.readObject();\n\t in.close();\n\t fileIn.close();\n\t }catch(IOException i)\n\t {\n\t i.printStackTrace();\n\t }catch(ClassNotFoundException c)\n\t {\n\t System.out.println(\"Employee class not found\");\n\t c.printStackTrace();\n\t }\n\t\treturn e;\n\t}", "private Object readObject(String path)\n throws IOException, ClassNotFoundException {\n InputStream file = new FileInputStream(path);\n InputStream buffer = new BufferedInputStream(file);\n ObjectInput input = new ObjectInputStream(buffer);\n Object inputObj = input.readObject();\n input.close();\n return inputObj;\n }", "public static Object getObjFromInternalFile(Context context, String fileName) {\n\t\ttry {\n\t\t\tInputStream fis = context.openFileInput(fileName);\n\t\t\tObjectInputStream is = new ObjectInputStream(fis);\n\t\t\tObject result = is.readObject();\n\t\t\tis.close();\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "Object loadObject() throws Exception;", "private void deserialize(String file_name) {\n\t\t// Reading the object from a file\n\t\ttry {\n\t\t\tFileInputStream file = new FileInputStream(file_name);\n\t\t\tObjectInputStream in = new ObjectInputStream(file);\n\t\t\t// Method for deserialization of object\n\t\t\tthis.GA = (graph) in.readObject();\n\n\t\t\tin.close();\n\t\t\tfile.close();\n\n\t\t\tSystem.out.println(\"Object has been deserialized\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException is caught,object didnt uploaded\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.err.println(\"ClassNotFoundException is caught,object didnt uploaded\");\n\t\t}\n\t}", "public void load(String filePath){\r\n File loadFile = new File(filePath);\r\n if (!loadFile.exists()){\r\n System.out.println(\"I failed. There are no saved games.\");\r\n return;\r\n }\r\n FileInputStream fis = null;\r\n ObjectInputStream in = null;\r\n try {\r\n fis = new FileInputStream(filePath);\r\n in = new ObjectInputStream(fis);\r\n long versionUID = (long) in.readObject();\r\n if (versionUID != this.serialVersionUID) {\r\n throw new UnsupportedClassVersionError(\"Version mismatch for save game!\");\r\n }\r\n this.p = (Character) in.readObject();\r\n this.map = (SpecialRoom[][]) in.readObject();\r\n\r\n } catch (FileNotFoundException ex){\r\n System.out.println(\"The saved game was not found!\");\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n System.out.println(\"There was an error reading your save game :(\");\r\n ex.printStackTrace();\r\n System.out.println(\")\");\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(\"The version of the save game is not compatible with this game!\");\r\n ex.printStackTrace();\r\n } catch (UnsupportedClassVersionError ex) {\r\n System.out.println(ex.getMessage());\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n System.out.println(\"An unknown error occurred!\");\r\n }\r\n\r\n }", "public void load( String fileName ) {\n System.out.println( \"Loading: \" + fileName );\n this.name = fileName;\n Object obj = null;\n try {\n FileInputStream fis = new FileInputStream(fileName);\n ObjectInputStream oos = new ObjectInputStream( fis );\n obj = oos.readObject();\n dofs = (double[][]) obj;\n oos.close();\n fis.close();\n } catch ( Exception e ) {\n e.printStackTrace();\n } \n }", "public Object DeSerializeObject(String sFilePath) {\n File f = null;\n FileInputStream fis = null;\n ObjectInputStream ois = null;\n Object object = null;\n try {\n f = new File(sFilePath);\n\n if (!f.exists()) {\n throw new Exception(\"File Not found for \" + sFilePath);\n }\n\n fis = new FileInputStream(f);\n ois = new ObjectInputStream(fis);\n\n try {\n object = ois.readObject();\n } catch (Exception e) {\n }\n\n } catch (Exception e) {\n } finally {\n try {\n ois.close();\n } catch (Exception e) {\n }\n try {\n fis.close();\n } catch (Exception e) {\n }\n f = null;\n return object;\n }\n }", "public static void serialize(Object obj, String fileName) throws IOException {\n\t\tFileOutputStream fos = new FileOutputStream(fileName);\n\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\toos.writeObject(obj);\n\n\t\tfos.close();\n\t}", "public Object readObjectFromFile() throws FileNotFoundException, IOException, ClassNotFoundException\n {\n Object obj = null;\n ObjectInputStream readFromFile = null;\n try\n {\n FileInputStream fileInStream = new FileInputStream(FILE_NAME);\n readFromFile = new ObjectInputStream(fileInStream);\n try\n {\n obj = readFromFile.readObject();\n }\n catch (EOFException eof)\n {\n //Done reading\n }\n }\n finally\n {\n if (readFromFile != null)\n {\n try\n {\n readFromFile.close();\n }\n catch (FileNotFoundException e)\n {\n displayErrorMessage(\"File not found\", FILE_NAME);\n }\n catch (IOException e)\n {\n displayErrorMessage(\"IO File error on\", FILE_NAME);\n }\n }\n }\n return obj;\n }", "void load(File file);", "@Override\n\tpublic Object load(String path, Object defaultObject) throws Exception {\n\t\tfinal Object[] object = new Object[1];\n\t\t\n\t\t// Stream\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(path);\n\t\t\tfinal ObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\t// Load an object\n\t\t\tobject[0] = ois.readObject();\n\n\t\t\t// Close stream\n\t\t\tois.close();\n\t\t} catch (FileNotFoundException fileNotFoundException){\n\t\t\t// Assign default object when the file is not found.\n\t\t\tobject[0] = defaultObject;\n\t\t}\n\t\t\n\t\t// Return object\n\t\treturn object[0];\n\t}", "public void loadFromOBJ(Context context, String filename) {\n loadFromOBJThreaded(context, filename);\n loadObjData();\n }", "public static Object loadObject(File file) throws Exception {\n FileInputStream fin = new FileInputStream(file);\n ObjectInputStream ois = new ObjectInputStream(fin);\n Object obj = ois.readObject();\n ois.close();\n return obj;\n }", "public abstract void load() throws IOException;", "public void load (File file) throws Exception;", "@Nullable\n public String readFile(String fileName) throws IOException {\n ObjectId objectId = findFile(fileName);\n if (objectId == null) {\n return null;\n }\n\n ObjectLoader obj = reader.open(objectId, Constants.OBJ_BLOB);\n byte[] raw = obj.getCachedBytes(Integer.MAX_VALUE);\n\n if (raw.length == 0) {\n return null;\n }\n return RawParseUtils.decode(raw);\n }", "private Object loadObject(File dir) throws FileNotFoundException, IOException, ClassNotFoundException {\r\n FileInputStream fis = new FileInputStream(dir);\r\n ObjectInputStream ois = new ObjectInputStream(fis);\r\n Object tmp = ois.readObject();\r\n ois.close();\r\n return tmp;\r\n }", "public void load() throws ClassNotFoundException, IOException;", "public static Game loadGame(String fileName){\n Game game = null;\n try {\n File file1 = new File(fileName);\n FileInputStream fileInputStream = new FileInputStream(file1);\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\n game = (Game) objectInputStream.readObject();\n game.makeGUIVisible();\n }catch (Exception e){\n System.err.println(\"Error when loading file\");\n }\n return game;\n }", "private void serializeObject(String filename, Object content)\n throws IOException\n {\n synchronized(filename)\n {\n FileOutputStream fileOut = new FileOutputStream(filename);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(content);\n out.close();\n fileOut.close();\n }\n }", "public void load (IFile file) throws Exception;", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "public abstract Object unMarshal(File pobjFile);", "public static Object load(File mazeFile) throws IOException, ClassNotFoundException {\n\n /* IO stuff */\n ObjectInputStream oi = new ObjectInputStream( new FileInputStream( mazeFile ) );\n\n Object instance = oi.readObject();\n\n oi.close();\n\n return instance;\n }", "public static Object readObjectFromFileNoExceptions(File file)\n/* */ {\n/* 133 */ Object o = null;\n/* */ try {\n/* 135 */ ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new GZIPInputStream(new FileInputStream(file))));\n/* 136 */ o = ois.readObject();\n/* 137 */ ois.close();\n/* */ } catch (IOException e) {\n/* 139 */ e.printStackTrace();\n/* */ } catch (ClassNotFoundException e) {\n/* 141 */ e.printStackTrace();\n/* */ }\n/* 143 */ return o;\n/* */ }", "public static Serializable deserialize(String filePath) throws IOException {\n if (filePath == null) {\n throw new IllegalArgumentException(\"Filepath cannot be null\");\n }\n\n try {\n FileInputStream fis = new FileInputStream(filePath);\n ObjectInputStream in = new ObjectInputStream(fis);\n List<Object> readModels = (List<Object>) in.readObject();\n List<IReasoningModel> models = (List<IReasoningModel>) readModels.get(0);\n in.close();\n\n ReasoningModels.models.clear();\n ReasoningModels.models.addAll(models);\n\n try {\n ReasoningModels.userData = (Serializable) readModels.get(1);\n return (Serializable)readModels.get(1);\n } catch (Exception e) {\n return null;\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void load (String argFileName) throws IOException;", "Object deserialize(Class objClass, InputStream stream) throws IOException;", "private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException\n {\n // TODO - temp?\n }", "public Automobile deserializeAuto(String fileName) {\n\n Automobile car = null;\n try {\n File inputFile = new File(fileName);\n FileInputStream fis = new FileInputStream(inputFile);\n ObjectInputStream ois = new ObjectInputStream(fis);\n car = (Automobile) ois.readObject();\n } catch (FileNotFoundException ex) {\n System.out.println(\"File was not found!\");\n ex.printStackTrace();\n } catch (IOException ex) {\n ex.printStackTrace();\n } catch (ClassNotFoundException ex) {\n System.out.println(\"Class was not found!\");\n ex.printStackTrace();\n }\n\n return car;\n }", "public void serializeObject(String fileName, Automobile automobile) {\n try {\n String path = System.getProperty(\"user.dir\");\n String fileNameWithPath = path + File.separator + fileName;\n if(DEBUG) {\n System.out.printf(\" File Name with Path : %s\", fileNameWithPath);\n }\n FileOutputStream fileOut = new FileOutputStream(fileNameWithPath);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(automobile);\n out.close();\n fileOut.close();\n System.out.printf(\"Serialized data is saved in automotive.ser %s%n\", fileName);\n } catch (IOException i) {\n i.printStackTrace();\n }\n }", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "public void load(String fileName) throws IOException{\n\t\tFileInputStream fileIn=null;\n\t try {\n\t\t\tfileIn = new FileInputStream(fileName);\n\t\t\tArrayList<User1> userList; // = new ArrayList<User1>();\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t// Tramite la funzione readValue riottengo la lista degli utenti a partire dalla stringa con codifica JSON\n\t\t\t//userList = mapper.readValue(fileIn, new TypeReference<ArrayList<User1>>());\n\t\t\tUser1[] array = mapper.readValue(fileIn, User1[].class);\n\t\t\tuserList=new ArrayList<>(Arrays.asList(array));\n\t\t\tfor(User1 userWrapped : userList) // Per ogni utente nella lista, riottengo l'oggetto User, andando a ripopolare il Realm (ripristino)\n\t\t\t{\n\t\t\t\tUser user = new User(userWrapped.getIdentifier(), userWrapped.getSecret());\n\t\t\t\trealm.getUsers().add(user); // Aggiungo l'utente alla lista\n\t\t\t}\n\t\t\tfileIn.close();\n\t\t} catch (IOException e){\n\t\t\tif(fileIn!=null)fileIn.close();\n\t \tthrow e;\n\t\t}\n\n\t}", "public static AuToBIClassifier readAuToBIClassifier(String filename) {\n FileInputStream fis;\n ObjectInputStream in;\n try {\n fis = new FileInputStream(filename);\n in = new ObjectInputStream(fis);\n Object o = in.readObject();\n if (o instanceof AuToBIClassifier) {\n return (AuToBIClassifier) o;\n }\n } catch (IOException e) {\n AuToBIUtils.error(e.getMessage());\n } catch (ClassNotFoundException e) {\n AuToBIUtils.error(e.getMessage());\n }\n return null;\n }", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "private static Object deserialize(String path) {\n Object e = null;\n try {\n discAccesses++;\n FileInputStream fileIn = new FileInputStream(path);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n e = in.readObject();\n in.close();\n fileIn.close();\n } catch (IOException | ClassNotFoundException i) {\n throw new Error(\"No serialized object for path \" + path);\n }\n return e;\n }", "void readObject(InputSerializer in) throws java.io.IOException;", "public Object readObject(String path) throws Exception{\n FileInputStream fis = new FileInputStream(path);\n ObjectInputStream ois = new ObjectInputStream(fis);\n\n return ois.readObject();\n }", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"tempFile\"));\n Serial serial = new Serial();\n serial.setAge(18);\n serial.setName(\"Loumt\");\n serial.setAddress(\"大桥镇中学\");\n oos.writeObject(serial);\n\n //read object from file\n File file = new File(\"tempFile\");\n ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file));\n Serial serial1 = (Serial)ois.readObject();\n\n //output\n System.out.println(serial1);\n System.out.println(serial1.getName());\n\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static List<Transaction> readObject(String filename){\n\n\t\tlogger.finer(\" Reading object (Deserializtion) used\");\n\t\tList<Transaction> transactionList = null;\n\n\t\ttry(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename))){\n\t\t\ttransactionList = (List<Transaction>)ois.readObject();\n\t\t}\n\t\tcatch(IOException | ClassNotFoundException ioe){\n\n\t\t\tSystem.out.println(\"Exception occurred during deserialization\");\n\t\t} \n\n\t\t//\t\tpresentFileContents(transactionList);\n\n\t\treturn (List<Transaction>) transactionList;\n\t}", "public void DesSerializar() throws FileNotFoundException {\n try {\n FileInputStream archivo = new FileInputStream(\"SerializacionEdificios\");\n ObjectInputStream entrada = new ObjectInputStream(archivo);\n ArrayList<Edificio> edificiosDes = (ArrayList<Edificio>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionEstudiantes\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Estudiante> estudiantesDes = (ArrayList<Estudiante>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionProfesores\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Profesor> profesoresDes = (ArrayList<Profesor>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionAdministradores\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Administrador> administradoresDes = (ArrayList<Administrador>) entrada.readObject();\n edificios = edificiosDes;\n estudiantes = estudiantesDes;\n profesores = profesoresDes;\n administradores = administradoresDes;\n entrada.close();\n }\n catch (IOException e){\n e.printStackTrace();\n }\n catch (ClassNotFoundException e){\n e.printStackTrace();\n }\n\n\n }", "public void load(){\n\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open Streams\n\t\t\tFileInputStream inFile = new FileInputStream(\"user.ser\");\n\t\t\tObjectInputStream objIn = new ObjectInputStream(inFile);\n\t\t\t\n\t\t\t// Load the existing UserList at the head\n\t\t\tthis.head = (User)objIn.readObject();\n\t\t\t\n\t\t\t// Close Streams\n\t\t\tobjIn.close();\n\t\t\tinFile.close();\n\t\t}\n\n\t\tcatch(Exception d) {\n\t\t System.out.println(\"Error loading\");\n\t\t}\n\n\t}", "public static Object readObjectFromFile(File f) {\r\n Object obj = null;\r\n try {\r\n FileInputStream fin = new FileInputStream(f);\r\n ObjectInputStream ois = new ObjectInputStream(fin);\r\n obj = ois.readObject();\r\n ois.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error reading Object from file: \"\r\n + e.getMessage());\r\n return null;\r\n }\r\n return obj;\r\n }", "public boolean load(String file);", "private static void loadSoFromInternalStorage(String fileName) throws UnsatisfiedLinkError {\n String path = System.getProperties().get(\"java.io.tmpdir\").toString().replace(\"/cache\", \"/files/\" + fileName);\n File file = new File(path);\n SecurityManager security = System.getSecurityManager();\n if (security != null) {\n security.checkLink(file.getAbsolutePath());\n }\n System.load(file.getAbsolutePath());\n }", "private Object getFile(String path) throws Exception {\t\t\t\n\t\t \n\t\t FileInputStream fileIn = new FileInputStream(path);\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\n\n Object obj = objectIn.readObject();\n objectIn.close();\n \n return obj;\t\t\n\t}", "public void readFile(String name)\n\t{\n\t\tFileInputStream fis = null;\n\t\tObjectInputStream in = null;\n\t\ttry\n\t\t{\n\t\t\tfis = new FileInputStream(name);\n\t\t\tin = new ObjectInputStream(fis);\n\t\t\t// ind = (WebIndexer)in.readObject();\n\t\t\tTree xcd = (Tree)in.readObject();\n\t\t\tind = new WebIndexer(xcd);\n\t\t\tin.close();\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch(ClassNotFoundException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t/**\n\t * Read data and store\n\t * @param data\n\t * \t\t\t\tThe map to store data read from ser file\n\t * @return Map<String, T>\n\t * \t\t\ta map of data that has all the ser file data\n\t * @throws ClassNotFoundException\n\t * @throws IOException\n\t */\n\tprotected Map<String, T> readFromFile(Map<String, T> data) throws ClassNotFoundException, IOException {\n\t\t\n\t\tInputStream file = new FileInputStream(filePath);\n\t\tInputStream buffer = new BufferedInputStream(file);\n\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t//deserialize the Map\n\t\tdata = (HashMap<String, T>) input.readObject();\n\t\tinput.close();\n\t\treturn data;\n\t}", "public abstract List<T> readObj(String path);", "Blob deserializeBlob(String path) {\n Blob newBlob = null;\n File pathy = new File(path);\n try {\n FileInputStream f = new FileInputStream(pathy);\n ObjectInputStream objn = new ObjectInputStream(f);\n newBlob = (Blob) objn.readObject();\n } catch (IOException e) {\n String msg = \"IOException while loading.\";\n return null;\n } catch (ClassNotFoundException e) {\n String msg = \"ClassNotFoundException while loading myCat.\";\n System.out.println(msg);\n }\n return newBlob;\n\n }", "public ObjReader(String filename){\n file = filename;\n }", "private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException\r\n\t{\r\n\t\tthis.deserialize(in);\r\n\t}", "public static DSAGraph load(String filename) throws IllegalArgumentException\n {\n FileInputStream fileStrm;\n ObjectInputStream objStrm;\n DSAGraph inObj = null;\n try\n {\n fileStrm = new FileInputStream(filename);//Underlying stream\n objStrm = new ObjectInputStream(fileStrm);//Object serialization stream\n inObj = (DSAGraph)objStrm.readObject();//Deserialize.\n objStrm.close();//Clean up\n }\n catch (ClassNotFoundException e)\n {\n System.out.println(\"Class not found: \" + e);\n }\n catch (Exception e)\n {\n throw new IllegalArgumentException(\"Unable to load object from file: \" + e.getMessage());\n }\n return inObj;\n\n }", "@Override\n public boolean load(String file) {\n try {\n FileInputStream streamIn = new FileInputStream(file);\n ObjectInputStream objectinputstream = new ObjectInputStream(streamIn);\n WGraph_Algo readCase = (WGraph_Algo) objectinputstream.readObject();\n this.ga=null;//initialize the graph\n this.ga=readCase.ga;//take the graph from readCase to this.ga\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "Object deserialize(Writable blob) throws SerDeException;", "public void load() ;", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "public static Resource loadFromFile() {\n File file = new File(saveFilePath);\n // create a new file if it doesn't exist\n if (!file.exists()) {\n // save an empty resource object\n Resource resource = new Resource();\n resource.saveToFile();\n }\n\n Resource resource = null;\n try {\n resource = (Resource) loadObjFromFile(saveFilePath);\n } catch (InvalidClassException e) {\n // if resource file is outdated or corrupted reset file\n resource = new Resource();\n resource.saveToFile();\n staticLog(\"resource file was corrupted, cleared with new one\");\n// e.printStackTrace();\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n resource.activeUsers = new HashMap<>();\n resource.activeProjects = new HashMap<>();\n return resource;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic static Item loadItem(String filename)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File(filename)));\r\n\t\t\tItem item = (Item)ois.readObject();\r\n\t\t\tois.close();\r\n\t\t\tSystem.out.println(\"Loaded item from disk: \" + item);\r\n\t\t\treturn item;\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e2) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"No locally saved \" + filename + \" - creating a new one: \" + e2.getMessage());\r\n\t\t}\r\n\t\tcatch (IOException e2) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"IO Error: \" + e2.getMessage());\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"This copy of the program is missing some files: \" + e1.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T extends Serializable> T deserialize(File file, Object target)\n\t\t\tthrows IOException, ClassNotFoundException, ClassCastException {\n\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\tObjectInputStream inStream = new ObjectInputStream(fileStream);\n\t\tObject o = inStream.readObject();\n\t\tinStream.close();\n\t\tfileStream.close();\n\t\treturn (T) o;\n\t}", "public void load(String path) throws IOException, ClassNotFoundException {\n FileInputStream inputFile = new FileInputStream(path);\n ObjectInputStream objectInput = new ObjectInputStream(inputFile);\n\n map = (String[]) objectInput.readObject();\n\n objectInput.close();\n inputFile.close();\n }", "private void readFromFile(String path) throws ClassNotFoundException {\n\t\ttry {\n\t\t\tInputStream file = new FileInputStream(path);\n\t\t\tInputStream buffer = new BufferedInputStream(file);\n\t\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t\ttagList = (HashMap<String, Integer>) input.readObject();\n\t\t\tinput.close();\n\t\t} catch (IOException ex) {\n\t\t\tSystem.out.println(\"Cannot read from input.\");\n\t\t}\n\t}", "public static void save(Serializable data, String fileName) throws Exception {\r\n\t\ttry(ObjectOutputStream out = new ObjectOutputStream( Files.newOutputStream(Paths.get(fileName)) )) {\r\n\t\t\tout.writeObject(data);\r\n\t\t}\r\n\t}", "public GameObject getGameObject(String fileName) {\n \t File file = new File(fileName);\n return (GameObject) xstream.fromXML(convertXMLFileToString(file));\n }", "public static void serialize(String filePath) throws IOException {\n if (filePath == null) {\n throw new IllegalArgumentException(\"Filepath cannot be null\");\n }\n\n List<Object> toSave = new ArrayList<>();\n toSave.add(models);\n if (userData != null) {\n toSave.add(userData);\n }\n\n try {\n FileOutputStream fos = new FileOutputStream(filePath, false);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(toSave);\n\n out.flush();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static Object loadObject(File file) throws XmlParseException, IOException\n {\n return objectFromXmlElement(Xmlwise.loadXml(file));\n }", "private void Load( String szFileName )\n throws FileNotFoundException, NullPointerException, AppException\n {\n FileInputStream fs = null;\n File f = null;\n long nFileSize;\n \n f = new File( szFileName );\n if( !f.exists() || !f.canRead() )\n throw new FileNotFoundException( \"File \" + f.getPath() );\n\n try\n {\n nFileSize = f.length();\n fs = new FileInputStream( f );\n\n CharsetDecoder utf8Decoder = Charset.forName( \"UTF-8\" ).newDecoder();\n byte[] Data = null;\n\n // Read user name length and user name in UTF8\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n int nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize < nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= nLength;\n Data = new byte[nLength];\n fs.read( Data );\n m_UserName = utf8Decoder.decode( ByteBuffer.wrap( Data ) ).toString();\n\n // Read user unique ID\n if( nFileSize < 16 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= 16;\n m_Key = new byte[16];\n fs.read( m_Key );\n\n // Read template length and template data\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize != nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n m_Template = new byte[nLength];\n fs.read( m_Template );\n fs.close();\n }\n catch( SecurityException e )\n {\n if( f == null )\n throw new AppException( \"Denies read access to the file \" + f.getPath() );\n else {\n throw new AppException( \"Denies read access to the file \" + szFileName );\n }\n }\n catch( IOException e)\n {\n if( f == null )\n throw new AppException( \"Bad file \" + f.getPath() );\n else\n throw new AppException( \"Bad file \" + szFileName );\n }\n }", "public QuizPlayer serialReadFile() {\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(); //If any error is caught the program will re ask the user for input.\r\n try {\r\n ObjectInputStream inputStream =\r\n new ObjectInputStream(new FileInputStream(fileObject));\r\n q = (QuizPlayer) inputStream.readObject();\r\n\r\n\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Cannot find file. Please Enter a different file Name\");\r\n\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problems with file input. Please Enter a different file name\");\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problems with file input. Please Enter a differet file name\");\r\n }\r\n\r\n\r\n return q;\r\n }", "public static Object deserialize(String s){\n\t\tObject m = null;\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fileIn = new FileInputStream(s + \".ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tm = in.readObject();\n\t\t\tin.close();\n\t\t\tfileIn.close();\n\t\t}catch(IOException i)\n\t\t{\n\t\t\ti.printStackTrace();\n\n\t\t}catch(ClassNotFoundException c)\n\t\t{\n\t\t\tSystem.out.println(\"Map class not found\");\n\t\t\tc.printStackTrace();\n\n\t\t}\n\t\treturn m;\n\t}", "private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException\n\t{\n\t\t// read values\n\t\tin.defaultReadObject();\n\n\t\tOutputStream output = getOutputStream();\n\t\tif (cachedContent != null)\n\t\t{\n\t\t\toutput.write(cachedContent);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFileInputStream input = new FileInputStream(dfosFile);\n\t\t\tStreams.copy(input, output);\n\t\t\tFiles.remove(dfosFile);\n\t\t\tdfosFile = null;\n\t\t}\n\t\toutput.close();\n\n\t\tcachedContent = null;\n\t}", "private <T> void loadFlatFile(Class<T> clazz, String flatFileName)\n\t\t\tthrows ApplicationException {\n\n\t\tlog.info(String.format(\"Loading file %s to object type %s\",\n\t\t\t\tflatFileName, clazz.toString()));\n\t\t\n\t\tDbInserter dbi = getDbInserter();\n\t\t\n\t\tFixedFormatManager manager = new FixedFormatManagerImpl();\n\t\tBufferedReader br = null;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tInputStream ins = this.getClass().getClassLoader()\n\t\t\t\t\t.getResourceAsStream(flatFileName);\n\t\t\tbr = new BufferedReader(new InputStreamReader(ins));\n\t\t\tString record;\n\n\t\t\tlog.info(\"Reading, inserting records.\");\n\t\t\twhile (null != (record = br.readLine())) {\n\t\t\t\tDomain obj = (Domain) manager.load(clazz, record);\n\t\t\t\t//log.info(String.format(\"Record %s\", obj));\n\t\t\t\t//log.info(String.format(\"%s: key %d\", obj.getRecType(), obj.getDomainId()));\n\t\t\t\t\n\t\t\t\tdbi.insert(obj);\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tlog.info(String.format(\"Read %d records from object.\", count,\n\t\t\t\t\tclazz.toString()));\n\t\t\t\n\t\t\tdbi.flushToIndex();\n\n\t\t} catch (FixedFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (null != br) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract void load();", "private void serialize(String file_name) {\n\t\t//Saving of object in a file\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(file_name);\n\t\t\tObjectOutputStream out = new ObjectOutputStream(file);\n\t\t\t// Method for serialization of object\n\t\t\tout.writeObject(this.GA);\n\n\t\t\tout.close();\n\t\t\tfile.close();\n\n\t\t\tSystem.out.println(\"Object has benn serialized\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException is caught,Object didnt save.\");\n\t\t}\n\t}", "public void load(File source);", "private void readObject() {}", "private void readObject() {}", "private void readObject() {}" ]
[ "0.72443855", "0.71708584", "0.7158897", "0.71536535", "0.7126305", "0.70566905", "0.70449346", "0.685623", "0.67531127", "0.6509979", "0.6485251", "0.64822805", "0.64727074", "0.6402265", "0.63566077", "0.6278439", "0.6244559", "0.6235899", "0.62268865", "0.62242454", "0.62242156", "0.62127316", "0.618784", "0.6181228", "0.6160624", "0.61327654", "0.61055666", "0.60952574", "0.60889816", "0.6054057", "0.6046039", "0.60090786", "0.5993827", "0.5982489", "0.5967379", "0.5964278", "0.59617555", "0.5926423", "0.5922285", "0.590723", "0.5906901", "0.58942336", "0.58679026", "0.5858202", "0.58323264", "0.57892543", "0.5783631", "0.5779095", "0.57784796", "0.5772218", "0.5769899", "0.57488394", "0.5747823", "0.5747698", "0.5742808", "0.57298654", "0.5728106", "0.5723176", "0.5722488", "0.57220566", "0.57128847", "0.56977916", "0.5689806", "0.56589323", "0.5654057", "0.5635052", "0.56140906", "0.56092954", "0.5606821", "0.55944824", "0.5586519", "0.55851763", "0.5582822", "0.5580277", "0.5575597", "0.5555745", "0.5554707", "0.55516523", "0.55474913", "0.55262953", "0.55262285", "0.55257624", "0.552495", "0.5509623", "0.55075514", "0.55013037", "0.5495076", "0.54925984", "0.54812914", "0.5470382", "0.5468372", "0.54682314", "0.5464971", "0.54588205", "0.5457709", "0.5457613", "0.54481655", "0.5445286", "0.5445286", "0.5445286" ]
0.7036106
7
Serialize the Object o to a the file specified by fileName.
public static boolean saveToFile(Object o, String fileName) { FileOutputStream fos = null; BufferedOutputStream bos = null; ObjectOutputStream oos = null; File objectFile = null; objectFile = new File(fileName); try { fos = new FileOutputStream(objectFile); bos = new BufferedOutputStream(fos); oos = new ObjectOutputStream(bos); oos.writeObject(o); oos.close(); bos.close(); fos.close(); } catch (FileNotFoundException e) { return false; } catch (IOException e) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void serialize(Object obj, String fileName) throws IOException {\n\t\tFileOutputStream fos = new FileOutputStream(fileName);\n\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\toos.writeObject(obj);\n\n\t\tfos.close();\n\t}", "public static void writeObjectToFile(Serializable object, String fileName) throws IOException {\n try (FileOutputStream fos = new FileOutputStream(fileName);\n ObjectOutputStream oos = new ObjectOutputStream(fos);) {\n oos.writeObject(object);\n }\n }", "public void serialize(String fileName)\r\n\t{\r\n\t\ttry (ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(fileName));)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tout.writeObject(this);\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "private void serialize(String file_name) {\n\t\t//Saving of object in a file\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(file_name);\n\t\t\tObjectOutputStream out = new ObjectOutputStream(file);\n\t\t\t// Method for serialization of object\n\t\t\tout.writeObject(this.GA);\n\n\t\t\tout.close();\n\t\t\tfile.close();\n\n\t\t\tSystem.out.println(\"Object has benn serialized\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException is caught,Object didnt save.\");\n\t\t}\n\t}", "private void writeObject(String filePath, Object obj) throws IOException {\n OutputStream file = new FileOutputStream(filePath);\n OutputStream buffer = new BufferedOutputStream(file);\n ObjectOutput output = new ObjectOutputStream(buffer);\n output.writeObject(obj);\n output.close();\n }", "public static final void serializeToFile(Object object,String filename)\n\t{\n\t\t// Define local constants.\n\n\t\tString METHOD_NAME = \"serializeToFile\";\n\n\t\t// Check the parameters received and throw the appropriate\n\t\t// exception if necessary.\n\n\t\tif ((null == object) || (null == filename))\n\t\t{\n\t\t\tthrow new NullPointerException(Messages.buildErrorMessage(CLASS_NAME,\n\t\t\t METHOD_NAME,\n\t\t\t Messages.NULL_PARAMETER_MSG));\n\t\t}\n\n\t\tif (0 == filename.length())\n\t\t{\n\t\t\tthrow new IllegalArgumentException(Messages.buildErrorMessage(CLASS_NAME,\n\t\t\t METHOD_NAME,\n\t\t\t Messages.ZERO_LENGTH_PARAMETER_MSG));\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tObjectOutputStream objectOutputStream =\n\t\t\t\tnew ObjectOutputStream(new FileOutputStream(filename));\n\t\t\tobjectOutputStream.writeObject(object);\n\t\t\tobjectOutputStream.close();\n\t\t}\n\n\t\tcatch (IOException exception)\n\t\t{\n\t\t\tSystem.out.println(\"Caught: \" + exception);\n\t\t}\n\t}", "public void serializeObject(String fileName, Automobile automobile) {\n try {\n String path = System.getProperty(\"user.dir\");\n String fileNameWithPath = path + File.separator + fileName;\n if(DEBUG) {\n System.out.printf(\" File Name with Path : %s\", fileNameWithPath);\n }\n FileOutputStream fileOut = new FileOutputStream(fileNameWithPath);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(automobile);\n out.close();\n fileOut.close();\n System.out.printf(\"Serialized data is saved in automotive.ser %s%n\", fileName);\n } catch (IOException i) {\n i.printStackTrace();\n }\n }", "private void serializeObject(String filename, Object content)\n throws IOException\n {\n synchronized(filename)\n {\n FileOutputStream fileOut = new FileOutputStream(filename);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(content);\n out.close();\n fileOut.close();\n }\n }", "private void writeToFile(String filename, Object object) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(filename, MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(object);\n objectOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void writeObjectToDisk(Object obj, String name) throws IOException {\r\n\t\t// Create file output stream\r\n\t\tFileOutputStream fileOutStr = new FileOutputStream(name);\r\n\t\t// Create object output stream and write object\r\n\t\tObjectOutputStream objOutStr = new ObjectOutputStream(fileOutStr);\r\n\t\tobjOutStr.writeObject(obj);\r\n\t\t// Close all streams\r\n\t\tobjOutStr.close();\r\n\t\tfileOutStr.close();\r\n\t\tSystem.out.printf(\"Serialized data is saved in a file - \" + name); // Printing message and file name which is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// saved\r\n\t}", "public void saveGame(String fileName){\n try {\n File file1 = new File(fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(file1);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(this);\n }catch (Exception e){\n System.err.println(\"Error when saving file\");\n }\n }", "public void writeToFile(Object obj) throws FileNotFoundException, IOException\n {\n ObjectOutputStream writeToFile = null;\n\n try\n {\n FileOutputStream fileOutStream = new FileOutputStream(FILE_NAME);\n writeToFile = new ObjectOutputStream(fileOutStream);\n\n writeToFile.writeObject(obj);\n }\n finally\n {\n if (writeToFile != null)\n {\n try\n {\n writeToFile.close();\n }\n catch (IOException e)\n {\n displayErrorMessage(\"IO File error on\", FILE_NAME);\n }\n }\n }\n }", "public void saveJSON(String fileName, Object o){\n // System.err.println(\"accessing disk\");\n Gson gson = new Gson();\n try(FileWriter writer = new FileWriter(fileName)){\n gson.toJson(o, writer);\n //System.err.println(\"\\n Token stored\");\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void saveObj(Object obj, File file)\n {\n try(ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file)))\n {\n oos.writeObject(obj);\n }\n \n catch(IOException e)\n {\n JOptionPane.showMessageDialog(null, \"[Error] Failed to save file: \" + e.getMessage());\n }\n }", "public static void save(final String filename, final Serializable object)\r\n throws IOException {\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n\r\n fos = new FileOutputStream(filename);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(object);\r\n out.close();\r\n }", "@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}", "private static void serialize(Gitlet gitletAtt, String fileName)\n throws IOException {\n try {\n File gitletFile = new File(fileName);\n FileOutputStream fileOut = new FileOutputStream(gitletFile);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(gitletAtt);\n } catch (IOException e) {\n System.err.println(e);\n String msg = \"IOException while saving Gitlet.\";\n System.out.println(msg);\n }\n }", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "public static void save(Serializable data, String fileName) throws Exception {\r\n\t\ttry(ObjectOutputStream out = new ObjectOutputStream( Files.newOutputStream(Paths.get(fileName)) )) {\r\n\t\t\tout.writeObject(data);\r\n\t\t}\r\n\t}", "public static void save(Object o, String filename) {\n\t\ttry\n\t {\n\t\t\tfilename = \"save\" + File.separator + filename + \".hsc\";\n\t\t\tcreateSaveDirIfNotExisting();\n\t\t\tprepareSaveFile(filename);\n\t FileOutputStream fileOut = new FileOutputStream(filename);\n\t ObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t out.writeObject(o.getClass().cast(o));\n\t out.close();\n\t fileOut.close();\n\t //System.out.println(\"Serialized object is saved in \" + filename);\n\t }catch(NotSerializableException e) {\n\t \t System.out.println(\"Object to be saved does not implement java.io.Serializable!\");\n\t \t e.printStackTrace();\n\t }\n\t\tcatch(IOException i)\n\t {\n\t i.printStackTrace();\n\t } \n\t}", "String saveToFile(Object data, String fileName, FileFormat fileFormat) throws IOException;", "public void serialize() {\n FileOutputStream fileOutput = null;\n ObjectOutputStream outStream = null;\n // attempts to write the object to a file\n try {\n clearFile();\n fileOutput = new FileOutputStream(data);\n outStream = new ObjectOutputStream(fileOutput);\n outStream.writeObject(this);\n } catch (Exception e) {\n } finally {\n try {\n if (outStream != null)\n outStream.close();\n } catch (Exception e) {\n }\n }\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 WriteEmployeeObjectIntoFile(Employee emp,String filename)\n\t{\n\t\t\n\t try\n\t {\n\t FileOutputStream fileOut =\n\t new FileOutputStream(filename);\n\t ObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t //Main write method\n\t out.writeObject(emp);\n\t out.close();\n\t fileOut.close();\n\t System.out.printf(\"Serialized data is saved in \" + filename);\n\t }catch(IOException i)\n\t {\n\t i.printStackTrace();\n\t }\n\t}", "public void save(File filename) throws IOException {\n FileOutputStream fos = new FileOutputStream(filename);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this);\n oos.close();\n }", "void serializeToFile(String fileName, BigInteger mod, BigInteger exp) throws IOException {\r\n ObjectOutputStream ObjOut = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(fileName)));\r\n\r\n try {\r\n ObjOut.writeObject(mod);\r\n ObjOut.writeObject(exp);\r\n System.out.println(\"Key File Created: \" + fileName);\r\n } catch (Exception e) {\r\n throw new IOException(\" Error while writing the key object\", e);\r\n } finally {\r\n ObjOut.close();\r\n }\r\n }", "void toFile (String fileName);", "public String getSerializedObj() {\r\n String serializedObject = null;\r\n // serialize the object\r\n // format = file content,size,name\r\n File f = this.fileObject;\r\n serializedObject = f.getBody()+\",\"+f.getFileSize()+\",\"+f.getName();\r\n return serializedObject;\r\n }", "public static void saveObjToFile(Object obj, String filePath) throws IOException {\n // create the enclosing folders if it doesn't exist\n createDir(filePath);\n\n FileOutputStream file = new FileOutputStream(filePath);\n ObjectOutputStream out = new ObjectOutputStream(file);\n out.writeObject(obj);\n out.close();\n }", "public void serializeAuto(Automobile car, String fileName) {\n\n try {\n File outputFile = new File(fileName);\n FileOutputStream fos = new FileOutputStream(outputFile);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(car);\n oos.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public static void serialize(String filePath) throws IOException {\n if (filePath == null) {\n throw new IllegalArgumentException(\"Filepath cannot be null\");\n }\n\n List<Object> toSave = new ArrayList<>();\n toSave.add(models);\n if (userData != null) {\n toSave.add(userData);\n }\n\n try {\n FileOutputStream fos = new FileOutputStream(filePath, false);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(toSave);\n\n out.flush();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static File writeObjectToTempFileNoExceptions(Serializable o, String filename)\n/* */ {\n/* */ try\n/* */ {\n/* 93 */ return writeObjectToTempFile(o, filename);\n/* */ } catch (Exception e) {\n/* 95 */ System.err.println(\"Error writing object to file \" + filename);\n/* 96 */ e.printStackTrace(); }\n/* 97 */ return null;\n/* */ }", "public void save(String fileName) throws IOException;", "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}", "public static File writeObjectToTempFile(Serializable o, String filename)\n/* */ throws IOException\n/* */ {\n/* 76 */ File file = File.createTempFile(filename, \".tmp\");\n/* 77 */ file.deleteOnExit();\n/* 78 */ ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));\n/* 79 */ oos.writeObject(o);\n/* 80 */ oos.close();\n/* 81 */ return file;\n/* */ }", "public static File writeObjectToFileNoExceptions(Serializable o, String filename)\n/* */ {\n/* 47 */ file = null;\n/* 48 */ ObjectOutputStream oos = null;\n/* */ try {\n/* 50 */ file = new File(filename);\n/* */ \n/* 52 */ oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));\n/* 53 */ oos.writeObject(o);\n/* 54 */ oos.close();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 65 */ return file;\n/* */ }\n/* */ catch (Exception e)\n/* */ {\n/* 56 */ e.printStackTrace();\n/* */ } finally {\n/* 58 */ if (oos != null) {\n/* */ try {\n/* 60 */ oos.close();\n/* */ }\n/* */ catch (Exception ioe) {}\n/* */ }\n/* */ }\n/* */ }", "private void setFile(Serializable object, String path) throws Exception {\t\t\n\t\t\n FileOutputStream fileOut = new FileOutputStream(path);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(object);\n objectOut.close(); \n\t\t\n\t}", "private void serialize() {\r\n if (newFile) {\r\n this.newFile = this.serializeAs();\r\n } else if (!newFile && !path.equals(\"\")) {\r\n sr.save(this.path);\r\n }\r\n }", "public void saveToFile(String fileName) {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(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 }", "public void writeObject(Object obj, String path)throws IOException{\n FileOutputStream fos = new FileOutputStream(path);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n\n oos.writeObject(obj);\n oos.close();\n }", "private void writeToFile(String pathName,Object logs) {\r\n try {\r\n File save = new File(pathName);\r\n FileOutputStream fileOutputStream = new FileOutputStream(save);\r\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\r\n objectOutputStream.writeObject(logs);\r\n // System.out.println(\"write successful for\"+pathName);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void serialize(Object object, String resourceDir, String filename) {\n\t\ttry\r\n\t\t{\r\n\t\t\tFileOutputStream fileOut;\r\n\t\t\tObjectOutputStream objectOut;\r\n\t\r\n\t\t\tfileOut = new FileOutputStream(resourceDir + filename);\r\n\t\t\tobjectOut = new ObjectOutputStream(fileOut);\r\n\t\t\tobjectOut.writeObject(object);\r\n\t\t\tobjectOut.close();\r\n\t\t\tfileOut.close();\r\n\t\t} catch (IOException i) {\r\n\t\t\t//TODO fail test here?\r\n\t\t\tUtil.printInfo(\"IOException occurred while serializing object: \" + i.getMessage());\r\n\t\t\ti.printStackTrace();\r\n\t\t}\r\n\t}", "public void writeToFile() {\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(pathName);\n\t\t\tObjectOutputStream output = new ObjectOutputStream(file);\n\n\t\t\tMap<String, HashSet<String>> toSerialize = tagToImg;\n\t\t\toutput.writeObject(toSerialize);\n\t\t\toutput.close();\n\t\t\tfile.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void storeObject(Object object, String filename) throws IOException\n {\n storeObject(object, new File(filename));\n }", "public static void writeJsonObjectFile(JsonEntity objectToWrite, String filePath) \n\t{\n\t\tGson gsonParser = new Gson();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFiles.write(gsonParser.toJson(objectToWrite).getBytes(), new File(filePath));\n\t\t}\n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.err.println(\"Can't write to the json file\" + e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void write(Object obj, File file) throws IJunitException {\n\t\t\n\t}", "@Override\r\n public boolean save(Object object, String fileName)\r\n throws FileAlreadyExistsException, IOException, JAXBException {\n File outputFile = new File(fileName);\r\n FileWriter fstream = new FileWriter(outputFile);\r\n BufferedWriter xmlOutputWriter = new BufferedWriter(fstream);\r\n \r\n if(!this.enableOverwrite && outputFile.exists()) {\r\n throw new FileAlreadyExistsException(fileName);\r\n }\r\n \r\n try {\r\n this.jaxbObjectToXML(object, xmlOutputWriter);\r\n } finally {\r\n xmlOutputWriter.close();\r\n } \r\n \r\n return (outputFile.length() > 0);\r\n }", "private void serializeToFile(File file) {\n\t\ttry {\n FileOutputStream outputStream = new FileOutputStream(file); // a file stream for writing the serialized objects two.\n ObjectOutputStream byteStream = new ObjectOutputStream(outputStream); // connect the byte stream to the file stream\n byteStream.writeObject(myProjects); // write objects to a byte stream for putting in a file\n byteStream.close(); \n outputStream.close();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Error: file could not be read.\");\n\t\t}\n\t}", "public static boolean writeObjectToFile(Object obj, File f) {\r\n try {\r\n FileOutputStream fout = new FileOutputStream(f);\r\n ObjectOutputStream oos = new ObjectOutputStream(fout);\r\n oos.writeObject(obj);\r\n oos.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error writing Object to file: \"\r\n + e.getMessage());\r\n return false;\r\n }\r\n return true;\r\n }", "public static void writeObject(Activity activity, Object object, String filename) {\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n fos = activity.openFileOutput(filename, Context.MODE_PRIVATE);\n oos = new ObjectOutputStream(fos);\n oos.writeObject(object);\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n closeOutputStream(fos);\n closeOutputStream(oos);\n }\n }", "public void saveAsSerialization() {\n try(ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(new File(\"saves/data.dat\")))){\n os.writeObject(this);\n } catch (FileNotFoundException e){\n System.out.println(\"Could not create file: \" + e.getMessage());\n } catch (IOException e){\n System.out.println(\"IO exception occurred: \" + e.getMessage());\n }\n\n }", "@Override\n public void saveFile(Object o, File file, String ext)\n throws IOException {\n dest = file;\n }", "public abstract Object marshal(Object objO, File objF);", "private void saveToDir(String name, Object obj) {\n\t\tFileOutputStream fileOut = null;\n\t\ttry {\n\t\t\tfileOut = new FileOutputStream(this.dir + \"/\" + name);\n\t\t\tObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t\t\tout.writeObject(obj);\n\t\t\tout.close();\n\t\t\tfileOut.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred while saving the index file: \" + name);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "synchronized public void saveToFile() {\n try {\n saveObjToFile(this, saveFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n log(\"error saving resource to file\");\n }\n }", "public void saveGame(String fileName){\n Gson gson = new Gson();\n String userJson = gson.toJson(player);\n\n try(Writer w = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileName), \"UTF-8\"))) {\n w.write(userJson);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void save(File filename) throws IOException {\n ObjectOutputStream outputStream = null;\n try {\n outputStream = new ObjectOutputStream(new FileOutputStream(filename));\n outputStream.writeObject(this.getHighScores());\n } catch (IOException e) {\n System.out.println(\"cannot save to file\");\n } finally {\n if (outputStream != null) { // Exception might have happened at constructor\n try {\n outputStream.close();\n } catch (IOException e) {\n System.out.println(\" Failed closing the file !\");\n }\n }\n }\n }", "public static void serialize(Serializable[] objects, String name) {\n try {\n File file = new File(BASE_DIRECTORY + name);\n if (new File(BASE_DIRECTORY).mkdirs()) {\n Logger.internalLog(\"SERIALIZER\", \"Created data directory.\");\n }\n\n if (file.delete()) {\n Logger.internalLog(\"SERIALIZER\", \"Overwrote previous data.\");\n } else {\n Logger.internalLog(\"SERIALIZER\", \"Writing new data.\");\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(objects);\n objectOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\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 }", "@Override\n public void serializeObject(Object o, int hashCode, String destDir) {\n // throw new NotImplementedException();\n }", "public void serialize(T t) throws IOException {\n FileOutputStream fileOutputStream = new FileOutputStream(this.mFile);\n BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream);\n DataOutputStream dataOutputStream = new DataOutputStream(bufferedOutputStream);\n this.mCodec.serialize(t, dataOutputStream);\n dataOutputStream.flush();\n $closeResource(null, dataOutputStream);\n $closeResource(null, bufferedOutputStream);\n $closeResource(null, fileOutputStream);\n }", "private static void LessonSerialization() {\n PersonDAO personDAO = new PersonDAOImpl();\n Person person = personDAO.getPersonById(1);\n\n // serialize to a text file\n try {\n FileOutputStream fileOut = new FileOutputStream(\"./newfile.txt\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(person);\n out.close();\n fileOut.close();\n System.out.println(\"Person Object serialized and written to file: newfile.txt\");\n System.out.println(\"Serialized Object: \" + person.ToString());\n } catch(IOException ioEx) {\n System.out.println(ioEx);\n }\n }", "public static void writeObjectInFile(File file, Object objToWrite) throws Exception {\n FileOutputStream fileOutputStream = null;\n ObjectOutputStream objectOutputStream = null;\n try {\n fileOutputStream = new FileOutputStream(file);\n objectOutputStream = new ObjectOutputStream(fileOutputStream);\n\n // Write objects to file\n objectOutputStream.writeObject(objToWrite);\n } finally {\n objectOutputStream.close();\n fileOutputStream.close();\n }\n }", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"tempFile\"));\n Serial serial = new Serial();\n serial.setAge(18);\n serial.setName(\"Loumt\");\n serial.setAddress(\"大桥镇中学\");\n oos.writeObject(serial);\n\n //read object from file\n File file = new File(\"tempFile\");\n ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file));\n Serial serial1 = (Serial)ois.readObject();\n\n //output\n System.out.println(serial1);\n System.out.println(serial1.getName());\n\n\n }", "void save(String fileName);", "@Override\n public boolean save(String file) {\n boolean ans = false;\n ObjectOutputStream oos;\n try {\n FileOutputStream fileOut = new FileOutputStream(file, true);\n oos = new ObjectOutputStream(fileOut);\n oos.writeObject(this);\n ans= true;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace(); }\n catch (IOException e) {e.printStackTrace();}\n return ans;\n }", "public static void save(DSAGraph objToSave, String filename)\n {\n FileOutputStream fileStrm;\n ObjectOutputStream objStrm;\n\n try\n {\n fileStrm = new FileOutputStream(filename); //Underlying stream\n objStrm = new ObjectOutputStream(fileStrm); //Object serialization stream\n objStrm.writeObject(objToSave); //Serialize and save to filename\n objStrm.close();//Clean up\n }\n catch (Exception e)\n { //should do more here\n throw new IllegalArgumentException(\"Unable to save object to file: \" + e);\n }\n }", "public static void main(String[] args) throws IOException {\nPerson p=new Person(101,\"reya\");\nFileOutputStream fo=new FileOutputStream(\"something.txt\");\nObjectOutputStream os=new ObjectOutputStream (fo);\nos.writeObject(p);\nSystem.out.println(\"Serialization Success\");//should implemet serializable concept\n\t}", "public boolean writeObject(Serializable object){\n try {\n FileOutputStream fileOut = new FileOutputStream(name);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(object);\n out.close();\n fileOut.close();\n System.out.println(\"Serialized data is saved in: \" + name);\n return true;\n } \n catch (IOException i) {\n System.out.println(\"Failed to load!\");\n return false;\n }\n }", "public Object loadFromFile(String fileName) {\n\t Object obj = null;\n\t try{\n\t\t FileInputStream FIS = new FileInputStream((defaultPath+\"\\\\\" + fileName));\n\t\t ObjectInputStream onjIn = new ObjectInputStream(FIS);\n\t\t obj = onjIn.readObject();\n\t } catch (NoSuchFileException e){\n\t\t saveToFile(fileName, null); \n\t } catch (IOException e) {\n\t } catch (ClassNotFoundException e) {\n\t } \n\t return obj;\n }", "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 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 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 }", "private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "public void saveToFile(Map<String, T> data) throws IOException{\n\t\tOutputStream file = new FileOutputStream(filePath);\n OutputStream buffer = new BufferedOutputStream(file);\n ObjectOutput output = new ObjectOutputStream(buffer);\n\n // serialize the Map\n output.writeObject(data);\n output.close();\n\t}", "void save(String fileName) throws IOException, TransformerConfigurationException, ParserConfigurationException;", "public void toFile(String filename) {\n\t\tString serialized = Serializer.serializeLevelPack(this);\n\t\tSerializer.writeToFile(filename, serialized.getBytes());\n\t}", "public Boolean saveToFile(String fileName, Object lines) {\n\t if(lines == null || fileName == null){\n\t\t return false;\n\t }\n\t try{\n\t\t ObjectOutputStream objOut = new ObjectOutputStream(new FileOutputStream((defaultPath+\"\\\\\" + fileName)));\n\t\t objOut.writeObject(lines);\n\t\t return true;\n\t } catch (IOException e){\n\t\t \n\t } \n\t return false;\n }", "public static void writeToJsonGzFile(Object jsonObj, Path filePath) throws JsonGenerationException, JsonMappingException, IOException {\n\n GZIPOutputStream gzipOS = new GZIPOutputStream(Files.newOutputStream(filePath));\n WritableByteChannel out = Channels.newChannel(gzipOS);\n\n ObjectMapper mapper = new ObjectMapper();\n byte[] jsonOut = mapper.writeValueAsBytes(jsonObj);\n out.write(ByteBuffer.wrap(jsonOut));\n out.close();\n\n }", "public void Serializar(){\n try {\n FileOutputStream archivo = new FileOutputStream(\"SerializacionEdificios\");\n ObjectOutputStream salida = new ObjectOutputStream(archivo);\n salida.writeObject(edificios);\n archivo = new FileOutputStream(\"SerializacionEstudiantes\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(estudiantes);\n archivo = new FileOutputStream(\"SerializacionProfesores\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(profesores);\n archivo = new FileOutputStream(\"SerializacionAdministradores\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(administradores);\n salida.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void writeObject(OutputSerializer out) throws java.io.IOException;", "private byte[] serialize(RealDecisionTree object){\n try{\n // Serialize data object to a file\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(\"MyObject.ser\"));\n out.writeObject(object);\n out.close();\n\n // Serialize data object to a byte array\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n out = new ObjectOutputStream(bos) ;\n out.writeObject(object);\n out.close();\n\n // Get the bytes of the serialized object\n byte[] buf = bos.toByteArray();\n return buf;\n } catch (IOException e) {\n System.exit(1);\n }\n\n return null;\n }", "public void saveBitmapToDisk(String fileName) throws FileNotFoundException, IOException {\n // serialize\n // save to disk\n FileOutputStream fout = new FileOutputStream(\"assets/\"+fileName+\".bitmap\");\n ObjectOutputStream oos = new ObjectOutputStream(fout);\n oos.writeObject(this);\n }", "private void saveInFile(final String fileName, ArrayList<Habit> habitArray) {\r\n try {\r\n FileOutputStream fos = openFileOutput(fileName, 0);\r\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\r\n Gson gson = new Gson();\r\n gson.toJson(habitArray, out);\r\n out.flush();\r\n\r\n fos.close();\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n }\r\n }", "public void exportAsJsonFile(String path) throws IOException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(this);\n\n FileWriter writer = new FileWriter(path);\n writer.write(json);\n writer.close();\n }", "public void saveToFile(String filePath) throws IOException {\n\t\tOutputStream file = new FileOutputStream(filePath);\n\t\tOutputStream buffer = new BufferedOutputStream(file);\n\t\tObjectOutput output = new ObjectOutputStream(buffer);\n\n\t\toutput.writeObject(tagList);\n\t\toutput.close();\n\t}", "public boolean SerializeObject(Object object, String sFilePath) {\n boolean bRetVal = false;\n File f = null;\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n f = new File(sFilePath);\n\n if (f.exists()) {\n f.delete();\n }\n\n File dir = new File(f.getParent());\n dir.mkdirs();\n f.createNewFile();\n\n fos = new FileOutputStream(f);\n oos = new ObjectOutputStream(fos);\n\n } catch (Exception e) {\n } finally {\n try {\n oos.writeObject(object);\n } catch (Exception e) {\n }\n try {\n oos.close();\n } catch (Exception e) {\n }\n try {\n fos.close();\n } catch (Exception e) {\n }\n f = null;\n return bRetVal;\n }\n }", "public <T> String SerializeJson(T obj, String pathToRoot) {\n this.lastPath = pathToRoot + obj.getClass().getSimpleName().toLowerCase() + \"_object-\" + Math.abs(new Random().nextLong()) + \".json\";\n File file = new File(this.lastPath);\n ObjectMapper mapper = new ObjectMapper();\n\n mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n mapper.registerModule(new JavaTimeModule());\n mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n\n try {\n file.createNewFile();\n mapper.writeValue(file, obj);\n System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj));\n return mapper.writeValueAsString(obj);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"\";\n }", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void saveBinary(String file) throws IOException {\n FileOutputStream f = new FileOutputStream(new File(file));\n ObjectOutputStream o = new ObjectOutputStream(f);\n o.writeObject(this);\n o.flush();\n o.close();\n }", "public static synchronized boolean writeFileToInternal(Context context, String fileName, Object data) {\n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfos = context.openFileOutput(fileName, Context.MODE_PRIVATE);\n\t\t\tObjectOutputStream os = new ObjectOutputStream(fos);\n\t\t\tos.writeObject(data);\n\t\t\tos.close();\n\n\t\t\treturn true;\n\t\t} catch (FileNotFoundException e) {\n\t\t\treturn false;\n\t\t} catch (IOException e) {\n\t\t\treturn false;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "@VisibleForTesting\n protected void writeToFile( FileObject fileObject, String backupFileName ) throws IOException, KettleException {\n OutputStream outputStream = null;\n PrintStream out = null;\n try {\n outputStream = initOutputStreamUsingKettleVFS( fileObject );\n\n out = new PrintStream( outputStream );\n\n out.print( XMLHandler.getXMLHeader( Const.XML_ENCODING ) );\n out.println( \"<\" + XML_TAG + \">\" );\n\n Collection<SharedObjectInterface> collection = objectsMap.values();\n for ( SharedObjectInterface sharedObject : collection ) {\n String xmlContent = sharedObject.getXML();\n out.println( xmlContent );\n }\n out.println( \"</\" + XML_TAG + \">\" );\n } catch ( Exception e ) {\n // restore file if something wrong\n boolean isRestored = false;\n if ( backupFileName != null ) {\n restoreFileFromBackup( backupFileName );\n isRestored = true;\n }\n throw new KettleException(\n BaseMessages.getString( PKG, \"SharedOjects.WriteToFile.ErrorWritingFile\", isRestored ), e );\n } finally {\n if ( out != null ) {\n out.flush();\n }\n if ( out != null ) {\n out.close();\n }\n if ( out != null ) {\n outputStream.close();\n }\n }\n }", "public void writeObject(Object obj) throws IOException;", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "void serialize(Object obj, OutputStream stream) throws IOException;", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }", "@SuppressWarnings(\"PMD.CloseResource\") // PMD does not understand Closer\n protected static void serializeObject(Serializable object, Path outputFile) {\n try {\n try (Closer closer = Closer.create()) {\n OutputStream out = closer.register(Files.newOutputStream(outputFile));\n BufferedOutputStream bout = closer.register(new BufferedOutputStream(out));\n serializeToLz4Data(object, bout);\n }\n } catch (Exception e) {\n throw new BatfishException(\"Failed to serialize object to output file: \" + outputFile, e);\n }\n }", "private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "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}" ]
[ "0.814712", "0.73666507", "0.7353468", "0.71307254", "0.7126318", "0.7108118", "0.70543617", "0.7008759", "0.6999937", "0.6888655", "0.6854973", "0.6848203", "0.68200946", "0.68014735", "0.6785502", "0.67849636", "0.6763344", "0.6754137", "0.6751749", "0.66192085", "0.66125846", "0.65984464", "0.6561226", "0.6530378", "0.6456448", "0.6399263", "0.63987964", "0.6398026", "0.63323706", "0.63157207", "0.6288605", "0.62498415", "0.620393", "0.6187977", "0.6184973", "0.61840326", "0.6169843", "0.6169396", "0.61476207", "0.61248296", "0.61152387", "0.6115238", "0.611152", "0.609883", "0.60882545", "0.60864234", "0.6055831", "0.6043206", "0.60165083", "0.59889233", "0.5988221", "0.5956838", "0.59187275", "0.59045607", "0.59025764", "0.58918846", "0.58656615", "0.58637977", "0.58619076", "0.58611804", "0.58576643", "0.5852159", "0.5841245", "0.58352256", "0.5822121", "0.5818423", "0.5794874", "0.57793635", "0.5773762", "0.57611996", "0.576029", "0.5754543", "0.575385", "0.5749288", "0.5746828", "0.5743283", "0.5741137", "0.57324183", "0.57176775", "0.5717666", "0.5706896", "0.57025135", "0.56999004", "0.56953245", "0.5675492", "0.5674567", "0.56632555", "0.5639882", "0.56286216", "0.5624423", "0.5620092", "0.56116265", "0.561056", "0.55954", "0.55879205", "0.5554829", "0.5546485", "0.5538374", "0.55373365", "0.5536547" ]
0.6989195
9
This is a simple method that writes the elements of an ArrayList of Strings into lines in the text file fileName.
public static void writeLinesToTextFile(ArrayList<String> lines, String fileName) { String nl = System.getProperty("line.separator"); try { BufferedWriter bw = new BufferedWriter(new FileWriter(fileName)); for (int i = 0; i < lines.size(); i++) { bw.write(lines.get(i) + nl); } bw.close(); } catch (IOException e) { MessageGenerator.briefErrorAndExit("Error writing file: " + fileName + File.separator + e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void writeFile(ArrayList<String> lines, String fileName)\n {\n try\n {\n // Create file \n FileWriter fstream = new FileWriter(fileName);\n BufferedWriter out = new BufferedWriter(fstream);\n for (String line: lines)\n {\n out.write(line);\n }\n //Close the output stream\n out.close();\n }\n catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }", "public static void writeToFile(String fileName, ArrayList<String> linesList) throws IOException\n {\n PrintWriter printWriter = new PrintWriter(new FileWriter(fileName));\n for(String currentLine : linesList)\n {\n printWriter.println(currentLine);\n }\n printWriter.close();\n }", "public void writeToFile(String filename, List<String> list) {\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(filename); \n\t\t\tfor(String str: list) {\n\t\t\t writer.write(str.trim() + System.lineSeparator());\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}", "public static void write(String fileName, List data) throws IOException {\n PrintWriter out = new PrintWriter(new FileWriter(fileName));\n\n try {\n\t\tfor (int i =0; i < data.size() ; i++) {\n \t\tout.println((String)data.get(i));\n\t\t}\n }\n finally {\n out.close();\n }\n }", "public void writeToFile(ArrayList<String> word, ArrayList<String> abb) {\n String path =\n Environment.getExternalStorageDirectory() + File.separator + \"TextEasy\";\n // Create the folder.\n File folder = new File(path);\n folder.mkdirs();\n\n // Create the file.\n File file = new File(folder, filename);\n\n // Save your stream, don't forget to flush() it before closing it.\n\n try {\n file.createNewFile();\n FileOutputStream fOut = new FileOutputStream(file);\n OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);\n for (int i = 0; i < word.size(); i++) {\n String text = word.get(i) + \"\\n\" + abb.get(i) + \"\\n\";\n myOutWriter.append(text);\n }\n myOutWriter.close();\n fOut.flush();\n fOut.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "public void saveToFile(String fileName, ArrayList<String> namesList, ArrayList<ArrayList<Double>> numList)\r\n {\r\n try\r\n {\r\n fileName = fileName + \"/\" + namesList.size() + \"Cities.txt\";\r\n FileWriter filePointer = new FileWriter(fileName, false); //false will replace what is there (append)\r\n PrintWriter output = new PrintWriter(filePointer);\r\n for(int i = 0; i < namesList.size(); i++)\r\n {\r\n String line = namesList.get(i) + \" \" \r\n + numList.get(i).get(0) + \" \" + numList.get(i).get(1) + \"\\n\";\r\n output.write(line);\r\n }\r\n output.close();\r\n }\r\n catch(IOException exp)\r\n {\r\n JOptionPane.showMessageDialog(null, \"Points not Saved\" \r\n + \"Save Error\" + JOptionPane.WARNING_MESSAGE);\r\n }\r\n }", "public static void textFile() throws IOException\n \t{ \n \t// Initialize the list\n \tArrayList<String[]> list = new ArrayList<String[]>();\n \t// Calling to random string generated by the randGenerator function! \n \tlist.add(new String[] {Datatostring});\n \t\t // File writer\n \tFileWriter Datawriter = new FileWriter(\"NumOUTPUT.txt\",true); // by adding true at the end is save to text file without overwriting older data\n \t\n \t\n \t// For loop for list data\n \tfor(String[] arr: list)\n \t{\n \t\tString appender = \"\";\n \t\tfor(String s : arr)\n \t\t{\n \t\tDatawriter.write(appender + s);\n \t\t\tappender = \",\";\n \t\t}\n \t\tDatawriter.flush();\n \t}\n \tDatawriter.close();\n }", "public static void writeToFile(java.util.List<String> list, String path) {\n\n // set file writer\n BufferedWriter out;\n try {\n // selected path\n File file = new File(path);\n out = new BufferedWriter(new FileWriter(file, true));\n for (Object s : list) {\n out.write((String) s);\n out.newLine();\n\n }\n out.close();\n } catch (IOException e) {\n // check errors and set show message dialog\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n JOptionPane.showMessageDialog(new JFrame(), errors.toString(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void saveFile(String fileName)\n {\n try\n {\n Formatter file = new Formatter(fileName);\n for (Item item: myList)\n {\n file.format(item.getFirstName() +\"\\n\" + item.getLastName() +\"\\n\"+ item.getPhoneNumber()+\"\\n\"+ item.getEmail()+\"\\n\");\n }\n file.close();\n }\n\n catch (Exception ex)\n {\n System.out.println(\"Error saving...\");\n }\n\n System.out.println(\"\");\n }", "public void writeFile(String filename, ArrayList<String> output)\n {\n try\n {\n PrintWriter write = new PrintWriter(filename);\n for(String out : output)\n {\n write.println(out);\n }\n write.close();\n }\n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n } \n }", "private void writeRowListToFile(List<String> rowList, String filePath) {\n try (BufferedWriter fileWriter = new BufferedWriter(new FileWriter(filePath))) {\n for (String row : rowList) {\n fileWriter.write(row);\n }\n } catch (IOException e) {\n LOGGER.error(e.getMessage());\n }\n }", "public void saveAllVehiclesToFile(ArrayList<DeliveryVehicle> vehicleList) throws java.io.IOException {\n\n // write object to file\n FileOutputStream fos = new FileOutputStream(_filePath); //object to hold a file, e.g. EmployeeData.txt\n PrintStream writer = new PrintStream(fos); //object to write data\n\n //For loop to read each employee and write them to the file\n for(DeliveryVehicle vehicle : vehicleList){\n writer.println(vehicle);\n }\n\n writer.close();//close the writer\n fos.close();//close the file\n\n }", "public void writeData(ArrayList<Task> orderList) {\n try {\n FileWriter fw = new FileWriter(filePath, false);\n for (Task task : orderList) {\n fw.write(task.fileFormattedString() + \"\\n\");\n }\n fw.close();\n\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n }", "public static void writeFileConvertGps(ArrayList<String[]> lines, String fileName)\n { \n ArrayList<String> newLines = new ArrayList<String> ();\n for (String[] lineSplitted : lines)\n {\n newLines.add(PreprocessCsvFiles.arrayToString(lineSplitted));\n }\n writeFile(newLines, fileName);\n }", "public static boolean writeToTextFile(String fname, //write to txt file - \n\t\t\t ArrayList<Cats> datapulled) {\n\t\t\t try {\n PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(fname)));\n\t\t\t for (Cats m: datapulled) {\n\t\t\t pw.println(m);\n\t\t\t }\n\t\t\t pw.close();\n\t\t\t return true;\n\t\t\t } catch (Exception ex) {\n\t\t\t return false;\n\t\t\t }\n\t\t\t }", "public void saveWords (ArrayList <String> list) {\n if (chooser.showSaveDialog (null) == JFileChooser.APPROVE_OPTION) {\n File newFile = chooser.getSelectedFile ();\n try {\n BufferedWriter buffer = new BufferedWriter (new FileWriter (newFile));\n for (String word : list) {\n buffer.write (word + \"\\n\");\n }\n buffer.close ();\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }", "public void writeToTextFile(String filename){\n try{\n FileWriter myWriter = new FileWriter(filename); \n myWriter.write(toString());\n myWriter.close();\n } \n catch(IOException e) { \n System.out.println(\"An error occurred.\"); \n e.printStackTrace();\n } \n }", "public static void outputNames(ArrayList<String> names) throws IOException {\n\n //Open filewriter for output file\n FileWriter output = new FileWriter(\"exercise41_output.txt\");\n\n // Write default text for output file for how many names there are\n output.write(\"Total of \" + names.size() + \" names\\n\");\n output.write(\"-----------------\\n\");\n\n // Write names in file\n for (String i : names) {\n output.write(i + \"\\n\");\n }\n\n //Close the filewriter\n output.close();\n }", "public static void writeFile(String filepath, List<String> contents) {\n List<String> content = new ArrayList<String>();\n File file = new File(filepath);\n if (file.exists()) {\n content.addAll(FileIOUtilities.readFile(filepath));\n }\n content.addAll(contents);\n if (content != null && !content.isEmpty()) {\n BufferedWriter writer = null;\n String encoding = \"UTF8\";\n try {\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), encoding));\n for (String line : content) {\n writer.write(line);\n writer.newLine();\n }\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n writer.close();\n } catch (IOException e) {\n // Ignore exception because writer was not initialized\n }\n }\n \n }\n }", "public void writeList()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPrintWriter writer = new PrintWriter(categoryName + \".txt\");\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < questions.size(); i++) // go through ArrayList\r\n\t\t\t{\r\n\t\t\t\twriter.println(questions.get(i).getQuestion() + \",\" + \r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer1() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer2() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer3() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer4() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getCorrectAnswer());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException fnf)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File was not found\");\r\n\t\t}\r\n\t}", "public WriteToFile(List<Person> peopleList){\r\n\r\n try {\r\n // write over existing file if exists or create new\r\n FileWriter myWriter = new FileWriter(\"sorted-names-list.txt\", false);\r\n for (Person person: peopleList){\r\n // Get person name in order to append to text file\r\n String wholeName = person.getFirstName() + \" \" + person.getLastName();\r\n System.out.println(wholeName);\r\n myWriter.write(wholeName);\r\n myWriter.write(\"\\n\");\r\n }\r\n myWriter.close();\r\n System.out.println(\"Successfully wrote to the file.\");\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n }", "public void writeList() {\n try{\n PrintWriter out = new PrintWriter(new FileWriter(\"OutFile.txt\"));\n\n for (int i = 0; i < SIZE; i++) {\n // The get(int) method throws IndexOutOfBoundsException, which must be caught.\n out.println(\"Value at: \" + i + \" = \" + list.get(i));\n }\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public static void storeFile(String fileName, List<String> arrayList) {\n\n \t// Creates a buffered reader for the file based on file name given.\n \ttry (BufferedReader br = new BufferedReader(new FileReader(fileName))) {\n String line;\n // Reads in the file line by line\n while ((line = br.readLine()) != null) {\n \t// Stores the line based on list to store in.\n arrayList.add(line);\n }\n } catch (IOException e) {\n System.err.println(\"ERROR: Could not read in file.\");\n }\n }", "public void writer(List<String> toStore) throws IOException{\n //creates writer and clears file\n PrintWriter writer = new PrintWriter(\"output.txt\", \"UTF-8\");\n //for each loop to store all the values in the file into the file named output.txt\n for(String s : toStore)\n //stores the strings for outputting\n writer.println(s);\n //closes the writer and outputs to the file\n writer.close();\n }", "private void saveListToFile() {\n try {\n PrintStream out = new PrintStream(\n openFileOutput(LIST_FILENAME, MODE_PRIVATE)\n );\n\n for (int i = 0; i < listArr.size(); i++) {\n out.println(listArr.get(i));\n }\n\n out.close();\n\n } catch (IOException ioe) {\n Log.e(\"saveListToFile\", ioe.toString());\n }\n }", "public void saveText(List<E> elements, String path){\n\n try (FileOutputStream fos = new FileOutputStream(path)){\n\n PrintWriter out = new PrintWriter(new BufferedOutputStream(fos));\n\n for (E el : elements) {\n out.println(el);\n }\n }\n catch (IOException ioe){\n System.out.println(\"Exception Can't find path or can't close stream\");\n }\n\n }", "private void writeLogToTxtFile(File logFileTarget, ArrayList<String> logFile) throws IOException {\n\t\tFileWriter FW = new FileWriter(logFileTarget);\n\t\tfor (String line : logFile) {\n\t\t\tFW.write(line + \"\\n\");\n\t\t}\n\t\tFW.close();\n\t}", "private void writeFile(List<ClubPointsDTO> clubs) {\n\t\tFileWriter file = null;\n\t\ttry {\n\n\t\t\tfile = new FileWriter(\"clubs.txt\");\n\n\t\t\t// Escribimos linea a linea en el fichero\n\t\t\tfile.write(\"CLUB\\tPUNTOS\\r\\n\");\n\t\t\tfor(ClubPointsDTO c : clubs)\n\t\t\t\tfile.write(c.getName()+\"\\t\"+c.getPoints()+\"\\r\\n\");\n\n\t\t\tfile.close();\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new FileException();\n\t\t}\n\t}", "public void addOn(ArrayList array) {\n try {\n PrintWriter writer;\n if (array.get(0) instanceof Integer)\n writer = new PrintWriter(\"points.txt\");\n else writer = new PrintWriter(\"names.txt\");\n\n for (int i=0; i<array.size(); i++)\n writer.println(array.get(i));\n writer.close();\n } catch (IOException e)\n {}\n }", "private void writeFile(File file, String... lines) throws IOException {\n try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file))) {\n for (String line : lines) {\n bufferedWriter.write(line);\n bufferedWriter.newLine();\n }\n }\n }", "public void getList() {\n\n\t\tFile opFile = new File(\"/home/bridgeit/Desktop/newfile.txt\");\n\t\ttry {\n\t\t\topFile.createNewFile();\n\t\t\tFileWriter fwriter = new FileWriter(opFile);\n\n\t\t\tfor (int i = 0; i < slist.size(); i++) {\n\n\t\t\t\tfwriter.append(slist.returnItem(i) + \" \");\n\n\t\t\t}\n\t\t\tfwriter.close();\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void writeUsers(ArrayList<User> userList, \r\n String filename) throws IOException {\r\n File file = new File(filename);\r\n PrintWriter out = new PrintWriter(\r\n new FileWriter(file, false));\r\n for (User user: userList) {\r\n out.println(user); \r\n }\r\n out.close();\r\n }", "private void writeToFile(String outputDir, String outFilename, ArrayList<String> out) throws IOException {\n PrintWriter outf = BagFormatter.openUTF8Writer(outputDir, outFilename);\n Iterator<String> it = out.iterator();\n int lastSpaceCount = -1;\n String line;\n int spaceCount;\n while (it.hasNext()) {\n line = it.next();\n spaceCount = 0;\n while (line.charAt(spaceCount) == ' ') {\n spaceCount++;\n }\n if (spaceCount == lastSpaceCount) {\n outf.println(\",\");\n } else if (lastSpaceCount >= 0) {\n outf.println();\n }\n outf.print(line);\n lastSpaceCount = spaceCount;\n }\n outf.println();\n outf.close();\n }", "public static void writeSortedArrayToFile(String[] lines, int linesLength, String fileName) {\n File outFile = new File(fileName);\n FileWriter outFileWriter = null;\n\n try {\n outFileWriter = new FileWriter(outFile);\n\n for (int i = 0; i < linesLength; i++)\n outFileWriter.append(lines[i] + \"\\n\");\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n outFileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public static void write(List<String> listOfMessages, String outputFilePath, boolean appendMode) {\n\n try {\n\n File outputFile = getFile(outputFilePath);\n\n // overwrite mode just replaces an existing file with this new one\n FileWriter fw = new FileWriter(outputFile, appendMode);\n for (String message : listOfMessages) {\n fw.write(message);\n fw.write(\"\\n\");\n }\n\n fw.flush();\n fw.close();\n\n } catch (Exception e) {\n for (String message : listOfMessages) {\n System.out.println(message);\n }\n }\n }", "public static void writeAllLines(String filePath, List<String> lines) {\n\t\ttry {\n\t\t\tFileUtils.write(new File(filePath), lines.get(0));\n\t\t} catch (IOException e) {\n\t\t\tthrow new FileDoesntExistException(filePath);\n\t\t}\n\t}", "public static void readFromFile(ArrayList<String> sArrayList, Context context){\n\n int i=0;\n try{\n InputStream inputStream = context.openFileInput(TxtName);\n\n if(inputStream!=null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receivedString = \"\";\n\n while((receivedString = bufferedReader.readLine())!=null){\n sArrayList.set(i,receivedString);\n Log.d(\"fileContent\", \"readFromFile: \"+sArrayList.get(i)+\"\\n\");\n i++;\n }\n inputStream.close();\n }\n\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n }\n\n }", "public void writeFile(String file, SLList list) {\n\t\tObjectOutputStream o = null;\n\t\ttry {\n\t\t\to = new ObjectOutputStream(new FileOutputStream(file));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t/**\n\t\t * try/catch block to verify file has been written/created\n\t\t */\n\t\t\n\t\ttry {\n\t\t\to.writeObject(list);\n\t\t\tSystem.out.println(\"File Successfully Created!\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\to.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void writeFile ( LinkedList contactsList ) {\n\t\ttry {\n PrintWriter writer = new PrintWriter ( \"contacts.txt\" );\n for ( int row = 0; row < contactsList.size ( ); row++ ) {\n \t// this is basically a toString right here, adapted to the original contacts.txt\n \tString line = contactsList.get ( row ).getFirst ( ) + \",\" + contactsList.get ( row ).getLast ( ) + \",\" + contactsList.get ( row ).getPhone ( ) \n \t\t\t+ \",\" + contactsList.get ( row ).getAddress ( ) + \",\" + contactsList.get ( row ).getCity ( ) + \",\" + contactsList.get ( row ).getZip ( );\n writer.println ( line );\n }\n writer.close();\n } catch ( FileNotFoundException fnf ) {\n System.out.println(\"File was not found.\");\n }\n\t}", "public void write(String s, ArrayList<String[]> data) throws IOException {\n\t\tFile metaFile = new File(s);\n\t\tmetaFile.createNewFile();\n\t\tFileWriter fw = new FileWriter(metaFile);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tString row = \"\";\n\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\trow = row + data.get(i)[j] + \",\";\n\t\t\t}\n\t\t\trow = row + data.get(i)[5];\n\t\t\tbw.write(row);\n\t\t\tbw.newLine();\n\t\t}\n\t\tbw.close();\n\t}", "static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }", "private void writeItems() {\n\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n\n // try to add items to file\n try {\n FileUtils.writeLines(todoFile, items);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void writeFile(String[] results) {\n\t\ttry {\n\t\t\tFile file = new File(outputFile);\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\tfor(int i = 0; i < results.length; i++) {\n\t\t\t\tString[] tuple = testTuples.get(i);\n\t\t\t\t// convert String[] to String\n\t\t\t\tString tupleString = \"\";\n\t\t\t\tfor(int j = 0; j < tuple.length; j++) {\n\t\t\t\t\ttupleString += tuple[j] + \",\";\n\t\t\t\t}\n\t\t\t\twriter.write(tupleString + results[i] + \"\\n\");\n\t\t\t}\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public boolean Ecritue(ArrayList<String> text) throws IOException {\n\t\t\n\t\ttry(PrintWriter print = new PrintWriter(new FileOutputStream(file))) {\n\t\t\tfor (int i=0;i<text.size();i++) {\n\t\t\t\tprint.println(text.get(i));\n\t\t\t\t\n\t\t\t}\n\t\t\tprint.close();\n\t\t} catch (IOException e1) {\n\t\t\tErreur(file, e1.getMessage());\n\t\t\te1.printStackTrace();\n\t\t\treturn false;\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn true;\n\t}", "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 }", "public void writeListtoFile(String path)\n\t\t\tthrows ParserConfigurationException, TransformerException, SAXException, IOException {\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\tDocument doc = docBuilder.newDocument();\n\n\t\tElement rootElement;\n\n\t\t// root contact\n\t\trootElement = doc.createElement(\"contacts\");\n\t\tdoc.appendChild(rootElement);\n\t\t\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t// contact\n\t\t\tElement contact = doc.createElement(INFO[0]);\n\t\t\trootElement.appendChild(contact);\n\n\t\t\t// name element\n\t\t\tElement name = doc.createElement(INFO[1]);\n\t\t\tname.appendChild(doc.createTextNode(list.get(i).getName()));\n\t\t\tcontact.appendChild(name);\n\n\t\t\t// phone element\n\t\t\tElement phone = doc.createElement(INFO[2]);\n\t\t\tphone.appendChild(doc.createTextNode(list.get(i).getPhone()));\n\t\t\tcontact.appendChild(phone);\n\t\t}\n\n\t\t// write the content into xml file\n\t\tTransformerFactory tranFFactory = TransformerFactory.newInstance();\n\t\tTransformer tranF = tranFFactory.newTransformer();\n\t\tDOMSource dSource = new DOMSource(doc);\n\n\t\tStreamResult result = new StreamResult(new File(path));\n\t\ttranF.transform(dSource, result);\n\n\t}", "public static void writeFile(ArrayList<Task> taskArrayList) throws IOException, DukeException {\n String dataPath = new File(\"saved_data/tasks.txt\").getAbsolutePath();\n StringBuilder fullString = new StringBuilder();\n\n for(Task task : taskArrayList) {\n if (task instanceof ToDo) {\n ToDo todo = (ToDo) task;\n String todoString = todo.getTypeIcon() + \"|\" + todo.isDone + \"|\"\n + todo.description + System.lineSeparator();\n fullString.append(todoString);\n } else if (task instanceof Event) {\n Event event = (Event) task;\n String eventString = event.getTypeIcon() + \"|\" + event.isDone + \"|\"\n + event.description + \"|\" + event.at + System.lineSeparator();\n fullString.append(eventString);\n } else if (task instanceof Deadline) {\n Deadline deadline = (Deadline) task;\n String deadlineString = deadline.getTypeIcon() + \"|\" + deadline.isDone + \"|\"\n + deadline.description + \"|\" + deadline.by + System.lineSeparator();\n fullString.append(deadlineString);\n } else {\n throw new DukeException();\n }\n }\n\n FileWriter fw = new FileWriter(dataPath);\n fw.write(String.valueOf(fullString));\n fw.close();\n }", "@Override\n public void saveToFile(List<Product> elements) throws IOException {\n List<String> collect = elements.stream()\n .map(product -> product.toString()) //z wykorzystanie method referencje .map(String::toString)\n .collect(Collectors.toList());\n\n //korzystamy z new io (nio patrz import) a nie jak wczesniej z io (we wprowadzeniu) bo latwiejsze\n Files.write(Paths.get(path), collect);\n\n\n }", "public void save(List<Task> list) throws IOException {\n FileWriter writer = new FileWriter(file);\n StringBuilder output = new StringBuilder();\n for (Task t : list) {\n output.append(formatTask(t));\n output.append(\"\\n\");\n }\n writer.write(output.toString());\n writer.close();\n }", "private static void writeToFile(String[] writeStringArr, String outputFileName){\n BufferedWriter outputBuffer = null;\n try{\n File outputFile = new File(outputFileName);\n if(!outputFile.exists()){\n outputFile.createNewFile();\n }\n\n outputBuffer = new BufferedWriter(new FileWriter(outputFile)); //create buffered reader\n// outputBuffer.write(writeString);\n\n for(int i=0; i< writeStringArr.length; i++){\n outputBuffer.write(writeStringArr[i]);\n outputBuffer.newLine();\n }\n } catch (IOException e){System.err.println(\"Error Writing File\");}\n finally {\n try {\n outputBuffer.close();\n }catch (IOException e){System.err.println(\"Error Closing File\");}\n }\n }", "public void saveFile()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString newLine = System.getProperty(\"line.separator\");\n\t\t\n\t\tfor(CSVItem cItem : itemList)\n\t\t{\n\t\t\tsb.append(cItem.buildCSVString()).append(newLine);\n\t\t\t\n\t\t}\n\t\tString fileString = sb.toString();\n\t\t\n\t\t File newTextFile = new File(filePath);\n\n FileWriter fw;\n\t\ttry {\n\t\t\tfw = new FileWriter(newTextFile);\n\t\t\t fw.write(fileString);\n\t\t fw.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n\n\t}", "public static void writeFile(ArrayList<Integer> data, String path) {\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(path);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos);\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n//\t\t\tfor (String dt : data) {\n//\t\t\t\tbw.write(dt);\n//\t\t\t\tbw.newLine();\n//\t\t\t}\n\n\t\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\t\tbw.write(data.get(i).toString());\n\t\t\t\tif (i < data.size() - 1)\n\t\t\t\t\tbw.write(\", \");\n\n\t\t\t\t// bw.newLine();\n\t\t\t}\n\t\t\tbw.newLine();\n\t\t\tbw.close();\n\t\t\tosw.close();\n\t\t\tfos.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void dumpCollection(Collection<String> strs, String fileName)\n throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(fileName, \"UTF-8\");\n\n for (String str : strs) {\n writer.println(str);\n }\n\n writer.close();\n }", "public void writeList(String filename, List <Double> Q) {\n\t\t\tObject[] objects = Q.toArray();\n\t\t\t\n\t \n\t\t\ttry {\n\t FileWriter writer = new FileWriter(filename, true);\n\t for (int i = 0; i < objects.length; i++) {\t \n\t writer.write( String.valueOf(objects[i]));\n\t \n\t //this is the code that you change, this will make a new line between each y value in the array\n\t writer.write(\"\\n\"); // write new line\n\t }\n\t writer.close();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\n\t}", "@Override\n public void output(final List<String> lines) {\n final String pathToFile = filePath + \"/foundDevices.txt\";\n final Path file = Paths.get(pathToFile);\n try {\n Files.write(file, lines, Charset.forName(\"UTF-8\"));\n } catch (final IOException e) {\n logger.warn(\n String.format(\"An error was thrown while trying \"\n + \"to write the foundDevices \"\n + \"file in position %s\",\n pathToFile)\n );\n }\n }", "public static void writeStringToFile(String filename, String content, int iteration, List<Exception> exceptionList, String fileEnding){\r\n\t\twriteToNewFile(filename, new StringBuilder(content), iteration, exceptionList, fileEnding);\r\n\t}", "private ArrayList<String> saveText(){\n FileReader loadDetails = null;\n String record;\n record = null;\n\n //Create an ArrayList to store the lines from text file\n ArrayList<String> lineKeeper = new ArrayList<String>();\n\n try{\n loadDetails=new FileReader(\"employees.txt\");\n BufferedReader bin=new BufferedReader (loadDetails);\n record=new String();\n while (((record=bin.readLine()) != null)){//Read the file and store it into the ArrayList line by line*\n lineKeeper.add(record);\n }//end while\n bin.close();\n bin=null;\n }//end try\n catch (IOException ioe) {}//end catc\n\n return lineKeeper;\n\n }", "private static void writeToFileEmployees() throws IOException {\n FileWriter write = new FileWriter(path2, append);\n PrintWriter print_line = new PrintWriter(write);\n for (int i = 0; i < RegisteredEmployees.listOfEmployees.size(); i++) {\n ArrayList<Integer> list = RegisteredEmployees.getEmployeeList();\n Integer ID = list.get(i);\n textLine = String.valueOf(ID);\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "private void rewriteLocationList(List<Location> newLocationList) {\n Log.d(\"debugMode\", \"writing new contents\");\n for (Location location : newLocationList) {\n String line = \"\\n\" + location.returnFull();\n byte[] bytes = line.getBytes();\n\n FileOutputStream out;\n try {\n Log.d(\"debugMode\", location.returnFull());\n out = openFileOutput(\"Locations.txt\", MODE_APPEND);\n out.write(bytes);\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void writeBuyingHistory(ArrayList<String> boughtBooks)throws IOException\n {\n String toWrite = new String();\n int i =0;\n if(hisMap.get(Customer.getInstance().getUsername())==null)\n {\n hisMap.put(Customer.getInstance().getUsername(),new ArrayList<String>());\n }\n else\n {\n i=0;\n while (i<boughtBooks.size())\n {\n hisMap.get(Customer.getInstance().getUsername()).add(boughtBooks.get(i));\n i++;\n }\n }\n\n\n i=0;\n\n toWrite+=Customer.getInstance().getUsername()+\",\";\n while (i<hisMap.get(Customer.getInstance().getUsername()).size()-boughtBooks.size())\n {\n toWrite+=hisMap.get(Customer.getInstance().getUsername()).get(i)+\"%\";\n i++;\n }\n ;\n i=0;\n while (i<boughtBooks.size())\n {\n toWrite+=boughtBooks.get(i);\n if(i!=boughtBooks.size()-1)\n toWrite+=\"%\";\n i++;\n }\n\n\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"history.txt\"));\n if(specificLine>lines.size()-1)\n {\n lines.add(toWrite);\n }\n else {\n lines.set(specificLine, toWrite);\n }\n /*write part*/\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n\n fw = new FileWriter(\"history.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n\n }", "public void writeToFile(ArrayList<quizImpl> ql) {\n Path path = Paths.get(\"Quizzes.txt\");\n try (Scanner scanner = new Scanner(path, String.valueOf(ENCODING))) {\n try (BufferedWriter writer = Files.newBufferedWriter(path, ENCODING)) {\n String toBeWritten;\n for (quizImpl q : ql) {\n String questionsString = \"\";\n //gets a list of questions for that quiz\n List<QuestionAndAnswer> questions = q.getQuestions();\n //for each question in the quiz get the answers\n for (QuestionAndAnswer question : questions) {\n List<String> answers = question.getAllAnswers();\n String answerString = \"\";\n for (String s : answers)\n answerString = answerString + s + \",\";\n answerString = answerString + question.getCorrectAnswer();\n questionsString = questionsString + \",\" + question.getQuestion() + \",\" + answerString;\n }\n if (q.getHighScore() == -1) toBeWritten = \"quizName,\" + q.getQuizName() + questionsString;\n else\n toBeWritten = \"quizName,\" + q.getQuizName() + questionsString + \",highScore,\" + q.playerWithHighScore() + \",\" + q.getHighScore();\n writer.write(toBeWritten);\n writer.newLine();\n }\n writer.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void writeFile(){\n try{\n FileWriter writer = new FileWriter(\"Highscores.txt\");\n for (int i = 0; i<10; i++){\n if (i >= this.highscores.size()){\n break;\n }\n writer.write(String.valueOf(this.highscores.get(i)) + \"\\n\");\n }\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void writeFile(String file, Vector<String> data) {\n\n //write details to the current file\n try {\n PrintWriter pw = new PrintWriter(file);\n for(int i = 0; i < data.size(); i++){\n pw.println(data.get(i));\n }\n pw.flush();\n pw.close();\n } catch (FileNotFoundException fnfe){\n System.out.println(fnfe);\n }\n }", "private void chatSave() {\n try{\n //create a text file to write the chatList to\n PrintStream print =\n new PrintStream(new FileOutputStream(\"log.txt\", true));\n //write each line of the array to the file \n for (String str:chatList)\n print.println(str);\n //once each record has been written to the file, close it.\n print.close();\n } catch (IOException e) {\n // exception handling\n }\n }", "public static void writePlayerToFile(ArrayList<Player> players)\r\n {\r\n clearFile(new File(\"players.txt\"));\r\n\r\n for(Player p : players)\r\n {\r\n writePlayerToFile(p);\r\n }//end for\r\n }", "public static void writeLines(File todo, String text) {\n\t\t// Check if data is not null\n\t\tif (text != null) {\n\t\t\ttry {\n\t\t\t\t// check if the file exist, else create a new\n\t\t\t\tif (!todo.exists()) {\n\t\t\t\t\ttodo.createNewFile();\n\t\t\t\t\t// todo.setWritable(true);\n\t\t\t\t}\n\n\t\t\t\tOutputStreamWriter out = new OutputStreamWriter(\n\t\t\t\t\t\tnew FileOutputStream(todo, MODE_APPEND));\n\n\t\t\t\tout.write(text);\n\t\t\t\tout.write('\\n');\n\t\t\t\tout.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tSystem.out.println(\"Exception in File Utils :: \"\n\t\t\t\t\t\t+ ioe.getMessage());\n\t\t\t\t// Throw this exception to the caller\n\t\t\t}\n\t\t}\n\t}", "public void writeToFile(String filename, HashSet<String> URLS) {\n\t FileWriter writer;\n\t try {\n\t writer = new FileWriter(filename);\n\t URLS.forEach(a -> {\n\t try {\n\t writer.write(a + \"\\n\");\n\t } catch (IOException e) {\n\t System.err.println(e.getMessage());\n\t }\n\t });\n\t writer.close();\n\t } catch (IOException e) {\n\t System.err.println(e.getMessage());\n\t }\n\t }", "public static void saveData(ArrayList<String> dataList, char[][]wordSoup){\r\n // Create File\r\n try {\r\n File myObj = new File(\"sdl_01.txt\");\r\n myObj.createNewFile();\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n \r\n // Write data to file\r\n try {\r\n FileWriter myWriter = new FileWriter(\"sdl_01.txt\");\r\n // Data writing\r\n int size = wordSoup.length;\r\n for(int i = 0 ; i < size ; i++) {\r\n\t \tfor(int j = 0 ; j < size ; j++) {\r\n\t \t\tmyWriter.write(wordSoup[i][j]);\r\n System.out.print(wordSoup[i][j]);\r\n\t \t}\r\n\t \tmyWriter.write(\"\\n\");\r\n System.out.print(\"\\n\");\r\n\t }\r\n size = dataList.size();\r\n for(int i = 0 ; i < size ; i++) {\r\n myWriter.write(dataList.get(i) + \"\\n\");\r\n System.out.print(dataList.get(i) + \"\\n\");\r\n }\r\n myWriter.close();\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "public void writeLine(List<String> values) throws Exception {\n boolean firstVal = true;\n for (String val : values) {\n if (!firstVal) {\n dataWriter.write(\",\");\n }\n //dataWriter.write(\"\\\"\");\n for (int i=0; i<val.length(); i++) {\n char ch = val.charAt(i);\n if (ch=='\\\"') {\n dataWriter.write(\"\\\"\"); //extra quote\n }\n dataWriter.write(ch);\n }\n //dataWriter.write(\"\\\"\");\n firstVal = false;\n }\n dataWriter.write(\"\\n\");\n dataWriter.flush();\n }", "void LoesungAusgeben (String strA) { createOutput ()\n //\n // println(\"strA = \"+strA);\n //\n String[] list1 = { \n strA\n };\n list1=split(strA, ',');\n // now write the strings to a file, each on a separate line\n // saveStrings (\"c:\\\\soft\\\\SolProcess\\\\result\" + Date1() + \"_\" + Now1() + \".txt\", list1);\n // saveStrings (\"result\" + Date1() + \"_\" + Now1() + \".txt\", list1);\n saveStrings (\"result.txt\", list1);\n}", "public static File stringsToFile(String folderPath, String fileName, List<String> content, boolean append){\n\t\t\n\t\tFile folder = createFolder(folderPath);\n\t\t\n\t\t//I'm not sure if this line is necessary. Maybe the file is already created by FileWriter.\n\t\tFile outputFile = createFile(folder, fileName);\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tPrintWriter out = new PrintWriter(new FileWriter(outputFile, append));\n\t\t\tfor(String line : content){\n\t\t\t\tout.println(line);\n\t\t\t}\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t\t\n\t\t\treturn outputFile;\n\t\t\t\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public static void writeScoreToFile(ArrayList<String> sArrayList,int score, Context context,String userName){\n\n int[] temp = new int[sArrayList.size()];\n Scanner in = null;\n\n //get the score part from the txt file\n for(int i=0;i<sArrayList.size();i++){\n\n in = new Scanner(sArrayList.get(i)).useDelimiter(\"[^0-9]+\");\n int integer = in.nextInt();\n temp[i]=integer;\n Log.d(\"array temp[]\", \"writeScoreToFile: \"+temp[i]+\"\\n\");\n in.close();\n\n }\n\n int tempVal=0;\n String tempString=null;\n if(score>temp[4]) {\n\n temp[4]=score;\n sArrayList.set(4,String.format(\"%-10s%d\",userName,score));\n for(int j=0;j<sArrayList.size()-1;j++){\n for(int k=1;k<sArrayList.size()-j;k++){\n if(temp[k-1]<temp[k]){\n tempVal = temp[k-1];\n temp[k-1]=temp[k];\n temp[k]=tempVal;\n tempString = sArrayList.get(k-1);\n sArrayList.set(k-1,sArrayList.get(k));\n sArrayList.set(k,tempString);\n }\n }\n }\n\n\n //print arraylist\n for(int i=0;i<sArrayList.size();i++){\n Log.d(\"Arraylistcontent\", \"writeScoreToFile: \"+sArrayList.get(i));\n //Log.d(\"sizeArrayList\", \"writeScoreToFile: \"+sArrayList.size());\n }\n\n\n try {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(context.openFileOutput(\"score.txt\", Context.MODE_PRIVATE));\n for(int i=0;i<sArrayList.size();i++){\n //use each line for one score\n outputStreamWriter.write(sArrayList.get(i)+\"\\n\");\n }\n outputStreamWriter.close();\n\n } catch (FileNotFoundException e) {\n Log.e(\"FileNotFoundException\", \"File write failed: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"IOException\", \"File write failed: \" + e.toString());\n }\n Log.d(\"end of the log\", \"writeScoreToFile: \"+\".......\");\n }\n }", "public static String outputToTempFile(List<String> lines, String fileName) {\n String downloadDir = DBBasedConfigs.getConfig(\"fileDownloadDir\", String.class, Constants.DEFAULT_FILE_DOWNLOAD_DIR);\n String targetFileName = UUID.randomUUID().toString() + \"____\" + fileName;\n String targetFilepath = downloadDir + \"/\" + targetFileName;\n CommonUtils.writeAllLines(lines, targetFilepath);\n\n return targetFilepath;\n }", "public static void saveOutput(String filename, DSALinkedList list)\n {\n try\n {\n PrintWriter out = new PrintWriter(filename);\n //out.println(input);\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(baos);\n PrintStream old = System.out;\n System.setOut(ps);\n //stuff goes here\n\n if(!list.isEmpty())\n {\n System.out.println(\"# All routes Traversed:\");\n Iterator<DSAQueue> itr = list.iterator();\n int counter = 0;\n while(itr.hasNext())\n {\n counter ++;\n System.out.println(\"\\n# Route number: [\" + counter + \"]\");\n itr.next().show();\n }\n }\n else\n {\n System.out.println(\"# Route list is empty. Add some more!\");\n }\n System.out.flush();\n System.setOut(old);\n out.println(baos.toString());\n\n out.close();\n }\n catch (Exception e)\n { //should do more here might not be needed\n throw new IllegalArgumentException(\"Unable to print object to file: \" + e);\n }\n\n }", "public void createCSV(ArrayList<String> result, String output){\t\r\n\t\ttry{\r\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(output);\r\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream, \"MS949\");\r\n\t\t\tBufferedWriter fw = new BufferedWriter(outputStreamWriter);\r\n\t\t\tfor(String line : result){\r\n\t\t\t\tfw.write(line+\"\\n\");\r\n\t\t\t}\r\n\t\t\tfw.flush();\r\n\t\t\tfw.close();\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void addFileNames(ArrayList<String> fileName) throws IOException{\n\t\tScanner regularSeasonData = new Scanner(new File(\"C:\\\\Users\\\\mattb\\\\Documents\\\\NCAAFileNames.txt\"));\n\t\tString teamFile = regularSeasonData.nextLine();\n\t\twhile(!teamFile.contains(\",,,,\")) {\n\t\t\tfileName.add(teamFile);\n\t\t\tteamFile = regularSeasonData.nextLine();\n\t\t}\t\n\t}", "public static void writeToStringToFile(Player p)\r\n {\r\n try \r\n { \r\n //Create file \r\n PrintWriter fileOutput = new PrintWriter(new FileWriter(\"playersData.txt\", true), true); \r\n\r\n //Write data from given ArrayList to the file \r\n fileOutput.println(p);\r\n\r\n //Close file\r\n fileOutput.close();\r\n } \r\n catch (IOException ioException) \r\n { \r\n //Output error message \r\n System.out.println(\"Error: The file cannot be created\"); \r\n }//end try \r\n }", "public void writeOut(Set<String> uniqueWords) {\r\n Path file = Paths.get(filename + \"_unique_words.txt\");\r\n Charset charset = Charset.forName(\"UTF-8\");\r\n try (BufferedWriter writer = Files.newBufferedWriter(file, charset)) {\r\n for (String s : uniqueWords)\r\n {\r\n writer.write(s);\r\n writer.newLine();\r\n }\r\n } catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n }", "public static List<String> writeTxtFile(String txtPath,List<String> writeList) throws IOException {\n char t = 1;\n String soh = String.valueOf(t);\n File file = null;\n FileWriter fw = null;\n try {\n file = new File(txtPath);\n if (!file.exists()) {\n file.createNewFile();\n }\n fw = new FileWriter(file);\n for (int i=0;i<writeList.size();i++){\n fw.write(writeList.get(i) + soh);\n }\n fw.flush();\n fw.close();\n System.out.println(\"写入文件成功\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return writeList;\n\n }", "private void write(HashMap<String, List<String>> result, String filename) {\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(filename));\n\n\t\t\tfor (String word : result.keySet()) {\n\t\t\t\tbw.write(String.format(\"%s: %s\\n\", word, result.get(word)));\n\t\t\t}\n\n\t\t\tbw.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void writeToFile(ArrayList<Task> tasks) throws IOException {\r\n FileWriter fileWriter = new FileWriter(filePath);\r\n for (Task task : tasks) {\r\n Parser fileFormatter = new ParseToFileFormat(task);\r\n String taskData = fileFormatter.getFileFormat();\r\n fileWriter.write(taskData);\r\n }\r\n fileWriter.close();\r\n }", "public void saveFile(TaskList tasklist) {\n try {\n String cwd = System.getProperty(\"user.dir\");\n FileWriter fw = new FileWriter(cwd + filePath);\n for (Task task : tasklist.getTasks()) {\n String data = task.getData();\n fw.write(data + System.lineSeparator());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Something went wrong: \" + e.getMessage());\n }\n\n }", "void writeRecordsToFile(List<IRecord> recordList) throws IOException;", "private void writeToFile(){\r\n File file = new File(\"leaderboard.txt\");\r\n\r\n try {\r\n FileWriter fr = new FileWriter(file, true);\r\n BufferedWriter br = new BufferedWriter(fr);\r\n for(Player player : this.sortedPlayers){\r\n br.write(player.toString());\r\n br.write(\"\\n\");\r\n }\r\n br.close();\r\n fr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public void writeToFile(TaskList tasks) {\n try {\n FileWriter fw = new FileWriter(filePath);\n for (Task t : tasks.getListOfTasks()) {\n fw.write(t.getRecordString() + \"\\n\");\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Error writing to data file.\");\n }\n }", "public static void writeFile(List<Task> database) {\r\n assert database != null: \"Storage.writeFile(): database cannot be null\";\r\n File dir = new File(\"./tmp/data\");\r\n try {\r\n FileWriter fw = new FileWriter(new File(dir, \"storage.txt\"));\r\n for (Task task : database) {\r\n assert task != null: \"Storage.writeFile(): task to be added cannot be null\";\r\n fw.write(task.serialize() + \"\\n\");\r\n }\r\n fw.close();\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public void writeToFile(List<String> values, Path destination) throws IOException {\n\t\ttry (FileWriter writer = new FileWriter(destination.toString())) {\n\t\t\tfor (String value : values) {\n\t\t\t\twriter.write(value.trim() + \",\");\n\t\t\t}\n\t\t};\n\t}", "public void FileWrite(Nimsys nimSys,ArrayList<Player> list)throws IOException{\r\n\t\tOutputStream out = new FileOutputStream(\"players.dat\");\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile(aa.hasNext()){ //each line includes the information below related to the players\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tout.write(in.getUserName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getSurName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getGivenName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getGamePlay()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getWinGame()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getID()).getBytes());\r\n\t\t\tout.write('\\r');\r\n\t\t}\r\n\t}", "public void devolverArchivo(ArrayList<Alumno> lista) // Crea archivo de texto con la lista de datos ya ordenada\n {\n try\n {\n PrintWriter print = new PrintWriter(\"Registros Ordenados.txt\");\n for(int k=0; k<100; k++)\n {\n print.println(F0.get(k).getNombre() + \", \" + F0.get(k).getApellido() + \", \" + F0.get(k).getNoCnt());\n }\n print.close();\n }\n catch(Exception ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "public static void saveData(ArrayList alr){\n List alw = new ArrayList();\n for (int i = 0; i < alr.size(); i++){\n Review review = (Review)alr.get(i);\n StringBuilder stb = new StringBuilder();\n stb.append(review.getMovieID());\n stb.append(SEPARATOR);\n stb.append(review.getEmail());\n stb.append(SEPARATOR);\n stb.append(review.getComment());\n alw.add(stb.toString());\n }\n try{\n write(filename, alw);\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n }", "public static void outputSolutionsToFile(ArrayList<Edge> solution) {\n\t\tString filename = \"out.txt\", content = new String();\n\t\tfor(Edge i : solution) content += i.p1.x + \" \" + i.p1.y + \" \" + i.p2.x + \" \" + i.p2.y + \"\\n\";\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(new File(filename), false);\n writer.write(content);\n writer.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"There was an error outputting your solution.\");\n\t\t}\n\t}", "public void writer(Vector<String> toWrite, String path) throws IOException {\n file = new File(path);\n fw = new FileWriter(file);\n\n for (int i = 0; i < toWrite.size(); i++) {\n fw.write(toWrite.get(i));\n fw.write('\\n');\n fw.flush();\n }\n }", "public void writeOutputToFile(ArrayList<Object> transformNums) throws IOException {\r\n FileWriter file = new FileWriter(writeFilename);\r\n\r\n for(int i=0; i<transformNums.size(); i++){\r\n file.write(transformNums.get(i)+\" \");\r\n }\r\n\r\n file.close();\r\n\r\n }", "public void concatePlainText(String[] filenames, String desFileName) {\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(desFileName));\n //StringBuffer buffer=new StringBuffer();\n for (String filename : filenames) {\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n String str;\n while ((str = reader.readLine()) != null) {\n // buffer.append(str);\n writer.write(str);\n writer.newLine();\n }\n reader.close();\n }\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void saveList(TaskList taskList) {\n try {\n FileWriter initialWriter = new FileWriter(\"duke.txt\");\n BufferedWriter myWriter = new BufferedWriter(initialWriter);\n for (int i = 0; i < taskList.size(); i++) {\n myWriter.write(taskList.getTask(i).typeChar() + \" \");\n myWriter.write(taskList.getTask(i).getStatusIcon() + \" \");\n if (taskList.getTask(i) instanceof Deadline || taskList.getTask(i) instanceof Events) {\n myWriter.write(taskList.getTask(i).getDesc() + \" \");\n myWriter.write(\"(\" + taskList.getTask(i).getBy() + \") \");\n } else {\n myWriter.write(taskList.getTask(i).getDesc() + \" \");\n }\n myWriter.newLine();\n }\n myWriter.close();\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public static void main( String[] args ) throws Exception\n {\n ArrayList<String> sortedNames = new ArrayList<>();\n\n //accessing the input file\n File file = new File(\"src\\\\main\\\\java\\\\ex41\\\\exercise41_input.txt\");\n\n //directing scanner to read from input file\n Scanner input = new Scanner(file);\n\n\n //creating an output file\n File orderedNamesFile = new File(\"exercise41_output.txt\");\n\n //accessing the ability to write in output file\n FileWriter outputFile = new FileWriter(orderedNamesFile);\n\n\n /*using a while loop to read each line from input file and then add it to the arraylist sortedNames\n until there are no more lines*/\n while (input.hasNextLine()) {\n String name = input.nextLine();\n sortedNames.add(name);\n }\n\n //using collections function to sort the names in the arraylist\n Collections.sort(sortedNames);\n\n\n //writing in output file\n outputFile.write(\"\\nTotal of \" + sortedNames.size() + \" names: \\n\");\n outputFile.write(\"------------------------\\n\");\n\n\n //adding in the sorted names in arraylist to the output file\n for(String n : sortedNames)\n {\n outputFile.write(n + \"\\n\");\n }\n\n\n }", "public static void writeActivityRecords(String fileName, ArrayList<Activity> courses) throws IOException {\n\t\tPrintStream fileWriter = new PrintStream(new File(fileName));\n\t\tfor (Activity c : courses) {\n\t\t\tfileWriter.println(c.toString());\n\t\t}\n\t\tfileWriter.close();\n\t}", "public void writeToEmployeeListFile()\r\n {\r\n\ttry(ObjectOutputStream toEmployeeListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/employeelist.dta\")))\r\n\t{\r\n toEmployeeListFile.writeObject(employeeList);\r\n employeeList.saveStaticEmpRunNr(toEmployeeListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Ansatt 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 }", "private static void writeToCoordinateFile(String idNames, String[] id_to_coord_list, String outputFileName){\n String[] stringToWrite = getStringBasedOnCoordinate( idNames, id_to_coord_list); //list of id we found, ignore the first 0th index\n writeToFile(stringToWrite, outputFileName);\n }", "@Test\n\tpublic void testWriteToFile() {\n ArrayList<String> actualLines = new ArrayList<String>();\n\n\t\tactualLines.add(\"Course: Java\");\n\t\tactualLines.add(\"CourseID: 590\");\n\t\tactualLines.add(\"StudentName: Nikhil Kumar\");\n\t\t\n\t\t// Write to file\n\t\tmyFileWriter1.writeToFile(actualLines);\n\t\t\n\t\t// Read the written file to test its contents\n\t\tArrayList<String> expectedLines = readWrittenFile(\"output_test.txt\");\n\t\tassertEquals(expectedLines, actualLines);\n\t}" ]
[ "0.7970999", "0.78948766", "0.7451031", "0.66339445", "0.66238225", "0.65967226", "0.65767795", "0.6575745", "0.65720785", "0.6558649", "0.65493125", "0.6534843", "0.65261805", "0.6424454", "0.6322196", "0.63068265", "0.6282555", "0.6273648", "0.6256599", "0.6253218", "0.62217146", "0.6179674", "0.61545146", "0.6139583", "0.6135178", "0.6115847", "0.6084609", "0.608425", "0.6080851", "0.60674536", "0.60667866", "0.6056931", "0.60454273", "0.6014374", "0.5998985", "0.5987933", "0.5976535", "0.5938954", "0.5937389", "0.5931396", "0.59225", "0.5912182", "0.5903855", "0.5894982", "0.589177", "0.58913994", "0.58896255", "0.5879363", "0.5878615", "0.5831965", "0.58292466", "0.5823712", "0.58051556", "0.58017385", "0.57973206", "0.57968175", "0.57959735", "0.5795493", "0.5766737", "0.5760943", "0.57341367", "0.5728285", "0.572232", "0.5721578", "0.5720381", "0.5698374", "0.5683992", "0.56828207", "0.56724083", "0.56670815", "0.56571704", "0.5654249", "0.56487006", "0.56385094", "0.56327844", "0.562507", "0.5618792", "0.56071687", "0.55966234", "0.5590485", "0.5583741", "0.5579268", "0.5577786", "0.5577455", "0.5572325", "0.55714333", "0.55697715", "0.5569716", "0.55644274", "0.5558806", "0.55518967", "0.5548068", "0.5540954", "0.55375105", "0.55370325", "0.5536035", "0.550776", "0.54923594", "0.5491652", "0.54847646" ]
0.7927185
1
This is a simple method that will read in a text file and put each line in a string and put all the lines in an ArrayList. The user is cautioned not to open extremely large files with this method.
public static ArrayList<String> getLinesFromTextFile(String fileName) { String line = null; BufferedReader br; ArrayList<String> lines = new ArrayList<String>(); try { br = new BufferedReader(new FileReader(fileName)); while ((line = br.readLine()) != null) { lines.add(line); } } catch (FileNotFoundException e) { MessageGenerator.briefErrorAndExit("ERROR: Could not find file: " + fileName); } catch (IOException e) { MessageGenerator.briefErrorAndExit("ERROR: Could not read from file: " + fileName); } return lines; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<String> readToString(String filePath) {\n\t\tFile file = new File(filePath);\n\t\tArrayList<String> res = new ArrayList<String>();\n\t\tif (!file.exists()) {\n\t\t\treturn res;\n\t\t}\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tString str = null;\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tres.add(str);\n\t\t\t}\n\t\t\tfr.close();\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn res;\n\t}", "public static ArrayList<String> readLines(String fileName){\n\t\treturn read(fileName, false);\n\t}", "public static List<String> readIn(String filename) throws Exception {\r\n Path filePath = new File(filename).toPath();\r\n Charset charset = Charset.defaultCharset(); \r\n List<String> stringList = Files.readAllLines(filePath, charset);\r\n\r\n return stringList;\r\n }", "private ArrayList<String> saveText(){\n FileReader loadDetails = null;\n String record;\n record = null;\n\n //Create an ArrayList to store the lines from text file\n ArrayList<String> lineKeeper = new ArrayList<String>();\n\n try{\n loadDetails=new FileReader(\"employees.txt\");\n BufferedReader bin=new BufferedReader (loadDetails);\n record=new String();\n while (((record=bin.readLine()) != null)){//Read the file and store it into the ArrayList line by line*\n lineKeeper.add(record);\n }//end while\n bin.close();\n bin=null;\n }//end try\n catch (IOException ioe) {}//end catc\n\n return lineKeeper;\n\n }", "public ArrayList<String> fileRead(String fileName) {\n String line = null;\n ArrayList<String> list = new ArrayList<>();\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n list.add(line);\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n return list;\n }", "public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }", "private void takeInFile() {\n System.out.println(\"Taking in file...\");\n //Reads the file\n String fileName = \"messages.txt\";\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileName);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n //Adds each line to the ArrayList\n int i = 0;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n //System.out.println(line);\n i++;\n }\n \n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n System.out.println(\"Done taking in file...\");\n }", "public static void readFromFile(ArrayList<String> sArrayList, Context context){\n\n int i=0;\n try{\n InputStream inputStream = context.openFileInput(TxtName);\n\n if(inputStream!=null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receivedString = \"\";\n\n while((receivedString = bufferedReader.readLine())!=null){\n sArrayList.set(i,receivedString);\n Log.d(\"fileContent\", \"readFromFile: \"+sArrayList.get(i)+\"\\n\");\n i++;\n }\n inputStream.close();\n }\n\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n }\n\n }", "public static List<String> readListOfStringsFromFile(String filePath) throws IOException {\n List<String> list = new ArrayList<>();\n Files.lines(Paths.get(filePath), StandardCharsets.UTF_8).forEach(list::add);\n return list;\n }", "public static ArrayList<String> Readfile(String fileName) {\n\t\t\t\t\t// This will reference one line at a time\n\t\t\t\t\tArrayList<String> doc = new ArrayList<String>();\n\t\t\t\t\tString line = null;\n\t\t\t\t\tString fileNamehere = fileName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// FileReader reads text files in the default encoding.\n\t\t\t\t\t\tFileReader fileReader = new FileReader(fileName);\n\n\t\t\t\t\t\t// Always wrap FileReader in BufferedReader.\n\t\t\t\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\t\t\tdoc.add(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Always close files.\n\t\t\t\t\t\tbufferedReader.close();\n\t\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\t\tSystem.out.println(\"file not found '\" + fileName + \"'\");\n\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn doc;\n\t}", "public ArrayList<String> readFile(File file) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tif (file.exists()) {\n\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\t\tString line;\n\t\t\t\tbr.readLine();\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\tal.add(line);\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t} catch (IOException e) {\t\n\t\t\t}\n\t\treturn al;\n\t\t}", "public List<String> readFileIntoList(String filepath) throws IOException;", "public ArrayList<String> readFromFile(String fileName) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t ArrayList<String> retour = new ArrayList<String>();\n\t String line = null;\n\t while((line = reader.readLine()) != null) \n\t \tretour.add(line);\n\t \n\t reader.close();\n\t return retour; \n\t}", "public static List<String> readFile(String filepath) {\n BufferedReader reader = null;\n List<String> fileLines = new ArrayList<String>();\n try {\n File file = new File(filepath);\n String encoding = \"UTF8\";\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));\n \n String line = reader.readLine();\n while (line != null) {\n fileLines.add(line);\n line = reader.readLine();\n }\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n // Ignore exception because reader was not initialized\n }\n }\n return fileLines;\n }", "public static ArrayList<String> loadFileStrings(File f) {\n\t\tArrayList<String> fileStrings = new ArrayList<String>();\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null)\n\t\t\t\tfileStrings.add(line);\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn fileStrings;\n\t}", "private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }", "public ArrayList<String> loadLines(String filename) {\n ArrayList<String> lines = new ArrayList<String>();\n String[] rawLines = loadStrings(filename);\n for(String str : rawLines) {\n if(str != null && !str.isEmpty()){\n lines.add(str);\n }\n }\n return lines;\n }", "private List<String> readFile() throws FileNotFoundException {\t\n\t\tList<String> itemsLines = new ArrayList<>();\n\t\tFile inputFile = new File(filePath);\t\n\t\ttry (Scanner newScanner = new Scanner(inputFile)) {\n\t\t\twhile(newScanner.hasNextLine()) {\n\t\t\t\titemsLines.add(newScanner.nextLine());\n\t\t\t}\t\n\t\t}\n\t\treturn itemsLines;\n\t}", "public static ArrayList<String> textToStr(String path) throws IOException {\n ArrayList<String> lines = new ArrayList<>();\n try{\n File file = new File(path);\n FileReader fr = new FileReader(file);\n BufferedReader bufr = new BufferedReader(fr);\n String line = \"\";\n while((line = bufr.readLine()) != null){\n if(line.trim() != null && line.trim().length() > 0){\n lines.add(line.trim());\n }\n }\n return lines;\n }\n catch (Exception e){\n System.out.println(\"The path is wrong or the input file does not exist. Try again.\\n\");\n return null;\n }\n }", "@Override\n\tpublic void ReadTextFile() {\n\t\t// Using Buffered Stream I/O\n\t\ttry (BufferedInputStream in = new BufferedInputStream(new FileInputStream(inFileStr))) {\n\t\t\tbyte[] contents = new byte[bufferSize];\n\t\t\tstartTime = System.nanoTime();\n\t\t\tint bytesCount;\n\t\t\twhile ((bytesCount = in.read(contents)) != -1) {\n\t\t\t\tsnippets.add(new String(contents));\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public static ArrayList<String> readLines(File fileName)\n\t\t\tthrows FileNotFoundException {\n\n\t\tArrayList<String> lvItems = new ArrayList<String>();\n\n\t\t// check if given file exists\n\t\tif (fileName.exists()) {\n\n\t\t\ttry {\n\n\t\t\t\tInputStream instream = new FileInputStream(fileName);\n\n\t\t\t\tif (instream != null) {\n\n\t\t\t\t\t// prepare the file for reading\n\t\t\t\t\tInputStreamReader inputreader = new InputStreamReader(\n\t\t\t\t\t\t\tinstream);\n\t\t\t\t\tbuffreader = new BufferedReader(inputreader);\n\n\t\t\t\t\tString line = null;\n\n\t\t\t\t\twhile ((line = buffreader.readLine()) != null) {\n\t\t\t\t\t\t// buffered reader reads only one line at a time, hence\n\t\t\t\t\t\t// we give a while loop to read all till the text is\n\t\t\t\t\t\t// null\n\n\t\t\t\t\t\tlvItems.add(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (IOException ioex) {\n\t\t\t\tSystem.out.println(\"Exception :: \" + ioex.getMessage());\n\t\t\t\t// Throw this exception to the caller\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new FileNotFoundException(\"File does not Exist\");\n\t\t}\n\t\treturn lvItems;\n\t}", "static List<String> fileToList(){\n List<String> contacts = null;\n try {\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n contacts = Files.readAllLines(contactsListPath);\n } catch (IOException ioe){\n ioe.printStackTrace();\n }\n return contacts;\n }", "String[] readFile(File file) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader = null;\n try {\n if (file.isFile()) {\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n return output;\n }", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "public static ArrayList<String> convert2list(String filename) \n\t\t\tthrows FileNotFoundException{\n\t\tInputStream oeuvre = new FileInputStream(filename);\n\t\tScanner scanner = new Scanner(oeuvre).useDelimiter(\"\\n\");\n\t\t\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\twhile(scanner.hasNext()){\n\t\t\twords.add(scanner.next());\n\t\t}\n\t\treturn words;\n\t}", "public static List<String> readFileAsList(String filePath) {\n\n\t\tBufferedReader readFile = null;\n\t\tString line = null;\n\t\tList<String> fileContents = new ArrayList<String>();\n\t\ttry {\n\t\t\treadFile = new BufferedReader((new FileReader(filePath)));\n\t\t\twhile ((line = readFile.readLine()) != null)\n\t\t\t\tfileContents.add(line);\n\t\t\treadFile.close();\n\t\t\treturn fileContents;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Unable to find file: \" + filePath);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to read file: \" + filePath);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn fileContents;\n\t}", "ArrayList<String> getLines();", "public List<String> readFile() {\n \n try {\n ensureFileExists();\n return Files.readAllLines(filePath);\n } catch (FileNotFoundException ex) {\n return new ArrayList<>();\n } catch (IOException ex) {\n ex.printStackTrace();\n return new ArrayList<>();\n }\n }", "public static ArrayList<String> readFile(String fileName) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tFile myObj = new File(fileName);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tal.add(data);\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tif (e.toString().contains(\"No such file or directory\")) {\n\t\t\t\tal.add(\"no file found\");\n\t\t\t\treturn al;\n\t\t\t}\n\t\t}\n\t\treturn al;\n\t}", "static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}", "protected List<List<String>> readFile() throws FileNotFoundException {\n\n List<List<String>> list = new ArrayList<>();\n\n File dire = new File(dir);\n File file = new File(dire, filename);\n\n try (Scanner in = new Scanner(file)) {\n\n while (in.hasNextLine()) {\n \n String line = in.nextLine();\n \n String temp[] = line.split(delimiter);\n \n list.add(Arrays.asList(temp));\n }\n in.close();\n } catch (IOException e) {\n System.out.println(\"Error reading file!\");\n }\n return list;\n }", "private ArrayList<String> readStringsFromFile(File f, String stringSeparator)\r\n\t\t\tthrows EasyCorrectionException {\r\n\t\tArrayList<String> contentOfFile = new ArrayList<String>();\r\n\t\tbyte[] buffer = new byte[(int) f.length()];\r\n\t\tBufferedInputStream stream = null;\r\n\t\ttry {\r\n\t\t\tstream = new BufferedInputStream(new FileInputStream(f));\r\n\t\t\tstream.read(buffer);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new EasyCorrectionException(\"The file \" + f.getName()\r\n\t\t\t\t\t+ \" could not be read during the Output Comparison!\");\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (stream != null) {\r\n\t\t\t\t\tstream.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tthrow new EasyCorrectionException(\"The file \" + f.getName()\r\n\t\t\t\t\t\t+ \" could not be closed during the Output Comparison!\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (String string : new String(buffer).split(stringSeparator)) {\r\n\t\t\tcontentOfFile.add(string);\r\n\t\t}\r\n\r\n\t\treturn contentOfFile;\r\n\t}", "public ArrayList<String> readFromFile(){\n ArrayList<String> results = new ArrayList<>();\n //Wrap code in a try/ catch to help with exception handling.\n try{\n //Create a object of Scanner class\n Scanner s = new Scanner(new FileReader(path));\n //While loop for iterating thru the file.\n // Reads the data and adds it to the ArrayList.\n while(s.hasNext()) {\n String c1 = s.next();\n String c2 = s.next();\n String w = s.next();\n results.add(c1);\n results.add(c2);\n results.add(w);\n }return results;\n\n }//File not found exception block.\n catch(FileNotFoundException e){\n System.out.println(e);\n }\n return results;//default return.\n }", "@Override\n\tpublic void ReadTextFile() {\n\t\t// Using a programmer-managed byte-array\n\t\ttry (FileInputStream in = new FileInputStream(inFileStr)) {\n\t\t\tstartTime = System.nanoTime();\n\t\t\tbyte[] byteArray = new byte[bufferSize];\n\t\t\tint bytesCount;\n\t\t\twhile ((bytesCount = in.read(byteArray)) != -1) {\n\t\t\t\tsnippets.add(new String(byteArray));\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public ArrayList<String> createStringArray() throws Exception {\n ArrayList<String> stringsFromFile = new ArrayList<>();\n while (reader.hasNext()) {\n stringsFromFile.add(reader.nextLine());\n }\n return stringsFromFile;\n }", "private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }", "private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }", "public static List read(String fileName) throws IOException {\n\tList data = new ArrayList() ;\n Scanner scanner = new Scanner(new FileInputStream(fileName));\n try {\n while (scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n }\n finally{\n scanner.close();\n }\n return data;\n }", "public static List<String> readFile(String fileName){\r\n \r\n List<String> lines = Collections.emptyList();\r\n\r\n try{\r\n lines = Files.readAllLines(Paths.get(fileName));\r\n }\r\n\r\n catch(IOException err){\r\n err.printStackTrace();\r\n }\r\n\r\n return lines;\r\n }", "public static List<String> loadLinesFromFile(String path) {\n\t\tPath Filepath = Paths.get(path);\n\t\ttry {\n\t\t\tList<String> lines = Files.readAllLines(Filepath);\n\t\t\treturn lines;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new ArrayList<String>();\n\t}", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "public ArrayList<ArrayList<Character> > reader(java.io.InputStream in) throws IOException{\n String s = \"\";\n int data = in.read();\n while(data!=-1){\n s += String.valueOf((char)data);\n data = in.read();\n }\t\t\t\t\t\t\t\t// s now has the input file stored as a string\n ArrayList<ArrayList<Character> > arr = new ArrayList<>();\n for(int i = 0;i<s.length();){\n ArrayList<Character> a = new ArrayList<>();\n while(s.charAt(i)!='\\n'){\n if((s.charAt(i)-'a'>=0&&s.charAt(i)-'a'<=25)||(s.charAt(i)-'0'>=0&&s.charAt(i)-'0'<=9)){ //taking only alphanumerics\n a.add(s.charAt(i));\n }\n i++;\n }\n arr.add(a);\n i++;\n }\n return arr;\n }", "private List<String> readFile(String fileName)\n {\n try\n {\n String file = new String(Files.readAllBytes(Paths.get(fileName)), Charset.forName(\"ISO-8859-1\"));\n file = file\n .toLowerCase()\n .replaceAll(\"[^\\\\w]+\", \" \")\n .replaceAll(\"[0-9]\", \"\");\n Tokenizer tokenizer = SimpleTokenizer.INSTANCE;\n String[] tokens = tokenizer.tokenize(file);\n return Arrays.asList(tokens);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public List<String> readFileIntoList(String sourceFilepath) throws IOException {\n List<String> lines = new ArrayList<>();\n URL url = new URL(sourceFilepath);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = null;\n while ((line = reader.readLine()) != null) {\n lines.add(line);\n }\n reader.close();\n return lines;\n }", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }", "public List<String> readFile(File inputFile) {\n\n List<String> AL = new ArrayList<>();\n List<String> retAL;\n wordReplace wr = new wordReplace();\n String text;\n try{\n Scanner file_scan = new Scanner(inputFile);\n while(file_scan.hasNextLine()){\n text= file_scan.nextLine();\n AL.add(text);\n }\n file_scan.close();\n }\n catch(IOException e){\n System.out.println(\"File Not Found for some reason.\");\n }\n retAL = wr.replaceWord((ArrayList<String>) AL);\n return retAL;\n }", "public static ArrayList<String> getLines() throws Exception\n {\n \tArrayList<String> lines = new ArrayList<String>();\n \twhile(reader.ready())\n \t{\n \t\tlines.add(reader.readLine());//reads the line and adds them into the arraylist\n \t}\n \treturn lines;\n }", "public static List<String> readLineFromFile(File file) {\r\n List<String> result = new ArrayList<String>();\r\n LineNumberReader lnr = null;\r\n try {\r\n lnr = new LineNumberReader(new BufferedReader(\r\n new InputStreamReader(new FileInputStream(file), Charset\r\n .defaultCharset().name())));\r\n for (String line = lnr.readLine(); line != null; line = lnr\r\n .readLine()) {\r\n result.add(line);\r\n }\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n } finally {\r\n if (lnr != null) {\r\n try {\r\n lnr.close();\r\n } catch (IOException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n }\r\n return result;\r\n }", "public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }", "private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}", "String[] readFile(String path) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader;\n File file;\n\n try {\n file = new File(path);\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n return output;\n }", "private List<String> readFile(String path) throws IOException {\n return Files.readAllLines (Paths.get (path), StandardCharsets.UTF_8);\n }", "private static void ReadText(String path) {\n\t\t//reads the file, throws an error if there is no file to open\n\t\ttry {\n\t\t\tinput = new Scanner(new File(path));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error opening file...\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tString line; //stores the string of text from the .txt file\n\t\tString parsedWord; //Stores the word of the parsed word\n\t\tint wordLength; //Stores the length of the word\n\t\tint lineNum = 1; //Stores the number of line\n\t\ttry {\n\t\t\t//loops while there is still a new line in the .txt file\n\t\t\twhile ((line = input.nextLine()) != null) {\n\t\t\t\t//separates the lines by words\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t//loops while there are still more words in the line\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tparsedWord = st.nextToken();\n\t\t\t\t\twordLength = parsedWord.length();\n\t\t\t\t\t//Regex gets rid of all punctuation\n\t\t\t\t\tif (parsedWord.matches(\".*\\\\p{Punct}\")) {\n\t\t\t\t\t\tparsedWord = parsedWord.substring(0, wordLength - 1);\n\t\t\t\t\t}\n\t\t\t\t\t//add the word to the list\n\t\t\t\t\twordList.add(parsedWord);\n\t\t\t\t\tlineList.add(lineNum);\n\t\t\t\t}\n\t\t\t\tlineNum++;\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Do nothing\n\t\t}\n\t\tinput.close();\n\t}", "public static List<String> readLines(String path) {\n ArrayList<String> lines = new ArrayList<>();\n\n //open file\n File file = new File(path);\n\n //Error if not readable\n if (!file.canRead()) {\n System.err.println(\"File \" + file.getAbsolutePath() + \" could not be read!\");\n System.exit(1);\n }\n\n //Return lines\n try {\n BufferedReader inputStream;\n inputStream = new BufferedReader(new FileReader(file));\n String line;\n while ((line = inputStream.readLine()) != null) {\n lines.add(line);\n }\n\n inputStream.close();\n } catch (FileNotFoundException ex) {\n System.err.println(file.getAbsolutePath() + \" not found!\");\n System.exit(1);\n } catch (IOException ex) {\n System.err.println(ex);\n System.exit(1);\n }\n\n return lines;\n }", "private String[] readFile(BufferedReader reader) throws IOException {\r\n // Read each line in the file, add it to the ArrayList lines\r\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n reader.close();\r\n // Convert the list to an array of type String and return\r\n String[] ret = new String[1];\r\n return (lines.toArray(ret));\r\n }", "public List<String> readFileContents(String filePath) throws APIException;", "List<String> obtenerlineas(String archivo) throws FileException;", "public static ArrayList<String> leerTXT(String path) {\n\t\t\n\t\tFile archivo = new File(path);\n\t\tFileReader fr;\n\t\tBufferedReader br;\n\t\tArrayList<String> lineas = new ArrayList<String>();\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tfr = new FileReader(archivo);\n\t\t\tbr = new BufferedReader(fr);\n\t\t\t\n\t\t\t\n\t\t\tString linea = \"\";\n\t\t\t\n\t\t\twhile((linea = br.readLine()) != null) {\n\t\t\t\tlineas.add(linea);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Ha sucedido un error leyendo el archivo \" + e);\n\t\t}\n\t\t\n\t\treturn lineas;\n\t}", "public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}", "public void readFile(String filePath) {\n\n\t\tFile file = new File(filePath);\n\t\t\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n \t while(sc.hasNextLine() ) {\t\t \t \n\t\t \t String line = sc.nextLine();\t\t \t \n\t\t \t linesArray.add( line.split(\",\") );\t\n\t\t \t \n\t\t\t}\n\t\t \t\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t\n\t}", "public static List<String> readLines( String resources, String fileName) {\n List<String> resultList = new ArrayList<String>();\n File textFile = new File( resources, fileName );\n BufferedReader br = null;\n \n try{\n //System.out.println(\"debug: textFile.getCanonicalPath() : \" + \n // textFile.getCanonicalPath() );\n \n br = new BufferedReader( \n new InputStreamReader( \n new FileInputStream( textFile )));\n String lineOfText;\n while( (lineOfText = br.readLine()) != null ) {\n resultList.add( lineOfText );\n }\n\n } catch( IOException ioe) {\n System.err.println(\"BufferedReader does not read\");\n } finally { \n try { \n br.close(); \n } catch (IOException ioe) {\n System.err.println(\"BufferedReader did not close \" +\n \"properly.\");\n }\n }\n\n \n return resultList;\n }", "public static List<Server> readFile() {\n String fileName = \"servers.txt\";\n\n List<Server> result = new LinkedList<>();\n try (Scanner sc = new Scanner(createFile(fileName))) {\n\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n result.add(lineProcessing(line));\n\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File is not found\");\n } catch (MyException e) {\n System.out.println(\"File is corrupted\");\n }\n return result;\n }", "public void readFile() {\r\n\t\tBufferedReader br = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString currentLine;\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\r\n\r\n\t\t\twhile ((currentLine = br.readLine()) != null) {\r\n\r\n\t\t\t\tif (!currentLine.equals(\"\")) {\r\n\t\t\t\t\tString[] paragraphs = currentLine.split(\"\\\\n\\\\n\");\r\n\r\n\t\t\t\t\tfor (String paragraphEntry : paragraphs) {\r\n\t\t\t\t\t\t//process(paragraphEntry);\r\n\t\t\t\t\t\t//System.out.println(\"Para:\"+paragraphEntry);\r\n\t\t\t\t\t\tParagraph paragraph = new Paragraph();\r\n\t\t\t\t\t\tparagraph.process(paragraphEntry);\r\n\t\t\t\t\t\tthis.paragraphs.add(paragraph);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)br.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static List<String> processFileLineByLine(MultipartFile file) throws IOException {\n try(BufferedReader fileBufferReader = new BufferedReader(new InputStreamReader(file.getInputStream()))) {\n return fileBufferReader.lines().collect(Collectors.toList());\n }\n }", "public static ArrayList<String> readFromFile(String fileName) throws IOException, FileNotFoundException\n {\n ArrayList<String> linesList = new ArrayList<String>();\n BufferedReader bufferReader = new BufferedReader(new FileReader(fileName));\n \n String currentLine;\n while ((currentLine = bufferReader.readLine()) != null) {\n if (!currentLine.startsWith(\"//\"))\n linesList.add(currentLine);\n }\n bufferReader.close();\n return linesList;\n }", "public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public void readText(String filename) throws IOException{\n\t\t\n\t\tif(sentences == null){\n\t\t\tsentences = new ArrayList<Sentence>();\n\t\t}\n\t\t\n\t\t//read from file\n\t\tFileInputStream inputStream = new FileInputStream(filename);\n\t\tDataInputStream stream = new DataInputStream(inputStream);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n\t\tString line;\n\t\twhile((line = reader.readLine()) != null){\n\t\t\tsentences.add(new Sentence(line));\n\t\t}\n\t\treader.close();\n\t\tstream.close();\n\t\tinputStream.close();\n\t\t\n\t\t\n\t}", "public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public static List<String> makeListFromFile(String filename) {\n\t\tList<String> names = new ArrayList<>();\n\t\ttry {\n\t\t\tFile file = new File(\"/Users/adhiman/Downloads/\" + filename);\n\t\t\tScanner input = new Scanner(file);\n\t\t\t\n\t\t\twhile (input.hasNextLine()) {\n\t\t\t\tString line = input.nextLine();\n\t\t\t\tnames.add(line);\n\t\t\t}\n\t\t\tinput.close();\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn names;\n\t}", "public static ArrayList<Item> readFromFile() {\n\t\t\n\t\tPath writeFile = Paths.get(\"list.txt\");\n\t\tFile file = writeFile.toFile();\n\t\tArrayList<Item> itemList = new ArrayList<Item>();\n\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\t// this is a buffer and the benefit of using this is to is to store a block of\n\t\t\t// memory that\n\t\t\t// we can read data from later -- more efficient than Scanner\n\n\t\t\tBufferedReader reader = new BufferedReader(fr);\n\t\t\t// this is attempting to read the first line from the text document\n\t\t\tString line = \"\";\n\t\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t\tString[] stringArray= line.split(\",\");\n\t\t\t\tItem item = new Item(Integer.parseInt(stringArray[0]), stringArray[1], stringArray[2],stringArray[3],Integer.parseInt(stringArray[4]),Double.parseDouble(stringArray[5]) );\n\t\t\t\titemList.add(item);\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"There were no items!\");\n\t\t}\n\t\treturn itemList;\n\t}", "public static List<String> readAllLines(String filePath) {\n\t\ttry {\n\t\t\treturn (List<String>)FileUtils.readLines(new File(filePath));\n\t\t} catch (IOException e) {\n\t\t\tthrow new FileDoesntExistException(filePath);\n\t\t}\n\t}", "private List<String> getLine() throws FileNotFoundException {\n List<String> lines = new ArrayList<>();\n File f = new File(path);\n Scanner s = new Scanner(f);\n while(s.hasNext()){\n lines.add(s.nextLine());\n }\n return lines;\n }", "public List<String> getStrings(String fileName) throws IOException {\n\n List<String> items = readFile (fileName);\n String text = String.join (\"\", items);\n\n return normalizeCsv (text + \" \");\n }", "public String[] readLines() {\n\t\tVector linesVector = new Vector(); ;\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\twhile (!eof) {\n\t\t\t\tString line = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\tlinesVector.add(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\tString[] lines = new String[linesVector.size()];\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = (String) (linesVector.get(i));\n\t\t}\n\t\treturn lines;\n\t}", "public static String[] readFile() throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(new File(\"H:/My Documents/Eclipse/wordlist.txt\"));\r\n\t\tArrayList<String> a = new ArrayList<String>();\r\n\t\twhile (scan.hasNextLine()) {\r\n\t\t\ta.add(scan.nextLine());\r\n\t\t}\r\n\t\tString[] w = new String[a.size()];\r\n\t\tfor (int i = 0; i < a.size(); i++) {\r\n\t\t\tw[i] = a.get(i);\r\n\t\t}\r\n\t\tscan.close();\r\n\t\treturn w;\r\n\t}", "public static ArrayList<String> file2Strings(String pathTofile){\n\t\t\t\n\t\t\tFile inputFile = new File(pathTofile);\n\t\t\treturn file2Strings(inputFile);\t\n\t\t\t\n\t\t}", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "public static ArrayList<String> convertCSVToStringList(String fileName) throws Exception\n\t{\n\t\tArrayList<String> stringList = new ArrayList<String>();\n\t\tBufferedReader br=new BufferedReader(new FileReader(fileName));\n\t\tfor (String lineOfCSV=\"\"; lineOfCSV!=(null); lineOfCSV=br.readLine())\n\t\t{\n\t\t\tif(lineOfCSV!=\"\")\n\t\t\tstringList.add(lineOfCSV);\n\t\t}\n\t\tbr.close();\n\t\tif (stringList.isEmpty())\n\t\t\t{\n\t\t\tthrow new Exception(\"CSV File was empty\");\n\t\t\t}\n\t\treturn stringList;\n\t}", "ArrayList<WordListItem> addDataFromFile(){\n BufferedReader br;\n InputStream inputStream = context.getResources().openRawResource(R.raw.animal_list);\n br = new BufferedReader(\n new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"))\n );\n String currentLine;\n ArrayList<WordListItem> wordListItems = new ArrayList<WordListItem>();\n try {\n while ((currentLine = br.readLine()) != null) {\n String[] tokens = currentLine.split(\";\");\n\n String word = tokens[0];\n String pronunciation = tokens[1];\n String description = tokens[2];\n\n WordListItem wordItem = new WordListItem(word, pronunciation, description);\n wordItem.setImgResNbr(setImgResFromWord(wordItem.getWord().toLowerCase()));\n wordListItems.add(wordItem);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null) br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n return wordListItems;\n }", "List<String> fileToListOfWords(File f) throws FileNotFoundException {\n\n\t\tScanner sc = new Scanner(f, \"UTF-8\");\n\n\t\tString txt = sc.useDelimiter(\"\\\\A\").next().toLowerCase();\n\t\tString[] s = txt.replaceAll(\"^[.,\\\\s]+\", \"\").split(\"[.,\\\\s]+\");\n\t\tsc.close(); // ovo je dobro\n\t\tList<String> list = Arrays.asList(s);\n\t\t\n\t\treturn list;\n\t}", "public static ArrayList<String> readInputTxtFile(ArrayList<String> inputList, FilePath pathStr) throws IOException {\n\t\tinputList = new ArrayList<String>();\n\t\tFile file = new File(pathStr.getPathStr() + \"input.txt\");\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), \"euc-kr\"));\n\n\t\tString resultStr = null;\n\t\twhile ((resultStr = br.readLine()) != null) {\n\t\t\tinputList.add(resultStr); // 너를 사랑해!\n\t\t\t// System.out.println(resultStr);\n\t\t}\n\t\treturn inputList;\n\t}", "public static ArrayList<String> readWords(String fileName){\n\t\treturn read(fileName, true);\n\t}", "static List<String> readDataFile(String filePath) throws Exception {\n\t\t// System.out.println(filePath);\n\t\tList<String> sortList = new ArrayList<String>();\n\n\t\tFileReader file = new FileReader(new File(filePath));\n\n\t\tBufferedReader bufRead = new BufferedReader(file);\n\n\t\tfor (long line = 0; line < linesPerFile; line++) {\n\n\t\t\tsortList.add((bufRead.readLine().toString()));\n\t\t}\n\n\t\tbufRead.close();\n\t\treturn sortList;\n\t}", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "private ArrayList<String> readReturnFileContents(String fileName){\n String startingDir = System.getProperty(\"user.dir\");\n BufferedReader reader = null;\n String line = \"\";\n ArrayList<String> wholeFile = new ArrayList<String>();\n try {\n reader = new BufferedReader(new FileReader(startingDir + \"/\" + fileName));\n while ((line = reader.readLine()) != null) {\n wholeFile.add(line);\n }\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe.getMessage());\n System.exit(1);\n } catch (NullPointerException npe) {\n System.out.println(npe.getMessage());\n System.exit(1);\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n return wholeFile;\n }", "public String readFile(){\r\n StringBuffer str = new StringBuffer(); //StringBuffer is a mutable string\r\n Charset charset = Charset.forName(\"UTF-8\"); //UTF-8 character encoding\r\n Path file = Paths.get(filename + \".txt\");\r\n try (BufferedReader reader = Files.newBufferedReader(file, charset)) { // Buffer: a memory area that buffered streams read\r\n String line = null;\r\n while ((line = reader.readLine()) != null) { //Readers and writers are on top of streams and converts bytes to characters and back, using a character encoding\r\n str.append(line + \"\\n\");\r\n }\r\n }\r\n catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n return str.toString();\r\n }", "private static List<String> loadGenericDfFile(String file) throws IOException{\n\t\tList<String> lines = new ArrayList<String>();\n\t\t\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tnew FileInputStream(file), \"UTF-8\"));\n\t\ttry {\n\t\t\tString str;\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\tlines.add(str);\n\t\t\t}\n\t\t} finally {\n\t\t\tin.close();\n\t\t}\n\n\t\treturn lines;\n\t}", "public ArrayList<String> read_file() {\n prog = new ArrayList<>();\n //Read file\n try {\n\n File myObj = new File(\"in3.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n if (data.charAt(0) != '.') {\n// System.out.println(data);\n prog.add(data);\n } else {\n continue;\n// data = data.substring(1);\n// System.out.println(\"{{ \" + data + \" }}\");\n }\n\n }\n myReader.close();\n\n } catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n return prog;\n }", "public static String[] getLines(String filename)\n throws IOException {\n\n\n try (\n FileInputStream inStream = new FileInputStream(filename);\n InputStreamReader reader = new InputStreamReader(inStream);\n BufferedReader buffer = new BufferedReader(reader)\n ) {\n List<String> lines = new LinkedList<>();\n for (String line = buffer.readLine();\n line != null;\n line = buffer.readLine()) {\n line = line.trim();\n if (!line.isEmpty()) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[0]);\n }\n }", "List<String> getLines();", "public List<String> getFromFile(String file) throws FileNotFoundException {\n\t\tScanner scan = new Scanner(new File(file));\n\t\tList<String> words = new ArrayList<String>();\n\t\twhile(scan.hasNextLine()){\n\t \tString line = scan.nextLine();\n\t \n\t \twords.add(line);\n\t }\n\t\treturn words;\n\t}", "private static String readTextFile(File file) throws IOException {\n return Files.lines(file.toPath()).collect(Collectors.joining(\"\\n\"));\n }", "private Object[] fetchTextFile(String filePathString){\n try (Stream<String> stream = Files.lines(Paths.get(filePathString))) {\n return stream.toArray();\n }\n catch (IOException ioe){\n System.out.println(\"Could not find file at \" + filePathString);\n return null;\n }\n\n }", "List readFile(String pathToFile);", "public ArrayList<String> readWords(String fileName) {\n BufferedReader r = null;\n\n try {\n r = new BufferedReader(new InputStreamReader(new FileInputStream(fileName)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n words = new ArrayList<String>();\n\n while (true) {\n String word = null;\n try {\n word = r.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (word == null) {\n break;\n }\n assert word.length() == 5;\n words.add(word);\n }\n\n return words;\n }", "public static String[] DataCollection(String a) throws FileNotFoundException {\n\tFile file = new File(a); \n \tScanner sc = new Scanner(file); \n \n // Counter variable to count the number of entries in text file\n\tint counter = 0;\n\n\t\n \n\tString[] data = new String[2976];\n // While loop to take in data from text file \n\twhile(sc.hasNextLine())\n\t{\n\t\n\tsc.useDelimiter(\"\\\\Z\"); \n\t\n\t// Inserting data in each line to array\n\tdata[counter] = sc.nextLine();\n\tcounter = counter + 1;\n\t\n\t}\n\treturn data;\n \t}", "public ArrayList<String[]> read(String s) throws IOException,\n\t\t\tFileNotFoundException {\n\t\tArrayList<String[]> result = new ArrayList<String[]>();\n\t\tFileReader fr = new FileReader(s);\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString[] row = new String[6];\n\t\tString line;\n\t\twhile (true) {\n\t\t\tline = br.readLine();\n\t\t\tif (line == null) {\n\t\t\t\tbr.close();\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\trow = line.split(\",\");\n\t\t\tresult.add(row);\n\t\t}\n\t}", "private ArrayList<String> readEntriesFromFile(String nameOfFile){\n\t\tArrayList<String> foundEntries = new ArrayList<String>();\n\t\t\n\t\ttry{\n\t\t\tFile file = new File(nameOfFile); \n\t\t\tScanner fileIn = new Scanner(file);\n\t\t\twhile (fileIn.hasNext()){\n\t\t\t\tString currentLine = fileIn.nextLine();\n\t\t\t\tfoundEntries.add(currentLine);\n\t\t\t} \n\t\t\tfileIn.close();\n\t\t}catch (IOException e){\n\t\t}\n\t\t\n\t\tif(foundEntries.size()==0){\n\t\t return null;\n\t\t}else{\n\t\t\treturn foundEntries;\n\t\t}\n\t}", "private static ArrayList<String> read(String fileName, boolean next) {\n\t\t\n\n\t\tFile input = new File(fileName);\n\t\tArrayList<String> information = new ArrayList<String>();\n\t\t\n\t\t\n\t\t//uses a simple try catch to read the file\n\t\ttry {\n\t\t\t\n\t\t\tScanner fileReader = new Scanner(input);\n\t\t\t\n\t\t\tif(next) //if reading by word, the ArrayList will contain info by word\n\t\t\t\twhile(fileReader.hasNext()) \n\t\t\t\t\tinformation.add(fileReader.next());\n\t\t\t\t\n\t\t\telse //otherwise the ArrayList will contain info by lines\n\t\t\t\twhile(fileReader.hasNextLine())\n\t\t\t\t\tinformation.add(fileReader.nextLine());\n\t\t\t\n\t\t\tfileReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn information;\n\t}" ]
[ "0.73310566", "0.73187476", "0.7244205", "0.7232129", "0.7192646", "0.7170425", "0.711438", "0.70930713", "0.70892775", "0.70337653", "0.6958482", "0.6953548", "0.69324017", "0.6931086", "0.68773973", "0.68743396", "0.68658036", "0.6850324", "0.68472934", "0.68130696", "0.68111545", "0.6809355", "0.67936665", "0.6788576", "0.6786392", "0.6783989", "0.6759296", "0.67506915", "0.67321783", "0.67321414", "0.6725661", "0.67013216", "0.66973054", "0.6691121", "0.66852367", "0.66742176", "0.66742176", "0.6671875", "0.6667801", "0.6658494", "0.6638269", "0.6622986", "0.6622865", "0.66085505", "0.65695715", "0.65560794", "0.65505546", "0.6519758", "0.6496686", "0.6492092", "0.64629656", "0.6453167", "0.6448545", "0.64431083", "0.64412963", "0.6424871", "0.6421508", "0.64063716", "0.63827986", "0.6381514", "0.63758767", "0.6373801", "0.6354115", "0.63363564", "0.6334298", "0.6320783", "0.6301566", "0.63006747", "0.6297205", "0.6242612", "0.6236307", "0.623312", "0.62127954", "0.62079084", "0.6200974", "0.6195457", "0.6181721", "0.61781836", "0.617452", "0.61685854", "0.6156908", "0.61510414", "0.61476856", "0.6146097", "0.6145476", "0.612301", "0.61168957", "0.6107982", "0.6107758", "0.610258", "0.61010265", "0.60953355", "0.60948265", "0.6091109", "0.6090408", "0.60889477", "0.6084258", "0.60841584", "0.6082217", "0.6066324" ]
0.7158289
6
===================================================================================// / Generic File Manipulation Methods ===================================================================================// Takes a file name and removes everything after the last '.' inclusive
public static String removeFileExtension(String fileName) { int endIndex = fileName.lastIndexOf('.'); if (endIndex != -1) { return fileName.substring(0, endIndex); } else { return fileName; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String stripFileExtension(String fileName) {\n int locationOfDot = fileName.lastIndexOf('.');\n return fileName.substring(0, locationOfDot);\n }", "private String removeFileExtension(String filename) {\n int extensionIndex = filename.indexOf(CODE_FILE_EXTENSION);\n if (extensionIndex != -1) {\n return filename.substring(0, extensionIndex);\n }\n return filename;\n }", "public static String fileNameWithoutExt(String file) {\n\t\tint lastIndexDot = file.lastIndexOf('.');\n\t\treturn file.substring(0, lastIndexDot); \n\t}", "public static String fileNameRemoveExtension(String fileName) {\r\n\tif (fileName == null)\r\n\t return null;\r\n\r\n\tfinal int idx = fileName.indexOf(\".\");\r\n\r\n\tif (idx == -1)\r\n\t return fileName;\r\n\r\n\telse\r\n\t return fileName.substring(0, idx);\r\n }", "String noExt(String name) {\r\n int last=name.lastIndexOf(\".\");\r\n if(last>0)\r\n return name.substring(0, last);\r\n\r\n return name;\r\n }", "private static String getFileNameWithoutExtension(File file) {\n String fileName = \"\";\n \n try {\n if (file != null && file.exists()) {\n String name = file.getName();\n fileName = name.replaceFirst(\"[.][^.]+$\", \"\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fileName = \"\";\n }\n return fileName;\n }", "public static String stripExtension(String name) {\n return name.split(\"\\\\.\")[0];\n }", "public String stripExtension(String s) {\n return s != null && s.lastIndexOf(\".\") > 0 ? s.substring(0, s.lastIndexOf(\".\")) : s;\n }", "public static String removeLastSlash(String fileName) {\n\t\tif (fileName.lastIndexOf('/') == fileName.length() - 1) {\n\t\t\treturn fileName.substring(0, fileName.length() - 1);\n\t\t} else {\n\t\t\treturn fileName;\n\t\t}\n\t}", "private String retrieveFileNameWithOutExt(String targetFile)\r\n\t{\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\ttargetFile = targetFile.substring(0, index - 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn targetFile;\r\n\t}", "public static String removeFileExt(String primary, String secondary) {\r\n String r = null;\r\n if (primary != null && secondary != null) {\r\n Matcher matcher = Pattern.compile(\"^\\\\^+\").matcher(secondary);\r\n if (matcher.find()) {\r\n String carets = matcher.group(0);\r\n String ext = secondary.replace(carets, \"\");\r\n for (int i = 0; i < carets.length(); i++) {\r\n int last = primary.lastIndexOf('.');\r\n if (last != -1) {\r\n primary = primary.substring(0, primary.lastIndexOf('.'));\r\n }\r\n }\r\n r = primary + ext;\r\n }\r\n }\r\n return r;\r\n }", "static String removePathIfNecessaryOrNull(final String filename) {\n String result = null;\n\n for (int i = filename.length() - 1; i >= 0; --i) {\n final char c = filename.charAt(i);\n if ('/' == c || ContentDispositionFileNameSupport.isFileSeperator(c)) {\n result = filename.substring(i + 1);\n break;\n }\n }\n\n return result;\n }", "public String clean(String file_name)\n\t{\n\t\treturn file_name;\n\t}", "public static String getFileNameWithoutExtension(String filePath) {\n if (isFileExist(filePath)) {\n return filePath;\n }\n\n int extenPosi = filePath.lastIndexOf(\".\");\n int filePosi = filePath.lastIndexOf(File.separator);\n if (filePosi == -1) {\n return (extenPosi == -1 ? filePath : filePath.substring(0, extenPosi));\n }\n if (extenPosi == -1) {\n return filePath.substring(filePosi + 1);\n }\n return (filePosi < extenPosi ? filePath.substring(filePosi + 1, extenPosi) : filePath.substring(filePosi + 1));\n }", "static String normaliseFileName(String name) {\n return cleanUpName(name)\n .replaceAll(\"_.*\", \"\") // Removes\n .replaceAll(\"\\\\(.*?\\\\)\", \"\") // Remove parenthesis\n .replaceAll(\"v\\\\d+\\\\s*$\", \"\")\n .trim();\n }", "private String trimLeadingPath(String filename) {\n return filename.substring(Math.max(filename.lastIndexOf('/'), filename.lastIndexOf('\\\\')) + 1);\n }", "public static String cleanFilePath(String path) {\r\n if (path.endsWith(\"/\")) {\r\n path = path.substring(0, path.length() - 1);\r\n }\r\n return path;\r\n }", "private String getExtension(java.io.File file){\n String name = file.getName();\n int idx = name.lastIndexOf(\".\");\n if (idx > -1) return name.substring(idx+1);\n else return \"\";\n }", "private String stripExtension(String str) {\n\t\tif (str == null)\n\t\t\treturn null;\n\t\tint pos = str.lastIndexOf(\".\");\n\t\tif (pos == -1)\n\t\t\treturn str;\n\t\treturn str.substring(0, pos);\n\t}", "private String removeNamePrefix(String sFileName){\n int iDateScoreIndex = 0;\n String sOriginalFileName = \"\";\n\n iDateScoreIndex = sFileName.indexOf(\"_attempt_\");\n sOriginalFileName = sFileName.substring(iDateScoreIndex + 29);\n\n return sOriginalFileName;\n }", "protected String getFilenameMinusExtension(Resource file) {\n String[] tokens = file.getFilename().split(\"\\\\.\");\r\n tokens = Arrays.copyOfRange(tokens, 0, tokens.length - 1);\r\n String filename = tokens[0];\r\n for (int i = 1; i < tokens.length; i++) {\r\n filename += \".\" + tokens[i];\r\n }\r\n return filename;\r\n }", "public static String getExtn(String fileName)\r\n\t{\r\n\t\tString res=\"\";\r\n\t\tfor(int i=fileName.length()-1;i>=0;i--)\r\n\t\t{\r\n\t\t\tif(fileName.charAt(i)!='.')\r\n\t\t\t\tres=fileName.charAt(i)+res;\r\n\t\t\telse \r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }", "public String normalizePathName( final String name );", "private String getWithoutExtension(String withExtension){\n if (withExtension.contains(\".\")){\n int dot = withExtension.lastIndexOf(\".\");\n return withExtension.substring(0, dot);\n } else {\n return withExtension;\n }\n }", "@Test public void getNameWithoutExt() {\n\t\tassertEquals(\"My File\",\n\t\t\tJseFileUtils.getNameWithoutExt(new File(\"some/path/with - space/My File.txt\")));\n\t}", "private String removeExtension(String string) {\n\t\tString pathWithoutExtension = string;\n\t\tint dotIndex = string.lastIndexOf('.');\n\t\tif (dotIndex > 0) {\n\t\t\tpathWithoutExtension = string.substring(0, dotIndex);\n\t\t}\n\t\treturn pathWithoutExtension;\n\t}", "static public String stripExtension(String str) {\n\r\n\t\tif (str == null)\r\n\t\t\treturn null;\r\n\r\n\t\t// Get position of last '.'.\r\n\r\n\t\tint pos = str.lastIndexOf(\".\");\r\n\r\n\t\t// If there wasn't any '.' just return the string as is.\r\n\r\n\t\tif (pos == -1)\r\n\t\t\treturn str;\r\n\r\n\t\t// Otherwise return the string, up to the dot.\r\n\r\n\t\treturn str.substring(0, pos);\r\n\t}", "private static String getFileRoot(String file) {\r\n \treturn file.substring(0, file.indexOf('.'));\r\n }", "final public static File changeFileExtension(File file, String extension) {\n\n if ((file == null) || (extension == null) || extension.trim().equals(\"\")) {\n return null;\n }\n\n String path = file.getAbsolutePath();\n String newPath = \"\";\n String filename = file.getName().trim();\n\n if ((filename != null) && !filename.equals(\"\")) {\n\n int periodIndex = path.lastIndexOf(\".\");\n\n newPath = path.substring(0, periodIndex);\n newPath += extension;\n }\n\n return new File(newPath);\n }", "public String getFileExtension(File file) {\n String name = file.getName();\n try {\n return name.substring(name.lastIndexOf(\".\") + 1);\n } catch (Exception e) {\n return \"\";\n }\n }", "public String getFilenameWithoutExtension(@NonNull String pathname) {\n File srcFile = new File(pathname);\n String srcFilename = srcFile.getName();\n int lastPeriodPos = srcFilename.lastIndexOf('.');\n return lastPeriodPos > 0 ? srcFilename.substring(0, lastPeriodPos) : srcFilename;\n }", "private String retrieveFileExtension(String targetFile)\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\tresult = targetFile.substring(index, targetFile.length());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (result.equals(targetFile))\r\n\t\t\treturn \"\";\r\n\t\treturn result;\r\n\t}", "public String getFileNoPath() {\n if (fileType == HTTP) {\n return fileName.substring(fileName.lastIndexOf(\"/\") + 1);\n } else {\n return fileName.substring(fileName.lastIndexOf(File.separator) + 1);\n }\n }", "public String filename(File f) {\r\n int dot = f.toString().lastIndexOf(\".\");\r\n int sep = f.toString().lastIndexOf(\"\\\\\");\r\n return f.toString().substring(sep + 1, dot);\r\n }", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\n }", "private String getFileExtension(String fileName) {\n return fileName.substring(fileName.lastIndexOf('.') + 1);\n }", "public static String getBaseFileName(String file_path)\n {\n String file_name = getFileName(file_path);\n int index = file_name.lastIndexOf(46);\n\n if (index >= 0)\n return file_name.substring(0, index);\n else\n return file_name.substring(0);\n }", "public static void removeNonAlpha(String inPath, String outPath) throws IOException\r\n\t{\r\n\t\t// Get data from input file\r\n\t\tbyte[] data = Files.readAllBytes(Paths.get(inPath));\r\n\t\t\r\n\t\tArrayList<Character> newData = new ArrayList<Character>();\r\n\t\t\r\n\t\t// Only take alphabetical characters and spaces\r\n\t\tbyte b;\r\n\t\tfor (int i = 0; i < data.length; i++) {\r\n\t\t\tb = data[i];\r\n\t\t\t\r\n\t\t\tif (b == '\\r') {\r\n\t\t\t\tnewData.add('.');\r\n\t\t\t\tnewData.add('\\r');\r\n\t\t\t\tnewData.add('\\n');\r\n\t\t\t\ti++;\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (b == '\\n') {\r\n\t\t\t\tnewData.add('.');\r\n\t\t\t\tnewData.add('\\n');\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (isAlpha(b) || b == ' ') {\r\n\t\t\t\tnewData.add((char) b);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// One last dot! Otherwise it skips over the last part of the song\r\n\t\tnewData.add('.');\r\n\t\t\r\n\t\t// Can't use ArrayList.toArray() because FileWriter.write()\r\n\t\t// wants a char (primitive) array\r\n\t\tchar[] chars = new char[newData.size()];\r\n\t\tfor (int i = 0; i < newData.size(); i++) {\r\n\t\t\tchars[i] = newData.get(i);\r\n\t\t}\r\n\t\t\r\n\t\t// Write to output file\r\n\t\tFileWriter fw = new FileWriter(outPath);\r\n\t\tfw.write(chars, 0, newData.size());\r\n\t\tfw.close();\r\n\t}", "public static String getFileExtension(File file) {\r\n String fileName = file.getName();\r\n if(fileName.lastIndexOf(\".\") != -1 && fileName.lastIndexOf(\".\") != 0)\r\n return fileName.substring(fileName.lastIndexOf(\".\")+1).toLowerCase();\r\n else return \"\";\r\n }", "private String getExtension(File aFile) {\n String ext = null;\n String s = aFile.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }", "public static String getFilenameSuffix(String filename) {\n String suffix = \"\";\n \n if(!StringUtil.isNullOrBlank(filename)) {\n if(filename.indexOf(File.pathSeparatorChar) > -1) {\n throw new IllegalArgumentException(\"Invalid filename.\");\n }\n List<String> segement = StringUtil.asList(filename, '.');\n int size = segement.size();\n if(size > 1) {\n suffix = segement.get(size - 1);\n }\n }\n \n return suffix;\n }", "public static String removePeriod(String s)\r\n/* 119: */ {\r\n/* 120:115 */ s = s.trim();\r\n/* 121:116 */ char last = s.charAt(s.length() - 1);\r\n/* 122:117 */ if (\".?!\".indexOf(last) >= 0) {\r\n/* 123:118 */ return s.substring(0, s.length() - 1).trim();\r\n/* 124: */ }\r\n/* 125:120 */ return s;\r\n/* 126: */ }", "public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}", "private String nakedFileName() {\n return f.getName().split(\"\\\\.\")[0];\n }", "private static String typeName(File file) {\r\n String name = file.getName();\r\n int split = name.lastIndexOf('.');\r\n\r\n return (split == -1) ? name : name.substring(0, split);\r\n }", "public static String getFileExtention(String file_path)\n {\n String file_name = getFileName(file_path);\n int index = file_name.lastIndexOf(46);\n\n if (index >= 0)\n return file_name.substring(index + 1);\n\n return \"\";\n }", "public static String filenamePart(String path) {\n char sep = System.getProperty(\"file.separator\", \"/\").charAt(0);\n int i = path.lastIndexOf(sep);\n return (i < 0)? path : path.substring(i+1);\n }", "private static String reduce(final String name) {\n\t\tint index = name.lastIndexOf('.');\n\t\treturn index == -1 ? null : name.substring(0, index);\n\t}", "public String getFileExt(File fileName) {\n return fileName.getName()\n .substring(fileName.getName().lastIndexOf('.'));\n }", "public static String getFileExtension(String fileName) {\n return fileName.trim().substring(fileName.indexOf('.'));\n }", "private File appendFileExtension(File file) {\r\n \t\tString filename = file.getName();\r\n \t\tif (isMissingExtension(filename)) {\r\n \t\t\tcurFile = new File(curFile.getAbsolutePath() + EXTENSION);\r\n \t\t}\r\n \r\n \t\treturn curFile;\r\n \t}", "private String getFileName(String url) {\n // get the begin and end index of name which will be between the\n //last \"/\" and \".\"\n int beginIndex = url.lastIndexOf(\"/\")+1;\n int endIndex = url.lastIndexOf(\".\");\n return url.substring(beginIndex, endIndex);\n \n }", "private final String stripDot(XMLElement e) {\n\t\tif ( e.getName().indexOf(\".\") == -1 ) {\n\t\t\treturn e.getName();\n\t\t}\n\t\tString value = e.getName().substring(e.getName().indexOf(\".\") + 1);\n\t\treturn value;\n\t}", "public static String shortFilename(String filename) {\n\t\tint pos=filename.lastIndexOf(java.io.File.separatorChar);\n\t\tif (pos!=-1) return filename.substring(pos+1);\n\t\telse return filename;\n\t}", "public static String getFileExtension(File f) {\r\n\tfinal int idx = f.getName().indexOf(\".\");\r\n\tif (idx == -1)\r\n\t return \"\";\r\n\telse\r\n\t return f.getName().substring(idx + 1);\r\n }", "private String cleanName(String name) {\n int pt = name.indexOf('<');\n if (pt >= 0) name = name.substring(0,pt);\n name = name.replace(\"-\", \"\");\n if (name.startsWith(\".\")) name = name.substring(1);\n if (name.endsWith(\".\")) name = name.substring(0,name.length()-1);\n return name;\n }", "public static String getFileExtension(String filename) {\n\t\tif(filename.indexOf(\".\") == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn \".\"+filename.substring(filename.lastIndexOf(\".\")+1);\n\t}", "public static String getRawFileName(String fileName) {\n return stripExtension(fileName).toUpperCase();\n }", "private String cutPrefixFromFilePath(String path) {\n return path.replace(mainFolder, \"\");\n }", "private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "String getFileName(String filePath) {\n\t\tint lastSlash = savedFilePath.lastIndexOf(\"\\\\\");\n\t\tint dotPos = savedFilePath.lastIndexOf(\".\");\n\t\tString fileName = savedFilePath.substring(lastSlash+1,dotPos);\n\t\treturn fileName;\n\t}", "public static String filename(String fullPath) {\n int dot = fullPath.lastIndexOf(\".\");\n int sep = fullPath.lastIndexOf(\"/\");\n return fullPath.substring(sep + 1, dot);\n }", "public static String getFileExtension(String filePath) {\n if (filePath == null || filePath.isEmpty()) {\n return \"\";\n }\n\n int extenPosi = filePath.lastIndexOf(\".\");\n int filePosi = filePath.lastIndexOf(File.separator);\n if (extenPosi == -1) {\n return \"\";\n }\n return (filePosi >= extenPosi) ? \"\" : filePath.substring(extenPosi + 1);\n }", "private static String cleanModuleName(String mn) {\n // replace non-alphanumeric\n mn = Patterns.NON_ALPHANUM.matcher(mn).replaceAll(\".\");\n\n // collapse repeating dots\n mn = Patterns.REPEATING_DOTS.matcher(mn).replaceAll(\".\");\n\n // drop leading dots\n if (!mn.isEmpty() && mn.charAt(0) == '.')\n mn = Patterns.LEADING_DOTS.matcher(mn).replaceAll(\"\");\n\n // drop trailing dots\n int len = mn.length();\n if (len > 0 && mn.charAt(len-1) == '.')\n mn = Patterns.TRAILING_DOTS.matcher(mn).replaceAll(\"\");\n\n return mn;\n }", "private String getFilename(String path) {\r\n\t\tint slashHere = path.lastIndexOf('/');\r\n\t\tif (slashHere == -1) {\r\n\t\t\treturn path;\r\n\t\t} else {\r\n\t\t\treturn path.substring(slashHere + 1);\r\n\t\t}\r\n\t}", "@Test\r\n public void testStripCommonTags() {\r\n String fileName = \"Modern.Family.S05E17.720p.DD5.1.AAC2.0.H.264.mkv\";\r\n String expResult = \"Modern.Family.S05E17.....mkv\";\r\n assertEquals(expResult, TVMatcher.stripCommonTags(fileName));\r\n fileName = \"the.walking.dead.s03e01.1080p.bluray.x264.mkv\";\r\n expResult = \"the.walking.dead.s03e01..bluray..mkv\";\r\n assertEquals(expResult, TVMatcher.stripCommonTags(fileName));\r\n fileName = \"house.of.cards.(2013).s01e01.bluray.dts.x264.mkv\";\r\n expResult = \"house.of.cards.(2013).s01e01.bluray.dts..mkv\";\r\n assertEquals(expResult, TVMatcher.stripCommonTags(fileName));\r\n }", "public static String GetFileBaseName(String filePath) {\n\t\tint index = filePath.lastIndexOf('.');\n\n\t\tif (index > 0) {\n\t\t\treturn filePath.substring(0, index);\n\t\t}\n\n\t\treturn \"\";\n\n\t}", "public String getFileName(File f) {\n String[] list = f.toString().split(Pattern.quote(\"\\\\\"));\n return \"...\\\\\" + list[list.length - 1];\n }", "public static String getFileExtension(File f) {\n\t\tString fileName = f.getName();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}", "private String getFileName(String path)\n\t{\n\t\tFile file = new File(path);\n\t\tString name = file.getName();\n\t\treturn name.replace(\".\", \"_\");\n\t}", "public final GetHTTP removeFilename() {\n properties.remove(FILENAME_PROPERTY);\n return this;\n }", "private String removeFeat(String songName) {\n if(songName.contains(\"feat.\")){\n int index = songName.indexOf(\"feat.\");\n songName = songName.substring(0,index -1);\n }\n return songName;\n }", "private String removeFirstChar(String name) {\n\t\treturn name.substring(1, name.length());\n\t}", "public String createUniqueSuffix(String filename) {\n \t\tint fileTypeIdx = filename.lastIndexOf('.');\n \t\tString fileType = filename.substring(fileTypeIdx); // Let the fileType include the leading '.'\n \n \t\tfilename = filename.substring(0, fileTypeIdx); // Strip off the leading '/' from the filename\n \n \tSimpleDateFormat timestampFormatter = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n \t\tString timstampStr = '_' + timestampFormatter.format(new Date());\n \n \t\treturn filename + timstampStr + fileType;\n \t}", "private String getSaveName(String filepath) {\r\n String newname = \"\";\r\n for (char c : filepath.toCharArray()) {\r\n if (c == '/' || c == '\\\\' || c == ':') newname+=\"_\";\r\n else newname+=c;\r\n }\r\n newname+=EXTENSION;\r\n return newname;\r\n }", "public void removeOriginalFilename(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), ORIGINALFILENAME, value);\r\n\t}", "protected String cleanReadName(String readName) {\n if (readName.endsWith(\"/1\") || readName.endsWith(\"/2\")) {\n readName = readName.substring(0, readName.length()-2);\n }\n return readName;\n }", "public static File getPathWithoutFilename(File file) {\n if (file != null) {\n if (file.isDirectory()) {\n // no file to be split off. Return everything\n return file;\n } else {\n String filename = file.getName();\n String filepath = file.getAbsolutePath();\n\n // Construct path without file name.\n String pathwithoutname = filepath.substring(0,\n filepath.length() - filename.length());\n if (pathwithoutname.endsWith(\"/\")) {\n pathwithoutname = pathwithoutname.substring(0, pathwithoutname.length() - 1);\n }\n return new File(pathwithoutname);\n }\n }\n return null;\n }", "public abstract String filterFileName(final String fileName);", "public static String getFileExtension(String filename) {\n\t\t\n\t\tint periodIndex = filename.lastIndexOf(\".\");\n\t\t\n\t\tif(periodIndex == -1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(periodIndex == filename.length() - 1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn filename.substring(periodIndex + 1, filename.length());\n\t}", "public static String everythingAfterDot(String str) {\n int index = str.indexOf('.');\n\n if (index > -1) {\n return str.substring(index + 1).trim();\n } else {\n return str;\n }\n }", "public static void main(String[] args){\n\n String fileName = \"abc.jpeg\";\n String[] parts = fileName.split(\"\\\\.\");\n\n System.out.println(parts[1]);\n\n\n\n }", "private static String convertToQualifiedName(final String fileName) {\n final String replacedSeparators = fileName.replace(File.separatorChar, '.');\n return replacedSeparators.substring(0, replacedSeparators.length() - \".class\".length());\n }", "private String trimClassPaths (String s) {\n int idx = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == '.') {\n idx = i;\n break;\n }\n }\n String trimmed = s.substring(idx + 1);\n return trimmed;\n }", "private String filePathToClassname(File file) {\n return file.getPath().replace(\".class\", \"\")\n .replace(\"/\", \".\")\n .replace(\"\\\\\", \".\");\n }", "static public String sanitizeName(String origName) {\n char c[] = origName.toCharArray();\n StringBuffer buffer = new StringBuffer();\n\n // can't lead with a digit, so start with an underscore\n if ((c[0] >= '0') && (c[0] <= '9')) {\n buffer.append('_');\n }\n for (int i = 0; i < c.length; i++) {\n if (((c[i] >= '0') && (c[i] <= '9')) ||\n ((c[i] >= 'a') && (c[i] <= 'z')) ||\n ((c[i] >= 'A') && (c[i] <= 'Z')) ||\n ((i > 0) && (c[i] == '-')) ||\n ((i > 0) && (c[i] == '.'))) {\n buffer.append(c[i]);\n } else {\n buffer.append('_');\n }\n }\n // let's not be ridiculous about the length of filenames.\n // in fact, Mac OS 9 can handle 255 chars, though it can't really\n // deal with filenames longer than 31 chars in the Finder.\n // but limiting to that for sketches would mean setting the\n // upper-bound on the character limit here to 25 characters\n // (to handle the base name + \".class\")\n if (buffer.length() > 63) {\n buffer.setLength(63);\n }\n return buffer.toString();\n }", "private static String getFileExtension(String fileName) {\r\n\t\tString ext = IConstants.emptyString;\r\n\t\tint mid = fileName.lastIndexOf(\".\");\r\n\t\text = fileName.substring(mid + 1, fileName.length());\r\n\t\tSystem.out.println(\"File Extension --\" + ext);\r\n\t\treturn ext;\r\n\t}", "public static String filename(String fullPath) {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "String getFileExtensionByFileString(String name);", "public static String getBareName(String name) {\n\t\tif (name.indexOf(AURA_TOKEN) != -1)\n\t\t\treturn secondName(name);\n\t\tint s0 = name.lastIndexOf(FILE_SEP);\n\t\tString s = (s0 == -1) ? name : name.substring(s0 + 1);// get partial name after slash\n\t\tif (s.indexOf(META_TOKEN) != -1) {\n\t\t\tString bareName = s.replace(META_TOKEN, \"\");\n\t\t\tif (bareName == null || bareName == \"\") return \"\";\n\t\t\tint s1 = bareName.lastIndexOf('.');\n\t\t\treturn s1 == -1 ? bareName : bareName.substring(0, s1);\n\t\t} else {\n\t\t\tint s1 = s.lastIndexOf('.');\n\t\t\treturn s1 == -1 ? s : s.substring(0, s1);\n\t\t}\n\t}", "public static String getFileExtension(File aFile) {\n\t\tString returnMe = aFile.getName().substring(\n\t\t\t\taFile.getName().lastIndexOf('.') + 1);\n\t\treturn returnMe;\n\t}", "public static String GetFileExtension(String filePath) {\n\n\t\tint index = filePath.lastIndexOf('.');\n\t\tif (index > 0) {\n\t\t\treturn filePath.substring(index + 1);\n\t\t}\n\n\t\treturn \"\";\n\t}", "public static String getName(String name) {\n\t\tint s = name.lastIndexOf(FILE_SEP);\n\t\treturn s == -1 ? name : name.substring(s + 1);\n\t}", "private static String getExtensionOrFileName(String filename, boolean extension) {\n\n\t\tString fileWithExt = new File(filename).getName();\n\t\tStringTokenizer s = new StringTokenizer(fileWithExt, \".\");\n\t\tif (extension) {\n\t\t\ts.nextToken();\n\t\t\treturn s.nextToken();\n\t\t} else\n\t\t\treturn s.nextToken();\n\t}", "public static String getFileName() {\n File base = new File(\"C:/Users/Steve/IdeaProjects/MiniJavaCompiler/samples/clean/\");\n File file = new File(inputFile);\n String relativePath = base.toURI().relativize(file.toURI()).getPath();\n return relativePath;\n }", "public String extractName(String line) {\n\t\t// Linux case\n\t\tif (line.contains(\"/\")) {\n\t\t\treturn line.substring(line.lastIndexOf(\"/\") + 1, line.indexOf(\".\"));\n\t\t}\n\t\t// Root dir case\n\t\treturn line.substring(1, line.indexOf(\".\")).trim();\n\t}", "public static String changeSuffix(File file, String suffix) {\n\t\tString fileName = getPrefix(file);\n\t\tString rtn = fileName + \".\" + suffix;\n\t\treturn rtn;\n\t}", "public static String truncateFileName(String agent, String s) {\r\n\t\tif (agent == null) {\r\n\t\t\treturn s;\r\n\t\t} else {\r\n\t\t\tif (agent.contains(\"MSIE\")) {\r\n\t\t\t\tif (s.contains(\"\\\\\")) {\r\n\t\t\t\t\tint pos = s.lastIndexOf(\"\\\\\");\r\n\t\t\t\t\treturn s.substring(pos + 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn s;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.76328874", "0.7359448", "0.72052634", "0.712982", "0.7092497", "0.68912673", "0.6875031", "0.68191665", "0.6770963", "0.6662376", "0.6626138", "0.6561874", "0.6549832", "0.6521244", "0.65034604", "0.64740616", "0.64344287", "0.6429838", "0.6386876", "0.63130605", "0.6302047", "0.62847245", "0.6265953", "0.62566024", "0.6252489", "0.6249583", "0.62479246", "0.62408364", "0.61353374", "0.60832787", "0.6044725", "0.60202646", "0.59864736", "0.59592223", "0.5953423", "0.5933477", "0.590318", "0.59001416", "0.5895055", "0.58774894", "0.5834917", "0.58205414", "0.58021563", "0.57962036", "0.57943654", "0.5765241", "0.57091063", "0.5693183", "0.56874365", "0.5677688", "0.5675633", "0.5673934", "0.5654935", "0.56514645", "0.5643651", "0.5643553", "0.5627858", "0.5606308", "0.5602831", "0.55912316", "0.5580995", "0.554974", "0.5543632", "0.553597", "0.5529682", "0.55231297", "0.5521252", "0.5514664", "0.5504006", "0.55006063", "0.5490973", "0.5489069", "0.5488829", "0.54845184", "0.5480663", "0.5478852", "0.54748225", "0.5465164", "0.5458941", "0.5456816", "0.54455495", "0.54444134", "0.5443993", "0.5441241", "0.54297644", "0.54243344", "0.540847", "0.5396117", "0.5389807", "0.5388529", "0.5381448", "0.53772616", "0.53569245", "0.5354033", "0.5339466", "0.53386635", "0.53290766", "0.53269947", "0.53213125", "0.53103006" ]
0.7513135
1
Creates a directory in the current path called dirName.
public static boolean makeDir(String dirName) { File dir = new File(dirName); if (!(dir.exists())) { return dir.mkdir(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void createDirectory(String srcDir, String nameDir) {\n try {\n Path path = Paths.get(srcDir + \"/\" + nameDir);\n\n Files.createDirectories(path);\n System.out.println(\"Directory is created\");\n } catch (IOException e) {\n System.err.println(\"ERROR CREATION! \" + e.getMessage());\n }\n\n }", "public static boolean create(String dirName)\r\n {\r\n Path p = Paths.get(dirName);\r\n if (Files.notExists(p))\r\n {\r\n try\r\n {\r\n Files.createDirectory(p);\r\n } catch (Exception ex)\r\n {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "private void createDirectoryIfNeeded(String directoryName)\n\t{\n\t\tFile theDir = new File(directoryName);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!theDir.exists())\n\t\t{\n\t\t\t//System.out.println(\"creating directory: \" + directoryName);\n\t\t\ttheDir.mkdir();\n\t\t}\n\t}", "private static void doCreateDir() {\n String newDir = \"new_dir\";\n boolean success = (new File(newDir)).mkdir();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n // Create a directory; all non-existent ancestor directories are\n // automatically created.\n newDir = \"c:/export/home/jeffreyh/new_dir1/new_dir2/new_dir3\";\n success = (new File(newDir)).mkdirs();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n }", "private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile path = FileHandler.getFile( dirName );\n \tif ( !path.exists() )\n \t{\n \t log.info( String.format( \"Creating directory: %s\", dirName ) );\n \t // create path:\n \t if ( !path.mkdir() )\n \t {\n \t\tString errMsg = String.format( \"Could not create necessary directory: %s\", dirName );\n \t\tlog.error( errMsg );\n \t\tthrow new HarvesterIOException( errMsg );\n \t }\n \t}\n \t\n \treturn path;\n }", "public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}", "public static boolean makeDirs(String dirName) {\n return new File(dirName).mkdirs();\n }", "public int createDir(String dirName, String path) throws IOException {\n\t\tmasterSock.write((CREATE_DIR + \" \" + dirName + \" \" + path).getBytes());\n\t\tmasterSock.write(\"\\r\\n\".getBytes());\n\t\tmasterSock.flush();\n\t\t\n\t\tString line = null;\n\t\t\n\t\tline = masterSock.readLine();\n\t\t\n\t\tswitch(line) {\n\t\tcase STR_OK:\n\t\t\treturn OK;\n\t\tcase STR_EXISTED:\n\t\t\treturn EXISTED;\n\t\tcase STR_NOT_FOUND:\n\t\t\treturn NOT_FOUND;\n\t\tcase STR_CLIENT_ERROR:\n\t\t\treturn CLIENT_ERROR;\n\t\tdefault:\n\t\t\treturn SERVER_ERROR;\n\t\t}\n\t}", "Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }", "protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor)\n throws IOException {\n createDirectory(env.getMasterServices().getMasterFileSystem(), nsDescriptor);\n }", "public void createDir(File file) {\n if (!file.exists()) {\n file.mkdir();\n }\n }", "public static void createDir(String path) {\n File dir = new File(new File(path).getParentFile().getAbsolutePath());\n dir.mkdirs();\n }", "protected void createDirectory(Path path, Path destPath) {\n String rootLocation = destPath.toString();\n int index;\n if(firstTime) {\n firstTime = false;\n index = path.toFile().getPath().lastIndexOf(\"\\\\\")+1;//index where cur directory name starts\n rootFolder = path.toFile().getPath().substring(index);\n }\n else {\n index = path.toFile().getPath().indexOf(rootFolder);\n }\n\n String folderName= path.toFile().getPath().substring(index);\n Path newDirPath = Paths.get(rootLocation + DOUBLE_BKW_SLASH +folderName);\n try {\n Path newDir = Files.createDirectory(newDirPath);\n } catch(FileAlreadyExistsException e){\n // the directory already exists.\n e.printStackTrace();\n } catch (IOException e) {\n //something else went wrong\n e.printStackTrace();\n }\n }", "public static void createDirectory(String inputDirectory) {\n File file = new File(inputDirectory);\n if (file.exists()) {\n System.out.println(\"The directory is already present\");\n } else {\n //use mkdir() and check its return value\n file.mkdir();\n System.out.println(\"The directory \" + inputDirectory + \" has been created.\");\n }\n }", "private void createDirectory(String path) throws IOException {\n\t\tfinal Path p = Paths.get(path);\n\t\tif (!fileExists(p)) {\n\t\t\tFiles.createDirectory(p);\n\t\t}\n\t}", "public void createDir(File file){\n\t\tif (!file.exists()) {\n\t\t\tif (file.mkdir()) {\n\t\t\t\tlogger.debug(\"Directory is created!\");\n\t\t\t} else {\n\t\t\t\tlogger.debug(\"Failed to create directory!\");\n\t\t\t}\n\t\t}\n\t}", "public boolean createDirectoryInJarFolder(String folderName){\r\n \r\n path = getPathToJarFolder();\r\n \r\n // add folder to path and make directory\r\n path += folderName;\r\n File file = new File(path);\r\n return file.mkdir();\r\n }", "public void setAndCreateDirPath(String dirname) {\r\n\t File newPath = new File(dirname); \r\n\t \r\n\t if(!newPath.isDirectory()) {\r\n\t\t newPath.mkdirs();\r\n\t }\r\n\t \r\n\t directory = newPath;\r\n }", "private static void createDirectory(Path path) throws IOException {\n\t\ttry {\n\t\t\tFiles.createDirectory(path);\n\t\t} catch (FileAlreadyExistsException e) {\n\t\t\tif (!Files.isDirectory(path)) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t}", "public static boolean createRootdir(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"mkdir \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "private static void createTempFolder(String folderName) throws IOException {\n Path tempFolderPath = Paths.get(folderName);\n if (Files.notExists(tempFolderPath) || !Files.isDirectory(tempFolderPath)) {\n Files.createDirectory(tempFolderPath);\n }\n }", "public boolean createDir(String userName) {\n\t\tString path = userName;\n\n\t\tboolean success = true;\n\t\ttry{\n\t\t\tsuccess = (new File(path)).mkdirs();\n\t\t\tSystem.out.println(success);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn success;\n\n\t}", "public void mkdirP(String dirPath) {\n\n\t\t// check if you need to go anywhere further\n\t\tif (dirPath.lastIndexOf(\"/\") == 0) {\n\t\t\treturn;// done\n\t\t} else {\n\t\t\t// parse directories...\n\t\t\tArrayList<String> direcs = new ArrayList<>();\n\t\t\tString temp = dirPath;\n\t\t\tboolean cont = true;\n\t\t\ttemp = temp.substring(1);\n\t\t\twhile (temp.length() > 1 && cont) {\n\n\t\t\t\t// add the substring to the list of directories that need to be\n\t\t\t\t// checked and/or created\n\t\t\t\tdirecs.add(temp.substring(0, temp.indexOf(\"/\")));\n\t\t\t\t// if there are more \"/\"s left, repeat\n\t\t\t\tif (temp.contains(\"/\")) {\n\t\t\t\t\ttemp = temp.substring(temp.indexOf(\"/\") + 1);\n\t\t\t\t}\n\t\t\t\t// else break out of the loop\n\t\t\t\telse {\n\t\t\t\t\tcont = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// do one last check to see if there are any extra characters left\n\t\t\tif (temp.length() > 0) {\n\t\t\t\t// there is still something left\n\t\t\t\tdirecs.add(temp);\n\t\t\t}\n\n\t\t\t// go through each directory, checking if it exists. if not, create\n\t\t\t// the directory and repeat.\n\t\t\tDirectoryObjects current = directory;\n\n\t\t\tfor (String p : direcs) {\n\n\t\t\t\tif (current.getDirectoryByName(p) != null) {\n\t\t\t\t\tcurrent = current.getDirectoryByName(p);\n\t\t\t\t} else {\n\t\t\t\t\tcurrent.getSubdirectories().add(new DirectoryObjects(p));\n\t\t\t\t\tcurrent = current.getDirectoryByName(p);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public void mkdir(String name) throws FileExistsException\n\t{\n\t\tcheckMakeFile(name);\n\t\tFileElement add = new FileElement(name, true);\n\t\tfileSystem.addChild(currentFileElement, add);\n\t}", "public Directory(String dirName) {\n setDirName(dirName);\n }", "private void makeFolder(File folderNameFile) {\n\t\tfolderNameFile.mkdir();\n\t}", "private void makeDir(String targetDir){\n\t\tchar letter = 'A';\n\t\tnew File(targetDir + \"\\\\Sorted Music\").mkdir();\n\t\t\n\t\tfor (int i = 0; i < 26; i++){\n\t\t\tnew File(targetDir + \"\\\\Sorted Music\\\\\" + letter).mkdir();\n\t\t\tletter++;\n\t\t}\n\t}", "@Override\n protected NodeInfo createDirectoryEntry(NodeInfo parentEntry, Path dir) throws IOException {\n return drive.createFolder(parentEntry.getId(), toFilenameString(dir));\n }", "@Override\n public void createDirectory(File storageName) throws IOException {\n }", "public String createWebsite(String websiteName){\n directory = path + websiteName;\n File newFolder = new File(directory);\n\n newFolder.mkdirs();\n return directory;\n }", "@TaskAction\n public void create() {\n dir.mkdirs();\n getChmod().chmod(dir, dirMode);\n }", "public void run(State state) throws IllegalNumberOfArgumentsException,\r\n InvalidPathException {\r\n String[] parameters = state.getParameters();\r\n if (parameters.length == 0) {\r\n throw new IllegalNumberOfArgumentsException(\r\n \"Mkdir requires a path to a directory to create.\");\r\n }\r\n // make a new directory for each path parameter\r\n for (String path : parameters) {\r\n path = State.cleanDirectoryPath(path);\r\n // get the name of the new directory and the path to its parent\r\n String[] separatedPath = state.separatePathName(path);\r\n String name = separatedPath[0];\r\n String parentPath = separatedPath[1];\r\n if (name.matches(\"/*\")) {\r\n throw new InvalidPathException(path);\r\n }\r\n try {\r\n // check that the name and parent's path are valid\r\n if (name.matches(State.ILLEGAL_CHARACTERS) || name\r\n .substring(0, name.length() - 1).contains(\"/\")) {\r\n throw new IllegalNameException(name);\r\n }\r\n // get the parent directory\r\n Directory parentDir = Navigate.navigateToDirectory(state, parentPath);\r\n //System.out.println(\"parent data: \" + parentDir.getData());\r\n //System.out.println(\"name: \" + name);\r\n String newPath = parentDir.getData() + name;\r\n // check that this file does not already exist\r\n if (parentDir.getChild(newPath) == null) {\r\n // create the new directory\r\n parentDir.addChild(name);\r\n state.addMessage(\"Created directory: \" + newPath + \"\\n\");\r\n } else {\r\n state.addMessage(newPath + \" already exists\\n\");\r\n }\r\n } catch (InvalidPathException e) {\r\n state.addMessage(\"Could not add directory \" + path + \" because \"\r\n + parentPath + \" does not exist.\\n\");\r\n } catch (IllegalNameException e) {\r\n state.addMessage(\"Could not add directory \" + path\r\n + \" because it contains illegal characters.\\n\");\r\n }\r\n }\r\n }", "public boolean mkdirs(String folderName){\n File f = new File(folderName);\n if (f.mkdirs()){\n return true;\n }\n return false;\n }", "public static void CreateFolder(String folderName, String path){\n File file = new File(path+ \"/\" + folderName);\n file.mkdirs ();\n }", "void createIndexDir(String indexDirPath) throws IOException {\n File indexDir = new File(indexDirPath);\n if (!indexDir.exists())\n indexDir.mkdir();\n else {\n removeIndexDir(indexDirPath);\n indexDir.mkdir(); \n }\n }", "public static boolean mkdirs(String existingPath, String dirPath){\r\n\t\tif(dirPath == null || dirPath.trim().equals(\"\")) return false;\r\n\t\tString[] dirs = null;\r\n\t\tif(existingPath == null) existingPath = \"\";\r\n\t\tif(dirPath.indexOf(\"\\\\\") != -1){\r\n\t\t\tdirs = dirPath.split(\"\\\\\\\\+\");\r\n\t\t}else if (dirPath.indexOf(\"/\") != -1){\r\n\t\t\tdirs = dirPath.split(\"/+\");\r\n\t\t}\r\n\t\tfor (int i = 0; i < dirs.length; i++) {\r\n\t\t\tif(dirs[i] == null || dirs[i].trim().equals(\"\")) continue;\r\n\t\t\tFile f = new File(existingPath + \"\\\\\" + dirs[i]);\r\n\t\t\tif(!f.exists())\r\n\t\t\t\tf.mkdirs();\r\n\t\t\texistingPath += \"\\\\\" + dirs[i];\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams params)\n throws IOException {\n\n // Access the database context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Check if the database is online\n \n if ( dbCtx.getDBInterface().isOnline() == false)\n throw new DiskOfflineException( \"Database is offline\");\n \n // Get, or create, a file state for the new path. Initially this will indicate that the directory\n // does not exist.\n \n FileState fstate = getFileState(params.getPath(), dbCtx, false);\n if ( fstate != null && fstate.fileExists() == true)\n throw new FileExistsException(\"Path \" + params.getPath() + \" exists\");\n\n // If there is no file state check if the directory exists\n \n if ( fstate == null) {\n\n // Create a file state for the new directory\n \n fstate = getFileState(params.getPath(), dbCtx, true);\n \n // Get the file details for the directory\n \n if ( getFileDetails(params.getPath(), dbCtx, fstate) != null)\n throw new FileExistsException(\"Path \" + params.getPath() + \" exists\");\n }\n\n // Find the parent directory id for the new directory\n \n int dirId = findParentDirectoryId(dbCtx,params.getPath(),true);\n if ( dirId == -1)\n throw new IOException(\"Cannot find parent directory\");\n \n // Create the new directory entry\n \n try {\n\n // Get the directory name\n \n String[] paths = FileName.splitPath(params.getPath());\n String dname = paths[1];\n\n // Check if the directory name is too long\n \n if ( dname != null && dname.length() > MaxFileNameLen)\n throw new FileNameException(\"Directory name too long, \" + dname);\n \n // If retention is enabled check if the file is a temporary folder\n \n boolean retain = true;\n \n if ( dbCtx.hasRetentionPeriod()) {\n \n // Check if the file is marked delete on close\n \n if ( params.isDeleteOnClose())\n retain = false;\n }\n \n // Set the default NFS file mode, if not set\n \n if ( params.hasMode() == false)\n params.setMode(DefaultNFSDirMode);\n\n // Make sure the create directory option is enabled\n \n if ( params.hasCreateOption( WinNT.CreateDirectory) == false)\n throw new IOException( \"Create directory called for non-directory\");\n \n // Use the database interface to create the new file record\n \n int fid = dbCtx.getDBInterface().createFileRecord(dname, dirId, params, retain);\n\n // Indicate that the path exists\n \n fstate.setFileStatus( FileStatus.DirectoryExists);\n \n // Set the file id for the new directory\n \n fstate.setFileId(fid);\n \n // If retention is enabled get the expiry date/time\n \n if ( dbCtx.hasRetentionPeriod() && retain == true) {\n RetentionDetails retDetails = dbCtx.getDBInterface().getFileRetentionDetails(dirId, fid);\n if ( retDetails != null)\n fstate.setRetentionExpiryDateTime(retDetails.getEndTime());\n }\n \n // Check if the file loader handles create directory requests\n \n if ( fid != -1 && dbCtx.getFileLoader() instanceof NamedFileLoader) {\n \n // Create the directory in the filesystem/repository\n \n NamedFileLoader namedLoader = (NamedFileLoader) dbCtx.getFileLoader();\n namedLoader.createDirectory(params.getPath(), fid);\n }\n }\n catch (Exception ex) {\n Debug.println(ex);\n }\n }", "public boolean makeDirectory( String directory, FileType type );", "private File createConfigDirIfNecessary(String configName) throws IOException {\n return createConfigDirIfNecessary(configDirPath.toFile(), configName);\n }", "public static void mkdir(String path)\n\t{\n\t\tif(!new File(path).exists())\n\t\t\tnew File(path).mkdirs();\n\t}", "private void createFolder(String myFilesystemDirectory) {\n\r\n File file = new File(myFilesystemDirectory);\r\n try {\r\n if (!file.exists()) {\r\n //modified \r\n file.mkdirs();\r\n }\r\n } catch (SecurityException e) {\r\n Utilidades.escribeLog(\"Error al crear carpeta: \" + e.getMessage());\r\n }\r\n }", "public static void mkdir(String path) {\n File directory = new File(path);\n if (directory.exists())\n return;\n directory.mkdir();\n }", "public static boolean createDirectoryAtPath(String path){\n \t\tFile folder = new File(path);\n \t\tif( !folder.exists() ){\n \t\t\tfolder.mkdirs();\n \t\t}\n \t\treturn true;\n \t}", "private static void judeDirExists(String myPath) {\n \tFile myDir = new File(Paths.get(myPath).getParent().toString());\n if (!myDir.exists()) {\n \tmyDir.mkdirs(); \n System.out.println(\"Create path:\"+ myDir.getPath());\n }\n }", "private void makeDirectory() {\n String userHome = System.getProperty(\"user.home\");\n wnwData = new File(userHome + \"/.wnwdata\");\n wnwData.mkdirs();\n\n makeCampaignChallengesFile();\n makeCustomChallengesFile();\n makeProgressFile();\n makeSettingsFile();\n }", "private static String createDir(String s) {\r\n \tint len = s.length() - 1;\r\n \tString tempBuff;\r\n \tString result;\r\n \tif (s.charAt(len) != '/') {\r\n \t\ttempBuff = String.format(\"%s/\", s);\r\n \t}\r\n \telse {\r\n \t\ttempBuff = s;\r\n \t}\r\n \tresult = tempBuff;\r\n \treturn result;\r\n }", "public static void createOutputDirectoryPath(String path){\n \n new File(path).mkdirs();\n \n }", "private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}", "private static void makeDirPath(String targetAddr) {\n\t\tString parentPath = PathUtil.getImgBasePath() + targetAddr;\r\n\t\tFile dirPath = new File(parentPath);\r\n\t\tif (!dirPath.exists()) {\r\n\t\t\tdirPath.mkdirs();\r\n\t\t}\r\n\t}", "private File createWorkingDir( final String path )\n {\n File workDir = new File( path );\n workDir.mkdirs();\n return workDir;\n }", "public MkdirCommand() {\r\n // The name of the mkdir command\r\n name = \"mkdir\";\r\n\r\n // The description of the mkdir command\r\n description = \"Creates a directory ar the given path. The given path can\"\r\n + \" be a full path or a path relative to the working directory\";\r\n\r\n // The parameters for the mkdir command and their description\r\n parameters.put(\"DIR\", \"The path that points to where the new directory\"\r\n + \" should be created.\");\r\n }", "public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }", "@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}", "private void makeFolders( final File directoryToCreate )\n throws MojoExecutionException\n {\n this.logger.debug( \"Creating folder '\" + directoryToCreate.getAbsolutePath() + \"' ...\" );\n if ( directoryToCreate.mkdirs() == false )\n {\n throw new MojoExecutionException( \"Could not create folder '\" + directoryToCreate.getAbsolutePath() + \"'!\" );\n }\n }", "private static void createSaveDirIfNotExisting() {\n\t\tFile dir = new File(\"save\");\n\t\tif (!dir.exists()) {\n\t\t\t// directory does not exist => create!\n\t\t\tdir.mkdir();\n\t\t}\n\t}", "private void createTDenseDirectory() {\n File dense = new File(DenseLayerPath);\n dense.mkdir();\n }", "public void mkdir(String path) throws SystemException;", "public OutputResponse mkdirs(String path){\n String command = \"mkdir -p \" + path;\n return jobTarget.runCommand( command);\n }", "public static boolean createDBDir() {\n return (new File(path)).mkdirs();\n }", "public String createDirectory(String parentID, String new_directory) throws CloudStorageNotEnoughSpace {\n File newFile = new File();\n newFile.setTitle(new_directory);\n newFile.setMimeType(\"application/vnd.google-apps.folder\");\n newFile.setParents(Arrays.asList(new ParentReference().setId(parentID)));\n\n try {\n File insertedFile = drive.files().insert(newFile).execute();\n return insertedFile.getId();\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n\n }", "private void createNewDirectory() {\n getMainWindow().addWindow(\n new TextInputDialog(\n \"Create Directory\",\n \"Create Directory\",\n \"New Folder\",\n new TextInputDialog.Callback() {\n public void onDialogResult(boolean happy, String newDirectory) {\n if ( happy\n && isValidFile(newDirectory)) {\n try {\n // Verzeichnis anlegen\n File newDir = getFile(newDirectory);\n if (!newDir.exists()) {\n newDir.mkdir(0755);\n }\n // Prüfen, ob das Verzeichnis angelegt wurde\n if (newDir.exists()) {\n loadXtreemFSData();\n showNotification(\"Success\", \"Directory \" + newDirectory + \" created.\", Notification.TYPE_TRAY_NOTIFICATION, null);\n }\n else {\n showNotification(\"Error\", \"Directory \" + newDirectory + \" could not be created.\", Notification.TYPE_WARNING_MESSAGE, null);\n }\n } catch (IOException e) {\n showNotification(\"Error\", e.toString(), Notification.TYPE_ERROR_MESSAGE, e);\n }\n }\n }\n }));\n }", "public File createNewFolder(File paramFile) throws IOException {\n/* 803 */ if (paramFile == null) {\n/* 804 */ throw new IOException(\"Containing directory is null:\");\n/* */ }\n/* */ \n/* 807 */ File file = createFileObject(paramFile, newFolderString);\n/* */ \n/* 809 */ if (file.exists()) {\n/* 810 */ throw new IOException(\"Directory already exists:\" + file.getAbsolutePath());\n/* */ }\n/* 812 */ file.mkdirs();\n/* */ \n/* */ \n/* 815 */ return file;\n/* */ }", "@Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n if (!this.sourceDirectory.equals(dir)) {\n // Create this directory in the target and make it our current target.\n Path newDirectory = this.currentTargetDirectory.resolve(dir.getFileName());\n boolean didCreate = newDirectory.toFile().mkdir();\n Assert.assertTrue(didCreate);\n logger.output(\"Created directory: \" + newDirectory);\n this.currentTargetDirectory = newDirectory;\n }\n return FileVisitResult.CONTINUE;\n }", "public static native void mkdirs(String path, int mode) throws IOException;", "private void createServiceDirectory(String serviceID){\n \n String changedServiceID = serviceID.replaceAll(\"\\\\.\",\"&\");\n changedServiceID = changedServiceID.replaceAll(\":\",\"&\");\n \n //Create directory to store output files of service\n File dir = new File(sessionDirectory.getPath()+\"/\"+changedServiceID);\n dir.mkdir();\n \n //Add created directory to map \"servicesDirectories\"\n servicesDirectories.put(serviceID,dir);\n \n }", "public int mkdirs(String callingPkg, String path) throws RemoteException;", "public File createSubDirectories(String directoryPath) {\n File myFilesDir = new File(this.assetFolderPath, directoryPath);\n\n if(!myFilesDir.isDirectory()) {\n myFilesDir.mkdirs();\n }\n return myFilesDir;\n }", "private final void directory() {\n\t\tif (!this.plugin.getDataFolder().isDirectory()) {\n\t\t\tif (!this.plugin.getDataFolder().mkdirs()) {\n\t\t\t\tMain.SEVERE(\"Failed to create directory\");\n\t\t\t} else {\n\t\t\t\tMain.INFO(\"Created directory sucessfully!\");\n\t\t\t}\n\t\t}\n\t}", "public OutputResponse mkdir(String path){\n String command = \"mkdir \" + path;\n return jobTarget.runCommand( command );\n }", "private void setUpDirectories() {\r\n\t\tFile creation = new File(\"Creations\");\r\n\t\tFile audio = new File(\"Audio\");\r\n\t\tFile quiz = new File(\"Quiz\");\r\n\t\tFile temp = new File(\"Temp\");\r\n\r\n\t\tif (!creation.isDirectory()) {\r\n\t\t\tcreation.mkdir();\r\n\t\t}\r\n\t\tif (!audio.isDirectory()) {\r\n\t\t\taudio.mkdir();\r\n\t\t}\r\n\t\tif (!quiz.isDirectory()) {\r\n\t\t\tquiz.mkdir();\r\n\t\t}\r\n\t\tif (!temp.isDirectory()) {\r\n\t\t\ttemp.mkdir();\r\n\t\t}\r\n\r\n\t}", "public static void CrearDirectorio (String args){\n File directorio = new File(args);\n \n if (!directorio.exists()) {\n if (directorio.mkdirs()) {\n //System.out.println(\"Directorio creado\\n\");\n } else {\n //System.out.println(\"Error al crear directorio\\n\");\n }\n }\n }", "private void createFolder(String name, String path, Long id) {\n VMDirectory newDir = new VMDirectory();\n newDir.setName(name);\n editResourceService.createDir(id, name, new AsyncCallback<Long>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.say(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Long result) {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, id), newDir, result, true);\n folderPath_idMap.put(path, result);\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n });\n }", "@Override\n\tpublic String createDirectory(AuthenticationToken authenticationToken, String filePath, String idealFolderName, boolean force) \n\t\t\tthrows PermissionDeniedException, CreateDirectoryFailedException { \n\t\tif(idealFolderName.trim().isEmpty()) \n\t\t\tthrow new CreateDirectoryFailedException(\"Directory name is empty. The directory was not created.\");\n\t\t\n\t\tidealFolderName = fileNameNormalizer.normalize(idealFolderName);\n\t\t\n\t\tFile dir = new File(filePath);\n if(dir.isFile()) {\n \tdir = dir.getParentFile();\n \tfilePath = dir.getAbsolutePath();\n }\n dir.mkdirs();\n\t\t\n\t\tboolean permissionResult = filePermissionService.hasWritePermission(authenticationToken, filePath);\n\t\tif(!permissionResult)\n\t\t\tthrow new PermissionDeniedException();\n\t\telse {\n\t\t\tboolean inUseResult = this.isInUse(authenticationToken, filePath);\n\t\t\tif(inUseResult)\n\t\t\t\t//throw new CreateDirectoryFailedException(\"Can't create directory. Parent directory is currently in use.\");\n\t\t\t\tthrow new CreateDirectoryFailedException(\"Can't create directory. Parent directory \"+this.createMessageFileInUse(authenticationToken, filePath)+\". Delete the tasks using Task Manager, then try again.\");\n\t\t\telse {\n\t\t\t\tFile file = new File(filePath + File.separator + idealFolderName);\n\t\t\t\tboolean resultMkDir = file.mkdir();\n\t\t\t\tif(!resultMkDir && force) {\n\t\t\t\t\tString date = dateTimeFormat.format(new Date());\n\t\t\t\t\tidealFolderName = idealFolderName + \"_\" + date;\n\t\t\t\t\tfile = new File(filePath + File.separator + idealFolderName);\n\t\t\t\t\tresultMkDir = file.mkdir();\n\t\t\t\t\tint i = 1;\n\t\t\t\t\twhile(!resultMkDir) {\n\t\t\t\t\t\tfile = new File(filePath + File.separator + idealFolderName + \"_\" + i++);\n\t\t\t\t\t\tresultMkDir = file.mkdir();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!resultMkDir){ \n\t\t\t\t\tif(file.isDirectory() && file.exists())\n\t\t\t\t\t\tthrow new CreateDirectoryFailedException(\"Directory \"+file.getName()+\" already exists. You can try again with another name.\");\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new CreateDirectoryFailedException(\"Network or server errors\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn file.getAbsolutePath();\n\t\t\t}\n\t\t}\n\t}", "private static void createDir(File f) {\n int limit = 10;\n while (!f.exists()) {\n if (!f.mkdir()) {\n createDir(f.getParentFile());\n }\n limit --;\n if(limit < 1) {\n break;\n }\n }\n if (limit == 0) {\n }\n }", "public static void createDirectories() \r\n\t{\r\n\t\tif(!fCertificatesDir().exists()) \r\n\t\t{\r\n\t\t\tfCertificatesDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fDbDir().exists()) \r\n\t\t{\r\n\t\t\tfDbDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsDir().exists())\r\n\t\t{\r\n\t\t\tfMibsDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsBinaryDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsBinaryDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsTextDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsTextDir().mkdir();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n doCreateDir();\n }", "private File createEmptyDirectory() throws IOException {\n File emptyDirectory = findNonExistentDirectory();\n if (emptyDirectory.mkdir() == false) {\n throw new IOException(\"Can't create \" + emptyDirectory);\n }\n\n return emptyDirectory;\n }", "public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}", "public boolean createFolderInServerDir(String FolderName){\r\n File file = new File(serversDir, FolderName);\r\n if(file.exists()){\r\n Toast.makeText(mContext, \"server already exist\", Toast.LENGTH_SHORT).show();\r\n return false;\r\n }else{\r\n file.mkdirs();\r\n updateServerList();\r\n return true;\r\n }\r\n }", "Folder createFolder();", "private void createLocalFolder(File newFolder) {\n\n if (!newFolder.exists()) {\n newFolder.mkdirs();\n //TODO: what if the folder can't be created?\n PieLogger.trace(this.getClass(), \"Folder created!\");\n } else {\n PieLogger.debug(this.getClass(), \"Folder exits already?!\");\n }\n }", "protected void createDirStructure(final File dir, final int directoryDepth) throws IOException\n {\n if (directoryDepth > 0) {\n for (int i = 0; i < FileCache.hexLength; i++) {\n final File newDir = new File(dir.getAbsolutePath() + File.separator + Integer.toHexString(i));\n if (!newDir.exists() && !newDir.mkdirs()) {\n throw new IOException(\"Creating dir \" + newDir.getAbsolutePath() + \" failed.\");\n }\n this.createDirStructure(newDir, directoryDepth - 1);\n }\n }\n }", "@PreAuthorize(\"hasAuthority('file:write')\")\n @PostMapping(\"/newDirectory\")\n public String createNewDirectory(@RequestParam(\"folderName\") String folderName,\n HttpSession httpSession,\n RedirectAttributes redirectAttributes) {\n String currentDirectory = httpSession.getAttribute(\"currentFolderPath\").toString();\n\n //create New directory from the request\n storageService.createNewDirectory(currentDirectory + File.separator + folderName);\n\n redirectAttributes.addFlashAttribute(\"message\",\n \"New directory created\");\n\n return \"redirect:/\";\n }", "public static void createRequiredDirectories()\n\t{\n\n\t\t/*Input_Files dir creation */\n\t\tFile inpDir = new File(INPUT_DIR_NAME);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!inpDir.exists())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tinpDir.mkdir();\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLOG_WRITER.write(DIR_CREATION_ERROR + INPUT_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\tSystem.out.println(DIR_CREATION_ERROR + INPUT_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t} catch (IOException e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\n\t\t/*Logs dir creation */\n\t\tFile logsDir = new File(LOGS_DIR_NAME);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!logsDir.exists())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tlogsDir.mkdir();\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLOG_WRITER.write(DIR_CREATION_ERROR + LOGS_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\tSystem.out.println(DIR_CREATION_ERROR + LOGS_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t} catch (IOException e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public static Menu createFolder(Menu parentMenu, String menuName) {\r\n Menu menu = new Menu();\r\n menu.setMenuText(menuName);\r\n menu.setMenuParent(parentMenu.getMenuId());\r\n menu.setMenuSort(0);\r\n menu.setMenuIcon(\"folder.gif\");\r\n menu.setMenuPath(parentMenu.getMenuPath() + \"/\" + parentMenu.getMenuId());\r\n menu.setMenuType(Menu.MENUTYPE_DIRECTORY);\r\n menu.setMenuHier(parentMenu.getMenuHier() + 1);\r\n menu.setMenuRef(\"\");\r\n for (MenuGroup mg : parentMenu.getMenuGroups()) {\r\n menu.getMenuGroups().add(mg);\r\n }\r\n\r\n MenuDAO menuDao = (MenuDAO) Context.getInstance().getBean(MenuDAO.class);\r\n if (menuDao.store(menu) == false)\r\n return null;\r\n return menu;\r\n }", "private void createRootDirectory(String rootDirectoryPath) throws Exception {\n\t\tlogger.traceEntry();\n\n\t\trootDirectory = new Path(rootDirectoryPath);\n\t\tif (!hadoopFileSystem.exists(rootDirectory)) {\n\t\t\tlogger.warn(\"Directory \" + rootDirectoryPath + \" does not exist, creating\");\n\t\t\thadoopFileSystem.mkdirs(rootDirectory);\n\t\t}\n\t\tlogger.traceExit();\n\t}", "private void createRequiredDirectory(String outdir, String className) throws IOException\r\n\t{\n\t\tString workingdirectory = System.getProperty(\"user.dir\");\r\n\t\t\r\n\t\t//used to create directory\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report/Failure_Screenshot\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory + \"/custom-test-report\" + \"/\" + className);\r\n\t\tscreenshotDir.mkdir();\r\n\t}", "@Test\n\tpublic void Directories() {\n\t\t\n\t\tString dirs = \"test/one/two/\";\n\t\tFile d = new File(dirs);\n\t\td.mkdirs();\n\t\tAssert.assertTrue(d.exists());\n\t\t\n\t\t//Cleanup\n\t\tif(d.delete()) {\n\t\t\td = new File(\"test/one\");\n\t\t\tif(d.delete()) {\n\t\t\t\td = new File(\"test\");\n\t\t\t\td.delete();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Directory(String name) {\n super(name);\n this.parent = null;\n }", "public static void mkdirs(String owner, Path path) throws CWLException {\r\n File dir = path.toFile();\r\n if (!dir.exists() && !dir.mkdirs()) {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.mkdir.failed\", path.toString(), owner), 255);\r\n }\r\n }", "@PostMapping(\"/createfolder\")\n public String createFolder(@RequestParam(name=\"directoryName\", required=true) String directoryName, @RequestParam(name=\"currentPath\", required=true) String currentPath, RedirectAttributes redirectAttributes) {\n try {\n logger.log(Level.INFO, \"Creating directory\");\n uiCommandService.createNewFolder(directoryName, currentPath);\n logger.log(Level.INFO, \"Folder was created successfully!\");\n redirectAttributes.addFlashAttribute(\"success_messages\",\"[Successfully created \" + directoryName + \"!]\");\n } catch (DirectoryExistsException e) {\n redirectAttributes.addFlashAttribute(\"error_messages\", \"[\"+ directoryName +\" already exists!]\");\n logger.log(Level.WARNING, \"Folder {0} already exist in {1}\", new Object[]{directoryName, currentPath});\n }\n return \"redirect:/imageview?location=\" + currentPath.replace(\"\\\\\", \"/\");\n }", "public static void creator(Website websiteInfo){\n //creates folder using info on current directory\n File newFolder = new File(websiteInfo.currentPath);\n boolean websiteTest = newFolder.mkdir();\n\n if(websiteTest){\n System.out.println(\"Created ./website/\"+ websiteInfo.name);\n htmlFile(websiteInfo);\n createCSSJava(websiteInfo);\n }else{\n System.out.println(\"Could not create website\");\n }\n }", "public static native boolean mkdir(String path, int mode)\n throws IOException;", "public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}", "public static boolean createRootFile(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"touch \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "public static void createDirs(final String fileName) throws SQLException {\n\n FileSystem.getInstance(fileName).createDirs(fileName);\n }", "public static void createLogsFolder(String name, String folderPath) {\r\n\t\tFile path = new File(folderPath);\r\n\t\tFile file = new File(folderPath+name+\".txt\");\r\n\t\tif(!file.exists()) {\r\n\t\t\tpath.mkdirs();\r\n\t\t\ttry {file.createNewFile();} catch (IOException e) {System.err.println(\"The file \\\"\"+name+\"\\\" cannot be created : \"+e.getMessage());}\r\n\t\t}\r\n\t}", "static void mkdirs(File f) {\n f.mkdirs();\n }", "static void createOutputStructure(final File dir) throws MojoExecutionException {\n if (!dir.exists() && !dir.mkdirs()) {\n throw new MojoExecutionException(\"could not create output directory \" + dir.getAbsolutePath());\n }\n }" ]
[ "0.776137", "0.7711189", "0.7622578", "0.7582808", "0.74557114", "0.7378105", "0.70493084", "0.69500583", "0.6886825", "0.6759898", "0.67493856", "0.67252624", "0.66787666", "0.66014886", "0.6600305", "0.6575441", "0.655951", "0.65300745", "0.64912134", "0.6483837", "0.64311314", "0.64153", "0.6377426", "0.6331032", "0.6272062", "0.62625957", "0.6250303", "0.6242306", "0.6235458", "0.6194226", "0.61905783", "0.6185224", "0.61718094", "0.6154402", "0.61398613", "0.61367077", "0.61091334", "0.6086184", "0.6020307", "0.6005805", "0.6004896", "0.5985524", "0.5977911", "0.5962316", "0.5942623", "0.5938173", "0.59180427", "0.58983254", "0.58939236", "0.5872288", "0.5845074", "0.58151364", "0.57813793", "0.5774318", "0.57610756", "0.5742519", "0.5741603", "0.57409096", "0.5739791", "0.57296604", "0.5724265", "0.5722339", "0.5721835", "0.5710223", "0.5708978", "0.57007766", "0.5693227", "0.56670743", "0.5660479", "0.56401676", "0.5616946", "0.560055", "0.55961996", "0.5589124", "0.5577415", "0.55657834", "0.5494974", "0.5489752", "0.54788184", "0.5468421", "0.5445064", "0.54338884", "0.5420405", "0.54066724", "0.540578", "0.5397803", "0.53973186", "0.5379563", "0.53710634", "0.53661835", "0.53047335", "0.53005666", "0.52934223", "0.5285278", "0.5277522", "0.527485", "0.5271416", "0.52685857", "0.5243359", "0.52269614" ]
0.7524886
4
Creates a directory in the current path called dirName.
public static boolean makeDirs(String dirName) { return new File(dirName).mkdirs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void createDirectory(String srcDir, String nameDir) {\n try {\n Path path = Paths.get(srcDir + \"/\" + nameDir);\n\n Files.createDirectories(path);\n System.out.println(\"Directory is created\");\n } catch (IOException e) {\n System.err.println(\"ERROR CREATION! \" + e.getMessage());\n }\n\n }", "public static boolean create(String dirName)\r\n {\r\n Path p = Paths.get(dirName);\r\n if (Files.notExists(p))\r\n {\r\n try\r\n {\r\n Files.createDirectory(p);\r\n } catch (Exception ex)\r\n {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "private void createDirectoryIfNeeded(String directoryName)\n\t{\n\t\tFile theDir = new File(directoryName);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!theDir.exists())\n\t\t{\n\t\t\t//System.out.println(\"creating directory: \" + directoryName);\n\t\t\ttheDir.mkdir();\n\t\t}\n\t}", "public static boolean makeDir(String dirName) {\n File dir = new File(dirName);\n if (!(dir.exists())) {\n return dir.mkdir();\n }\n return true;\n }", "private static void doCreateDir() {\n String newDir = \"new_dir\";\n boolean success = (new File(newDir)).mkdir();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n // Create a directory; all non-existent ancestor directories are\n // automatically created.\n newDir = \"c:/export/home/jeffreyh/new_dir1/new_dir2/new_dir3\";\n success = (new File(newDir)).mkdirs();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n }", "private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile path = FileHandler.getFile( dirName );\n \tif ( !path.exists() )\n \t{\n \t log.info( String.format( \"Creating directory: %s\", dirName ) );\n \t // create path:\n \t if ( !path.mkdir() )\n \t {\n \t\tString errMsg = String.format( \"Could not create necessary directory: %s\", dirName );\n \t\tlog.error( errMsg );\n \t\tthrow new HarvesterIOException( errMsg );\n \t }\n \t}\n \t\n \treturn path;\n }", "public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}", "public int createDir(String dirName, String path) throws IOException {\n\t\tmasterSock.write((CREATE_DIR + \" \" + dirName + \" \" + path).getBytes());\n\t\tmasterSock.write(\"\\r\\n\".getBytes());\n\t\tmasterSock.flush();\n\t\t\n\t\tString line = null;\n\t\t\n\t\tline = masterSock.readLine();\n\t\t\n\t\tswitch(line) {\n\t\tcase STR_OK:\n\t\t\treturn OK;\n\t\tcase STR_EXISTED:\n\t\t\treturn EXISTED;\n\t\tcase STR_NOT_FOUND:\n\t\t\treturn NOT_FOUND;\n\t\tcase STR_CLIENT_ERROR:\n\t\t\treturn CLIENT_ERROR;\n\t\tdefault:\n\t\t\treturn SERVER_ERROR;\n\t\t}\n\t}", "Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }", "protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor)\n throws IOException {\n createDirectory(env.getMasterServices().getMasterFileSystem(), nsDescriptor);\n }", "public void createDir(File file) {\n if (!file.exists()) {\n file.mkdir();\n }\n }", "public static void createDir(String path) {\n File dir = new File(new File(path).getParentFile().getAbsolutePath());\n dir.mkdirs();\n }", "protected void createDirectory(Path path, Path destPath) {\n String rootLocation = destPath.toString();\n int index;\n if(firstTime) {\n firstTime = false;\n index = path.toFile().getPath().lastIndexOf(\"\\\\\")+1;//index where cur directory name starts\n rootFolder = path.toFile().getPath().substring(index);\n }\n else {\n index = path.toFile().getPath().indexOf(rootFolder);\n }\n\n String folderName= path.toFile().getPath().substring(index);\n Path newDirPath = Paths.get(rootLocation + DOUBLE_BKW_SLASH +folderName);\n try {\n Path newDir = Files.createDirectory(newDirPath);\n } catch(FileAlreadyExistsException e){\n // the directory already exists.\n e.printStackTrace();\n } catch (IOException e) {\n //something else went wrong\n e.printStackTrace();\n }\n }", "public static void createDirectory(String inputDirectory) {\n File file = new File(inputDirectory);\n if (file.exists()) {\n System.out.println(\"The directory is already present\");\n } else {\n //use mkdir() and check its return value\n file.mkdir();\n System.out.println(\"The directory \" + inputDirectory + \" has been created.\");\n }\n }", "private void createDirectory(String path) throws IOException {\n\t\tfinal Path p = Paths.get(path);\n\t\tif (!fileExists(p)) {\n\t\t\tFiles.createDirectory(p);\n\t\t}\n\t}", "public void createDir(File file){\n\t\tif (!file.exists()) {\n\t\t\tif (file.mkdir()) {\n\t\t\t\tlogger.debug(\"Directory is created!\");\n\t\t\t} else {\n\t\t\t\tlogger.debug(\"Failed to create directory!\");\n\t\t\t}\n\t\t}\n\t}", "public boolean createDirectoryInJarFolder(String folderName){\r\n \r\n path = getPathToJarFolder();\r\n \r\n // add folder to path and make directory\r\n path += folderName;\r\n File file = new File(path);\r\n return file.mkdir();\r\n }", "public void setAndCreateDirPath(String dirname) {\r\n\t File newPath = new File(dirname); \r\n\t \r\n\t if(!newPath.isDirectory()) {\r\n\t\t newPath.mkdirs();\r\n\t }\r\n\t \r\n\t directory = newPath;\r\n }", "private static void createDirectory(Path path) throws IOException {\n\t\ttry {\n\t\t\tFiles.createDirectory(path);\n\t\t} catch (FileAlreadyExistsException e) {\n\t\t\tif (!Files.isDirectory(path)) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t}", "public static boolean createRootdir(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"mkdir \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "private static void createTempFolder(String folderName) throws IOException {\n Path tempFolderPath = Paths.get(folderName);\n if (Files.notExists(tempFolderPath) || !Files.isDirectory(tempFolderPath)) {\n Files.createDirectory(tempFolderPath);\n }\n }", "public boolean createDir(String userName) {\n\t\tString path = userName;\n\n\t\tboolean success = true;\n\t\ttry{\n\t\t\tsuccess = (new File(path)).mkdirs();\n\t\t\tSystem.out.println(success);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn success;\n\n\t}", "public void mkdirP(String dirPath) {\n\n\t\t// check if you need to go anywhere further\n\t\tif (dirPath.lastIndexOf(\"/\") == 0) {\n\t\t\treturn;// done\n\t\t} else {\n\t\t\t// parse directories...\n\t\t\tArrayList<String> direcs = new ArrayList<>();\n\t\t\tString temp = dirPath;\n\t\t\tboolean cont = true;\n\t\t\ttemp = temp.substring(1);\n\t\t\twhile (temp.length() > 1 && cont) {\n\n\t\t\t\t// add the substring to the list of directories that need to be\n\t\t\t\t// checked and/or created\n\t\t\t\tdirecs.add(temp.substring(0, temp.indexOf(\"/\")));\n\t\t\t\t// if there are more \"/\"s left, repeat\n\t\t\t\tif (temp.contains(\"/\")) {\n\t\t\t\t\ttemp = temp.substring(temp.indexOf(\"/\") + 1);\n\t\t\t\t}\n\t\t\t\t// else break out of the loop\n\t\t\t\telse {\n\t\t\t\t\tcont = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// do one last check to see if there are any extra characters left\n\t\t\tif (temp.length() > 0) {\n\t\t\t\t// there is still something left\n\t\t\t\tdirecs.add(temp);\n\t\t\t}\n\n\t\t\t// go through each directory, checking if it exists. if not, create\n\t\t\t// the directory and repeat.\n\t\t\tDirectoryObjects current = directory;\n\n\t\t\tfor (String p : direcs) {\n\n\t\t\t\tif (current.getDirectoryByName(p) != null) {\n\t\t\t\t\tcurrent = current.getDirectoryByName(p);\n\t\t\t\t} else {\n\t\t\t\t\tcurrent.getSubdirectories().add(new DirectoryObjects(p));\n\t\t\t\t\tcurrent = current.getDirectoryByName(p);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public void mkdir(String name) throws FileExistsException\n\t{\n\t\tcheckMakeFile(name);\n\t\tFileElement add = new FileElement(name, true);\n\t\tfileSystem.addChild(currentFileElement, add);\n\t}", "public Directory(String dirName) {\n setDirName(dirName);\n }", "private void makeFolder(File folderNameFile) {\n\t\tfolderNameFile.mkdir();\n\t}", "private void makeDir(String targetDir){\n\t\tchar letter = 'A';\n\t\tnew File(targetDir + \"\\\\Sorted Music\").mkdir();\n\t\t\n\t\tfor (int i = 0; i < 26; i++){\n\t\t\tnew File(targetDir + \"\\\\Sorted Music\\\\\" + letter).mkdir();\n\t\t\tletter++;\n\t\t}\n\t}", "@Override\n protected NodeInfo createDirectoryEntry(NodeInfo parentEntry, Path dir) throws IOException {\n return drive.createFolder(parentEntry.getId(), toFilenameString(dir));\n }", "@Override\n public void createDirectory(File storageName) throws IOException {\n }", "public String createWebsite(String websiteName){\n directory = path + websiteName;\n File newFolder = new File(directory);\n\n newFolder.mkdirs();\n return directory;\n }", "@TaskAction\n public void create() {\n dir.mkdirs();\n getChmod().chmod(dir, dirMode);\n }", "public void run(State state) throws IllegalNumberOfArgumentsException,\r\n InvalidPathException {\r\n String[] parameters = state.getParameters();\r\n if (parameters.length == 0) {\r\n throw new IllegalNumberOfArgumentsException(\r\n \"Mkdir requires a path to a directory to create.\");\r\n }\r\n // make a new directory for each path parameter\r\n for (String path : parameters) {\r\n path = State.cleanDirectoryPath(path);\r\n // get the name of the new directory and the path to its parent\r\n String[] separatedPath = state.separatePathName(path);\r\n String name = separatedPath[0];\r\n String parentPath = separatedPath[1];\r\n if (name.matches(\"/*\")) {\r\n throw new InvalidPathException(path);\r\n }\r\n try {\r\n // check that the name and parent's path are valid\r\n if (name.matches(State.ILLEGAL_CHARACTERS) || name\r\n .substring(0, name.length() - 1).contains(\"/\")) {\r\n throw new IllegalNameException(name);\r\n }\r\n // get the parent directory\r\n Directory parentDir = Navigate.navigateToDirectory(state, parentPath);\r\n //System.out.println(\"parent data: \" + parentDir.getData());\r\n //System.out.println(\"name: \" + name);\r\n String newPath = parentDir.getData() + name;\r\n // check that this file does not already exist\r\n if (parentDir.getChild(newPath) == null) {\r\n // create the new directory\r\n parentDir.addChild(name);\r\n state.addMessage(\"Created directory: \" + newPath + \"\\n\");\r\n } else {\r\n state.addMessage(newPath + \" already exists\\n\");\r\n }\r\n } catch (InvalidPathException e) {\r\n state.addMessage(\"Could not add directory \" + path + \" because \"\r\n + parentPath + \" does not exist.\\n\");\r\n } catch (IllegalNameException e) {\r\n state.addMessage(\"Could not add directory \" + path\r\n + \" because it contains illegal characters.\\n\");\r\n }\r\n }\r\n }", "public boolean mkdirs(String folderName){\n File f = new File(folderName);\n if (f.mkdirs()){\n return true;\n }\n return false;\n }", "public static void CreateFolder(String folderName, String path){\n File file = new File(path+ \"/\" + folderName);\n file.mkdirs ();\n }", "void createIndexDir(String indexDirPath) throws IOException {\n File indexDir = new File(indexDirPath);\n if (!indexDir.exists())\n indexDir.mkdir();\n else {\n removeIndexDir(indexDirPath);\n indexDir.mkdir(); \n }\n }", "public static boolean mkdirs(String existingPath, String dirPath){\r\n\t\tif(dirPath == null || dirPath.trim().equals(\"\")) return false;\r\n\t\tString[] dirs = null;\r\n\t\tif(existingPath == null) existingPath = \"\";\r\n\t\tif(dirPath.indexOf(\"\\\\\") != -1){\r\n\t\t\tdirs = dirPath.split(\"\\\\\\\\+\");\r\n\t\t}else if (dirPath.indexOf(\"/\") != -1){\r\n\t\t\tdirs = dirPath.split(\"/+\");\r\n\t\t}\r\n\t\tfor (int i = 0; i < dirs.length; i++) {\r\n\t\t\tif(dirs[i] == null || dirs[i].trim().equals(\"\")) continue;\r\n\t\t\tFile f = new File(existingPath + \"\\\\\" + dirs[i]);\r\n\t\t\tif(!f.exists())\r\n\t\t\t\tf.mkdirs();\r\n\t\t\texistingPath += \"\\\\\" + dirs[i];\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams params)\n throws IOException {\n\n // Access the database context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Check if the database is online\n \n if ( dbCtx.getDBInterface().isOnline() == false)\n throw new DiskOfflineException( \"Database is offline\");\n \n // Get, or create, a file state for the new path. Initially this will indicate that the directory\n // does not exist.\n \n FileState fstate = getFileState(params.getPath(), dbCtx, false);\n if ( fstate != null && fstate.fileExists() == true)\n throw new FileExistsException(\"Path \" + params.getPath() + \" exists\");\n\n // If there is no file state check if the directory exists\n \n if ( fstate == null) {\n\n // Create a file state for the new directory\n \n fstate = getFileState(params.getPath(), dbCtx, true);\n \n // Get the file details for the directory\n \n if ( getFileDetails(params.getPath(), dbCtx, fstate) != null)\n throw new FileExistsException(\"Path \" + params.getPath() + \" exists\");\n }\n\n // Find the parent directory id for the new directory\n \n int dirId = findParentDirectoryId(dbCtx,params.getPath(),true);\n if ( dirId == -1)\n throw new IOException(\"Cannot find parent directory\");\n \n // Create the new directory entry\n \n try {\n\n // Get the directory name\n \n String[] paths = FileName.splitPath(params.getPath());\n String dname = paths[1];\n\n // Check if the directory name is too long\n \n if ( dname != null && dname.length() > MaxFileNameLen)\n throw new FileNameException(\"Directory name too long, \" + dname);\n \n // If retention is enabled check if the file is a temporary folder\n \n boolean retain = true;\n \n if ( dbCtx.hasRetentionPeriod()) {\n \n // Check if the file is marked delete on close\n \n if ( params.isDeleteOnClose())\n retain = false;\n }\n \n // Set the default NFS file mode, if not set\n \n if ( params.hasMode() == false)\n params.setMode(DefaultNFSDirMode);\n\n // Make sure the create directory option is enabled\n \n if ( params.hasCreateOption( WinNT.CreateDirectory) == false)\n throw new IOException( \"Create directory called for non-directory\");\n \n // Use the database interface to create the new file record\n \n int fid = dbCtx.getDBInterface().createFileRecord(dname, dirId, params, retain);\n\n // Indicate that the path exists\n \n fstate.setFileStatus( FileStatus.DirectoryExists);\n \n // Set the file id for the new directory\n \n fstate.setFileId(fid);\n \n // If retention is enabled get the expiry date/time\n \n if ( dbCtx.hasRetentionPeriod() && retain == true) {\n RetentionDetails retDetails = dbCtx.getDBInterface().getFileRetentionDetails(dirId, fid);\n if ( retDetails != null)\n fstate.setRetentionExpiryDateTime(retDetails.getEndTime());\n }\n \n // Check if the file loader handles create directory requests\n \n if ( fid != -1 && dbCtx.getFileLoader() instanceof NamedFileLoader) {\n \n // Create the directory in the filesystem/repository\n \n NamedFileLoader namedLoader = (NamedFileLoader) dbCtx.getFileLoader();\n namedLoader.createDirectory(params.getPath(), fid);\n }\n }\n catch (Exception ex) {\n Debug.println(ex);\n }\n }", "public boolean makeDirectory( String directory, FileType type );", "public static void mkdir(String path)\n\t{\n\t\tif(!new File(path).exists())\n\t\t\tnew File(path).mkdirs();\n\t}", "private File createConfigDirIfNecessary(String configName) throws IOException {\n return createConfigDirIfNecessary(configDirPath.toFile(), configName);\n }", "private void createFolder(String myFilesystemDirectory) {\n\r\n File file = new File(myFilesystemDirectory);\r\n try {\r\n if (!file.exists()) {\r\n //modified \r\n file.mkdirs();\r\n }\r\n } catch (SecurityException e) {\r\n Utilidades.escribeLog(\"Error al crear carpeta: \" + e.getMessage());\r\n }\r\n }", "public static void mkdir(String path) {\n File directory = new File(path);\n if (directory.exists())\n return;\n directory.mkdir();\n }", "public static boolean createDirectoryAtPath(String path){\n \t\tFile folder = new File(path);\n \t\tif( !folder.exists() ){\n \t\t\tfolder.mkdirs();\n \t\t}\n \t\treturn true;\n \t}", "private static void judeDirExists(String myPath) {\n \tFile myDir = new File(Paths.get(myPath).getParent().toString());\n if (!myDir.exists()) {\n \tmyDir.mkdirs(); \n System.out.println(\"Create path:\"+ myDir.getPath());\n }\n }", "private void makeDirectory() {\n String userHome = System.getProperty(\"user.home\");\n wnwData = new File(userHome + \"/.wnwdata\");\n wnwData.mkdirs();\n\n makeCampaignChallengesFile();\n makeCustomChallengesFile();\n makeProgressFile();\n makeSettingsFile();\n }", "private static String createDir(String s) {\r\n \tint len = s.length() - 1;\r\n \tString tempBuff;\r\n \tString result;\r\n \tif (s.charAt(len) != '/') {\r\n \t\ttempBuff = String.format(\"%s/\", s);\r\n \t}\r\n \telse {\r\n \t\ttempBuff = s;\r\n \t}\r\n \tresult = tempBuff;\r\n \treturn result;\r\n }", "public static void createOutputDirectoryPath(String path){\n \n new File(path).mkdirs();\n \n }", "private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}", "private static void makeDirPath(String targetAddr) {\n\t\tString parentPath = PathUtil.getImgBasePath() + targetAddr;\r\n\t\tFile dirPath = new File(parentPath);\r\n\t\tif (!dirPath.exists()) {\r\n\t\t\tdirPath.mkdirs();\r\n\t\t}\r\n\t}", "private File createWorkingDir( final String path )\n {\n File workDir = new File( path );\n workDir.mkdirs();\n return workDir;\n }", "public MkdirCommand() {\r\n // The name of the mkdir command\r\n name = \"mkdir\";\r\n\r\n // The description of the mkdir command\r\n description = \"Creates a directory ar the given path. The given path can\"\r\n + \" be a full path or a path relative to the working directory\";\r\n\r\n // The parameters for the mkdir command and their description\r\n parameters.put(\"DIR\", \"The path that points to where the new directory\"\r\n + \" should be created.\");\r\n }", "public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }", "@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}", "private void makeFolders( final File directoryToCreate )\n throws MojoExecutionException\n {\n this.logger.debug( \"Creating folder '\" + directoryToCreate.getAbsolutePath() + \"' ...\" );\n if ( directoryToCreate.mkdirs() == false )\n {\n throw new MojoExecutionException( \"Could not create folder '\" + directoryToCreate.getAbsolutePath() + \"'!\" );\n }\n }", "private static void createSaveDirIfNotExisting() {\n\t\tFile dir = new File(\"save\");\n\t\tif (!dir.exists()) {\n\t\t\t// directory does not exist => create!\n\t\t\tdir.mkdir();\n\t\t}\n\t}", "private void createTDenseDirectory() {\n File dense = new File(DenseLayerPath);\n dense.mkdir();\n }", "public void mkdir(String path) throws SystemException;", "public OutputResponse mkdirs(String path){\n String command = \"mkdir -p \" + path;\n return jobTarget.runCommand( command);\n }", "public static boolean createDBDir() {\n return (new File(path)).mkdirs();\n }", "public String createDirectory(String parentID, String new_directory) throws CloudStorageNotEnoughSpace {\n File newFile = new File();\n newFile.setTitle(new_directory);\n newFile.setMimeType(\"application/vnd.google-apps.folder\");\n newFile.setParents(Arrays.asList(new ParentReference().setId(parentID)));\n\n try {\n File insertedFile = drive.files().insert(newFile).execute();\n return insertedFile.getId();\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n\n }", "private void createNewDirectory() {\n getMainWindow().addWindow(\n new TextInputDialog(\n \"Create Directory\",\n \"Create Directory\",\n \"New Folder\",\n new TextInputDialog.Callback() {\n public void onDialogResult(boolean happy, String newDirectory) {\n if ( happy\n && isValidFile(newDirectory)) {\n try {\n // Verzeichnis anlegen\n File newDir = getFile(newDirectory);\n if (!newDir.exists()) {\n newDir.mkdir(0755);\n }\n // Prüfen, ob das Verzeichnis angelegt wurde\n if (newDir.exists()) {\n loadXtreemFSData();\n showNotification(\"Success\", \"Directory \" + newDirectory + \" created.\", Notification.TYPE_TRAY_NOTIFICATION, null);\n }\n else {\n showNotification(\"Error\", \"Directory \" + newDirectory + \" could not be created.\", Notification.TYPE_WARNING_MESSAGE, null);\n }\n } catch (IOException e) {\n showNotification(\"Error\", e.toString(), Notification.TYPE_ERROR_MESSAGE, e);\n }\n }\n }\n }));\n }", "public File createNewFolder(File paramFile) throws IOException {\n/* 803 */ if (paramFile == null) {\n/* 804 */ throw new IOException(\"Containing directory is null:\");\n/* */ }\n/* */ \n/* 807 */ File file = createFileObject(paramFile, newFolderString);\n/* */ \n/* 809 */ if (file.exists()) {\n/* 810 */ throw new IOException(\"Directory already exists:\" + file.getAbsolutePath());\n/* */ }\n/* 812 */ file.mkdirs();\n/* */ \n/* */ \n/* 815 */ return file;\n/* */ }", "@Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n if (!this.sourceDirectory.equals(dir)) {\n // Create this directory in the target and make it our current target.\n Path newDirectory = this.currentTargetDirectory.resolve(dir.getFileName());\n boolean didCreate = newDirectory.toFile().mkdir();\n Assert.assertTrue(didCreate);\n logger.output(\"Created directory: \" + newDirectory);\n this.currentTargetDirectory = newDirectory;\n }\n return FileVisitResult.CONTINUE;\n }", "public static native void mkdirs(String path, int mode) throws IOException;", "private void createServiceDirectory(String serviceID){\n \n String changedServiceID = serviceID.replaceAll(\"\\\\.\",\"&\");\n changedServiceID = changedServiceID.replaceAll(\":\",\"&\");\n \n //Create directory to store output files of service\n File dir = new File(sessionDirectory.getPath()+\"/\"+changedServiceID);\n dir.mkdir();\n \n //Add created directory to map \"servicesDirectories\"\n servicesDirectories.put(serviceID,dir);\n \n }", "public int mkdirs(String callingPkg, String path) throws RemoteException;", "public File createSubDirectories(String directoryPath) {\n File myFilesDir = new File(this.assetFolderPath, directoryPath);\n\n if(!myFilesDir.isDirectory()) {\n myFilesDir.mkdirs();\n }\n return myFilesDir;\n }", "private final void directory() {\n\t\tif (!this.plugin.getDataFolder().isDirectory()) {\n\t\t\tif (!this.plugin.getDataFolder().mkdirs()) {\n\t\t\t\tMain.SEVERE(\"Failed to create directory\");\n\t\t\t} else {\n\t\t\t\tMain.INFO(\"Created directory sucessfully!\");\n\t\t\t}\n\t\t}\n\t}", "public OutputResponse mkdir(String path){\n String command = \"mkdir \" + path;\n return jobTarget.runCommand( command );\n }", "private void setUpDirectories() {\r\n\t\tFile creation = new File(\"Creations\");\r\n\t\tFile audio = new File(\"Audio\");\r\n\t\tFile quiz = new File(\"Quiz\");\r\n\t\tFile temp = new File(\"Temp\");\r\n\r\n\t\tif (!creation.isDirectory()) {\r\n\t\t\tcreation.mkdir();\r\n\t\t}\r\n\t\tif (!audio.isDirectory()) {\r\n\t\t\taudio.mkdir();\r\n\t\t}\r\n\t\tif (!quiz.isDirectory()) {\r\n\t\t\tquiz.mkdir();\r\n\t\t}\r\n\t\tif (!temp.isDirectory()) {\r\n\t\t\ttemp.mkdir();\r\n\t\t}\r\n\r\n\t}", "public static void CrearDirectorio (String args){\n File directorio = new File(args);\n \n if (!directorio.exists()) {\n if (directorio.mkdirs()) {\n //System.out.println(\"Directorio creado\\n\");\n } else {\n //System.out.println(\"Error al crear directorio\\n\");\n }\n }\n }", "private void createFolder(String name, String path, Long id) {\n VMDirectory newDir = new VMDirectory();\n newDir.setName(name);\n editResourceService.createDir(id, name, new AsyncCallback<Long>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.say(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Long result) {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, id), newDir, result, true);\n folderPath_idMap.put(path, result);\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n });\n }", "@Override\n\tpublic String createDirectory(AuthenticationToken authenticationToken, String filePath, String idealFolderName, boolean force) \n\t\t\tthrows PermissionDeniedException, CreateDirectoryFailedException { \n\t\tif(idealFolderName.trim().isEmpty()) \n\t\t\tthrow new CreateDirectoryFailedException(\"Directory name is empty. The directory was not created.\");\n\t\t\n\t\tidealFolderName = fileNameNormalizer.normalize(idealFolderName);\n\t\t\n\t\tFile dir = new File(filePath);\n if(dir.isFile()) {\n \tdir = dir.getParentFile();\n \tfilePath = dir.getAbsolutePath();\n }\n dir.mkdirs();\n\t\t\n\t\tboolean permissionResult = filePermissionService.hasWritePermission(authenticationToken, filePath);\n\t\tif(!permissionResult)\n\t\t\tthrow new PermissionDeniedException();\n\t\telse {\n\t\t\tboolean inUseResult = this.isInUse(authenticationToken, filePath);\n\t\t\tif(inUseResult)\n\t\t\t\t//throw new CreateDirectoryFailedException(\"Can't create directory. Parent directory is currently in use.\");\n\t\t\t\tthrow new CreateDirectoryFailedException(\"Can't create directory. Parent directory \"+this.createMessageFileInUse(authenticationToken, filePath)+\". Delete the tasks using Task Manager, then try again.\");\n\t\t\telse {\n\t\t\t\tFile file = new File(filePath + File.separator + idealFolderName);\n\t\t\t\tboolean resultMkDir = file.mkdir();\n\t\t\t\tif(!resultMkDir && force) {\n\t\t\t\t\tString date = dateTimeFormat.format(new Date());\n\t\t\t\t\tidealFolderName = idealFolderName + \"_\" + date;\n\t\t\t\t\tfile = new File(filePath + File.separator + idealFolderName);\n\t\t\t\t\tresultMkDir = file.mkdir();\n\t\t\t\t\tint i = 1;\n\t\t\t\t\twhile(!resultMkDir) {\n\t\t\t\t\t\tfile = new File(filePath + File.separator + idealFolderName + \"_\" + i++);\n\t\t\t\t\t\tresultMkDir = file.mkdir();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!resultMkDir){ \n\t\t\t\t\tif(file.isDirectory() && file.exists())\n\t\t\t\t\t\tthrow new CreateDirectoryFailedException(\"Directory \"+file.getName()+\" already exists. You can try again with another name.\");\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new CreateDirectoryFailedException(\"Network or server errors\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn file.getAbsolutePath();\n\t\t\t}\n\t\t}\n\t}", "private static void createDir(File f) {\n int limit = 10;\n while (!f.exists()) {\n if (!f.mkdir()) {\n createDir(f.getParentFile());\n }\n limit --;\n if(limit < 1) {\n break;\n }\n }\n if (limit == 0) {\n }\n }", "public static void createDirectories() \r\n\t{\r\n\t\tif(!fCertificatesDir().exists()) \r\n\t\t{\r\n\t\t\tfCertificatesDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fDbDir().exists()) \r\n\t\t{\r\n\t\t\tfDbDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsDir().exists())\r\n\t\t{\r\n\t\t\tfMibsDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsBinaryDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsBinaryDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsTextDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsTextDir().mkdir();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n doCreateDir();\n }", "private File createEmptyDirectory() throws IOException {\n File emptyDirectory = findNonExistentDirectory();\n if (emptyDirectory.mkdir() == false) {\n throw new IOException(\"Can't create \" + emptyDirectory);\n }\n\n return emptyDirectory;\n }", "public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}", "public boolean createFolderInServerDir(String FolderName){\r\n File file = new File(serversDir, FolderName);\r\n if(file.exists()){\r\n Toast.makeText(mContext, \"server already exist\", Toast.LENGTH_SHORT).show();\r\n return false;\r\n }else{\r\n file.mkdirs();\r\n updateServerList();\r\n return true;\r\n }\r\n }", "Folder createFolder();", "private void createLocalFolder(File newFolder) {\n\n if (!newFolder.exists()) {\n newFolder.mkdirs();\n //TODO: what if the folder can't be created?\n PieLogger.trace(this.getClass(), \"Folder created!\");\n } else {\n PieLogger.debug(this.getClass(), \"Folder exits already?!\");\n }\n }", "protected void createDirStructure(final File dir, final int directoryDepth) throws IOException\n {\n if (directoryDepth > 0) {\n for (int i = 0; i < FileCache.hexLength; i++) {\n final File newDir = new File(dir.getAbsolutePath() + File.separator + Integer.toHexString(i));\n if (!newDir.exists() && !newDir.mkdirs()) {\n throw new IOException(\"Creating dir \" + newDir.getAbsolutePath() + \" failed.\");\n }\n this.createDirStructure(newDir, directoryDepth - 1);\n }\n }\n }", "@PreAuthorize(\"hasAuthority('file:write')\")\n @PostMapping(\"/newDirectory\")\n public String createNewDirectory(@RequestParam(\"folderName\") String folderName,\n HttpSession httpSession,\n RedirectAttributes redirectAttributes) {\n String currentDirectory = httpSession.getAttribute(\"currentFolderPath\").toString();\n\n //create New directory from the request\n storageService.createNewDirectory(currentDirectory + File.separator + folderName);\n\n redirectAttributes.addFlashAttribute(\"message\",\n \"New directory created\");\n\n return \"redirect:/\";\n }", "public static void createRequiredDirectories()\n\t{\n\n\t\t/*Input_Files dir creation */\n\t\tFile inpDir = new File(INPUT_DIR_NAME);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!inpDir.exists())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tinpDir.mkdir();\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLOG_WRITER.write(DIR_CREATION_ERROR + INPUT_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\tSystem.out.println(DIR_CREATION_ERROR + INPUT_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t} catch (IOException e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\n\t\t/*Logs dir creation */\n\t\tFile logsDir = new File(LOGS_DIR_NAME);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!logsDir.exists())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tlogsDir.mkdir();\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLOG_WRITER.write(DIR_CREATION_ERROR + LOGS_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\tSystem.out.println(DIR_CREATION_ERROR + LOGS_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t} catch (IOException e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "private void createRootDirectory(String rootDirectoryPath) throws Exception {\n\t\tlogger.traceEntry();\n\n\t\trootDirectory = new Path(rootDirectoryPath);\n\t\tif (!hadoopFileSystem.exists(rootDirectory)) {\n\t\t\tlogger.warn(\"Directory \" + rootDirectoryPath + \" does not exist, creating\");\n\t\t\thadoopFileSystem.mkdirs(rootDirectory);\n\t\t}\n\t\tlogger.traceExit();\n\t}", "public static Menu createFolder(Menu parentMenu, String menuName) {\r\n Menu menu = new Menu();\r\n menu.setMenuText(menuName);\r\n menu.setMenuParent(parentMenu.getMenuId());\r\n menu.setMenuSort(0);\r\n menu.setMenuIcon(\"folder.gif\");\r\n menu.setMenuPath(parentMenu.getMenuPath() + \"/\" + parentMenu.getMenuId());\r\n menu.setMenuType(Menu.MENUTYPE_DIRECTORY);\r\n menu.setMenuHier(parentMenu.getMenuHier() + 1);\r\n menu.setMenuRef(\"\");\r\n for (MenuGroup mg : parentMenu.getMenuGroups()) {\r\n menu.getMenuGroups().add(mg);\r\n }\r\n\r\n MenuDAO menuDao = (MenuDAO) Context.getInstance().getBean(MenuDAO.class);\r\n if (menuDao.store(menu) == false)\r\n return null;\r\n return menu;\r\n }", "private void createRequiredDirectory(String outdir, String className) throws IOException\r\n\t{\n\t\tString workingdirectory = System.getProperty(\"user.dir\");\r\n\t\t\r\n\t\t//used to create directory\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report/Failure_Screenshot\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory + \"/custom-test-report\" + \"/\" + className);\r\n\t\tscreenshotDir.mkdir();\r\n\t}", "@Test\n\tpublic void Directories() {\n\t\t\n\t\tString dirs = \"test/one/two/\";\n\t\tFile d = new File(dirs);\n\t\td.mkdirs();\n\t\tAssert.assertTrue(d.exists());\n\t\t\n\t\t//Cleanup\n\t\tif(d.delete()) {\n\t\t\td = new File(\"test/one\");\n\t\t\tif(d.delete()) {\n\t\t\t\td = new File(\"test\");\n\t\t\t\td.delete();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Directory(String name) {\n super(name);\n this.parent = null;\n }", "public static void mkdirs(String owner, Path path) throws CWLException {\r\n File dir = path.toFile();\r\n if (!dir.exists() && !dir.mkdirs()) {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.mkdir.failed\", path.toString(), owner), 255);\r\n }\r\n }", "@PostMapping(\"/createfolder\")\n public String createFolder(@RequestParam(name=\"directoryName\", required=true) String directoryName, @RequestParam(name=\"currentPath\", required=true) String currentPath, RedirectAttributes redirectAttributes) {\n try {\n logger.log(Level.INFO, \"Creating directory\");\n uiCommandService.createNewFolder(directoryName, currentPath);\n logger.log(Level.INFO, \"Folder was created successfully!\");\n redirectAttributes.addFlashAttribute(\"success_messages\",\"[Successfully created \" + directoryName + \"!]\");\n } catch (DirectoryExistsException e) {\n redirectAttributes.addFlashAttribute(\"error_messages\", \"[\"+ directoryName +\" already exists!]\");\n logger.log(Level.WARNING, \"Folder {0} already exist in {1}\", new Object[]{directoryName, currentPath});\n }\n return \"redirect:/imageview?location=\" + currentPath.replace(\"\\\\\", \"/\");\n }", "public static void creator(Website websiteInfo){\n //creates folder using info on current directory\n File newFolder = new File(websiteInfo.currentPath);\n boolean websiteTest = newFolder.mkdir();\n\n if(websiteTest){\n System.out.println(\"Created ./website/\"+ websiteInfo.name);\n htmlFile(websiteInfo);\n createCSSJava(websiteInfo);\n }else{\n System.out.println(\"Could not create website\");\n }\n }", "public static native boolean mkdir(String path, int mode)\n throws IOException;", "public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}", "public static boolean createRootFile(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"touch \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "public static void createDirs(final String fileName) throws SQLException {\n\n FileSystem.getInstance(fileName).createDirs(fileName);\n }", "public static void createLogsFolder(String name, String folderPath) {\r\n\t\tFile path = new File(folderPath);\r\n\t\tFile file = new File(folderPath+name+\".txt\");\r\n\t\tif(!file.exists()) {\r\n\t\t\tpath.mkdirs();\r\n\t\t\ttry {file.createNewFile();} catch (IOException e) {System.err.println(\"The file \\\"\"+name+\"\\\" cannot be created : \"+e.getMessage());}\r\n\t\t}\r\n\t}", "static void mkdirs(File f) {\n f.mkdirs();\n }", "static void createOutputStructure(final File dir) throws MojoExecutionException {\n if (!dir.exists() && !dir.mkdirs()) {\n throw new MojoExecutionException(\"could not create output directory \" + dir.getAbsolutePath());\n }\n }" ]
[ "0.7761953", "0.77117425", "0.7621944", "0.7582399", "0.75241584", "0.7457002", "0.73768806", "0.7049972", "0.68862784", "0.6759008", "0.6751739", "0.6725161", "0.66778064", "0.660052", "0.66002345", "0.6575107", "0.655949", "0.6529112", "0.64925885", "0.6483453", "0.64302504", "0.64135903", "0.6377397", "0.63305706", "0.62736887", "0.6261963", "0.6249078", "0.624282", "0.6235406", "0.61941886", "0.61889946", "0.6186473", "0.6173079", "0.61532027", "0.61374587", "0.61373585", "0.6108248", "0.6087374", "0.6022048", "0.600527", "0.60038805", "0.59854907", "0.59786147", "0.59614676", "0.5939988", "0.59391147", "0.5917324", "0.58969134", "0.5893975", "0.587172", "0.5845011", "0.5817039", "0.5781393", "0.57739264", "0.5761478", "0.57430524", "0.57427126", "0.57423204", "0.57408875", "0.57301444", "0.572466", "0.57233185", "0.5720848", "0.57105863", "0.5710276", "0.57011247", "0.5694797", "0.5664731", "0.5661637", "0.56412446", "0.5616814", "0.5600825", "0.5596956", "0.55897665", "0.55773973", "0.5566777", "0.54968554", "0.5489438", "0.547867", "0.54663754", "0.5446187", "0.5432697", "0.5422381", "0.5406319", "0.5406087", "0.5397682", "0.53962415", "0.5380422", "0.5371506", "0.53658515", "0.5305596", "0.5300447", "0.52930003", "0.52865297", "0.527787", "0.5273767", "0.5272793", "0.52663904", "0.5243272", "0.5228179" ]
0.6949092
8
Gets the size of the file in bytes.
public static long getFileSize(String fileName) { return new File(fileName).length(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long size() {\n return file.length();\n }", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "public long getSize() {\r\n return mFile.getSize();\r\n }", "public long size() {\n return this.filePage.getSizeInfile();\n }", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "public long getFileSize();", "public long getFileSize();", "public long getSizeFromFile(File file) {\n\t\tlong size = 0;\n\t\tif (file != null) {\n\t\t\tsize = file.length();\n\t\t}\n\t\treturn size;\n\t}", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public long length() {\n return _file.length();\n }", "long getFileSize();", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "private int getFileSize(File file) {\r\n\t\tFileInputStream fis = null;\r\n\t\ttry {\r\n\t\t\tfis = new FileInputStream(file);\r\n\t\t\tint size = fis.available();\r\n\t\t\tfis.close();\r\n\t\t\treturn size;\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "public long getFileLength() {\n\n return fileLength;\n\n }", "public final long getFileLength()\n\t\tthrows IOException {\n\t\t\n\t\t//\tGet the file length\n\t\t\n\t\tFile tempFile = new File(getTemporaryFile());\n\t\treturn tempFile.length();\n\t}", "long sizeInBytes() throws IOException;", "public long getFileSize(String fileName)\n {\n long size = -1;\n\n File file = new File(fileLocation.getAbsolutePath() + File.separatorChar\n + fileName);\n\n if (file.isFile())\n {\n size = file.length();\n }\n\n return size;\n }", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "public long getFileSize() {\r\n return fileSize;\r\n }", "public long getFileSize(String filename) {\n\t\treturn 0;\n\t}", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public Long sizeInKB() {\n return this.sizeInKB;\n }", "public int getFileSize (String filePath) throws RemoteException {\r\n\t\tint size;\r\n\t\tFile myFile = new File(filePath);\r\n\t\tsize = (int)myFile.length();\r\n\t\treturn size;\r\n\r\n\t\t\t\t\r\n\t}", "public static long getFileSize(String filePath) {\n\t\treturn new File(filePath).length();\n\t}", "long getFileLength(String path) throws IOException;", "public final long length() throws IOException {\r\n\t\treturn f.length();\r\n\t}", "public String getFileSize() {\n return fileSize;\n }", "public int size() {\n return bytes.length;\n }", "public long getFileSize() {\n return this.originalFileSize;\n }", "protected long getDataFileSize() throws IOException\r\n {\r\n long size = 0;\r\n\r\n storageLock.readLock().lock();\r\n\r\n try\r\n {\r\n if (dataFile != null)\r\n {\r\n size = dataFile.length();\r\n }\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n return size;\r\n }", "public float getFileSize() {\n return fileSize_;\n }", "@Override\n public long size() {\n if (!isRegularFile()) {\n throw new IllegalStateException(\"not a regular file!\");\n }\n return this.fileSize;\n }", "public Long sizeInBytes() {\n return this.sizeInBytes;\n }", "@Override\n\tpublic long contentLength() throws IOException {\n\t\treturn Files.size(this.path);\n\t}", "public static long getFileSize(String path) {\n if (path == null || path.isEmpty()) {\n return -1;\n }\n File file = new File(path);\n return (file.exists() && file.isFile() ? file.length() : -1);\n }", "public float getFileSize() {\n return fileSize_;\n }", "long getSize() throws IOException;", "long getSize() throws IOException {\n return fileRWAccessSize.get();\n }", "public long getByteCount() {\n return byteCount;\n }", "public long size(String path);", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "@XmlElement\n public long getFileSize() {\n return this.fileSize;\n }", "public static long getDownloadingFileSize() {\n\t\treturn downloadingFileSize;\n\t}", "@Override\n public synchronized long size(Path file) throws FileNotFoundException\n {\n File f = file.toFile(root);\n if (!f.exists() || f.isDirectory())\n throw new FileNotFoundException(\"File not found or is a directory\");\n return f.length(); \n }", "public Integer getFileSize(Long key) {\n File file = new File(MUSIC_FILE_PATH + File.separator + key + \".mp3\");\n return (int)file.length();\n }", "public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}", "public long getDbFileSize() {\r\n\tlong result = -1;\r\n\r\n\ttry {\r\n\t File dbFile = new File(fileName);\r\n\t if (dbFile.exists()) {\r\n\t\tresult = dbFile.length();\r\n\t }\r\n\t} catch (Exception e) {\r\n\t // nothing todo here\r\n\t}\r\n\r\n\treturn result;\r\n }", "public long getSize() {\n\t\treturn size;\n\t}", "public void determineFileSize() {\n \t//Creating scanner object\n \tScanner scan = new Scanner(System.in);\n \tSystem.out.println(\"Please enter the path of the file you'd like to determint the size of\");\n \t\n \t//Capturing file path as filePath variable\n \tString filePath = scan.next();\n \t//using Java Nio\n \tPath path = Paths.get(filePath);\n\t\t\n \ttry {\n\t\t\tLong fileSize = Files.size(path);\n\t\t\tSystem.out.println(String.format(\"%s, bytes\", fileSize));\n\t\t\tSystem.out.println(String.format(\"%s, kilobytes\", fileSize/1024));\n\n\t\t\t\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \tscan.close();\n \t\n }", "public static byte getSize() {\n return SIZE;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "long getSize() throws FileSystemException;", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public abstract long size() throws IOException;", "public long picoSize() throws IOException {\n return _backing.length();\n }", "public long getFileCompressedSize()\r\n {\r\n return lFileCompressedSize;\r\n }", "public long getSize() {\n return size.get();\n }", "public int size() {\n return files.size();\n }", "public long getCurrentFileLength() {\n\t\tif (requestedFile != null) {\n\t\t\ttry {\t// avoid race conditions\n\t\t\t\treturn requestedFile.length;\n\t\t\t} catch (NullPointerException e) {}\n\t\t}\n\t\ttry {\t// avoid race conditions\n\t\t\treturn currentFile.length;\n\t\t} catch (NullPointerException e) {}\n\t\treturn 0;\n\t}", "public long getSizeOfImage()\n throws IOException, EndOfStreamException\n {\n return peFile_.readUInt32(relpos(Offsets.SIZE_OF_IMAGE.position));\n }", "public long getSize() {\r\n return size;\r\n }", "public double fileSizeMB(String filePath) throws NumberFormatException, IOException {\n \tFile file = new File(filePath.replace(\"\\\\\", \"/\"));\n if(file.exists()) {\n // fileWriterPrinter(\"FILE SIZE: \" + file.length() + \" Bit\");\n // fileWriterPrinter(\"FILE SIZE: \" + file.length()/1024 + \" Kb\");\n fileWriterPrinter(\"FILE SIZE: \" + ((double) file.length()/(1024*1024)) + \" Mb\");\n return (double) file.length()/(1024*1024);\n } else { fileWriterPrinter(\"File doesn't exist\"); return 0; }\n \n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public native long getReceivedByteCount()\n throws IOException, IllegalArgumentException;", "public long size() {\n\t\treturn size;\n\t}", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "public synchronized long size() {\n\t\treturn size;\n\t}", "public final long getSize() { return size; }", "Long diskSizeBytes();", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public Number getFileCount() {\r\n\t\treturn (this.fileCount);\r\n\t}", "public long getSize();", "public int TotalBytes()\n {\n int totalBytes = request.getContentLength();\n if (totalBytes == -1) return 0;\n return totalBytes;\n }", "private Long computeSize(InputStreamWrapper stream) throws IOException {\n long size = 0;\n try (InputStream inStream = stream.getStream()) {\n byte[] buffer = new byte[1024 * 1024]; // 1MB\n int chunkBytesRead;\n while ((chunkBytesRead = inStream.read(buffer)) != -1) {\n size += chunkBytesRead;\n }\n }\n\n return size;\n }", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "int getFileCount();", "public int getSizeBytes() {\n if (getDataType() == DataType.SEQUENCE)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRING)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRUCTURE)\n return size * members.getStructureSize();\n // else if (this.isVariableLength())\n // return 0; // do not know\n else\n return size * getDataType().getSize();\n }", "public long getSize() {\n return mSize;\n }", "public long getTotalSize() {\n return totalSize;\n }", "public int getFileSize(Uri uri) {\n\t\tContentResolver cr = getContentResolver();\n\t\tInputStream is = null;\n\t\tint size = 0;\n\t\ttry {\n\t\t\tis = cr.openInputStream(uri);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tsize = is.available();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString fileSize = android.text.format.Formatter.formatShortFileSize(\n\t\t\t\tthis, size);\n\n\t\tint sizef = (int) Float.parseFloat(fileSize.substring(0,\n\t\t\t\tfileSize.length() - 2));\n\t\treturn sizef;\n\t}", "int getByteCount() {\n\t\treturn byteCount;\n\t}", "public long getInstrumentedFileSize() {\n if (this.rewrittenFile != null) return this.rewrittenFile.length();\n else return -1;\n }", "public final int getSize() {\n return size;\n }", "public int getByteLength() {\n return byteLength;\n }", "long getMaxFileSizeBytes();", "public int getTotalSize();" ]
[ "0.8441944", "0.82988083", "0.8283543", "0.8107492", "0.80137855", "0.79849863", "0.7918594", "0.7804852", "0.7804852", "0.7760834", "0.7713304", "0.7653076", "0.7604042", "0.75575256", "0.74928755", "0.7492357", "0.7485215", "0.7482278", "0.74371046", "0.74079996", "0.73906285", "0.7373502", "0.7361059", "0.73288625", "0.7324", "0.73173314", "0.7254365", "0.7246914", "0.71942717", "0.7164844", "0.71515805", "0.7106763", "0.70931566", "0.7079846", "0.70773584", "0.70648545", "0.70428836", "0.7032526", "0.702618", "0.7009268", "0.6993753", "0.698122", "0.695932", "0.693494", "0.69263685", "0.6867752", "0.68637407", "0.6848482", "0.6832759", "0.6824391", "0.6806412", "0.68012035", "0.6798382", "0.6795684", "0.6775668", "0.67735875", "0.67710614", "0.6759291", "0.6750694", "0.6730322", "0.67247516", "0.672136", "0.67121696", "0.67121696", "0.67121696", "0.67121696", "0.66999966", "0.6695029", "0.6691451", "0.6687908", "0.66872674", "0.66664296", "0.6663022", "0.6651644", "0.6646374", "0.6646132", "0.6643935", "0.66189146", "0.66179496", "0.66040343", "0.65842617", "0.65808696", "0.657734", "0.6575811", "0.65613496", "0.65450376", "0.6541626", "0.65396035", "0.6526847", "0.6526268", "0.65194833", "0.65131027", "0.64957637", "0.64581144", "0.64477485", "0.6436389", "0.64127195", "0.64116925", "0.6409839", "0.6400242" ]
0.72203106
28
Delete the file/folder in the file system called fileName
public static boolean deleteFile(String fileName) { // A File object to represent the filename File f = new File(fileName); // Make sure the file or directory exists and isn't write protected if (!f.exists()) throw new IllegalArgumentException( "Delete: no such file or directory: " + fileName); if (!f.canWrite()) throw new IllegalArgumentException("Delete: write protected: " + fileName); // If it is a directory, make sure it is empty if (f.isDirectory()) { String[] files = f.list(); if (files.length > 0) throw new IllegalArgumentException( "Delete: directory not empty: " + fileName); } // Attempt to delete it boolean success = f.delete(); if (!success) throw new IllegalArgumentException("Delete: deletion failed"); return success; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void deleteFile(String fileName) {\n\t\tFile f = new File(fileName);\n\n\t\t// Make sure the file or directory exists and isn't write protected\n\t\tif (!f.exists())\n\t\t\treturn;\n\t\t// throw new IllegalArgumentException(\"Delete: no such file or directory: \" + fileName);\n\n\t\tif (!f.canWrite())\n\t\t\tthrow new IllegalArgumentException(\"Delete: write protected: \"\n\t\t\t\t\t+ fileName);\n\n\t\t// If it is a directory, make sure it is empty\n\t\tif (f.isDirectory()) {\n\t\t\tString[] files = f.list();\n\t\t\tif (files.length > 0)\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"Delete: directory not empty: \" + fileName);\n\t\t}\n\n\t\t// Attempt to delete it\n\t\tboolean success = f.delete();\n\n\t\tif (!success)\n\t\t\tthrow new IllegalArgumentException(\"Delete: deletion failed\");\n\t}", "private void deleteFile() {\n\t\tFile dir = getFilesDir();\n\t\tFile file = new File(dir, FILENAME);\n\t\tfile.delete();\n\t}", "void deleteFile(FsPath path);", "public static void deleteFile()\n\t{\n\t\t//Variable Declaration\n\t\tString fileName;\n\t\tScanner obj = new Scanner(System.in);\n\t\t\n\t\t//Read file name from user\n\t\tSystem.out.println(\"Enter file name to delete:\");\n\t\tfileName= obj.nextLine();\n\t\t\n\t\t//Deleting the file\n\t\tboolean isDeleted = FileManager.deleteFile(folderpath, fileName);\n\t\t\n\t\tif(isDeleted)\n\t\t\tSystem.out.println(\"File deleted successfully\");\n\t\telse\n\t\t\tSystem.out.println(\"File not found! Enter valid file name.\");\n\t}", "public void delete_File(){\n context.deleteFile(Constant.FILE_NAME);\n }", "private void delete(String name) {\n File f = new File(name);\n if (f.exists()) {\n f.delete();\n }\n }", "public void deleteImgFromDirectory1(String fileName) {\n File f = new File(fileName);\r\n\r\n // Mi assicuro che il file esista\r\n if (!f.exists()) {\r\n throw new IllegalArgumentException(\"Il File o la Directory non esiste: \" + fileName);\r\n }\r\n\r\n // Mi assicuro che il file sia scrivibile\r\n if (!f.canWrite()) {\r\n throw new IllegalArgumentException(\"Non ho il permesso di scrittura: \" + fileName);\r\n }\r\n\r\n // Se è una cartella verifico che sia vuota\r\n if (f.isDirectory()) {\r\n String[] files = f.list();\r\n if (files.length > 0) {\r\n throw new IllegalArgumentException(\"La Directory non è vuota: \" + fileName);\r\n }\r\n }\r\n\r\n // Profo a cancellare\r\n boolean success = f.delete();\r\n\r\n // Se si è verificato un errore...\r\n if (!success) {\r\n throw new IllegalArgumentException(\"Cancellazione fallita\");\r\n }\r\n }", "public boolean delete(String filename);", "public void deleteFile(File f);", "private static void removeFromWorking(String fileName) {\n for (File file : WORKING_DIR.listFiles()) {\n if (!file.isDirectory()) {\n if (file.getName().equals(fileName)) {\n file.delete();\n break;\n }\n }\n }\n }", "public static void tryDelete(final String fileName) {\n\n final boolean deleted = FileSystem.getInstance(fileName).tryDelete(fileName);\n\n // if (!deleted) {\n // System.err.println(\"File not deleted: \" + fileName);\n // }\n }", "public void deleteFile(String filePath){\n File myFile = new File(filePath);\n if (myFile.exists()) {\n myFile.delete();\n System.out.println(\"File successfully deleted.\");\n } else {\n System.out.println(\"File does not exists\");\n }\n }", "public void delete_file(String file_name) throws Exception{\n\t\tFile file = new File(file_name);\n\t\tif (file.exists() && file.isFile()) file.delete();\n\t\telse if(file.isDirectory()){\n\t\t\tfor(File f : file.listFiles()){\n\t\t\t\tdelete_file(f.getAbsolutePath());\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}", "void deleteFile(FileReference fileReferece);", "public String deleteCache(String fileName)\n {\n File file = new File(getCacheDir(), fileName);\n accessToken = null;\n if (file.exists())\n {\n Boolean successCheck = file.delete();\n\n if (successCheck == true)\n {\n return \"File successfully deleted.\";\n }\n } else\n {\n return \"There is no file with that name.\";\n }\n return \"The file was not deleted.\";\n }", "public boolean deleteFile(String fileName) {\n File file = new File(FILES_PATH + \"/\" + fileName);\n if (file == null || !file.exists() || file.isDirectory())\n return false;\n return file.delete();\n }", "@Override\n public boolean deleteFile(String fileName) {\n // Check parameters\n if (fileName == null || fileName.isEmpty()) {\n return false;\n }\n\n LOGGER.info(\"Deleting File \" + fileName);\n\n // Emit event\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.Event.DELETE.getId(), Tracer.Event.DELETE.getType());\n }\n\n // Parse the file name and translate the access mode\n try {\n DataLocation loc = createLocation(fileName);\n ap.markForDeletion(loc);\n } catch (IOException ioe) {\n ErrorManager.fatal(ERROR_FILE_NAME, ioe);\n } finally {\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n }\n }\n\n // Return deletion was successful\n return true;\n }", "public static int delete(String fileName) {\n return Kernel.interrupt(Kernel.INTERRUPT_SOFTWARE, Kernel.DELETE, 0, fileName);\n }", "public static void delete(String filename) \n throws IOException {\n if ((filename != null) && (!filename.isEmpty())) {\n delete(new File(filename));\n }\n }", "public static void doRemove(String fileName) {\n Stage fromSave = Utils.readObject(STAGED_FILES,\n Stage.class);\n HashSet<String> stagedFiles = fromSave.getStagedFiles();\n Commit currHead = Utils.readObject(TREE_DIR, Tree.class).\n getCurrHead();\n if (stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (stagedFiles.contains(fileName) && !currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (!stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n if (!Utils.filesSet(WORKING_DIR).contains(fileName)) {\n File removedFile = Utils.join(STAGE_RM_DIR, fileName);\n try {\n removedFile.createNewFile();\n } catch (IOException ignored) {\n return;\n }\n String contents = currHead.getBlobs().get(fileName).\n getContents();\n Utils.writeContents(removedFile, contents);\n } else {\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n }\n } else {\n System.out.println(\"No reason to remove the file.\");\n System.exit(0);\n }\n }", "public static boolean rm(final String fileName) {\n return new File(fileName).delete();\n }", "public void removeFile(FileContentType fileContentType, String fileName) throws ServiceException;", "public boolean deleteSDFile(String fileName) {\n File file = new File(SD_FILES_PATH + \"/\" + fileName);\n if (file == null || !file.exists() || file.isDirectory())\n return false;\n return file.delete();\n }", "private static boolean deleteFile(String fileName) {\n File f = new File(fileName);\n\n // Make sure the file or directory exists and isn't write protected\n// if (!f.exists())\n// throw new IllegalArgumentException(\n// \"Delete: no such file or directory: \" + fileName);\n//\n// if (!f.canWrite())\n// throw new IllegalArgumentException(\"Delete: write protected: \"\n// + fileName);\n\n // If it is a directory, make sure it is empty\n// if (f.isDirectory()) {\n// String[] files = f.list();\n// if (files.length > 0)\n// throw new IllegalArgumentException(\n// \"Delete: directory not empty: \" + fileName);\n// }\n\n // Attempt to delete it\n boolean success = f.delete();\n\n// if (!success)\n// throw new IllegalArgumentException(\"Delete: deletion failed\");\n return success;\n }", "public static void main(String[] args){\nFile filez = new File(\"d:/prac/sub1\");\r\ndeleteFolder(filez);\r\n}", "protected synchronized void delete()\n {\n if (this.file.exists())\n {\n this.file.delete();\n }\n }", "private static boolean DeleteFile(String fileName) {\n boolean delete = false;\n File f = new File(fileName);\n if (f.exists()) {\n delete = f.delete();\n }\n return delete;\n }", "public static void deleteFile(String inputFile){\n File file = new File(inputFile);\n //validate the file\n if(file.isFile()){\n try{\n if(file.delete())\n System.out.println(\"File \"+inputFile+\" has been deleted.\");\n else\n System.out.println(\"Error in deleting the file.\");\n }catch(Exception e){\n e.printStackTrace();\n }\n }else{\n System.out.println(\"Invalid file path.\");\n }\n }", "public static void deleteFile(String filePath) {\n File file = getFile(filePath);\n if (file.exists()) {\n file.delete();\n }\n }", "void fileDeleted(String path);", "public void delete( String name) throws PhileNotFoundException {\n\t\tif (!fileList.containsKey(name)) {\n\t\t\tthrow new PhileNotFoundException(\"File doesn't exist\");\n\t\t}\n\t\telse {\n\t\t\tPhile phile = fileList.get(name);\n\t\t\tfileList.remove(name);\n\t\t\ttotalNumberOfFiles--;\n\t\t\tif (openFiles.contains(phile)) {\n\t\t\t\topenFiles.remove(phile);\n\t\t\t\tnumberOfOpenFiles--;\n\t\t\t}\n\t\t}\n }", "private void deleteFile(String runtimePropertiesFilename) {\n File f = new File(runtimePropertiesFilename);\r\n\r\n // Make sure the file or directory exists and isn't write protected\r\n if (!f.exists())\r\n return; // already gone!\r\n\r\n if (!f.canWrite())\r\n throw new IllegalArgumentException(\"Delete: write protected: \"\r\n + runtimePropertiesFilename);\r\n\r\n // If it is a directory, make sure it is empty\r\n if (f.isDirectory()) {\r\n String[] files = f.list();\r\n if (files.length > 0)\r\n throw new IllegalArgumentException(\r\n \"Delete: directory not empty: \" + runtimePropertiesFilename);\r\n }\r\n\r\n // Attempt to delete it\r\n if (!f.delete())\r\n throw new IllegalArgumentException(\"Delete: deletion failed\");\r\n }", "abstract public void remove( String path )\r\n throws Exception;", "@Override\n public void delete(File file) {\n }", "private void deleteFile(java.io.File file) {\n if (file.isDirectory()) {\n for (java.io.File f : file.listFiles()) \n deleteFile(f);\n }\n \n if (!file.delete())\n try {\n throw new FileNotFoundException(\"Failed to delete file: \" + file.getName());\n } catch (FileNotFoundException e) {\n System.err.println(\"Delete of file \" + file.getAbsolutePath() + \" failed\");\n e.printStackTrace();\n }\n }", "private static void remover(String st){\n File f = new File(st);\n boolean isDeleted = f.delete();\n if(isDeleted == true) System.out.println(st + \"(removido com sucesso)\");\n }", "public static void deleteFile(String strFilePath) {\n File file = new File(strFilePath);\n file.delete();\n }", "@Override\r\n\tpublic void remFile(String path) {\n\t\t\r\n\t}", "boolean deleteFile(File f);", "public static void delete(File file) throws IOException {\n String method = \"delete() - \";\n if ((file != null) && (file.exists())) {\n if (file.isDirectory()) {\n if (file.list().length == 0) {\n file.delete();\n }\n else {\n String files[] = file.list();\n for (String current : files) {\n File fileToDelete = new File(file, current);\n delete(fileToDelete);\n if (file.list().length == 0) {\n file.delete();\n }\n }\n }\n }\n else {\n file.delete();\n }\n }\n else {\n throw new IOException(method \n + \"The input file is null or does not exist.\");\n }\n }", "protected void remove(String filename) throws IOException {\n\t\tthrow new IOException( \"not implemented\" ); //TODO map this to the FileSystem\n\t}", "public void deleteFileByName(String nomFichier) throws IOException {\n\t\tif (nomFichier != null && !nomFichier.isEmpty()) {\n\t\t\tPath target = Paths.get(folder_photo + nomFichier);\n\t\t\tFiles.deleteIfExists(target);\n\t\t}\n\n\t}", "@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "public int remove(String pathname) throws YAPI_Exception\n {\n byte[] json = new byte[0];\n String res;\n json = sendCommand(String.format(Locale.US, \"del&f=%s\",pathname));\n res = _json_get_key(json, \"res\");\n //noinspection DoubleNegation\n if (!(res.equals(\"ok\"))) { throw new YAPI_Exception( YAPI.IO_ERROR, \"unable to remove file\");}\n return YAPI.SUCCESS;\n }", "public void deleteFile() {\n\t\tif (JOptionPane.showConfirmDialog(desktopPane,\n\t\t\t\t\"Are you sure? this action is permanent!\") != JOptionPane.YES_OPTION)\n\t\t\treturn;\n\n\t\tEllowFile file = null;\n\t\tTreePath paths[] = getSelectionModel().getSelectionPaths();\n\t\tif (paths == null)\n\t\t\treturn;\n\t\tfor (TreePath path : paths) {\n\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) path\n\t\t\t\t\t.getLastPathComponent();\n\t\t\tfile = (EllowFile) node.getUserObject();\n\t\t\tEllowynProject project = file.parentProject;\n\t\t\tfile.deleteAll();\n\t\t\tif (!file.isProjectFile && project != null)\n\t\t\t\tproject.rebuild(); // don't rebuild the project if the project\n\t\t\t\t\t\t\t\t\t// itself is deleted\n\t\t\tdesktopPane.closeFrames(file);\n\t\t\tmodel.removeNodeFromParent(node);\n\t\t}\n\t}", "public static void deleteFileFromInternal(Context mContext, String fileName) {\n\t\ttry {\n\t\t\tmContext.deleteFile(fileName);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void deletaArquivo(String nomeArquivo){\n\t\tboolean logExiste = false;\n\t\t\n\t\tFile file = new File(nomeArquivo);\n\t\tlogExiste = file.exists();\n\t\t\n\t\tif(logExiste){\n\t\t\tfile.delete();\n\t\t}\n\t}", "private static void removeFile(File fileDir) throws Exception {\n String fileName = getFileNameInput();\n File fileToRemove = new File(fileDir.toString() + \"\\\\\" + fileName);\n boolean fileRemoved = fileToRemove.delete();\n if (fileRemoved) {\n System.out.println(\"File removed successfully.\");\n } else {\n throw new FileNotFoundException(\"No such file under current directory.\");\n }\n }", "public static boolean deleteFile(String string) {\n\t\tFile f=new File(string);\n\t\tlog(\"Delete: '\"+string+\"' \"+f.exists());\n\t\treturn f.delete();\n\t\t\n\t}", "public int deleteFile(String datastore, String filename) throws HyperVException;", "@RequestMapping(value=\"/my_files\", method = RequestMethod.DELETE)\n @ResponseBody\n public AppResponse delete(@RequestParam String path) throws IOException, InvalidValueException,FilePathAccessDeniedException {\n\n String username = CSQLUserContext.getCurrentUser().getUsername();\n if(validator.isValidAndUserHasAccess(username, path)){\n return fileSystemService.delete(path, true);\n }\n\n return AppResponse.error();\n }", "public void delete() throws Exception {\n\n getConnection().do_Delete(new URL(getConnection().getFilemanagerfolderendpoint() + \"/\" + getId()),\n getConnection().getApikey());\n }", "public static void fileDelete(String filePath) {\n\t\tFile f = new File(filePath);\n\n\t\t// noinspection ResultOfMethodCallIgnored\n\t\tf.delete();\n\t}", "public static void deleteFolder(String path){\n List<CMSFile> files = CMSFile.find(\"name like '\" + path + \"%'\").fetch();\n for (CMSFile file: files){\n if (file.data != null && file.data.exists()) {\n file.data.getFile().delete();\n }\n file.delete();\n }\n }", "public boolean deleteFile(String inKey) throws NuxeoException;", "private void deleteFile() {\r\n actionDelete(dataModelArrayList.get(position));\r\n }", "private void deleteFile(String oldPic) {\n\n\n File fileDir = new File(oldPic);\n if (fileDir.exists()) {\n \n fileDir.delete();\n }\n\n }", "public void deleteData(String filename, SaveType type);", "private void delete(File file) {\n if (file.isDirectory()) {\n cleanDirectory(file);\n }\n file.delete();\n }", "public static void clear(final String filename) throws IOException {\n\t\tif (!new File(SAVES_FOLDER + filename).delete()) {\n\t\t\tthrow new IOException();\n\t\t}\n\t}", "public void delete() {\r\n Log.d(LOG_TAG, \"delete()\");\r\n for (int i = 0; i < mNumSegments; i++) {\r\n File chunk = new File(getFileNameForIndex(i));\r\n if (chunk.delete()) {\r\n Log.d(LOG_TAG, \"Deleted file \" + chunk.getAbsolutePath());\r\n }\r\n }\r\n new File(mBaseFileName + \".zip\").delete();\r\n }", "public void delete(String path) throws IOException {\n Path destionationPath = new Path(path);\n\n if (!hdfs.exists(destionationPath)) {\n throw new IOException(\"File/directory doesn't exists!\");\n }\n hdfs.delete(destionationPath, true);\n }", "public static void deleteObject(String path, String name) throws Exception {\n if (!exists(path, name))\n throw new Exception (\"File does not exist!\");\n new File(kNetworkPath + name).delete();\n }", "@Override\r\n\tpublic boolean removeFile(String filePath) throws FileSystemUtilException {\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":deleteFile()\");\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tconnect(); \r\n\t\t\tString command = \"rm -f \"+remoteFilePath;\r\n\t\t\t int results = executeSimpleCommand(command);\r\n\t\t\tdisconnect();\r\n\t\t\tif(stop)\r\n\t {\r\n\t \tthrow new FileSystemUtilException(\"999\");\r\n\t }\t\t\t\r\n\t\t\tlogger.debug(\"End: \"+getClass().getName()+\":deleteFile()\");\t\r\n\t\t\tif(results == 0)\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(FileSystemUtilException e)\r\n\t\t{\t\t\t\r\n\t\t disconnect();\r\n\t\t throw e;\r\n\t\t}\t\r\n\t}", "private static boolean deleteFileOrDirectory(String absoluteName) {\n\t\tString[] subnames = absoluteName.split(\"/\");\r\n\t\tint blockNumber = 0;\r\n\t\tint pos = 0;\r\n\r\n\t\twhile(pos < subnames.length)\r\n\t\t{\r\n\t\t if (pos + 1 == subnames.length)\r\n\t\t {\r\n\t\t \tint tmpBlockNumber;\r\n\t\t \tFileSystem.blockUsage tmpBlockType = FileSystem.blockUsage.INVALID;\r\n\t\t \tint backBlockNumber = -1;\r\n\t\t \tdo {\r\n \t\ttmpBlockNumber = fileSystem[blockNumber].getDirectoryStructure().checkifDirOrFileExistsInSpecifiedBlockAndGetLink(subnames[pos]);\r\n \t\tif (tmpBlockNumber != -1 || fileSystem[blockNumber].getDirectoryStructure().getFrwd() == 0)\r\n \t\t{\r\n \t\t\tif (tmpBlockNumber != -1)\r\n \t\t\t{\r\n \t\t\t\ttmpBlockType = fileSystem[blockNumber].getDirectoryStructure().checkifDirOrFileExistsInSpecifiedBlockAndGetType(subnames[pos]);\r\n \t\t\t}\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tbackBlockNumber = blockNumber;\r\n \t\t\tblockNumber = fileSystem[blockNumber].getDirectoryStructure().getFrwd();\r\n \t\t}\r\n \t}while (true);\r\n\t\t \t\r\n\t\t \tif (tmpBlockNumber == -1)\r\n\t\t \t{\r\n\t\t \t\tSystem.out.println(\"File or directory doesn't exists in the file system \" + subnames[pos]);\r\n\t\t \t\treturn false;\r\n\t\t \t}\r\n\t\t \telse\r\n\t\t \t{\r\n\t\t \t\tif ((fileSystem[tmpBlockNumber].getBlockUsageType() == blockUsage.DIRECTORY) && (!fileSystem[tmpBlockNumber].getDirectoryStructure().IsDirectoryEmpty()))\r\n\t\t \t\t{\r\n\t\t \t\t\tSystem.out.println(\"Directory requested to delete not empty\");\r\n\t\t \t\t\treturn false;\r\n\t\t \t\t}\r\n\t\t \t\telse if (fileSystem[tmpBlockNumber].getBlockUsageType() == blockUsage.USERDATA)\r\n\t\t \t\t{\r\n\t\t \t\t\tint frwdTmpBlockNumber = fileSystem[tmpBlockNumber].getUserData().getForward();\r\n\t\t \t\t\twhile (frwdTmpBlockNumber != 0)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tint tmpFrwdBlockNumber = frwdTmpBlockNumber;\r\n\t\t \t\t\t\tfrwdTmpBlockNumber = fileSystem[tmpFrwdBlockNumber].getUserData().getForward();\r\n\t\t \t\t\t\tresetBlock(tmpFrwdBlockNumber);\r\n\t\t \t\t\t}\r\n\t\t \t\t}\r\n\t\t \t\tresetBlock(tmpBlockNumber);\r\n\t\t \t\tfileSystem[blockNumber].getDirectoryStructure().deleteAnEntryInDirectoryContents(subnames[pos]);\r\n\t\t \t\tif (backBlockNumber != -1)\r\n\t\t \t\t{\r\n\t\t \t\t\tif (fileSystem[blockNumber].getDirectoryStructure().IsDirectoryEmpty())\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tfileSystem[backBlockNumber].getDirectoryStructure().setFrwd(0);\r\n\t\t \t\t\t\tresetBlock(blockNumber);\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 else\r\n\t\t {\r\n\t\t \tint tmpBlockNumber;\r\n\t\t \tdo {\r\n \t\ttmpBlockNumber = fileSystem[blockNumber].getDirectoryStructure().checkifDirExistsInSpecifiedBlock(subnames[pos]);\r\n \t\tif (tmpBlockNumber != -1 || fileSystem[blockNumber].getDirectoryStructure().getFrwd() == 0)\r\n \t\t{\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tblockNumber = fileSystem[blockNumber].getDirectoryStructure().getFrwd();\r\n \t\t}\r\n \t}while (true);\r\n\t\t \tif (tmpBlockNumber == -1)\r\n\t\t \t{\r\n\t\t \t\tSystem.out.println(\"Sub Directory \" + subnames[pos] + \" doesn't exists in the file system \");\r\n\t\t \t\treturn false;\r\n\t\t \t}\r\n\t\t \tblockNumber = tmpBlockNumber;\r\n\t\t }\r\n\t\t pos ++;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static Boolean deleteFile(String parent, String fileName, boolean recursive) {\r\n File file = new File(parent, fileName);\r\n if (file.isDirectory() && file.list().length > 0) {\r\n deleteFile(file, recursive);\r\n }\r\n return deleteFile(file, recursive);\r\n }", "private void del_file() {\n\t\tFormatter f;\n\t\ttry{\n\t\t\tf = new Formatter(url2); //deleting file content\n\t\t\tf.format(\"%s\", \"\");\n\t\t\tf.close();\t\t\t\n\t\t}catch(Exception e){}\n\t}", "public void deleteFile(IAttachment file)\n throws OculusException;", "@AfterStep\n\tprivate void deleteFile(){\n\t\tif(LOGGER.isDebugEnabled()){\n\t\tLOGGER.debug(\" Entering into SalesReportByProductEmailProcessor.deleteFile() method --- >\");\n\t\t}\n\t\ttry {\n\t\t\tif(null != salesReportByProductBean){\n\t\t\tReportsUtilBO reportsUtilBO = reportBOFactory.getReportsUtilBO();\n\t\t\tList<String> fileNames = salesReportByProductBean.getFileNameList();\n\t\t\tString fileLocation = salesReportByProductBean.getFileLocation();\n\t\t\treportsUtilBO.deleteFile(fileNames, fileLocation);\n\t\t\t}\n\t\t} catch (PhotoOmniException e) {\n\t\t\tLOGGER.error(\" Error occoured at SalesReportByProductEmailProcessor.deleteFile() method ----> \" + e);\n\t\t}finally {\n\t\t\tif(LOGGER.isDebugEnabled()){\n\t\t\tLOGGER.debug(\" Exiting from SalesReportByProductEmailProcessor.deleteFile() method ---> \");\n\t\t\t}\n\t\t}\n\t}", "public static native boolean remove(String path) throws IOException;", "public void revokePermissionsFor(String userName, String fileName) throws InterruptedException {\n Log.i(\"revokePermissionsFor\",\n \"About to revoke permissions for \" + userName + \" on file \" + fileName);\n String userPublicKey = getUserKeyFromUserName(userName);\n Log.i(\"revokePermissionsFor\", \"About to revoke permissions for \" + userPublicKey);\n database.delete(\"FileKeys\", \"UserPublicKey = ? AND File = ?\", new String[]{\n userPublicKey, fileName\n });\n AsyncTask.execute(new Runnable() {\n @Override\n public void run() {\n updateDatabaseFile();\n Log.i(\"AsyncTask\", \"database file updated\");\n finished = true;\n }\n });\n customWait();\n }", "public static void deleteFolder(String name) {\n File dir = new File(Environment.getExternalStorageDirectory() + name);\n if (dir.isDirectory()) {\n dir.delete();\n }\n }", "@Test\n public void filesByNameDeleteTest() throws ApiException {\n String name = null;\n api.filesByNameDelete(name);\n\n // TODO: test validations\n }", "public File delete(File f) throws FileDAOException;", "public File[] DeleteFile(String sfileName) {\n\t \tFile dir = new File(fileStorageLocation.toString());\n\t \tFile[] matchingFiles = dir.listFiles(new FilenameFilter() {\n\t \t public boolean accept(File dir, String name) {\n\t \t return name.endsWith(\"_\" + sfileName);\n\t \t }\n\t \t});\n\t \t\n\t \tfor (int i = 0; i < matchingFiles.length; i++)\n\t \t{\n\t \t\tmatchingFiles[i].delete();\n\t \t}\n \t\n return matchingFiles;\n }", "public void deleteFile() {\n String newName = playerList.getSelectionModel().getSelectedItem();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n if (user.delete()) {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().remove(newName);\n\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n } else {\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n input.setStyle(\"-fx-border-color: red\");\n }\n }", "public static void deleteFiles(final String _file) throws IOException {\n final File file = new File(_file);\n FileUtils.forceDelete(file);\n }", "public void delete() {\n\t\tclose();\n\t\t// delete the files of the container\n\t\tfor (int i=0; i<BlockFileContainer.getNumberOfFiles(); i++)\n\t\t\tfso.deleteFile(prefix+EXTENSIONS[i]);\n\t}", "public void delete() throws IOException {\n\t\tclose();\n\t\tdeleteContents(directory);\n\t}", "public void rm(String name) throws IsDirectoryException, NoSuchFileException\n\t{\n\t\tIterable<Position<FileElement>> toCheck = fileSystem.children(currentFileElement);\n\t\tif (toCheck != null)\n\t\t{\n\t\t\tfor (Position<FileElement> fe : toCheck )\n\t\t\t{\n\t\t\t\tif (fe.toString().equals(name) && fe.getValue().isDirectory() )\n\t\t\t\t{\n\t\t\t\t\tthrow new IsDirectoryException();\n\t\t\t\t}\n\t\t\t\tif (fe.toString().equals(name) && fe.getValue().isDirectory() == false)\n\t\t\t\t{\n\t\t\t\t\tfileSystem.remove(fe);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {throw new NoSuchFileException();}\n\t}", "public boolean delete(String path, boolean recurse) throws SystemException;", "@Override\n public void delete(String id) {\n log.debug(\"Request to delete File : {}\", id);\n fileRepository.delete(id);\n }", "public void s3delete(String bucketName, String fileName) throws IOException {\n\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Inside s3delete bucket Name: \"+bucketName+\" and file Name: \"+ fileName);\n\n s3 = AmazonS3ClientBuilder.standard()\n .withCredentials(new ProfileCredentialsProvider())\n .withRegion(\"us-east-1\")\n .build();\n\n // List current buckets.\n ListMyBuckets(bucketName);\n\n //upload the file\n s3.deleteObject(bucketName, fileName);\n\n System.out.println(\"------------- Success --------------\");\n\n }", "public static void delete(String source) {\n Path directory = Paths.get(source);\n try {\n Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs)\n throws IOException {\n Files.delete(file);\n return CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(final Path file, final IOException e) {\n return handleException(e);\n }\n\n private FileVisitResult handleException(final IOException e) {\n e.printStackTrace(); // replace with more robust error handling\n return TERMINATE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(final Path dir, final IOException e)\n throws IOException {\n if (e != null) {\n return handleException(e);\n }\n Files.delete(dir);\n return CONTINUE;\n }\n });\n } catch (IOException ex) {\n Logger.getLogger(FolderManager.class.getName()).log(Level.SEVERE, null, ex);\n delete(source);\n }\n }", "public static void clearFile(File fileName)\r\n {\r\n try \r\n {\r\n FileWriter fw = new FileWriter(fileName);\r\n fw.write(\"\");\r\n\r\n fw.close();\r\n }\r\n catch(IOException ioe)\r\n {\r\n //Output error message \r\n System.out.println(ioe); \r\n }\r\n }", "public static void deleteFile(File file){\r\n if(file.isFile()){\r\n file.delete();\r\n return;\r\n }\r\n if(file.isDirectory()){\r\n File[] childFile = file.listFiles();\r\n if(childFile == null || childFile.length == 0){\r\n file.delete();\r\n return;\r\n }\r\n for(File f : childFile){\r\n deleteFile(f);\r\n }\r\n file.delete();\r\n }\r\n }", "public boolean deleteFile(String fileName, String fileextension) {\n\t\tFile f = getFile(fileName, fileextension);\n\t\tif (f.isFile()) {\n\t\t\treturn f.delete();\n\t\t}\n\t\treturn false;\n\t}", "private static void deleteFileOrDir(File file)\n {\n if (file.isDirectory())\n {\n File[] childs = file.listFiles();\n for (int i = 0;i < childs.length;i++)\n {\n deleteFileOrDir(childs[i]);\n }\n }\n file.delete();\n }", "@RequestMapping(value=\"/remove/{filename}&{subdir}\", method = RequestMethod.GET)\r\n public String processRemoveFile(@PathVariable String filename, @PathVariable String subdir, Locale locale, Model model, HttpServletRequest request) {\r\n\t\t\r\n\t\tlogger.info(\"Delete file: \" + filename + \" in \" + QRDA_URIResolver.REPOSITORY_TESTFILES + \"/\" + subdir);\r\n\t\tfileService.deleteFile(filename, QRDA_URIResolver.REPOSITORY_TESTFILES, subdir);\r\n\t\treturn \"redirect:/testFiles\";\r\n\t}", "public boolean eliminarArchivo(String archivo);", "private void deleteFile(@Nonnull File file) throws IOException {\n Files.delete(file.toPath());\n }", "@SuppressWarnings(\"PMD.AvoidCatchingGenericException\")\n public void processFile(Path fileName) {\n String filePath = path + \"/\" + fileName;\n ProcessArquivo processFile = this.fileFactory.createProcessFile(fileName.toString());\n try (FileInputStream fileInputStream = new FileInputStream(filePath)) {\n processFile.processFile(fileInputStream, fileName.toString());\n } catch (Exception e) {\n Logger.getLogger(this.getClass()).error(\"Erro ao ler o arquivo: \" + filePath, e);\n }\n\n delete(filePath);\n }", "public void deleteFile(long id)\r\n \t{\r\n \t\tif (this.logger!= null) \r\n \t\t\tlogger.debug(\"calling deleteFile(\"+id+\") was called...\");\r\n \t\t\r\n \t\tExtFileObjectDAO extFileDao= externalFileMgrDao.getExtFileObj(id);\r\n \t\tString fileSrc= this.externalDataFolder + \"/\"+ extFileDao.getBranch() + \"/\"+ extFileDao.getFileName();\r\n \t\tFile dFile= new File(fileSrc);\r\n \t\tif (!dFile.delete())\r\n \t\t\tthrow new ExternalFileMgrException(ERR_DELETE + fileSrc);\r\n \t\texternalFileMgrDao.deleteExtFileObj(id);\r\n \t}", "public static void delete(FileSystem fs, String name) throws IOException {\n\t\tPath dir = new Path(name);\n\t\tPath data = new Path(dir, DATA_FILE_NAME);\n\t\tPath index = new Path(dir, INDEX_FILE_NAME);\n\n\t\tfs.delete(data, true);\n\t\tfs.delete(index, true);\n\t\tfs.delete(dir, true);\n\t}", "public synchronized int deleteEntry(String fileName)\n {\n int iNumber = -1;\n\n // Return an error if the filename is too long\n if (fileName.length() > maxChars)\n {\n return -1;\n }\n\n // Search the vector for the filename\n for (int i = 0; i < files.size(); i++)\n {\n if (files.get(i).equals(fileName))\n {\n // Remove it from the vector\n iNumber = i;\n files.add(iNumber, new String(\"\"));\n files.removeElementAt(iNumber + 1);\n flush();\n break;\n }\n }\n\n return iNumber;\n }", "public static boolean deleteFile(String sFile) {\r\n\t\tboolean rtn = false;\r\n\r\n\t\tif (sFile != null) {\r\n\t\t\tFile file = new File(sFile);\r\n\t\t\tif (file.exists()) {\r\n\t\t\t\trtn = file.delete();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rtn;\r\n\t}", "public boolean delete()\n\t{\n\t\treturn deleteRecursive( file ) ;\n\t}", "public void deleteFile(String url)\n\t{\n\t\t\n\t\tIterator<UserInfo> itr= iterator();\n\t\tUserInfo info=null;\n\t\twhile(itr.hasNext()) {\n\t\t\t\n\t\t\tinfo= itr.next();\n\t\t\tif( info.getUrl().equalsIgnoreCase(url)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( info!=null)\n\t\t{\n\t\t\tSystem.out.println(\"file has been deleted!\");\n\t\t\tuserinfos.remove(info);\n\t\t}\n\t\t\n\t}", "public static boolean eliminarArchivo(String archivo) {\n\t\tFile directorio = new File(archivo);\n\t\treturn directorio.delete();\n\t}", "void remove(long directoryId, String userName);" ]
[ "0.7816442", "0.7550028", "0.7354422", "0.7235794", "0.71656543", "0.7110614", "0.70545155", "0.7053526", "0.70301867", "0.6925733", "0.69103575", "0.6905375", "0.6898532", "0.68961567", "0.68190354", "0.6793942", "0.67584056", "0.6720652", "0.67026734", "0.66959447", "0.66907954", "0.6652323", "0.6634919", "0.6624969", "0.6616438", "0.66134197", "0.6596532", "0.6557189", "0.6548991", "0.65239745", "0.6487102", "0.64702296", "0.64682895", "0.6454382", "0.6432721", "0.64256084", "0.64180154", "0.64166117", "0.64001364", "0.6387126", "0.63863057", "0.6384375", "0.6371936", "0.636971", "0.63628757", "0.6352661", "0.634851", "0.63316464", "0.6330515", "0.6314965", "0.6310765", "0.6299686", "0.6287943", "0.6286226", "0.62663156", "0.6239975", "0.6236141", "0.62267655", "0.6226629", "0.621539", "0.6199269", "0.61962444", "0.6195662", "0.6195517", "0.6190916", "0.6189536", "0.61880046", "0.61564523", "0.61538917", "0.6147004", "0.61404717", "0.61281013", "0.61153406", "0.6104946", "0.60936123", "0.6093266", "0.60744005", "0.60727847", "0.6062409", "0.60619384", "0.6049652", "0.6047643", "0.60280615", "0.6023318", "0.6014721", "0.60110646", "0.60093844", "0.6002491", "0.5999876", "0.5997241", "0.5995691", "0.59949964", "0.5994414", "0.5993127", "0.59786266", "0.5971998", "0.5971159", "0.5968119", "0.5967845", "0.59524065" ]
0.6402883
38
Deletes everything in the directory given by path, but does not delete the folder itself.
public static boolean deleteFolderContents(String path) { File currDirectory = new File(path); if (currDirectory.exists()) { try { for (File file : currDirectory.listFiles()) { if (file.isDirectory()) { if (!deleteFolder(file.getCanonicalPath())) { return false; } } else { if (!deleteFile(file.getCanonicalPath())) { return false; } } } } catch (IOException e) { return false; } return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteDirectory(Path path) throws IOException {\n if (Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS)) {\n try (DirectoryStream<Path> entries = Files.newDirectoryStream(path)) {\n for (Path entry : entries) {\n deleteDirectory(entry);\n }\n }\n }\n Files.delete(path);\n }", "public static void deleteFolder(String path){\n List<CMSFile> files = CMSFile.find(\"name like '\" + path + \"%'\").fetch();\n for (CMSFile file: files){\n if (file.data != null && file.data.exists()) {\n file.data.getFile().delete();\n }\n file.delete();\n }\n }", "public static void deletePath(Path path) throws IOException {\n if (!Files.isDirectory(path) || Files.list(path).count() == 0) { Files.deleteIfExists(path); }\n else {\n try (Stream<Path> files = Files.list(path)) {\n files.forEach(p -> {\n try { deletePath(p); }\n catch (IOException e) { e.printStackTrace(); }\n });\n Files.delete(path);\n }\n }\n }", "public static void deleteEverythingInPath(String path) {\n try {\n Path rootPath = Paths.get(path);\n Files.walk(rootPath, FileVisitOption.FOLLOW_LINKS)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .peek(System.out::println)\n .forEach(File::delete);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void deleteDirectory(String path, boolean recursive) throws IOException;", "public static void deleteDirectory(String path) throws KubernetesPluginException {\n Path pathToBeDeleted = Paths.get(path);\n if (!Files.exists(pathToBeDeleted)) {\n return;\n }\n try {\n Files.walk(pathToBeDeleted)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Unable to delete directory: \" + path, e);\n }\n\n }", "private void clean(Path path) throws IOException {\n if (Files.exists(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<>() {\n public FileVisitResult visitFile(Path path, BasicFileAttributes attributes) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n\n public FileVisitResult postVisitDirectory(Path path, IOException exception) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n });\n }\n }", "public static void deleteAllFile(File path) {\n File[] array = path.listFiles();\n\n for (File file : array) {\n if (file.isFile()) {\n file.delete();\n }\n }\n }", "private static boolean deleteDirectory(final File path) {\r\n if (path.exists()) {\r\n final File[] files = path.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n }\r\n else {\r\n files[i].delete();\r\n }\r\n }\r\n }\r\n return (path.delete());\r\n }", "public static void recursiveDelete(Path path) throws IOException {\n if (Files.isDirectory(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (exc == null) {\n Files.delete(dir);\n return FileVisitResult.CONTINUE;\n } else {\n throw exc;\n }\n }\n });\n }\n }", "public void removeFolder(File path){\n if (path.isDirectory()){\n String subdirectories[] = path.list();\n for(String subdirectory: subdirectories){\n File file = new File(path.getPath()+\"\\\\\"+subdirectory);\n LOG.info(\"file.getAbsolutePath(): \"+file.getPath());\n if (file.isFile()){\n boolean isDeleted = file.delete();\n if (isDeleted){\n LOG.success(\"file was delete, path: \"+file.getPath());\n }else{\n LOG.error(\"file does not delete, path: \"+file.getPath());\n }\n }else{\n removeFolder(file);\n boolean folderIsDelete = file.delete();\n if (folderIsDelete){\n LOG.success(\"folder was delete, path: \"+file);\n }else{\n LOG.error(\"folder does not delete, path: \"+file);\n }\n }\n }\n }else {\n LOG.info(\"file.getAbsolutePath(): \"+path.getPath());\n }\n }", "public void clearPath(Path path) throws Exception {\n List<FileInfo> listing = metastore.list(Collections.singletonList(path), true);\n \n for(FileInfo file : listing) {\n metastore.delete(file.getPath());\n }\n }", "public static void deleteDirectoryRecursively(Path pathToBeDeleted) throws IOException {\n\n Files.walk(pathToBeDeleted).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);\n }", "public static boolean deleteDirectory(File path) {\n\t\tif (path.exists()) {\n\t\t\tFile[] files = path.listFiles();\n\t\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\tdeleteDirectory(files[i]);\n\t\t\t\t} else {\n\t\t\t\t\tfiles[i].delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (path.delete());\n\t}", "public boolean delete(String path, boolean recurse) throws SystemException;", "public static void deleteAll(File path, boolean includePath) throws IOException {\n\n Files.walkFileTree(path.toPath(), new FileTreeWalker(FileTreeWalker.Action.DELETE));\n\n if (includePath && path.exists() && !path.delete()) {\n throw new IOException(\"Failed to delete directory or file \"\n + path);\n }\n\n }", "public static void deleteFolder(File folder) {\r\nFile[] files = folder.listFiles();\r\nif(files!=null) { //some JVMs return null for empty dirs\r\nfor(File f: files) {\r\nif(f.isDirectory()) {\r\ndeleteFolder(f);\r\n} else {\r\nf.delete();\r\n}\r\n}\r\n}\r\nfolder.delete();\r\n}", "private static void deleteDir(File file) {\n\t\tFile[] contents = file.listFiles();\n\t\tif (contents != null) {\n\t\t\tfor (File f : contents) {\n\t\t\t\tdeleteDir(f);\n\t\t\t}\n\t\t}\n\t\tfile.delete();\n\t}", "public boolean deleteFolder(String path){\n\t\tValueCollection payload = new ValueCollection();\n\t\tpayload.put(\"path\", new StringPrimitive(path));\n\t\ttry {\t\n\t\t\tclient.invokeService(ThingworxEntityTypes.Things, FileThingName, \"DeleteFolder\", payload, 5000);\n\t\t\tLOG.info(\"Folder {} deleted.\",path);\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Folder doesn't exist. Error: {}\",e);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void remDir(String path) {\n\t\t\r\n\t}", "public static boolean deleteFileRoot(String path) {\n try {\n if (!readReadWriteFile())\n RootTools.remount(path, \"rw\");\n\n if (new File(path).isDirectory()) {\n execute(\"rm -f -r \" + getCommandLineString(path));\n } else {\n execute(\"rm -r \" + getCommandLineString(path));\n }\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "private void cleanDirectory(File dir) {\n File[] files= dir.listFiles();\n if (files!=null && files.length>0) {\n for (File file: files) {\n delete(file);\n }\n }\n }", "public void delete(String path) throws GRIDAClientException {\n\n List<String> paths = new ArrayList<String>();\n paths.add(path);\n\n delete(paths);\n }", "public void delete(String path) throws IOException {\n Path destionationPath = new Path(path);\n\n if (!hdfs.exists(destionationPath)) {\n throw new IOException(\"File/directory doesn't exists!\");\n }\n hdfs.delete(destionationPath, true);\n }", "public void deleteFile(Path path) throws FileTreeReadingException, CannotDeleteFilesException {\n Boolean isDirectory = projectFiles.get(path);\n if (isDirectory == null)\n return;\n\n List<Path> filesToDelete = new ArrayList<>();\n\n if (isDirectory) {\n try {\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException {\n filesToDelete.add(path);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {\n filesToDelete.add(path);\n return FileVisitResult.CONTINUE;\n }\n });\n } catch (IOException e) {\n throw new FileTreeReadingException(projectDirectoryPath, e);\n }\n } else {\n filesToDelete.add(path);\n }\n\n //Walk in reverse order to delete directories too\n ListIterator<Path> iterator = filesToDelete.listIterator(filesToDelete.size());\n Set<Path> failedToDelete = new HashSet<>();\n synchronized (this) {\n while (iterator.hasPrevious()) {\n Path toDelete = iterator.previous();\n try {\n Files.delete(toDelete);\n } catch (IOException e1) {\n logger.warn(\"Cannot delete file \" + toDelete, e1);\n filesToDelete.remove(toDelete);\n failedToDelete.add(toDelete);\n }\n projectFiles.remove(toDelete);\n }\n globalEventManager.fireEventListeners(this,\n new ProjectFileListChangedEvent(new LinkedHashMap<>(),\n new HashSet<>(filesToDelete)));\n }\n if (failedToDelete.size() > 0)\n throw new CannotDeleteFilesException(failedToDelete);\n }", "public static void cleanDirectory(File dir) {\n if (dir.isDirectory()) {\n for (File f : dir.listFiles()) {\n cleanDirectory( f );\n }\n }\n dir.delete();\n }", "public static void deleteDir(File dir) {\n\t if (dir.isDirectory()) {\n\t String[] children = dir.list();\n\t for (int i=0; i<children.length; i++) {\n\t File file = new File(dir, children[i]);\n\t log.info(\"Deleting file:\" + file.toString());\n\t file.delete();\n\t }\n\t }\n\t }", "private static void deleteDirectory(File directory) {\r\n File[] files = directory.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n } else {\r\n files[i].delete();\r\n }\r\n }\r\n // Now that the directory is empty. Delete it.\r\n directory.delete();\r\n }", "public void cleanImportDirectory(String iPath) {\r\n\t\ttry {\r\n\t\t\tFile theFile = new File(iPath);\r\n\t\t\tFile allFiles[] = theFile.listFiles();\r\n\r\n\t\t\tfor (File allFile : allFiles) {\r\n\t\t\t\tif (allFile.isDirectory()) {\r\n\t\t\t\t\tcleanImportDirectory(allFile.toString());\r\n\t\t\t\t\tallFile.delete();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tallFile.delete();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (NullPointerException npe) {\r\n\t\t\tmLogger.severe(iPath + \" did not exist and was not cleaned!!\");\r\n\t\t}\r\n\t}", "public void deleteKeysFromTree(String path) {\n LinkedList<String> keysList = UsefulFunctions.createStringListFromFile(path);\n if (keysList != null) {\n for (String key : keysList) {\n delete(key);\n }\n }\n }", "@Override\r\n\tpublic boolean removeFolder(String path) throws FileSystemUtilException {\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tconnect();\r\n\t\t\tString rmDirCmd = \"rm -fr \"+path;\t\t\t\r\n\t\t\tint x = executeSimpleCommand(rmDirCmd);\r\n\t\t\tif(x!=0)\r\n\t\t\t{\r\n\t\t\t\tlogger.info(\"Folder remove failed, may be file path is not correct or privileges are not there\");\r\n\t\t\t\tthrow new FileSystemUtilException(\"EL0699\");\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}catch(FileSystemUtilException e)\r\n\t\t{\r\n\t\t disconnect();\r\n\t\t\tthrow new FileSystemUtilException(e.getErrorCode(),e.getException());\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tthrow new FileSystemUtilException(\"F00002\",e);\r\n\t\t}\r\n\r\n\t}", "void deleteFile(FsPath path);", "private static void deleteDatabaseHelper(final Path path) {\n if (path != null) {\n\n try {\n if (!Files.isDirectory(path)) {\n Files.delete(path);\n } else {\n \n // see http://www.oracle.com/technetwork/articles/java/ma14-java-se-8-streams-2177646.html\n // for an explanation of streams and foreach\n Files.newDirectoryStream(path).forEach(filePath -> deleteDatabaseHelper(filePath));\n Files.delete(path);\n }\n\n } catch (IOException ex) {\n Logger.getLogger(ConnectionManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public static void deleteFilesRecursive(String strPath) {\n\n File fileOrDirectory = new File(strPath);\n\n if (fileOrDirectory.isDirectory()){\n for (File child : fileOrDirectory.listFiles())\n deleteFilesRecursive(child.getPath());\n fileOrDirectory.delete();\n }else\n fileOrDirectory.delete();\n }", "private void emptyDirectory(File dir){\n\n for (File file : Objects.requireNonNull(dir.listFiles())){\n if (file.isDirectory())\n {\n emptyDirectory(file);\n }\n file.delete();\n }\n }", "public void clearDirectory(File directory) {\n if (directory.exists()) {\n for (File file : directory.listFiles()) {\n file.delete();\n }\n }\n }", "public static void delete(File file) {\n\n\t\tif (file.isDirectory()) {\n\n\t\t\t// directory is empty, then delete it\n\t\t\tif (file.list().length == 0) {\n\n\t\t\t\tfile.delete();\n\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t// file.getAbsolutePath());\n\n\t\t\t} else {\n\n\t\t\t\t// list all the directory contents\n\t\t\t\tString files[] = file.list();\n\n\t\t\t\tfor (String temp : files) {\n\t\t\t\t\t// construct the file structure\n\t\t\t\t\tFile fileDelete = new File(file, temp);\n\n\t\t\t\t\t// recursive delete\n\t\t\t\t\tdelete(fileDelete);\n\t\t\t\t}\n\n\t\t\t\t// check the directory again, if empty then delete it\n\t\t\t\tif (file.list().length == 0) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t\t// file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then delete it\n\t\t\tfile.delete();\n\t\t\t// System.out.println(\"File is deleted : \" +\n\t\t\t// file.getAbsolutePath());\n\t\t}\n\t}", "public static void deleteDirectory(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\t//directory is empty, then delete it\n\t\t\tif (dir.list().length == 0) {\n\t\t\t\tdir.delete();\n\t\t\t} else {\n\t\t\t\t//list all the directory contents\n\t\t\t\tString[] subFiles = dir.list();\n\t\t\t\tfor (int i = 0; i < subFiles.length; i++) {\n\t\t\t\t\t//construct the file structure\n\t\t\t\t\tFile fileDelete = new File(dir, subFiles[i]);\n\t\t\t\t\t//recursive delete\n\t\t\t\t\tdeleteDirectory(fileDelete);\n\t\t\t\t}\n\t\t\t\t//check the directory again, if empty then delete it\n\t\t\t\tif (dir.list().length == 0) {\n\t\t\t\t\tdir.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tdir.delete();\n\t\t}\n\t}", "protected void deleteDirectory(String oneDir) {\n \n File[] listOfFiles;\n File cleanDir;\n\t\n cleanDir = new File(oneDir);\n if (!cleanDir.exists()) {// Nothing to do. Return; \n\t return;\n\t}\n listOfFiles = cleanDir.listFiles();\n if(listOfFiles != null) { \n for(int countFiles = 0; countFiles < listOfFiles.length; countFiles++) { \n if (listOfFiles[countFiles].isFile()) {\n listOfFiles[countFiles].delete();\n } else { // It is a directory\n String nextCleanDir = cleanDir + separator + listOfFiles[countFiles].getName();\n\t\t File newCleanDir = new File(nextCleanDir);\n deleteDirectory(newCleanDir.getAbsolutePath());\n } \n }// End for loop\n } // End if statement \n cleanDir.delete();\n }", "public static String cleanDirectoryPath(String path) {\r\n if (!path.endsWith(\"/\")) {\r\n path += \"/\";\r\n }\r\n return path;\r\n }", "@Override\n public void clean(Path path) {\n }", "public boolean clearDataDir(String path) {\n logger.info(\"clearDataDir is called, and processing.\");\n logger.info(\"Status report before remove data directory.\");\n IndexManager.statusReport();\n ArrayList<File> dataDirs = getDataDirectories();\n if (path.equals(\"*\")) {\n int size = dataDirs.size();\n for (int i = size - 1; i >= 0; i--) {\n Path removed_path = this.dataDirectories.remove(i).toPath();\n unWatchDir(removed_path);\n }\n if (dataDirs.size() == 0) {\n IndexManager indexManager = new IndexManager();\n indexManager.deleteIndex();\n return true;\n } else {\n logger.warning(\"Remove all data directory error. Cannot clear all directory.\");\n return false;\n }\n } else {\n Iterator<File> fileIterator = dataDirs.iterator();\n Path dir_path;\n Path file_path = Paths.get(path);\n //Iterate through a list of paths, If matched, remove.\n while (fileIterator.hasNext()) {\n dir_path = Paths.get(fileIterator.next().getAbsolutePath());\n if (dir_path.equals(file_path)) { //If it is matched.\n fileIterator.remove(); //remove the path that is matched.\n //Report to a terminal.\n logger.fine(\"Following path has been removed: \" + dir_path);\n IndexManager.statusReport(); //Log\n unWatchDir(file_path);\n return true;\n }\n }\n logger.info(\"No directory match.\");\n IndexManager.statusReport();\n return false;\n }\n }", "@Override\n public void removeDirectory(File directory, boolean recursive) throws FileNotFoundException, IOException {\n }", "private static void deleteFileOrDir(File file)\n {\n if (file.isDirectory())\n {\n File[] childs = file.listFiles();\n for (int i = 0;i < childs.length;i++)\n {\n deleteFileOrDir(childs[i]);\n }\n }\n file.delete();\n }", "private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}", "public void reset(File folder) {\n File[] listOfFiles = folder.listFiles();\n for(int x=0;x<listOfFiles.length;x++) {\n if(listOfFiles[x].isDirectory()) {\n this.reset(listOfFiles[x]);\n listOfFiles[x].delete();\n }\n }\n folder.delete();\n }", "private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }", "public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}", "private void delete(File file) {\n if (file.isDirectory()) {\n cleanDirectory(file);\n }\n file.delete();\n }", "public void removeFromAll(String path) {\n for (String device : this.execAdbDevices())\n this.remove(device, path);\n }", "private static void deleteTempFolder(String folderName) throws IOException {\n Path tempFolderPath = Paths.get(folderName);\n\n if (Files.exists(tempFolderPath) && Files.isDirectory(tempFolderPath)) {\n Files.walk(tempFolderPath)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n }\n }", "public static void deleteDir(File dir) throws RepositoryException {\n String list[] = dir.list();\n\n if (list == null) {\n return;\n }\n\n for (int i = 0; i < list.length; i++) {\n File file = new File(dir, list[i]);\n\n if (file.isDirectory()) {\n deleteDir(file);\n } else {\n if (!file.delete()) {\n throw new RepositoryException(EXCEPTION_LOCALIZER.format(\n \"cannot-delete-file\", file.getAbsolutePath()));\n }\n }\n }\n\n if (!dir.delete()) {\n throw new RepositoryException(EXCEPTION_LOCALIZER.format(\n \"directory-cannot-be-deleted\", dir.getAbsolutePath()));\n }\n }", "public static void delTree(File file) {\r\n File[] files = file.listFiles();\r\n if (files != null) { \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n delTree(files[i]);\r\n }\r\n }\r\n }\r\n files = file.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n files[i].delete();\r\n }\r\n }\r\n }", "public static void delete(String source) {\n Path directory = Paths.get(source);\n try {\n Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs)\n throws IOException {\n Files.delete(file);\n return CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(final Path file, final IOException e) {\n return handleException(e);\n }\n\n private FileVisitResult handleException(final IOException e) {\n e.printStackTrace(); // replace with more robust error handling\n return TERMINATE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(final Path dir, final IOException e)\n throws IOException {\n if (e != null) {\n return handleException(e);\n }\n Files.delete(dir);\n return CONTINUE;\n }\n });\n } catch (IOException ex) {\n Logger.getLogger(FolderManager.class.getName()).log(Level.SEVERE, null, ex);\n delete(source);\n }\n }", "protected void deleteTmpDirectory(File file) {\n\t\tif (file.exists() && file.canWrite()) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\tfor (File child : files) {\n\t\t\t\t\tif (child.isDirectory()) {\n\t\t\t\t\t\tdeleteTmpDirectory(child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}", "public static void deleteFile(File file){\r\n if(file.isFile()){\r\n file.delete();\r\n return;\r\n }\r\n if(file.isDirectory()){\r\n File[] childFile = file.listFiles();\r\n if(childFile == null || childFile.length == 0){\r\n file.delete();\r\n return;\r\n }\r\n for(File f : childFile){\r\n deleteFile(f);\r\n }\r\n file.delete();\r\n }\r\n }", "abstract public void remove( String path )\r\n throws Exception;", "public void removeFiles(String mPath)\n\t{\n\t\tFile dir = new File(mPath);\n\n\t\tString[] children = dir.list();\n\t\tif (children != null) {\n\t\t\tfor (int i=0; i<children.length; i++) {\n\t\t\t\tString filename = children[i];\n\t\t\t\tFile f = new File(mPath + filename);\n\n\t\t\t\tif (f.exists()) {\n\t\t\t\t\tf.delete();\n\t\t\t\t}\n\t\t\t}//for\n\t\t}//if\n\n\t}", "public static void delete(File d) {\n\t\tif (d.isDirectory()) {\n\t\t\tfor (File f: d.listFiles()) delete(f);\n\t\t\td.delete();\n\t\t} else d.delete();\n\t}", "private void unWatchDir(Path path) {\n watcher_service.deRegisterAll(path);\n }", "protected void remove(String path) throws IOException {\n String[] command = {SVN, REMOVE, path, FORCE, NON_INTERACTIVE};\n run(command, null, null, null);\n }", "private static void doDeleteEmptyDir(String dir) {\n\n boolean success = (new File(dir)).delete();\n\n if (success) {\n System.out.println(\"Successfully deleted empty directory: \" + dir);\n } else {\n System.out.println(\"Failed to delete empty directory: \" + dir);\n }\n\n }", "public static synchronized void deleteDirectory(File directory) {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.deleteDirectory: [\" + directory.getPath() + \"]\");\n File[] firstDirectoryFiles = directory.listFiles();\n if (firstDirectoryFiles != null) {\n for (File file : firstDirectoryFiles) {\n file.delete();\n }\n }\n directory.delete();\n }", "public boolean folderCleaner(String folderPath, Boolean ifDeleteSubdirs, Boolean ifDeleteFiles, Boolean ifDeleteRoot, Boolean ifPrompt) throws IOException { \n folderPath = folderPath.replace(\"\\\\\", \"/\");\n if(folderPath.endsWith(\"/\")) { folderPath = folderPath.substring(0, folderPath.length() - 1); }\n File dir = new File(folderPath);\n String how = \"\", action = null;\n Boolean success = false;\n Boolean current = false;\n if (dir.exists() && dir.isDirectory()) { \n try{ \n success = true;\n String[] children = dir.list();\n if(children.length > 0) {\n action = \"CLEANED\";\n for (int i = 0; i < children.length; i++) {\n File child = new File(dir, children[i]);\n if(child.isDirectory()){ if(ifDeleteSubdirs) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteSubdirs) {System.out.print(\"DIRECTORY \");} }\n else { if(ifDeleteFiles) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteFiles) {System.out.print(\" FILE \");} }\n \n current = !child.exists();\n success = success && current;\n if(current) { how = \" DELETED: \\\"\"; } else { how = \"NOT DELETED: \\\"\"; }\n if(ifPrompt && current) System.out.print(how + child.getAbsolutePath() + \"\\n\");\n }\n }\n // THE DIRECTORY IS EMPTY - DELETE IT IF REQUIRED\n if (ifDeleteRoot) { FileUtils.forceDelete(dir); success = success && !dir.exists(); action = \"DELETED\"; }\n if(ifPrompt && (!action.equals(null))) {\n if (success) { \n System.out.println(\"\\n\" + \"FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n } else {\n System.out.println(\"\\n\" + \"NOT FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n }\n }\n } catch (Exception e) {} \n }\n return success;\n }", "private static void deleteEmptyParentDirs(Path pkgDirPath, Path repoPath) throws IOException {\n Path pathsInBetween = repoPath.relativize(pkgDirPath);\n for (int i = pathsInBetween.getNameCount(); i > 0; i--) {\n Path toRemove = repoPath.resolve(pathsInBetween.subpath(0, i));\n if (!Files.list(toRemove).findAny().isPresent()) {\n Files.delete(toRemove);\n }\n }\n }", "public static final void delete(final File file)\n\t{\n\t\tif (file.isDirectory())\n\t\t{\n\t\t\tfor (final String temp : file.list())\n\t\t\t{\n\t\t\t\tdelete(new File(file, temp));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfile.delete();\n\t\t}\n\t}", "public String do_rmdir(String pathOnServer) throws RemoteException {\r\n\t\tString directoryPath = pathOnServer;\r\n\t\tString message;\r\n\t\t\r\n\t\t\tFile dir = new File(directoryPath);\r\n\t\t\tif (!dir.isDirectory()) {\r\n\t\t\t\tmessage = \"Invalid directory\";\t}\t\r\n\t\t\telse {\r\n\t\t\t\t\r\n\t\t\tif(dir.list().length>0) {\r\n\r\n\t\t\tFile[] filesList = dir.listFiles();\r\n\t\t\t//Deleting Directory Content\r\n\t\t\tfor(File file : filesList){\r\n\t\t\t\tSystem.out.println(\"Deleting \"+file.getName());\r\n\t\t\t\tfile.delete();\r\n\t\t\t}}\r\n\t\t\tif (dir.delete()) message =\"Successfully deleted the Directory: \" + directoryPath ;\r\n\t\t\telse message =\"Error deleting the directory: \" + directoryPath ;\r\n\t\t\t}//else end \r\n\t\treturn message;\r\n\t}", "public static void deleteFolder(String name) {\n File dir = new File(Environment.getExternalStorageDirectory() + name);\n if (dir.isDirectory()) {\n dir.delete();\n }\n }", "private void deleteFile(java.io.File file) {\n if (file.isDirectory()) {\n for (java.io.File f : file.listFiles()) \n deleteFile(f);\n }\n \n if (!file.delete())\n try {\n throw new FileNotFoundException(\"Failed to delete file: \" + file.getName());\n } catch (FileNotFoundException e) {\n System.err.println(\"Delete of file \" + file.getAbsolutePath() + \" failed\");\n e.printStackTrace();\n }\n }", "public static void deleteFilesMatchingExpression(String path,\n \t\t\tString expression, boolean recurse) {\n \t\tdeleteFilesMatchingExpression(new File(path), expression, recurse);\n \t}", "private boolean deleteDir(File dir) {\r\n if (dir.isDirectory()) {\r\n \r\n //Borra todos los ficheros del directorio\r\n String[] children = dir.list();\r\n for (int i=0; i<children.length; i++) {\r\n boolean success = deleteDir(new File(dir, children[i]));\r\n if (!success) {\r\n return false;\r\n }\r\n }\r\n }\r\n \r\n //Ahora que el directorio está vacío, se puede borrar\r\n return dir.delete();\r\n }", "private void cleanFolder(File[] files) {\n \t\t\n \t\tif (files != null) {\n \t\t\t// Iterate the files\n \t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\tFile f = files[i];\n \t\t\t\t// If the file is a directory, remove its contents recursively\n \t\t\t\tif (f.isDirectory()) {\n \t\t\t\t\tcleanFolder(f.listFiles());\n \t\t\t\t}\n \t\t\t\t// Remove the file if it is a class file\n \t\t\t\tif (f.getName().endsWith(\".class\"))\n \t\t\t\t\tf.delete();\n \t\t\t}\n \t\t}\n \t}", "private void deleteRecursive(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteRecursive(child);\n }\n }\n fileOrDirectory.delete();\n }", "void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }", "void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }", "protected static void deleteTrash() {\n\t\tArrays.stream(new File(\".\").listFiles())\n\t\t\t.filter(f -> f.getName().startsWith(\"_tmp.\"))\n\t\t\t.forEach(File::delete);\n\t}", "private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }", "private static boolean deleteDir(File dir) {\n\n if (dir.isDirectory()) {\n String[] children = dir.list();\n for (int i=0; i<children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n }\n\n // The directory is now empty so now it can be smoked\n return dir.delete();\n }", "public void removePath(Path aPath) {\n _thePaths.remove(aPath);\n }", "public static void deleteDirectory(File directory) {\n // LOG.debug(\"ics.core.io.FileUtils.deleteDirectory(): Deleting directory \"\n // + directory.toString());\n File[] files = directory.listFiles();\n for (int n = 0; n < files.length; n++) {\n File nextFile = files[n];\n\n // if it's a directory, delete sub-directories and files before\n // removing the empty directory\n if (nextFile.isDirectory() == true) {\n deleteDirectory(nextFile);\n } else {\n nextFile.delete(); // otherwise just delete the file\n // LOG.debug(\"ics.core.io.FileUtils.deleteDirectory(): Deleting file \"\n // + nextFile.toString());\n }\n }\n\n // finally, delete the specified directory\n if (directory.delete() == false) {\n LOG.warn(\"ics.core.io.FileUtils.deleteDirectory(): Unable to delete \"\n + directory.toString());\n }\n }", "public static void blockingDeleteDirectory(final String pathToDirectory) {\n final File testBaseFolderF = new File(pathToDirectory);\n try {\n FSUtils.deleteFileFolder(testBaseFolderF);\n } catch (final IOException e) {\n e.printStackTrace();\n }\n boolean finishClean = false;\n while (!finishClean) {\n finishClean = !testBaseFolderF.exists();\n if (!finishClean) {\n try {\n Thread.sleep(SHORT_SLEEP_MILLIS);\n } catch (final InterruptedException e) {\n e.printStackTrace();\n Thread.currentThread().interrupt();\n }\n }\n }\n\n }", "public void deleteFiles(File directory) {\n File[] contents = directory.listFiles();\n if (contents != null) {\n for (File file : contents) {\n deleteFiles(file);\n }\n }\n directory.delete();\n }", "public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}", "public static final void deleteDirectory(File directory) throws IOException {\n if (!directory.exists()) {\n return;\n }\n\n cleanDirectory(directory);\n\n if (!directory.delete()) {\n throw new IOException(\"Unable to delete directory \" + directory + \".\");\n }\n }", "public static void deleteFileOrDirectory(KVFile file) {\n if (file.isDirectory()) {\n String[] children = file.list();\n for (String aChildren : children) {\n if (new KVFile(file, aChildren).isDirectory() && !aChildren.equals(\"PreinstalledMaps\") && !aChildren.equals(\"Maps\")) {\n deleteFileOrDirectory(new KVFile(file, aChildren));\n } else {\n new KVFile(file, aChildren).delete();\n }\n }\n }\n }", "public void clean(final Path path) {\n this.recurrence(path);\n this.summary.finished();\n }", "private void deleteDir(File fileDir)\n {\n try\n {\n FileHelper.deleteDir(fileDir);\n }\n catch (Exception e)\n {\n // ignore\n }\n }", "private void deleteFileOrFolder(File fileOrFolder) {\n if (fileOrFolder != null) {\n if (fileOrFolder.isDirectory()) {\n for (File item : fileOrFolder.listFiles()) {\n deleteFileOrFolder(item);\n }\n }\n if (!fileOrFolder.delete()) {\n fileOrFolder.deleteOnExit();\n }\n }\n }", "public static void emptyFolder(File folder) {\n\tif (folder.exists()) {\n\t File[] files = folder.listFiles(new FilenameFilter(\"csv\"));\n\t if (null != files && files.length > 0) {\n\t\tfor (File file : files) {\n\t\t file.delete();\n\t\t}\n\t }\n\t}\n }", "@Override\r\n public void deleteFolder(long id) {\n this.folderRepository.deleteById(id);; \r\n }", "public static void cleanDirectory( File directory ) throws IOException\n {\n if ( !directory.exists() )\n {\n throw new IllegalArgumentException( I18n.err( I18n.ERR_17006_DOES_NOT_EXIST, directory ) );\n }\n\n if ( !directory.isDirectory() )\n {\n throw new IllegalArgumentException( I18n.err( I18n.ERR_17007_IS_NOT_DIRECTORY, directory ) );\n }\n\n File[] files = directory.listFiles();\n\n if ( files == null )\n {\n // null if security restricted\n throw new IOException( I18n.err( I18n.ERR_17008_FAIL_LIST_DIR, directory ) );\n }\n\n IOException exception = null;\n\n for ( File file : files )\n {\n try\n {\n forceDelete( file );\n }\n catch ( IOException ioe )\n {\n exception = ioe;\n }\n }\n\n if ( null != exception )\n {\n throw exception;\n }\n }", "public DeleteTResponse remove(String path, boolean recursive, DeleteTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;", "private void recDelete(File file) {\n if (!file.exists()) {\n return;\n }\n if (file.isDirectory()) {\n File[] list = file.listFiles();\n if (list != null) {\n for (File f : list) {\n recDelete(f);\n }\n }\n }\n file.delete();\n }", "private static void deletePublicationDir(File pubDir) {\n System.out.println(\" Deleting contents of directory: \" + pubDir);\n for (File pubFile : pubDir.listFiles()) {\n if (pubFile.isFile()) {\n System.out.println(\" Deleting file: \" + pubFile);\n pubFile.delete();\n }\n }\n System.out.println(\" Now deleting directory: \" + pubDir);\n pubDir.delete();\n }", "public void deleteNode(TreePath path) {\n \t\tSpatial node = (Spatial) path.getLastPathComponent();\n \t\ttreeModel.deleteNode(node);\n \t\trepaint();\n \t}", "@RequestMapping(value=\"/my_files\", method = RequestMethod.DELETE)\n @ResponseBody\n public AppResponse delete(@RequestParam String path) throws IOException, InvalidValueException,FilePathAccessDeniedException {\n\n String username = CSQLUserContext.getCurrentUser().getUsername();\n if(validator.isValidAndUserHasAccess(username, path)){\n return fileSystemService.delete(path, true);\n }\n\n return AppResponse.error();\n }", "public void delete() throws IOException {\n\t\tclose();\n\t\tdeleteContents(directory);\n\t}", "public static void deleteFilesMatchingExpression(String path,\n \t\t\tString expression) {\n \t\tdeleteFilesMatchingExpression(new File(path), expression, false);\n \t}", "public static void cleanDirectory(final ContextualLogger logger, Path start) throws IOException {\n if (!start.toFile().exists()) {\n boolean didMake = start.toFile().mkdir();\n Assert.assertTrue(didMake);\n }\n // We need the directory to be a directory (as we don't want to follow symlinks anywhere in this delete operation).\n Assert.assertTrue(start.toFile().isDirectory());\n // We don't want to delete the starting directory, but we do want to delete everything in it.\n Files.walkFileTree(start, new FileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n // Do nothing.\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n // This clearly can't be the start.\n Assert.assertFalse(start.equals(file));\n // Delete the file.\n Files.delete(file);\n logger.output(\"Deleted file \" + file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n logger.error(\"visitFileFailed: \\\"\" + file + \"\\\"\");\n throw exc;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (null == exc) {\n // Make sure that this isn't the starting directory.\n if (!start.equals(dir)) {\n Files.delete(dir);\n logger.output(\"Deleted directory \" + dir);\n }\n } else {\n throw exc;\n }\n return FileVisitResult.CONTINUE;\n }\n }\n );\n }", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }" ]
[ "0.80105096", "0.7883224", "0.7668979", "0.750973", "0.7477246", "0.7458504", "0.731934", "0.72630787", "0.72568166", "0.72416276", "0.7223308", "0.6871204", "0.6865109", "0.6858573", "0.669695", "0.66757077", "0.6665946", "0.6639811", "0.66284424", "0.66132236", "0.6516566", "0.64327383", "0.6428976", "0.6423642", "0.6421395", "0.6362367", "0.63057697", "0.62551785", "0.62477106", "0.62273306", "0.62127674", "0.62037545", "0.62007713", "0.6160393", "0.6154212", "0.6136997", "0.6091622", "0.6088879", "0.6083369", "0.6057278", "0.6033939", "0.6032843", "0.60326284", "0.602818", "0.60170466", "0.5996946", "0.59637016", "0.59208673", "0.5911632", "0.59078825", "0.5900141", "0.58845127", "0.58838207", "0.587645", "0.5862042", "0.5836489", "0.5819009", "0.58010995", "0.5786427", "0.57842433", "0.5772455", "0.57632023", "0.5743795", "0.5734693", "0.573089", "0.57036835", "0.56981766", "0.56946695", "0.56891185", "0.5680866", "0.5653986", "0.5648247", "0.56479883", "0.5646168", "0.55996287", "0.55898476", "0.55848867", "0.55800056", "0.55791515", "0.5576346", "0.5564515", "0.555748", "0.55517375", "0.55438197", "0.5536492", "0.5536425", "0.55355513", "0.5534169", "0.5532471", "0.55298036", "0.5520884", "0.5508444", "0.55018693", "0.5499492", "0.5498819", "0.5495416", "0.54937255", "0.5492167", "0.5482806", "0.5479794" ]
0.6717962
14
Delete the folder and recursively files and folders below
public static boolean deleteFolder(String folderName) { // A file object to represent the filename File f = new File(folderName); if (!f.exists() || !f.isDirectory()) { throw new IllegalArgumentException("Delete: no such directory: " + folderName); } for (File i : f.listFiles()) { if (i.isDirectory()) { deleteFolder(i.getAbsolutePath()); } else if (i.isFile()) { if (!i.delete()) { throw new IllegalArgumentException("Delete: deletion failed: " + i.getAbsolutePath()); } } } return deleteFile(folderName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void deleteFolder(File folder) {\r\nFile[] files = folder.listFiles();\r\nif(files!=null) { //some JVMs return null for empty dirs\r\nfor(File f: files) {\r\nif(f.isDirectory()) {\r\ndeleteFolder(f);\r\n} else {\r\nf.delete();\r\n}\r\n}\r\n}\r\nfolder.delete();\r\n}", "private void deleteDirectory(Path path) throws IOException {\n if (Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS)) {\n try (DirectoryStream<Path> entries = Files.newDirectoryStream(path)) {\n for (Path entry : entries) {\n deleteDirectory(entry);\n }\n }\n }\n Files.delete(path);\n }", "void deleteDirectory(String path, boolean recursive) throws IOException;", "public static void deleteFolder(String path){\n List<CMSFile> files = CMSFile.find(\"name like '\" + path + \"%'\").fetch();\n for (CMSFile file: files){\n if (file.data != null && file.data.exists()) {\n file.data.getFile().delete();\n }\n file.delete();\n }\n }", "public static void recursiveDelete(Path path) throws IOException {\n if (Files.isDirectory(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (exc == null) {\n Files.delete(dir);\n return FileVisitResult.CONTINUE;\n } else {\n throw exc;\n }\n }\n });\n }\n }", "public void removeFolder(File path){\n if (path.isDirectory()){\n String subdirectories[] = path.list();\n for(String subdirectory: subdirectories){\n File file = new File(path.getPath()+\"\\\\\"+subdirectory);\n LOG.info(\"file.getAbsolutePath(): \"+file.getPath());\n if (file.isFile()){\n boolean isDeleted = file.delete();\n if (isDeleted){\n LOG.success(\"file was delete, path: \"+file.getPath());\n }else{\n LOG.error(\"file does not delete, path: \"+file.getPath());\n }\n }else{\n removeFolder(file);\n boolean folderIsDelete = file.delete();\n if (folderIsDelete){\n LOG.success(\"folder was delete, path: \"+file);\n }else{\n LOG.error(\"folder does not delete, path: \"+file);\n }\n }\n }\n }else {\n LOG.info(\"file.getAbsolutePath(): \"+path.getPath());\n }\n }", "public static void delTree(File file) {\r\n File[] files = file.listFiles();\r\n if (files != null) { \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n delTree(files[i]);\r\n }\r\n }\r\n }\r\n files = file.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n files[i].delete();\r\n }\r\n }\r\n }", "private static void deleteDir(File file) {\n\t\tFile[] contents = file.listFiles();\n\t\tif (contents != null) {\n\t\t\tfor (File f : contents) {\n\t\t\t\tdeleteDir(f);\n\t\t\t}\n\t\t}\n\t\tfile.delete();\n\t}", "private void deleteRecursive(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteRecursive(child);\n }\n }\n fileOrDirectory.delete();\n }", "void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }", "private void cleanFolder(File[] files) {\n \t\t\n \t\tif (files != null) {\n \t\t\t// Iterate the files\n \t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\tFile f = files[i];\n \t\t\t\t// If the file is a directory, remove its contents recursively\n \t\t\t\tif (f.isDirectory()) {\n \t\t\t\t\tcleanFolder(f.listFiles());\n \t\t\t\t}\n \t\t\t\t// Remove the file if it is a class file\n \t\t\t\tif (f.getName().endsWith(\".class\"))\n \t\t\t\t\tf.delete();\n \t\t\t}\n \t\t}\n \t}", "@AfterClass(groups ={\"All\"})\n\tpublic void deleteFolder() {\n\t\ttry {\n\t\t\tUserAccount account = dciFunctions.getUserAccount(suiteData);\n\t\t\tUniversalApi universalApi = dciFunctions.getUniversalApi(suiteData, account);\n\t\t\tif(suiteData.getSaasApp().equalsIgnoreCase(\"Salesforce\")){\n\t\t\t\tfor(String id:uploadId){\n\t\t\t\t\tMap<String,String> fileInfo = new HashMap<String,String> ();\n\t\t\t\t\tfileInfo.put(\"fileId\", id);\n\t\t\t\t\tdciFunctions.deleteFile(universalApi, suiteData, fileInfo);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdciFunctions.deleteFolder(universalApi, suiteData, folderInfo);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogger.info(\"Issue with Delete Folder Operation \" + ex.getLocalizedMessage());\n\t\t}\n\t}", "public boolean folderCleaner(String folderPath, Boolean ifDeleteSubdirs, Boolean ifDeleteFiles, Boolean ifDeleteRoot, Boolean ifPrompt) throws IOException { \n folderPath = folderPath.replace(\"\\\\\", \"/\");\n if(folderPath.endsWith(\"/\")) { folderPath = folderPath.substring(0, folderPath.length() - 1); }\n File dir = new File(folderPath);\n String how = \"\", action = null;\n Boolean success = false;\n Boolean current = false;\n if (dir.exists() && dir.isDirectory()) { \n try{ \n success = true;\n String[] children = dir.list();\n if(children.length > 0) {\n action = \"CLEANED\";\n for (int i = 0; i < children.length; i++) {\n File child = new File(dir, children[i]);\n if(child.isDirectory()){ if(ifDeleteSubdirs) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteSubdirs) {System.out.print(\"DIRECTORY \");} }\n else { if(ifDeleteFiles) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteFiles) {System.out.print(\" FILE \");} }\n \n current = !child.exists();\n success = success && current;\n if(current) { how = \" DELETED: \\\"\"; } else { how = \"NOT DELETED: \\\"\"; }\n if(ifPrompt && current) System.out.print(how + child.getAbsolutePath() + \"\\n\");\n }\n }\n // THE DIRECTORY IS EMPTY - DELETE IT IF REQUIRED\n if (ifDeleteRoot) { FileUtils.forceDelete(dir); success = success && !dir.exists(); action = \"DELETED\"; }\n if(ifPrompt && (!action.equals(null))) {\n if (success) { \n System.out.println(\"\\n\" + \"FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n } else {\n System.out.println(\"\\n\" + \"NOT FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n }\n }\n } catch (Exception e) {} \n }\n return success;\n }", "public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}", "public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}", "private void przygotujFolderWynikowy() {\r\n\t\tFile folder = new File(\"./wynik\");\r\n\t\tif (!(folder.mkdir())) {\r\n\t\t\tFile[] tablica = folder.listFiles();\r\n\t\t\tif(tablica != null)\r\n\t\t\tfor (File f : tablica) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tf.delete();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "private static void deleteFileOrDir(File file)\n {\n if (file.isDirectory())\n {\n File[] childs = file.listFiles();\n for (int i = 0;i < childs.length;i++)\n {\n deleteFileOrDir(childs[i]);\n }\n }\n file.delete();\n }", "public static void main(String[] args){\nFile filez = new File(\"d:/prac/sub1\");\r\ndeleteFolder(filez);\r\n}", "@Override\r\n public void deleteFolder(long id) {\n this.folderRepository.deleteById(id);; \r\n }", "public static void cleanFolder(File outputFolder)\n {\n File[] files = outputFolder.listFiles();\n for (File file : files)\n {\n if (file.isDirectory())\n {\n cleanFolder(file);\n }\n else\n {\n if (file.delete())\n {\n Main.out(\"Deleted: \" + file);\n }\n else\n {\n Main.warn(\"Failed to delete file: \" + file);\n }\n }\n }\n }", "private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }", "private static void deleteTempFolder(String folderName) throws IOException {\n Path tempFolderPath = Paths.get(folderName);\n\n if (Files.exists(tempFolderPath) && Files.isDirectory(tempFolderPath)) {\n Files.walk(tempFolderPath)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n }\n }", "void deleteDirectories() {\n\n if (story_directory != null && !newStoryReady) {\n deleteStoryDirectory();\n }\n\n if (tag_directory != null && !newStoryReady) {\n deleteTagDirectory();\n }\n\n if (cover_directory != null && !newStoryReady) {\n deleteCoverDirectory();\n }\n }", "private void cleanDirectory(File dir) {\n File[] files= dir.listFiles();\n if (files!=null && files.length>0) {\n for (File file: files) {\n delete(file);\n }\n }\n }", "private void clean(Path path) throws IOException {\n if (Files.exists(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<>() {\n public FileVisitResult visitFile(Path path, BasicFileAttributes attributes) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n\n public FileVisitResult postVisitDirectory(Path path, IOException exception) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n });\n }\n }", "@Override\n public void removeDirectory(File directory, boolean recursive) throws FileNotFoundException, IOException {\n }", "public void reset(File folder) {\n File[] listOfFiles = folder.listFiles();\n for(int x=0;x<listOfFiles.length;x++) {\n if(listOfFiles[x].isDirectory()) {\n this.reset(listOfFiles[x]);\n listOfFiles[x].delete();\n }\n }\n folder.delete();\n }", "private void recDelete(File file) {\n if (!file.exists()) {\n return;\n }\n if (file.isDirectory()) {\n File[] list = file.listFiles();\n if (list != null) {\n for (File f : list) {\n recDelete(f);\n }\n }\n }\n file.delete();\n }", "void deleteTagDirectory() {\n\n try {\n\n Log.i(\"Deleting Tag Directory\", tag_directory.toString());\n FileUtils.deleteDirectory(tag_directory);\n } catch (IOException e) {\n\n }\n\n }", "public static void deleteDir(File dir) {\n\t if (dir.isDirectory()) {\n\t String[] children = dir.list();\n\t for (int i=0; i<children.length; i++) {\n\t File file = new File(dir, children[i]);\n\t log.info(\"Deleting file:\" + file.toString());\n\t file.delete();\n\t }\n\t }\n\t }", "public static void deleteRecursively(File file) throws IOException {\n\t\tboolean successful = true;\n\t\tif (file.isDirectory()) {\n\t\t\tfor (File sub : file.listFiles()) {\n\t\t\t\tdeleteRecursively(sub);\n\t\t\t}\n\t\t\tsuccessful = file.delete();\n\t\t} else if (file.isFile()) {\n\t\t\tsuccessful = file.delete();\n\t\t}\n\t\tif (!successful) {\n\t\t\tthrow new IOException(\"Could not delete:\" + file.getName());\n\t\t}\n\t}", "private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}", "@Override\n public FileVisitResult postVisitDirectory(Path dir, IOException e) throws IOException{\n if (e == null) {\n Files.deleteIfExists(dir);\n }\n return FileVisitResult.CONTINUE;\n }", "public static void delete(File file) {\n\n\t\tif (file.isDirectory()) {\n\n\t\t\t// directory is empty, then delete it\n\t\t\tif (file.list().length == 0) {\n\n\t\t\t\tfile.delete();\n\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t// file.getAbsolutePath());\n\n\t\t\t} else {\n\n\t\t\t\t// list all the directory contents\n\t\t\t\tString files[] = file.list();\n\n\t\t\t\tfor (String temp : files) {\n\t\t\t\t\t// construct the file structure\n\t\t\t\t\tFile fileDelete = new File(file, temp);\n\n\t\t\t\t\t// recursive delete\n\t\t\t\t\tdelete(fileDelete);\n\t\t\t\t}\n\n\t\t\t\t// check the directory again, if empty then delete it\n\t\t\t\tif (file.list().length == 0) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t\t// file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then delete it\n\t\t\tfile.delete();\n\t\t\t// System.out.println(\"File is deleted : \" +\n\t\t\t// file.getAbsolutePath());\n\t\t}\n\t}", "private void deleteFileOrFolder(File fileOrFolder) {\n if (fileOrFolder != null) {\n if (fileOrFolder.isDirectory()) {\n for (File item : fileOrFolder.listFiles()) {\n deleteFileOrFolder(item);\n }\n }\n if (!fileOrFolder.delete()) {\n fileOrFolder.deleteOnExit();\n }\n }\n }", "void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }", "public static void deleteDirectoryRecursively(Path pathToBeDeleted) throws IOException {\n\n Files.walk(pathToBeDeleted).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);\n }", "private void cleanTempFolder() {\n File tmpFolder = new File(getTmpPath());\n if (tmpFolder.isDirectory()) {\n String[] children = tmpFolder.list();\n for (int i = 0; i < children.length; i++) {\n if (children[i].startsWith(TMP_IMAGE_PREFIX)) {\n new File(tmpFolder, children[i]).delete();\n }\n }\n }\n }", "@Override\n\tpublic boolean delete() {\n\t\tboolean result = false;\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).delete();\n\t\t\t\t\t\t\telse if (file.isFile()) super.delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsuper.delete();\n\t\t\t\t} else if (this.isFile()) super.delete();\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "public static void deleteFile(File file){\r\n if(file.isFile()){\r\n file.delete();\r\n return;\r\n }\r\n if(file.isDirectory()){\r\n File[] childFile = file.listFiles();\r\n if(childFile == null || childFile.length == 0){\r\n file.delete();\r\n return;\r\n }\r\n for(File f : childFile){\r\n deleteFile(f);\r\n }\r\n file.delete();\r\n }\r\n }", "public static void deletePath(Path path) throws IOException {\n if (!Files.isDirectory(path) || Files.list(path).count() == 0) { Files.deleteIfExists(path); }\n else {\n try (Stream<Path> files = Files.list(path)) {\n files.forEach(p -> {\n try { deletePath(p); }\n catch (IOException e) { e.printStackTrace(); }\n });\n Files.delete(path);\n }\n }\n }", "private void emptyDirectory(File dir){\n\n for (File file : Objects.requireNonNull(dir.listFiles())){\n if (file.isDirectory())\n {\n emptyDirectory(file);\n }\n file.delete();\n }\n }", "public static void deleteDirectory(String path) throws KubernetesPluginException {\n Path pathToBeDeleted = Paths.get(path);\n if (!Files.exists(pathToBeDeleted)) {\n return;\n }\n try {\n Files.walk(pathToBeDeleted)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Unable to delete directory: \" + path, e);\n }\n\n }", "protected void deleteTmpDirectory(File file) {\n\t\tif (file.exists() && file.canWrite()) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\tfor (File child : files) {\n\t\t\t\t\tif (child.isDirectory()) {\n\t\t\t\t\t\tdeleteTmpDirectory(child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}", "public static void deleteEverythingInPath(String path) {\n try {\n Path rootPath = Paths.get(path);\n Files.walk(rootPath, FileVisitOption.FOLLOW_LINKS)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .peek(System.out::println)\n .forEach(File::delete);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public boolean delete(String path, boolean recurse) throws SystemException;", "private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }", "private static void deleteDirectory(File directory) {\r\n File[] files = directory.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n } else {\r\n files[i].delete();\r\n }\r\n }\r\n // Now that the directory is empty. Delete it.\r\n directory.delete();\r\n }", "@Override\r\n\tpublic void remDir(String path) {\n\t\t\r\n\t}", "public static void cleanDirectory(File dir) {\n if (dir.isDirectory()) {\n for (File f : dir.listFiles()) {\n cleanDirectory( f );\n }\n }\n dir.delete();\n }", "private synchronized static void deleteParents(File file) {\n if (file == null) {\n return;\n }\n\n File tmp = file;\n\n for (int i = 0; i < directoryLevels; i++) {\n File directory = tmp.getParentFile();\n File[] files = directory.listFiles();\n\n // Only delete empty directories\n if (files.length != 0) {\n break;\n }\n\n directory.delete();\n tmp = directory;\n }\n }", "@Override\n public FileVisitResult postVisitDirectory(Path dir,\n IOException exc)\n throws IOException {\n Files.delete(dir);\n System.out.printf(\"Directory is deleted : %s%n\", dir);\n return FileVisitResult.CONTINUE;\n }", "private static boolean deleteDirectory(final File path) {\r\n if (path.exists()) {\r\n final File[] files = path.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n }\r\n else {\r\n files[i].delete();\r\n }\r\n }\r\n }\r\n return (path.delete());\r\n }", "private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }", "private void deleteWorkingRoot(WorkUnit workUnit, boolean copy) {\n\n // Construct folder name (will be copy or not)\n String folderToDelete = format(\"%s%s\", workUnit.root, (copy ? \"_copy\" : \"\"));\n\n // 7. Clean work directory\n MigrationHistory history = historyMgr.startStep(workUnit.migration,\n StepEnum.CLEANING, format(\"Remove %s\", folderToDelete));\n\n // Sanity check\n if (!StringUtils.isBlank(folderToDelete) && folderToDelete.contains(\"20\") && folderToDelete.contains(\"_\")) {\n\n try {\n\n if (isWindows) {\n // FileUtils.deleteDirectory(new File(folderToDelete));\n // JBU : Fails occassionally on windows with file lock issue\n // FileUtils.deleteDirectory(new File(folderToDelete));\n // JBU : Fails on windows not able to delete a large number of files?..\n String gitCommand = format(\"rd /s /q %s\", folderToDelete);\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n } else {\n // Seems to work ok on linux. Keeping Java command for the moment\n FileSystemUtils.deleteRecursively(new File(folderToDelete));\n }\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n } catch (Exception exc) {\n LOG.error(\"Failed deleteDirectory: \", exc);\n historyMgr.endStep(history, StatusEnum.FAILED, exc.getMessage());\n }\n\n } else {\n LOG.error(\"Failed deleteDirectory: Badly formed delete path\");\n historyMgr.endStep(history, StatusEnum.FAILED, \"Badly formed delete path\");\n }\n }", "public static void delete(File d) {\n\t\tif (d.isDirectory()) {\n\t\t\tfor (File f: d.listFiles()) delete(f);\n\t\t\td.delete();\n\t\t} else d.delete();\n\t}", "private void delete(File file) {\n if (file.isDirectory()) {\n cleanDirectory(file);\n }\n file.delete();\n }", "private void deleteFilesFromDirectory(ArrayList<File> files)\n {\n for(File file:files) {\n Log.i(\"file\",\"indide\"+file.getPath());\n if (file.exists()) {\n Log.i(\"file\",\"exist\"+file.getPath());\n if (file.delete()) {\n Log.i(\"file\",\"delted successfully\"+file.getPath());\n } else {\n Log.i(\"file\",\"unable to delte file\"+file.getPath());\n }\n }\n }\n }", "public static void deleteFileOrDirectory(KVFile file) {\n if (file.isDirectory()) {\n String[] children = file.list();\n for (String aChildren : children) {\n if (new KVFile(file, aChildren).isDirectory() && !aChildren.equals(\"PreinstalledMaps\") && !aChildren.equals(\"Maps\")) {\n deleteFileOrDirectory(new KVFile(file, aChildren));\n } else {\n new KVFile(file, aChildren).delete();\n }\n }\n }\n }", "public static void deleteFilesRecursive(String strPath) {\n\n File fileOrDirectory = new File(strPath);\n\n if (fileOrDirectory.isDirectory()){\n for (File child : fileOrDirectory.listFiles())\n deleteFilesRecursive(child.getPath());\n fileOrDirectory.delete();\n }else\n fileOrDirectory.delete();\n }", "public synchronized void cleanup() {\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) { // children will be null if the directory does\n\t\t\t\t\t\t\t\t// not exist.\n\t\t\tfor (int i = 0; i < children.length; i++) { // remove too small file\n\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\tif (!child.equals(new File(mStorageDirectory, NOMEDIA))\n\t\t\t\t\t\t&& child.length() <= MIN_FILE_SIZE_IN_BYTES) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void deletePublicationDir(File pubDir) {\n System.out.println(\" Deleting contents of directory: \" + pubDir);\n for (File pubFile : pubDir.listFiles()) {\n if (pubFile.isFile()) {\n System.out.println(\" Deleting file: \" + pubFile);\n pubFile.delete();\n }\n }\n System.out.println(\" Now deleting directory: \" + pubDir);\n pubDir.delete();\n }", "public void delete() throws Exception {\n\n getConnection().do_Delete(new URL(getConnection().getFilemanagerfolderendpoint() + \"/\" + getId()),\n getConnection().getApikey());\n }", "private void deleteFile(java.io.File file) {\n if (file.isDirectory()) {\n for (java.io.File f : file.listFiles()) \n deleteFile(f);\n }\n \n if (!file.delete())\n try {\n throw new FileNotFoundException(\"Failed to delete file: \" + file.getName());\n } catch (FileNotFoundException e) {\n System.err.println(\"Delete of file \" + file.getAbsolutePath() + \" failed\");\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}", "public static void deleteDirectoryTree(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteDirectoryTree(child);\n }\n }\n\n fileOrDirectory.delete();\n }", "private static void deleteEmptyParentDirs(Path pkgDirPath, Path repoPath) throws IOException {\n Path pathsInBetween = repoPath.relativize(pkgDirPath);\n for (int i = pathsInBetween.getNameCount(); i > 0; i--) {\n Path toRemove = repoPath.resolve(pathsInBetween.subpath(0, i));\n if (!Files.list(toRemove).findAny().isPresent()) {\n Files.delete(toRemove);\n }\n }\n }", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "protected void deleteDirectory(String oneDir) {\n \n File[] listOfFiles;\n File cleanDir;\n\t\n cleanDir = new File(oneDir);\n if (!cleanDir.exists()) {// Nothing to do. Return; \n\t return;\n\t}\n listOfFiles = cleanDir.listFiles();\n if(listOfFiles != null) { \n for(int countFiles = 0; countFiles < listOfFiles.length; countFiles++) { \n if (listOfFiles[countFiles].isFile()) {\n listOfFiles[countFiles].delete();\n } else { // It is a directory\n String nextCleanDir = cleanDir + separator + listOfFiles[countFiles].getName();\n\t\t File newCleanDir = new File(nextCleanDir);\n deleteDirectory(newCleanDir.getAbsolutePath());\n } \n }// End for loop\n } // End if statement \n cleanDir.delete();\n }", "public void deleteFile() {\n\t\tif (JOptionPane.showConfirmDialog(desktopPane,\n\t\t\t\t\"Are you sure? this action is permanent!\") != JOptionPane.YES_OPTION)\n\t\t\treturn;\n\n\t\tEllowFile file = null;\n\t\tTreePath paths[] = getSelectionModel().getSelectionPaths();\n\t\tif (paths == null)\n\t\t\treturn;\n\t\tfor (TreePath path : paths) {\n\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) path\n\t\t\t\t\t.getLastPathComponent();\n\t\t\tfile = (EllowFile) node.getUserObject();\n\t\t\tEllowynProject project = file.parentProject;\n\t\t\tfile.deleteAll();\n\t\t\tif (!file.isProjectFile && project != null)\n\t\t\t\tproject.rebuild(); // don't rebuild the project if the project\n\t\t\t\t\t\t\t\t\t// itself is deleted\n\t\t\tdesktopPane.closeFrames(file);\n\t\t\tmodel.removeNodeFromParent(node);\n\t\t}\n\t}", "protected static void deleteTrash() {\n\t\tArrays.stream(new File(\".\").listFiles())\n\t\t\t.filter(f -> f.getName().startsWith(\"_tmp.\"))\n\t\t\t.forEach(File::delete);\n\t}", "public static void deleteAllFile(File path) {\n File[] array = path.listFiles();\n\n for (File file : array) {\n if (file.isFile()) {\n file.delete();\n }\n }\n }", "public synchronized void cleanupSimple() {\n\t\tfinal int maxNumFiles = 1000;\n\t\tfinal int numFilesToDelete = 50;\n\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) {\n\t\t\tif (children.length > maxNumFiles) {\n\t\t\t\tfor (int i = children.length - 1, m = i - numFilesToDelete; i > m; i--) {\n\t\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void delete(String source) {\n Path directory = Paths.get(source);\n try {\n Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs)\n throws IOException {\n Files.delete(file);\n return CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(final Path file, final IOException e) {\n return handleException(e);\n }\n\n private FileVisitResult handleException(final IOException e) {\n e.printStackTrace(); // replace with more robust error handling\n return TERMINATE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(final Path dir, final IOException e)\n throws IOException {\n if (e != null) {\n return handleException(e);\n }\n Files.delete(dir);\n return CONTINUE;\n }\n });\n } catch (IOException ex) {\n Logger.getLogger(FolderManager.class.getName()).log(Level.SEVERE, null, ex);\n delete(source);\n }\n }", "public static void deleteAllMediaThumbIntStg() {\n File[] subDirectory = PathUtil.INTERNAL_MAIN_DIRECTORY.listFiles();\n for (File aSubDirectory : subDirectory) { //looping sub folders\n String[] files = aSubDirectory.list();\n //if (!aSubDirectory.getName().equals(PathUtil.INTERNAL_SUB_FOLDER_CHAT_IMAGE)) { //except chat image folder\n for (String file : files) {\n File f = new File(aSubDirectory, file);\n delete(f);\n //LogUtil.e(\"StorageUtil\", \"deleteAllMediaThumbIntStg\");\n }\n delete(aSubDirectory);\n //}\n }\n }", "public void delete() throws IOException {\n\t\tclose();\n\t\tdeleteContents(directory);\n\t}", "private void deleteDir(File fileDir)\n {\n try\n {\n FileHelper.deleteDir(fileDir);\n }\n catch (Exception e)\n {\n // ignore\n }\n }", "public static void delete(File file) throws IOException {\n String method = \"delete() - \";\n if ((file != null) && (file.exists())) {\n if (file.isDirectory()) {\n if (file.list().length == 0) {\n file.delete();\n }\n else {\n String files[] = file.list();\n for (String current : files) {\n File fileToDelete = new File(file, current);\n delete(fileToDelete);\n if (file.list().length == 0) {\n file.delete();\n }\n }\n }\n }\n else {\n file.delete();\n }\n }\n else {\n throw new IOException(method \n + \"The input file is null or does not exist.\");\n }\n }", "public static void deleteAll(File path, boolean includePath) throws IOException {\n\n Files.walkFileTree(path.toPath(), new FileTreeWalker(FileTreeWalker.Action.DELETE));\n\n if (includePath && path.exists() && !path.delete()) {\n throw new IOException(\"Failed to delete directory or file \"\n + path);\n }\n\n }", "public void deleteFolder() throws IOException {\n\t\tclientOutput.println(\">>> Unesite relativnu putanju do foldera koji zelite da izbrisete: \");\n\t\tuserInput = clientInput.readLine();\n\n\t\tuserInput = \"drive/\" + username + \"/\" + userInput;\n\t\tizabraniF = new File(userInput);\n\n\t\ttry {\n\t\t\tizabraniF.delete();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void deleteDirectory(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\t//directory is empty, then delete it\n\t\t\tif (dir.list().length == 0) {\n\t\t\t\tdir.delete();\n\t\t\t} else {\n\t\t\t\t//list all the directory contents\n\t\t\t\tString[] subFiles = dir.list();\n\t\t\t\tfor (int i = 0; i < subFiles.length; i++) {\n\t\t\t\t\t//construct the file structure\n\t\t\t\t\tFile fileDelete = new File(dir, subFiles[i]);\n\t\t\t\t\t//recursive delete\n\t\t\t\t\tdeleteDirectory(fileDelete);\n\t\t\t\t}\n\t\t\t\t//check the directory again, if empty then delete it\n\t\t\t\tif (dir.list().length == 0) {\n\t\t\t\t\tdir.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tdir.delete();\n\t\t}\n\t}", "@Test\n public void testDeleteFolder() {\n System.out.println(\"deleteFolder\");\n String folder = \"\";\n FileSystemStorage instance = null;\n instance.deleteFolderAndAllContents(folder);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public String do_rmdir(String pathOnServer) throws RemoteException {\r\n\t\tString directoryPath = pathOnServer;\r\n\t\tString message;\r\n\t\t\r\n\t\t\tFile dir = new File(directoryPath);\r\n\t\t\tif (!dir.isDirectory()) {\r\n\t\t\t\tmessage = \"Invalid directory\";\t}\t\r\n\t\t\telse {\r\n\t\t\t\t\r\n\t\t\tif(dir.list().length>0) {\r\n\r\n\t\t\tFile[] filesList = dir.listFiles();\r\n\t\t\t//Deleting Directory Content\r\n\t\t\tfor(File file : filesList){\r\n\t\t\t\tSystem.out.println(\"Deleting \"+file.getName());\r\n\t\t\t\tfile.delete();\r\n\t\t\t}}\r\n\t\t\tif (dir.delete()) message =\"Successfully deleted the Directory: \" + directoryPath ;\r\n\t\t\telse message =\"Error deleting the directory: \" + directoryPath ;\r\n\t\t\t}//else end \r\n\t\treturn message;\r\n\t}", "public static boolean deleteFileRoot(String path) {\n try {\n if (!readReadWriteFile())\n RootTools.remount(path, \"rw\");\n\n if (new File(path).isDirectory()) {\n execute(\"rm -f -r \" + getCommandLineString(path));\n } else {\n execute(\"rm -r \" + getCommandLineString(path));\n }\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "public boolean delete()\n\t{\n\t\treturn deleteRecursive( file ) ;\n\t}", "public DeleteTResponse remove(String path, boolean recursive, DeleteTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;", "public boolean deleteFolder(String path){\n\t\tValueCollection payload = new ValueCollection();\n\t\tpayload.put(\"path\", new StringPrimitive(path));\n\t\ttry {\t\n\t\t\tclient.invokeService(ThingworxEntityTypes.Things, FileThingName, \"DeleteFolder\", payload, 5000);\n\t\t\tLOG.info(\"Folder {} deleted.\",path);\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Folder doesn't exist. Error: {}\",e);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static boolean deleteFolderContents(String path) {\n File currDirectory = new File(path);\n if (currDirectory.exists()) {\n try {\n for (File file : currDirectory.listFiles()) {\n if (file.isDirectory()) {\n if (!deleteFolder(file.getCanonicalPath())) {\n return false;\n }\n } else {\n if (!deleteFile(file.getCanonicalPath())) {\n return false;\n }\n }\n }\n } catch (IOException e) {\n return false;\n }\n return true;\n }\n return false;\n }", "@TestFor(issues = \"TW-42737\")\n public void test_directory_remove() throws Exception {\n CommitPatchBuilder patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.createFile(\"dir/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.createFile(\"dir2/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Create dir with file\"));\n patchBuilder.dispose();\n\n RepositoryStateData state1 = myGit.getCurrentState(myRoot);\n\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.deleteDirectory(\"dir\");\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Delete dir\"));\n patchBuilder.dispose();\n\n RepositoryStateData state2 = myGit.getCurrentState(myRoot);\n\n List<ModificationData> changes = myGit.getCollectChangesPolicy().collectChanges(myRoot, state1, state2, CheckoutRules.DEFAULT);\n then(changes).hasSize(1);\n then(changes.get(0).getChanges()).extracting(\"fileName\", \"type\").containsOnly(Tuple.tuple(\"dir/file\", VcsChange.Type.REMOVED));\n }", "private static void deleteDatabaseHelper(final Path path) {\n if (path != null) {\n\n try {\n if (!Files.isDirectory(path)) {\n Files.delete(path);\n } else {\n \n // see http://www.oracle.com/technetwork/articles/java/ma14-java-se-8-streams-2177646.html\n // for an explanation of streams and foreach\n Files.newDirectoryStream(path).forEach(filePath -> deleteDatabaseHelper(filePath));\n Files.delete(path);\n }\n\n } catch (IOException ex) {\n Logger.getLogger(ConnectionManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public final boolean recursiveDelete(File file) {\r\n if (isFileSystem(file)) {\r\n if (file.isDirectory()) {\r\n // delete all children first\r\n File[] children = FileSystemView.getFileSystemView().getFiles(file, false);\r\n for (File f : children) {\r\n if (!recursiveDelete(f)) {\r\n return false;\r\n }\r\n }\r\n // delete this file.\r\n return file.delete();\r\n }\r\n else {\r\n return file.delete();\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "public boolean clean() {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t((File) file).delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult = true;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "public void excludeAllFiles(){\n for(Map.Entry<String,File> entry : dataSourcesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //For each directory created for each service\n for(Map.Entry<String,File> entry : servicesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //Finally, delete sessionDirectory\n if(sessionDirectory != null)\n sessionDirectory.delete();\n \n }", "void folderDeleted(String remoteFolder);", "private boolean deleteDir(File dir) {\r\n if (dir.isDirectory()) {\r\n \r\n //Borra todos los ficheros del directorio\r\n String[] children = dir.list();\r\n for (int i=0; i<children.length; i++) {\r\n boolean success = deleteDir(new File(dir, children[i]));\r\n if (!success) {\r\n return false;\r\n }\r\n }\r\n }\r\n \r\n //Ahora que el directorio está vacío, se puede borrar\r\n return dir.delete();\r\n }", "protected void deleteZipAndFiles() throws IOException {\n FileUtils.deleteDirectory(new File(workspace + \"\\\\\" + zipName.replace(\".zip\", \"\")));\n FileUtils.forceDelete(new File(workspace + \"\\\\\" + zipName));\n uploadStatus = \"Cleaning up :)\";\n System.out.println(\"Done!\");\n }", "public static void deleteCache(Context context){\n File baseDir = getResourcesFolder(context);\n //basDir could be null if storage has not yet been selected (extreme cases where memory is too low)\n if(baseDir != null) {\n File[] content = baseDir.listFiles();\n if(content != null)\n for (File file : content)\n deleteRecursively(file);\n }\n }", "public static void m35140a(File file) {\n try {\n if (file.exists()) {\n File[] listFiles = file.listFiles();\n if (listFiles != null) {\n for (File file2 : listFiles) {\n if (file2.isDirectory()) {\n m35140a(file2);\n } else {\n file2.delete();\n }\n }\n }\n file.delete();\n }\n } catch (Exception e) {\n new StringBuilder(\"SDK encountered unexpected error in deleting directory; \").append(e.getMessage());\n }\n }", "public static native void deleteTreesBelow(String dir) throws IOException;", "private static boolean deleteDirectory(File directory) {\n\t if(directory.exists()){\n\t File[] files = directory.listFiles();\n\t if(null!=files){\n\t for(int i=0; i<files.length; i++) {\n\t if(files[i].isDirectory()) {\n\t deleteDirectory(files[i]);\n\t }\n\t else {\n\t files[i].delete();\n\t }\n\t }\n\t }\n\t }\n\t return(directory.delete());\n\t}", "public static final void delete(final File file)\n\t{\n\t\tif (file.isDirectory())\n\t\t{\n\t\t\tfor (final String temp : file.list())\n\t\t\t{\n\t\t\t\tdelete(new File(file, temp));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfile.delete();\n\t\t}\n\t}" ]
[ "0.7671761", "0.73998964", "0.73071927", "0.7283027", "0.7095871", "0.7066259", "0.7062983", "0.70174134", "0.70037675", "0.69962543", "0.69704205", "0.69408214", "0.6877099", "0.6870789", "0.6861422", "0.68416554", "0.6812918", "0.68016946", "0.67901635", "0.67474514", "0.6731237", "0.67272484", "0.672459", "0.6720077", "0.6712804", "0.6707267", "0.66963726", "0.66918457", "0.6687673", "0.6671791", "0.66633177", "0.665981", "0.66578835", "0.66492385", "0.66338396", "0.6604425", "0.6594723", "0.657904", "0.6577791", "0.655888", "0.6556123", "0.65547955", "0.65277773", "0.6509497", "0.6507417", "0.6502841", "0.6501497", "0.6473003", "0.6459697", "0.6458006", "0.6443602", "0.6432717", "0.64259356", "0.64248925", "0.6415343", "0.638471", "0.6364275", "0.6344913", "0.6338103", "0.632628", "0.6325826", "0.6311341", "0.63108563", "0.63058364", "0.62996185", "0.6297753", "0.6269809", "0.62398905", "0.620912", "0.61972785", "0.6175867", "0.6168429", "0.6165911", "0.6161706", "0.6157648", "0.6148762", "0.6137086", "0.61307424", "0.61299527", "0.6122103", "0.61183774", "0.60848385", "0.6065577", "0.6059717", "0.6038855", "0.60189474", "0.6015786", "0.60153276", "0.60094506", "0.5993172", "0.59923464", "0.5989116", "0.5988685", "0.59800434", "0.5974942", "0.59740865", "0.593355", "0.592912", "0.59274536", "0.59216774", "0.5907215" ]
0.0
-1
Copies a file from one location (src) to another (dst). This implementation uses the java.nio channels (because supposedly it is faster).
public static boolean copyFile(String src, String dst) { FileChannel inChannel = null; FileChannel outChannel = null; try { inChannel = new FileInputStream(new File(src)).getChannel(); outChannel = new FileOutputStream(new File(dst)).getChannel(); inChannel.transferTo(0, inChannel.size(), outChannel); } catch (FileNotFoundException e) { MessageGenerator.briefError("ERROR could not find/access file(s): " + src + " and/or " + dst); return false; } catch (IOException e) { MessageGenerator.briefError("ERROR copying file: " + src + " to " + dst); return false; } finally { try { if (inChannel != null) inChannel.close(); if (outChannel != null) outChannel.close(); } catch (IOException e) { MessageGenerator.briefError("Error closing files involved in copying: " + src + " and " + dst); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}", "public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }", "public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }", "public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}", "public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }", "static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}", "private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }", "private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }", "public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}", "@Test\n public void testCopyFileUsingChannel() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingChannel(sourceFile, channelDestFile);\n System.out.println(\"Time taken by file channel using:\" + (System.nanoTime() - start) / 1000);\n }", "private static void copyFile(File scrFile, File file) {\n\t\r\n}", "public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}", "public static void copyFile(File sourceFile, File destFile)\n throws IOException {\n if (!destFile.exists()) {\n destFile.createNewFile();\n }\n FileChannel source = null;\n FileChannel destination = null;\n try {\n source = new FileInputStream(sourceFile).getChannel();\n destination = new FileOutputStream(destFile).getChannel();\n destination.transferFrom(source, 0, source.size());\n } catch (Exception e) {} finally {\n if (source != null) {\n source.close();\n }\n if (destination != null) {\n destination.close();\n }\n }\n }", "private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }", "public void copyFileChannel(String inputFile, String outputFile) throws IOException {\n\t\tFileInputStream inputStream = new FileInputStream(inputFile);\n\t\tFileOutputStream outputStream = new FileOutputStream(outputFile);\n\n\t\tFileChannel inChannel = inputStream.getChannel();\n\t\tFileChannel outChannel = outputStream.getChannel();\n\n\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }", "private boolean copyFile(FileInputStream srcStream, String filePath) {\n FileChannel srcChannel;\n FileOutputStream destStream;\n Throwable th;\n if (srcStream != null) {\n if (filePath != null) {\n FileOutputStream destStream2 = null;\n FileChannel dstChannel = null;\n FileChannel dstChannel2 = null;\n try {\n destStream2 = new FileOutputStream(createDestFile(filePath));\n FileChannel srcChannel2 = srcStream.getChannel();\n try {\n FileChannel dstChannel3 = destStream2.getChannel();\n try {\n srcChannel2.transferTo(0, srcChannel2.size(), dstChannel3);\n boolean isSuccess = true;\n try {\n srcChannel2.close();\n } catch (IOException e) {\n isSuccess = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n try {\n destStream2.close();\n } catch (IOException e2) {\n isSuccess = false;\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n if (dstChannel3 != null) {\n try {\n dstChannel3.close();\n } catch (IOException e3) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n }\n return isSuccess;\n } catch (FileNotFoundException e4) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess2 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e5) {\n isSuccess2 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e6) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess2 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess2;\n }\n dstChannel2.close();\n return isSuccess2;\n } catch (IOException e7) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess3 = false;\n try {\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e8) {\n isSuccess3 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e9) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess3 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess3;\n }\n try {\n dstChannel2.close();\n return isSuccess3;\n } catch (IOException e10) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n } catch (Throwable th2) {\n srcChannel = dstChannel2;\n destStream = destStream2;\n th = th2;\n }\n } catch (Throwable th3) {\n destStream = destStream2;\n th = th3;\n srcChannel = dstChannel3;\n dstChannel = srcChannel2;\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e11) {\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream != null) {\n try {\n destStream.close();\n } catch (IOException e12) {\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n }\n if (srcChannel != null) {\n try {\n srcChannel.close();\n } catch (IOException e13) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n }\n }\n throw th;\n }\n } catch (FileNotFoundException e14) {\n dstChannel = srcChannel2;\n boolean isSuccess22 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e15) {\n dstChannel = srcChannel2;\n boolean isSuccess32 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (Throwable th4) {\n dstChannel = srcChannel2;\n srcChannel = null;\n destStream = destStream2;\n th = th4;\n if (dstChannel != null) {\n }\n if (destStream != null) {\n }\n if (srcChannel != null) {\n }\n throw th;\n }\n } catch (FileNotFoundException e16) {\n boolean isSuccess222 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e17) {\n boolean isSuccess322 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n }\n }\n }\n return false;\n }", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "static void copyFile(File srcFile, File destFile) {\n\t\ttry {\n\t\t\tLong start = System.currentTimeMillis();\n\t\t\tdestFile.createNewFile();\n\t\t\tInputStream oInStream = new FileInputStream(srcFile);\n\t\t\tOutputStream oOutStream = new FileOutputStream(destFile);\n\n\t\t\t// Transfer bytes from in to out\n\t\t\tbyte[] oBytes = new byte[1024];\n\t\t\tint nLength;\n\t\t\tBufferedInputStream oBuffInputStream = \n\t\t\t\t\tnew BufferedInputStream( oInStream );\n\t\t\twhile ((nLength = oBuffInputStream.read(oBytes)) > 0) {\n\t\t\t\toOutStream.write(oBytes, 0, nLength);\n\t\t\t}\n\t\t\toInStream.close();\n\t\t\toOutStream.close();\n\t\t\tLong end = System.currentTimeMillis();\n\t\t\tSystem.out.println((end-start));\n\t\t} catch (IOException e) {\n\t\t\tlogger.info(\"Error in creating the excels :\" +e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void copyFile(InputStream in, File to) throws IOException {\r\n FileOutputStream out = new FileOutputStream(to);\r\n int len;\r\n byte[] buffer = new byte[4096];\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n }", "void copyFile(File sourcefile, File targetfile) throws Exception {\n\t\tif(targetfile.exists()) targetfile.delete();\n\t\ttargetfile.createNewFile();\n\t\tFileChannel source = null;\n\t\tFileChannel target = null;\n\t\ttry{\n\t\t\tsource = new FileInputStream(sourcefile).getChannel();\n\t\t\ttarget = new FileOutputStream(targetfile).getChannel();\n\t\t\ttarget.transferFrom(source, 0, source.size());\n\t\t}\n\t\tfinally{\n\t\t\tif(source!=null) source.close();\n\t\t\tif(target!=null) target.close();\n\t\t}\n\t\ttargetfile.setLastModified(sourcefile.lastModified());\n\t}", "@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}", "public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }", "public void copy(String name, String oldPath, String newPath);", "public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}", "public long FileChannelCopy(String inFile, String outFile) throws Exception {\n\t\tlong begin = System.currentTimeMillis();\n\t\tFile in = new File(inFile);\n\t\tFile out = new File(outFile);\n\t\tif (out.exists())\n\t\t\tout.delete();\n\t\tFileInputStream fin = new FileInputStream(in);\n\t\tFileOutputStream fout = new FileOutputStream(out);\n\t\tFileChannel inc = fin.getChannel();\n\t\tFileChannel outc = fout.getChannel();\n\t\tint bufferLen = (int) in.length();\n\t\tByteBuffer bb = ByteBuffer.allocateDirect(bufferLen);\n\t\twhile (true) {\n\t\t\tint ret = inc.read(bb);\n\t\t\tif (ret == -1) {\n\t\t\t\tfin.close();\n\t\t\t\tfout.flush();\n\t\t\t\tfout.close();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbb.flip();\n\t\t\toutc.write(bb);\n\t\t\tbb.clear();\n\t\t}\n\t\tlong end = System.currentTimeMillis();\n\t\tlong runtime = 0;\n\t\tif (end > begin)\n\t\t\truntime = end - begin;\n\t\treturn runtime;\n\t}", "private static void cp(File f1,File f2) throws IOException{\n\t\tFileInputStream fi=new FileInputStream(f1);\r\n\t\tFileOutputStream fo=new FileOutputStream(f2);\r\n\t\tBufferedOutputStream bof=new BufferedOutputStream(fo);\r\n\t\tBufferedInputStream bis=new BufferedInputStream(fi);\r\n\t\tbyte[] buffer=new byte[1024];\r\n\t\tint off=0;\r\n\t\tint length=1024;\r\n\t\twhile(true){\r\n\t\t\tif(fi.available()<1024){\r\n\t\t\t\tlength=fi.available();}\r\n\t\tbis.read(buffer, off, length);\r\n\t\tbof.write(buffer, off, length);\r\n//\t\tfi.read(buffer, off,length);\r\n//\t\tfo.write(buffer, off, length);\r\n\t\tif(length<1024){\r\n\t\t\tSystem.out.println(f1+\"-->\"+f2+\"复制完成!\");\r\n\t\t\tbof.flush();\r\n\t\t\tfi.close();\r\n\t\t\tfo.close();\r\n\t\t\treturn;}\r\n\t\t}\r\n\t\t\r\n\t}", "public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }", "public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }", "@Override\n public void copyBlockdata(URI destination) throws IOException {\n getFileIoProvider().nativeCopyFileUnbuffered(\n getVolume(), getBlockFile(), new File(destination), true);\n }", "private boolean doSingleFileMove(Path src, Path dst) throws IOException {\n RecoverableWriter writer;\n try {\n writer = fileSystem.createRecoverableWriter();\n } catch (UnsupportedOperationException ignore) {\n // Some writer not support RecoverableWriter, so fallback to per record moving.\n // For example, see the constructor of HadoopRecoverableWriter. Although it not support\n // RecoverableWriter, but HadoopPathBasedBulkFormatBuilder can support streaming\n // writing.\n return false;\n }\n\n RecoverableFsDataOutputStream out = writer.open(dst);\n try (FSDataInputStream in = fileSystem.open(src)) {\n IOUtils.copyBytes(in, out, false);\n } catch (Throwable t) {\n out.close();\n throw t;\n }\n out.closeForCommit().commit();\n return true;\n }", "public static void copyFile(File from, File to) throws IOException {\r\n FileInputStream in = new FileInputStream(from);\r\n copyFile(in, to);\r\n }", "public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }", "public void transferTo(File dest) throws IOException, IllegalStateException {\r\n mFile.transferTo(dest);\r\n }", "public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public static void copy(File file, File file2) {\n Throwable th;\n Throwable th2;\n Throwable th3;\n Throwable th4 = null;\n FileInputStream fileInputStream = new FileInputStream(file);\n FileOutputStream fileOutputStream = new FileOutputStream(file2);\n byte[] bArr = new byte[1024];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read > 0) {\n fileOutputStream.write(bArr, 0, read);\n } else {\n fileOutputStream.close();\n fileInputStream.close();\n return;\n }\n }\n throw th2;\n if (th4 == null) {\n }\n throw th;\n throw th;\n if (th3 != null) {\n try {\n fileOutputStream.close();\n } catch (Throwable th5) {\n }\n } else {\n fileOutputStream.close();\n }\n throw th2;\n }", "public void copyFile(String oldPath, String newPath) {\n\t\ttry {\n\t\t\tint byteread = 0;\n\t\t\tFile oldfile = new File(oldPath);\n\t\t\tif (oldfile.exists()) {\n\t\t\t\tFileInputStream oldStream = new FileInputStream(oldPath);\n\t\t\t\tFileOutputStream newStream = new FileOutputStream(newPath);\n\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\twhile ((byteread = oldStream.read(buffer)) != -1) {\n\t\t\t\t\tnewStream.write(buffer, 0, byteread);\n\t\t\t\t}\n\t\t\t\tnewStream.close();\n\t\t\t\toldStream.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void copyFile(InputStream is, OutputStream os) throws IOException {\n\n final byte[] buf = new byte[4096];\n int cnt = is.read(buf, 0, buf.length);\n while (cnt >= 0) {\n os.write(buf, 0, cnt);\n cnt = is.read(buf, 0, buf.length);\n }\n os.flush();\n }", "public static void copyFiles(OverthereConnection srcHost, OverthereConnection dstHost, List<String> copySpec) {\n if (copySpec.isEmpty()) {\n return;\n }\n\n if (copySpec.size() % 2 == 0) {\n Iterator<String> toCopy = copySpec.iterator();\n while (toCopy.hasNext()) {\n OverthereFile src = srcHost.getFile(toCopy.next());\n OverthereFile dst = dstHost.getFile(toCopy.next());\n src.copyTo(dst);\n }\n } else {\n List<String> srcFiles = copySpec.subList(0, copySpec.size() - 1);\n OverthereFile dst = dstHost.getFile(copySpec.get(copySpec.size() - 1));\n\n for (String srcFile : srcFiles) {\n OverthereFile src = srcHost.getFile(srcFile);\n src.copyTo(dst);\n }\n }\n }", "private void copyOrMoveFile(File file, File dir,boolean isCopy) throws IOException {\n File newFile = new File(dir, file.getName());\n FileChannel outChannel = null;\n FileChannel inputChannel = null;\n try {\n outChannel = new FileOutputStream(newFile).getChannel();\n inputChannel = new FileInputStream(file).getChannel();\n inputChannel.transferTo(0, inputChannel.size(), outChannel);\n inputChannel.close();\n if(!isCopy)\n file.delete();\n } finally {\n if (inputChannel != null) inputChannel.close();\n if (outChannel != null) outChannel.close();\n }\n }", "@Override\n\tpublic void transferTo(File dest) throws IOException, IllegalStateException {\n\n\t}", "public void copyFile(InputStream inputStream, OutputStream outputStream) throws IOException\n {\n byte[] buffer = new byte[1024];\n int length;\n while ((length = inputStream.read(buffer)) > 0)\n outputStream.write(buffer, 0, length);\n inputStream.close();\n outputStream.close();\n }", "public boolean copy(String path, InputStream is) throws SystemException;", "@Test\n public void testCopyFileUsingStream() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingStream(sourceFile, streamDestFile);\n System.out.println(\"Time taken by file stream using:\" + (System.nanoTime() - start) / 1000);\n }", "public static void copy(String suffix) {\r\n boolean success = false;\r\n boolean doVideo = true;\r\n String imgSrcDir = zipDir0 + \"/R\";\r\n String videoSrcDir = zipDir0 + \"/Video\";\r\n String imgDstDir = rImagesDir0 + \"/Images\" + suffix;\r\n String videoDstDir = rVideoDir0 + \"/Video\" + suffix;\r\n File imgSrcDirFile = new File(imgSrcDir);\r\n File videoSrcDirFile = new File(videoSrcDir);\r\n File imgDstDirFile = new File(imgDstDir);\r\n File videoDstDirFile = new File(videoDstDir);\r\n\r\n // Check and create directories\r\n if(!imgSrcDirFile.isDirectory()) {\r\n System.err.println(\"Not a directory: \" + imgSrcDirFile.getPath());\r\n System.exit(1);\r\n }\r\n if(!videoSrcDirFile.isDirectory()) {\r\n doVideo = false;\r\n }\r\n if(!imgDstDirFile.isDirectory()) {\r\n success = imgDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + imgDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n if(doVideo && !videoDstDirFile.isDirectory()) {\r\n success = videoDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + videoDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n\r\n // Images\r\n System.out.println(\"\\nCopying images:\");\r\n System.out.println(\"From: \" + imgSrcDirFile.getPath());\r\n System.out.println(\"To: \" + imgDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(imgSrcDirFile, imgDstDirFile, saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + imgSrcDirFile.getPath()\r\n + \"\\n To: \" + imgDstDirFile.getPath() + \"\\n\");\r\n }\r\n\r\n // Video\r\n System.out.println(\"\\nCopying video:\");\r\n if(!doVideo) {\r\n System.out.println(\"No video found\");\r\n return;\r\n }\r\n System.out.println(\"From: \" + videoSrcDirFile.getPath());\r\n System.out.println(\"To: \" + videoDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(videoSrcDirFile, videoDstDirFile,\r\n saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + videoSrcDirFile.getPath()\r\n + \"\\n To: \" + videoDstDirFile.getPath() + \"\\n\");\r\n }\r\n }", "public int Copy(final String sSourceFile, final String sDestinationtFile, final int EXISITING_FILE_ACTION) throws Exception {\n OutputStream out = null;\n InputStream in = null;\n File fSrc = null;\n File fDest = null;\n File fDestDir = null;\n byte[] buf = null;\n int len = 0;\n int iFileCopied = 0;\n boolean bProcess = false;\n try {\n\n buf = new byte[4096];\n\n //reating source file object\n fSrc = new File(sSourceFile);\n if (!fSrc.exists()) {\n throw new Exception(\"Source File Does not exists!! :\" + sSourceFile);\n }\n\n //creating output file object\n fDest = new File(sDestinationtFile);\n\n //check for folder/directory\n if (fSrc.isDirectory()) {\n File[] fSubFiles = fSrc.listFiles();\n\n //creating destination directory\n if (!fDest.exists()) {\n fDest.mkdirs();\n }\n\n for (int i = 0; i < fSubFiles.length; i++) {\n String sSourceSubFile = sSourceFile + File.separator + fSubFiles[i].getName();\n String sDestinationtSubFile = sDestinationtFile + File.separator + fSubFiles[i].getName();\n\n iFileCopied = iFileCopied + Copy(sSourceSubFile, sDestinationtSubFile, EXISITING_FILE_ACTION);\n }\n\n //check for file \n } else {\n\n //creating input stream of source file\n in = new FileInputStream(fSrc);\n\n //check for destination file parent directory\n fDestDir = fDest.getParentFile();\n if (!fDestDir.exists()) {\n fDestDir.mkdirs();\n }\n\n //check for exisitng file\n //REPLACE EXISITNG FILE\n if (fDest.exists() && EXISITING_FILE_ACTION == FILE_REPLACE) {\n bProcess = true;\n out = new FileOutputStream(fDest);\n\n //APPEND EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_APPEND) {//For Append the file.\n bProcess = true;\n out = new FileOutputStream(fDest, true);\n\n //COPY WITH TIMESTAMP WITH EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_COPY_WITH_TIMESTAMP) {//For Append the file.\n bProcess = true;\n String sTimeStamp = fDest.lastModified() + \"_\";\n fDest = new File(fDest.getParent() + File.separator + sTimeStamp + fDest.getName());\n out = new FileOutputStream(fDest);\n\n //DO NOTHING EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_DO_NOTHING) {//For Append the file.\n bProcess = false;\n\n //file does not exists\n } else if (!fDest.exists()) {\n bProcess = true;\n out = new FileOutputStream(fDest, true);\n\n }\n\n //loop to read buffer & copy in output file\n while ((len = in.read(buf)) > 0 && bProcess) {\n out.write(buf, 0, len);\n }\n\n iFileCopied = iFileCopied + 1;\n }\n\n return iFileCopied;\n } catch (Exception e) {\n throw e;\n } finally {\n try {\n in.close();\n } catch (Exception e) {\n }\n try {\n out.close();\n } catch (Exception e) {\n }\n in = null;\n out = null;\n fSrc = null;\n fDest = null;\n fDestDir = null;\n }\n }", "public void copy(String scrpath,String destpath) throws IOException \n\t{\n\t\ttry {\n\t\t\tInputStream in=new FileInputStream(scrpath);\n\t\t\tFileOutputStream out=new FileOutputStream(destpath);\n\t\t\tbyte[] buffer=new byte[1024];\n\t\t\tint length=0;\n\t\t\twhile((length=in.read(buffer))>0) {\n\t\t\t\tSystem.out.println(length);\n\t\t\t\tout.write(buffer,0,length);\n\t\t\t}\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString sourcePathHdfs=args[0];\n\t\tString destinationPath=args[1];\n\t\tnew CopyToLocal().copyToLocal(sourcePathHdfs, destinationPath);\n\t\t\n\t}", "public static IStatus copyFile(String from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(new FileInputStream(from), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "public static void copy(File srcDir, File relSrcFile, File destDir, File relDestFile) throws IOException {\n File finalSrcFile = (srcDir != null) ? new File(srcDir, relSrcFile.getPath()) : relSrcFile;\n File relDestDir = relDestFile.getParentFile();\n if (relDestDir != null) {\n File finalDestDir = (destDir != null) ? new File(destDir, relDestDir.getPath()) : relDestDir;\n finalDestDir.mkdirs();\n }\n File finalDestFile = new File(destDir, relDestFile.getPath());\n Files.copy(finalSrcFile.toPath(), finalDestFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n }", "public void copyImageFile() throws IOException {\n Path sourcePath = imageFile.toPath();\n\n String selectFileName = imageFile.getName();\n\n Path targetPath = Paths.get(\"/Users/houumeume/IdeaProjects/Assignment2/image/\" + selectFileName);\n\n //copy the file to the new directory\n Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);\n\n //update the imageFile to point to the new File\n imageFile = new File(targetPath.toString());\n }", "public static long copy(String srcName, String destName) throws FileNotFoundException, IOException\n\t{\n\t\tlong bytesWritten = 0;\n\t\tint bytesRead = 0;\n\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\tFile fSrc = new File(srcName), fDest = new File(destName);\n\t\ttry(\n\t\t\t\tBufferedInputStream instream = new BufferedInputStream(new FileInputStream(fSrc));\n\t\t\t\tBufferedOutputStream outstream = new BufferedOutputStream(new FileOutputStream(fDest));\n\t\t\t\t){\n\t\t\twhile((bytesRead = instream.read(buffer, 0, BUFFER_SIZE))!=-1) {\n\t\t\t\toutstream.write(buffer,0,bytesRead);\n\t\t\t\tbytesWritten += bytesRead;\n\t\t\t}\n\t\t}\n\t\treturn bytesWritten;\n\t}", "public void copyChannel(int sourceChannel, int targetChannel) {\n\t\tfloat[] source = getChannel(sourceChannel);\n\t\tfloat[] target = getChannel(targetChannel);\n\t\tSystem.arraycopy(source, 0, target, 0, getSampleCount());\n\t}", "public static void copyFile(final String fromPath, final String toPath) throws IOException {\n FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath));\n }", "private void streamCopy(InputStream in, OutputStream out) throws IOException {\t \n\t\tsynchronized (in) {\n\t\t\tsynchronized (out) {\n\t\t\t\tbyte[] buffer = new byte[256];\n\t\t\t\twhile (true) {\n\t \t\tint bytesRead = in.read(buffer);\n\t \t\tif (bytesRead == -1) break;\n\t \t\tout.write(buffer, 0, bytesRead);\n\t \t}\n\t \t}\n\t }\n\t}", "public static void copyFile(File oldLocation, File newLocation) throws IOException {\n\t\tif (oldLocation.exists()) {\n\t\t\tBufferedInputStream reader = new BufferedInputStream(new FileInputStream(oldLocation));\n\t\t\tBufferedOutputStream writer = new BufferedOutputStream(new FileOutputStream(newLocation, false));\n\t\t\ttry {\n\t\t\t\tbyte[] buff = new byte[8192];\n\t\t\t\tint numChars;\n\t\t\t\twhile ((numChars = reader.read(buff, 0, buff.length)) != -1) {\n\t\t\t\t\twriter.write(buff, 0, numChars);\n\t\t\t\t}\n\t\t\t} catch (IOException ex) {\n\t\t\t\tthrow new IOException(\n\t\t\t\t\t\t\"IOException when transferring \" + oldLocation.getPath() + \" to \" + newLocation.getPath());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (reader != null) {\n\t\t\t\t\t\twriter.close();\n\t\t\t\t\t\treader.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tSystem.out.println(\"Error closing files when transferring \" + oldLocation.getPath() + \" to \"\n\t\t\t\t\t\t\t+ newLocation.getPath());\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IOException(\"Old location does not exist when transferring \" + oldLocation.getPath() + \" to \"\n\t\t\t\t\t+ newLocation.getPath());\n\t\t}\n\t}", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "public static IStatus copyFile(URL from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(from.openStream(), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "public static void copy(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n // delete all files in dst firstly because of different folder if has dstDataPath\n if(!fs.delete(new Path(destPath), true)) {\n // ignore delete failed, it's ok.\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}", "private int copy(String from, String to, int flag) {\n\n File fromFile = new File(rootPath + from);\n if (!fromFile.exists()) {\n return ERROR_FILE_NOT_EXIST;\n }\n\n if ((flag & FLAG_FORCE) != 0) {\n delete(to);\n }\n\n if (createFile(to) < 0) {\n return ERROR_FILE_ALREADY_EXIST;\n }\n\n File toFile = new File(rootPath + to);\n if (!toFile.setWritable(true)) {\n return ERROR;\n }\n\n try {\n BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(fromFile));\n BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(toFile));\n byte[] buf = new byte[BUF_SIZE];\n // TODO : it limits file size to INTEGER!!\n int offset = 0;\n int read = 0;\n while((read = inputStream.read(buf)) >= 0) {\n outputStream.write(buf, offset, read);\n offset += read;\n }\n inputStream.close();\n outputStream.close();\n } catch (FileNotFoundException e) {\n // file not found\n return ERROR_FILE_NOT_EXIST;\n } catch (IOException e) {\n // IO Exception\n return ERROR;\n }\n\n return OK;\n }", "public static void copy(File destDir, File file) throws Exception {\r\n \t\tString name = file.getName();\r\n \t\tif (!destDir.exists()) destDir.mkdirs();\r\n \t\tFile oldFile = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n \t\tif (oldFile.exists()) oldFile.delete();\r\n\t\tFile fileout = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n\t FileInputStream fileinstr = new FileInputStream(file);\r\n\t FileOutputStream fileoutstr = new FileOutputStream(fileout);\r\n\t BufferedOutputStream bufout = new BufferedOutputStream(fileoutstr); \r\n\t byte [] b = new byte[1024];\r\n\t\tint len = 0;\r\n\t\twhile ( (len=fileinstr.read(b))!= -1 ) {\r\n\t\t bufout.write(b,0,len);\r\n\t\t}\r\n\t\tbufout.flush();\r\n\t\tbufout.close();\r\n\t\tfileinstr.close();\r\n\t}", "public static void moveTo(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n if(!fs.exists(new Path(destPath))) {\n throw new RuntimeException(destPath + \" does not exist.\");\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }", "public static boolean copyFile(String srcFilename, String dstFilename, int bufferSize, boolean bOverwrite) {\n\t\t\n\t\tFileReader inputStream = null;\n FileWriter outputStream = null;\n\n try {\n \t\n \t// I/O streams\n \tinputStream = new FileReader(srcFilename);\n outputStream = new FileWriter(dstFilename);\n\n // I/O loop\n int bytesRead;\n char[] cbuf = new char[bufferSize];\n while ((bytesRead = inputStream.read(cbuf, 0, bufferSize)) != -1) {\n \toutputStream.write(cbuf, 0, bytesRead);\n }\n \n } catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(BADSRCFILE);\n\t\t\treturn false;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(IOERROR);\n\t\t\treturn false;\n\t\t} finally {\n if (inputStream != null) {\n try {\n\t\t\t\t\tinputStream.close();\n\t\t\t\t} catch (IOException e) {}\n }\n if (outputStream != null) {\n try {\n\t\t\t\t\toutputStream.close();\n\t\t\t\t} catch (IOException e) {}\n }\n }\n\t\t\n\t\treturn true;\n\t}", "public static void moveFile(Component parentComponent, String source, String destination)\r\n {\r\n File des = new File(destination);\r\n File src = new File(source);\r\n try(FileOutputStream fout = new FileOutputStream(des); FileInputStream in = new FileInputStream(src))\r\n {\r\n BufferedInputStream bin = new BufferedInputStream(in);\r\n byte[] pic = new byte[(int)src.length()];\r\n bin.read(pic, 0, pic.length - 1);\r\n des.createNewFile();\r\n fout.write(pic, 0, pic.length - 1);\r\n fout.flush();\r\n JOptionPane.showMessageDialog(parentComponent, \"File Successfully Copied!\");\r\n }\r\n catch(IOException xcp)\r\n {\r\n xcp.printStackTrace(System.err);\r\n }\r\n }", "@Override\n public byte[] copy(File localFile, URL archiveURL)\n throws InterruptedException, IOException {\n\n requireInitialized();\n Objects.requireNonNull(localFile, \"localFile arg must not be null\");\n Objects.requireNonNull(archiveURL, \"archiveFile arg must not be null\");\n\n final MessageDigest messageDigest;\n try {\n messageDigest = MessageDigest.getInstance(checksumAlg);\n } catch (NoSuchAlgorithmException e) {\n /* Should not happen, already checked during initialization. */\n throw new IllegalArgumentException(\"Bad checksum algorithm\", e);\n }\n long length = localFile.length();\n\n final File archiveFile = getFileFromURL(archiveURL);\n try (final FileInputStream inputStream = new FileInputStream(localFile);\n final FileOutputStream outputStream =\n new FileOutputStream(archiveFile, false)) {\n final ByteBuffer buffer = ByteBuffer.allocate(TRANSFER_BYTES);\n for (long bytes = length; bytes > 0;) {\n int readSize = (int)Math.min(TRANSFER_BYTES, bytes);\n int readBytes = inputStream.read(buffer.array(), 0, readSize);\n if (readBytes == -1) {\n throw new IOException(\"Premature EOF. Was expecting: \" +\n readSize);\n }\n outputStream.write(buffer.array(), 0, readSize);\n messageDigest.update(buffer.array(), 0, readBytes);\n bytes -= readBytes;\n }\n }\n\n /* Ensure that the copy is persistent in the file system. */\n /* Persist the file itself. */\n BackupManager.forceFile(archiveFile.toPath());\n /* Persist its directory entry. */\n BackupManager.forceFile(archiveFile.getParentFile().toPath());\n\n return messageDigest.digest();\n }", "public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }", "private void streamCopy(InputStream from, OutputStream to) {\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\tbyte[] buffer = new byte[16*1024];\r\n\t\t\twhile ((count = from.read(buffer)) > 0) {\r\n\t\t\t\tto.write(buffer, 0, count);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tEventLogger.logConnectionException(logger, socket, e);\r\n\t\t}\r\n\t}", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "public static int copyInputStream(InputStream in, File destination) throws IOException {\n FileOutputStream out = new FileOutputStream(destination);\n BufferedOutputStream bufferedOut = new BufferedOutputStream(out, 1024 * 8);\n return copyInputStream(in, bufferedOut);\n }", "public void copy(String file1, String file2) throws FileNotFoundException{\r\n\t\tFile original = new File(file1);\r\n\t\tFile copied = new File(file2);\r\n\t\t\r\n\t\tScanner input = new Scanner(original);\r\n\t\tPrintWriter output = new PrintWriter(copied);//writes new file\r\n\t\t\r\n\t\twhile(input.hasNextLine()){\r\n\t\t\tString next = input.nextLine();\r\n\t\t\toutput.println(next);\t\t\t\r\n\t\t}\r\n\t\toutput.close();\r\n\t\tinput.close();\r\n\t}", "private void copy(int numBytes) {\n for (int i = 0; i < numBytes; i++) {\n dest[destPos + i] = src[srcPos + i];\n }\n srcPos += numBytes;\n destPos += numBytes;\n }", "final public VFile copyTo(VFile targetFile) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,targetFile,false); \n }", "public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}", "private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }", "private static void copy(InputStream in, OutputStream out) throws IOException {\n byte[] buffer = new byte[4096];\n while (true) {\n int bytesRead = in.read(buffer);\n if (bytesRead < 0) {\n break;\n }\n out.write(buffer, 0, bytesRead);\n }\n }", "final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }", "@Test\n public void testCopyFileUsingApacheCommonsIO() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingApacheCommonsIO(sourceFile, apacheDestFile);\n System.out.println(\"Time taken by apache using:\" + (System.nanoTime() - start) / 1000);\n }", "Buffer copy();", "public void copy(int sourceIndex, int destIndex, int length) {\n\t\tint count = getChannelCount();\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tcopy(i, sourceIndex, destIndex, length);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tcopy(new RandomAccessFile(\"copyfrom.jpg\", \"r\"), new RandomAccessFile(\"copyto.jpg\",\"rw\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test(groups = \"Integration\")\n public void testCopyStreamTo() throws Exception {\n String contents = \"abc\";\n File dest = new File(Os.tmp(), \"sssMachineLocationTest_dest.tmp\");\n try {\n host.copyTo(Streams.newInputStreamWithContents(contents), dest.getAbsolutePath());\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n dest.delete();\n }\n }", "@Override\n public void copyBlob(BlobId from, BlobId to) {\n BlobInfo toInfo = BlobInfo.newBuilder(to).build();\n CopyWriter w =\n storageProvider\n .get()\n .copy(CopyRequest.newBuilder().setSource(from).setTarget(toInfo).build());\n while (!w.isDone()) {\n w.copyChunk();\n }\n }", "protected void writeFromStreamToStream(InputStream source, OutputStream destination) throws IOException {\n byte[] buffer = new byte[4096]; // A buffer to hold file contents\n int bytesRead; \n while((bytesRead = source.read(buffer)) != -1) { // Read bytes until EOF\n destination.write(buffer, 0, bytesRead); \n }\n \t}", "@Override\n public void copyFrom(final FileObject file, final FileSelector selector) throws FileSystemException {\n final FileType[] linkableTypes = new FileType[] {FileType.FILE, FileType.IMAGINARY};\n\n if (Arrays.binarySearch(linkableTypes, getType()) >= 0 && file.getType().equals(FileType.FILE)\n && file instanceof MantaFileObject && selector.equals(Selectors.SELECT_SELF)) {\n\n final MantaFileObject sourceFile = (MantaFileObject)file;\n final MantaFileSystem fs = getAbstractFileSystem();\n\n synchronized (fs) {\n try {\n final MantaClient client = fs.getClient();\n client.putSnapLink(path(), path(sourceFile.getName()), new MantaHttpHeaders());\n } catch (IOException e) {\n final String msg = String.format(\"Unable to link source file [%s] to destination: %s\",\n path(sourceFile.getName()), path());\n throw new FileSystemException(msg, e);\n }\n }\n\n } else {\n super.copyFrom(file, selector);\n }\n }", "public void copy(int channel, int sourceIndex, int destIndex, int length) {\n\t\tfloat[] data = getChannel(channel);\n\t\tint bufferCount = getSampleCount();\n\t\tif (sourceIndex + length > bufferCount\n\t\t\t\t|| destIndex + length > bufferCount || sourceIndex < 0\n\t\t\t\t|| destIndex < 0 || length < 0) {\n\t\t\tthrow new IndexOutOfBoundsException(\"parameters exceed buffer size\");\n\t\t}\n\t\tSystem.arraycopy(data, sourceIndex, data, destIndex, length);\n\t}" ]
[ "0.75873923", "0.71217906", "0.7062738", "0.70608366", "0.70234066", "0.70049524", "0.6988153", "0.6952991", "0.69445115", "0.68927735", "0.6890641", "0.68643355", "0.67602843", "0.6658637", "0.6624522", "0.6495369", "0.64596236", "0.6447394", "0.6445637", "0.639724", "0.63704467", "0.63576835", "0.6340651", "0.63280386", "0.6324318", "0.6320256", "0.62894034", "0.62225384", "0.6174091", "0.61649984", "0.61353034", "0.6109636", "0.60968435", "0.6039788", "0.6031414", "0.6027605", "0.601233", "0.599917", "0.59982175", "0.5990029", "0.59224993", "0.5914663", "0.58688", "0.58234674", "0.5803881", "0.5801385", "0.5800995", "0.57932305", "0.57515126", "0.5725457", "0.5721453", "0.56930214", "0.5690095", "0.5678101", "0.5625556", "0.56111395", "0.56010395", "0.5578205", "0.55759007", "0.5568018", "0.5559186", "0.55588543", "0.55484587", "0.5539892", "0.5531858", "0.552813", "0.55253595", "0.55184466", "0.5518237", "0.5504766", "0.5498675", "0.54984766", "0.54941225", "0.5491686", "0.5486193", "0.5482716", "0.54758763", "0.5471826", "0.54698217", "0.5467726", "0.54589236", "0.54355425", "0.54337037", "0.5398288", "0.53745675", "0.53568727", "0.5343985", "0.53424627", "0.5340608", "0.53389144", "0.5335727", "0.53306705", "0.5329968", "0.5325399", "0.53111416", "0.5308184", "0.52965283", "0.52949846", "0.52904606", "0.52830637" ]
0.66073406
15
Copies a folder and its files from the path defined in srcDirectoryPath to a new folder at dstDirectoryPath. If the recursive flag is set it will also recursively copy subfolders from the source to the destination.
public static boolean copyFolder(String srcDirectoryPath, String dstDirectoryPath, boolean recursive) { File srcDirectory = new File(srcDirectoryPath); File dstDirectory = new File(dstDirectoryPath + File.separator + srcDirectory.getName()); if (srcDirectory.exists() && srcDirectory.isDirectory()) { if (!dstDirectory.exists()) { dstDirectory.mkdirs(); } for (File file : srcDirectory.listFiles()) { if (!file.isDirectory()) { if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath() + File.separator + file.getName())) { return false; } } else if (file.isDirectory() && recursive) { if (!copyFolder(file.getAbsolutePath(), dstDirectory.getAbsolutePath(), true)) { return false; } } } return true; } MessageGenerator.briefError("ERROR: copyFolder() - Cannot find directory: " + srcDirectoryPath); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]), new File(dstDir, children[i]));\n } else {\n copyFile(srcDir, dstDir);\n }\n }", "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}", "public static void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n System.out.println(sourceFolder.toString());\n System.out.println(destinationFolder.toString());\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n //System.out.println(\"Directory created :: \" + destinationFolder); // debug\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n Files.copy(\n sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n //System.out.println(\"File copied :: \" + destinationFolder); // debug\n }\n }", "public static boolean copyFolderContents(String src, String dst, boolean recursive) {\n File srcDirectory = new File(src);\n File dstDirectory = new File(dst);\n if (srcDirectory.exists() && srcDirectory.isDirectory()) {\n if (!dstDirectory.exists()) {\n MessageGenerator.briefError(\"ERROR: Could find destination directory \" + dstDirectory.getAbsolutePath());\n }\n for (File file : srcDirectory.listFiles()) {\n if (!file.isDirectory()) {\n if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath())) {\n return false;\n }\n } else if (file.isDirectory() && recursive) {\n if (!copyFolder(file.getAbsolutePath(), dst, true)) {\n MessageGenerator.briefError(\"ERROR: While copying folder \" + file.getAbsolutePath() +\n \" to \" + dst + File.separator + file.getName());\n return false;\n }\n }\n }\n return true;\n }\n MessageGenerator.briefError(\"ERROR: copyFolderContents() - Cannot find directory: \" + src);\n return false;\n }", "public void copyDirectory(File srcDir, File dstDir) throws IOException {\n\t\tif (srcDir.isDirectory()) {\n\t\t\tif (srcDir.getName().startsWith(\".\")) {// Si es un directorio oculto\n\t\t\t\t\t\t\t\t\t\t\t\t\t// no lo copiamos\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Si el directorio no existe\n\t\t\tif (!dstDir.exists()) {\n\t\t\t\tif(logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"El directorio no existe lo creamos. \" + dstDir);\n\t\t\t\tdstDir.mkdirs();\n\t\t\t}\n\n\t\t\tString[] children = srcDir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\n\t\t\t\tcopyDirectory(new File(srcDir, children[i]), new File(dstDir,\n\t\t\t\t\t\tchildren[i]));\n\n\t\t\t}\n\t\t} else {\n\t\t\t// This method is implemented in e1071 Copying a File\n\t\t\tcopyFile(srcDir, dstDir);\n\t\t}\n\t}", "private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }", "public static void copyDirectory(File destDir, File sourceDir, boolean mkdirs) throws Exception {\r\n\t\tif (!destDir.exists() && !destDir.isDirectory()) {\r\n\t\t\tif (mkdirs) destDir.mkdirs();\r\n\t\t\telse return;\r\n\t\t}\r\n\t\tFile[] containedFiles = sourceDir.listFiles();\r\n\t\tfor (int i = 0; i < containedFiles.length; i++) {\r\n\t\t\tFile aFile = containedFiles[i];\r\n\t\t\tif (aFile.isFile()) copy(destDir, aFile);\r\n\t\t\telse {\r\n\t\t\t\tString dirName = aFile.getName();\r\n\t\t\t\tFile newDir = new File(destDir.getAbsolutePath() + File.separatorChar + dirName);\r\n\t\t\t\tcopyDirectory(newDir, aFile, mkdirs);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void copyDirectory(File sourceDir, File targetDir) throws IOException {\n File[] srcFiles = sourceDir.listFiles();\n if (srcFiles != null) {\n for (int i = 0; i < srcFiles.length; i++) {\n File dest = new File(targetDir, srcFiles[i].getName());\n if (srcFiles[i].isDirectory() && FileUtils.safeIsRealDirectory(srcFiles[i])) {\n if (!dest.exists()) {\n dest.mkdirs();\n }\n copyDirectory(srcFiles[i], dest);\n } else {\n if (!dest.exists()) {\n dest.createNewFile();\n }\n copyFile(srcFiles[i].getAbsolutePath(), new File(targetDir,\n srcFiles[i].getName()).getAbsolutePath());\n }\n }\n }\n }", "public void copyDirectory(String srcDirName, String dstDirName)\n\t\t\tthrows IOException {\n\t\tFile srcDir = new File(srcDirName);\n\t\tFile dstDir = new File(dstDirName);\n\t\tcopyDirectory(srcDir, dstDir);\n\t}", "public static void copyFolder(final String sourcePath, final String targetPath)\n\t{\n\t\tFile tfile = new File(targetPath);\n\t\ttfile.mkdirs();\n\t\tFile sfile = new File(sourcePath);\n\t\tfinal FilenameFilter ffilter = new FilenameFilter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File dir, String name)\n\t\t\t{\n\t\t\t\tif( name.startsWith(\".svn\"))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tFile[] files = sfile.listFiles(ffilter);\n\t\t\n\t\tArrayList <File> cpFile = new ArrayList<File>();\n\t\tfor( int i=0;i<files.length;i++)\n\t\t{\n\t\t\tfinal File souFile = files[i];\n\t\t\tif( souFile.isDirectory())\n\t\t\t{\n\t\t\t\tfinal String souPath = souFile.getAbsolutePath();\n\t\t\t\tfinal String tarpath = targetPath + File.separator + souFile.getName();\n\t\t\t\ttraverseDir(souPath, ffilter, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n//\t\t\t\t\t\tcopyFile(file.getAbsolutePath(), tarpath +File.separator + file.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tcopyFolder(file.getAbsolutePath(), tarpath);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcpFile.add(souFile);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcopyFiles(targetPath, cpFile);\n\t\t\n\t\t\n\t}", "public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "public void copyDirectories(File sourceFolder, File destinationFolder, Transformer<String> targetFileNameTransformer, boolean overwriteExistingFiles, String... fileNamesToIgnore)\n throws IOException {\n if (sourceFolder == null) {\n throw new IllegalArgumentException(\"src may not be null!\");\n }\n if (!sourceFolder.exists()) {\n throw new FileNotFoundException(\"source folder does not exist:\" + sourceFolder);\n }\n if (destinationFolder == null) {\n throw new IllegalArgumentException(\"dest may not be null!\");\n }\n Set<String> fileNamesToIgnoreSet = new HashSet<>();\n if (fileNamesToIgnore != null) {\n for (String fileNameToIgnore : fileNamesToIgnore) {\n if (fileNamesToIgnore == null) {\n continue;\n }\n fileNamesToIgnoreSet.add(fileNameToIgnore);\n }\n }\n copyRecursive(sourceFolder, destinationFolder, targetFileNameTransformer, overwriteExistingFiles, fileNamesToIgnoreSet);\n }", "public void copyDirectories(File sourceFolder, File destinationFolder, boolean overwriteExistingFiles, String... fileNamesToIgnore) throws IOException {\n copyDirectories(sourceFolder, destinationFolder, null, overwriteExistingFiles, fileNamesToIgnore);\n }", "public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }", "public static void copyPaths (Path path1, Path path2){\n // Creating files\n File d1 = path1.toFile();\n File d2 = path2.toFile();\n \n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "public static void copyPath(Path source, Path target) {\n try {\n Files.copy(source, target);\n if (Files.isDirectory(source)) {\n try (Stream<Path> files = Files.list(source)) {\n files.forEach(p -> copyPath(p, target.resolve(p.getFileName())));\n }\n }\n } catch (IOException e) { e.printStackTrace(); }\n }", "public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }", "public void copyDirectory(File sourceLocation, File targetLocation)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tif (sourceLocation.isDirectory()) {\r\n\t\t\tif (!targetLocation.exists()) {\r\n\t\t\t\ttargetLocation.mkdir();\r\n\t\t\t}\r\n\r\n\t\t\tString[] children = sourceLocation.list();\r\n\t\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\t\tcopyDirectory(new File(sourceLocation, children[i]), new File(\r\n\t\t\t\t\t\ttargetLocation, children[i]));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInputStream in = new FileInputStream(sourceLocation);\r\n\t\t\tOutputStream out = new FileOutputStream(targetLocation);\r\n\t\t\t// Copy the bits from instream to outstream\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\tint len;\r\n\t\t\twhile ((len = in.read(buf)) > 0) {\r\n\t\t\t\tout.write(buf, 0, len);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t}", "public static void copyDirectory(String destDirStr, String sourceDirStr, boolean mkdirs) throws Exception {\r\n\t\tFile destDir = new File(destDirStr);\r\n\t\tFile sourceDir = new File(sourceDirStr);\r\n\t\tcopyDirectory(destDir, sourceDir, mkdirs);\r\n\t}", "private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }", "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}", "void copyFolder(OrionCMContext ctx, Long sourceId, Long targetFolderId, List<SolutionParam> solutions) throws PhoenixDataAccessException, IOException;", "private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }", "public void copyAll(String src_path, String dest_path) {\n String sub_directory = null;\n for (String device : this.execAdbDevices()) {\n sub_directory = this.deviceid_hostname_map.get(device);\n this.copy(device, src_path, dest_path + File.separator + sub_directory);\n }\n }", "private static void moveFilesToFolder(List<File> files, String strFolderPath) throws IOException {\n File folderPath = Paths.get(strFolderPath).toFile();\n folderPath.mkdir();\n\n for (File file : files) {\n Path dst = Paths.get(folderPath.getAbsolutePath(), file.getName());\n Path src = file.toPath();\n if (dst.toFile().exists() && !src.equals(dst)) {\n String dstStr = dst.toString();\n String fileExt = FilenameUtils.getExtension(dstStr);\n String newPath = FilenameUtils.removeExtension(dstStr) + \" (Copy).\" + fileExt;\n Files.move(src, new File(newPath).toPath(), StandardCopyOption.ATOMIC_MOVE);\n } else {\n Files.move(src, dst, StandardCopyOption.ATOMIC_MOVE);\n }\n }\n }", "public static void copy(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n // delete all files in dst firstly because of different folder if has dstDataPath\n if(!fs.delete(new Path(destPath), true)) {\n // ignore delete failed, it's ok.\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}", "public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }", "void moveFolder(Long sourceId, Long targetFolderId, List<SolutionParam> solutions);", "public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }", "public static void copyAll(File root, File dest) throws IOException {\n if(root.isDirectory()){\n for(File child : root.listFiles()){\n File childDest = new File(dest, child.getName());\n if(child.isDirectory()){\n if(!childDest.exists() && !childDest.mkdirs())\n throw new IOException(\"Failed to create dir \"+childDest.getPath());\n copyAll(child, childDest);\n }else{\n Files.copy(child.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }\n }else{\n File childDest = new File(dest, root.getName());\n if(!dest.exists() && !dest.mkdirs())\n throw new IOException(\"Failed to create dir \"+dest.getPath());\n Files.copy(root.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }", "private static void addDirectory(ZipOutputStream zout, File fileSource, File sourceDir) {\n\n\t\t// get sub-folder/files list\n\t\tFile[] files = fileSource.listFiles();\n\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\ttry {\n\t\t\t\tString name = files[i].getAbsolutePath();\n\t\t\t\tname = name.substring((int) sourceDir.getAbsolutePath().length());\n\t\t\t\t// if the file is directory, call the function recursively\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\taddDirectory(zout, files[i], sourceDir);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * we are here means, its file and not directory, so\n\t\t\t\t * add it to the zip file\n\t\t\t\t */\n\n\n\t\t\t\t// create object of FileInputStream\n\t\t\t\tFileInputStream fin = new FileInputStream(files[i]);\n\n\t\t\t\tzout.putNextEntry(new ZipEntry(name));\n\n\t\t\t\tIOUtils.copy(fin, zout);\n\t\t\t\t\n\t\t\t\tzout.closeEntry();\n\n\t\t\t\t// close the InputStream\n\t\t\t\tfin.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tioe.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public static void copyAll(File source, File dest, boolean replaceExisting) throws IOException {\n\n Files.walkFileTree(source.toPath(), new FileTreeWalker(FileTreeWalker.Action.COPY,\n source.toPath(), dest.toPath(), replaceExisting));\n\n }", "public static void copy(File srcDir, File relSrcFile, File destDir, File relDestFile) throws IOException {\n File finalSrcFile = (srcDir != null) ? new File(srcDir, relSrcFile.getPath()) : relSrcFile;\n File relDestDir = relDestFile.getParentFile();\n if (relDestDir != null) {\n File finalDestDir = (destDir != null) ? new File(destDir, relDestDir.getPath()) : relDestDir;\n finalDestDir.mkdirs();\n }\n File finalDestFile = new File(destDir, relDestFile.getPath());\n Files.copy(finalSrcFile.toPath(), finalDestFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n }", "public static void copyFile(final String fromPath, final String toPath) throws IOException {\n FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath));\n }", "protected void createDirectory(Path path, Path destPath) {\n String rootLocation = destPath.toString();\n int index;\n if(firstTime) {\n firstTime = false;\n index = path.toFile().getPath().lastIndexOf(\"\\\\\")+1;//index where cur directory name starts\n rootFolder = path.toFile().getPath().substring(index);\n }\n else {\n index = path.toFile().getPath().indexOf(rootFolder);\n }\n\n String folderName= path.toFile().getPath().substring(index);\n Path newDirPath = Paths.get(rootLocation + DOUBLE_BKW_SLASH +folderName);\n try {\n Path newDir = Files.createDirectory(newDirPath);\n } catch(FileAlreadyExistsException e){\n // the directory already exists.\n e.printStackTrace();\n } catch (IOException e) {\n //something else went wrong\n e.printStackTrace();\n }\n }", "public void moveDirectory(String source, String target) throws IOException{\n Path sourceFilePath = Paths.get(PWD.getPath()+\"/\"+source);\n Path targetFilePath = Paths.get(PWD.getPath()+\"/\"+target);\n //using builtin move function which uses Paths\n Files.move(sourceFilePath,targetFilePath);\n }", "private File copyResources(String srcFileName, File sourceDir, File destinationDir) throws MojoExecutionException {\n File srcFile = new File(sourceDir.getAbsolutePath()+File.separator+srcFileName);\n if (srcFile.exists()) {\n getLog().info(\"Copying \"+srcFile.getName()+\"...\");\n try {\n File destFile = new File(destinationDir.getAbsolutePath()+File.separator+srcFile.getName());\n if (srcFile.isDirectory()) {\n FileUtils.copyDirectory(srcFile, destFile, false);\n } else {\n FileUtils.copyFile(srcFile, destFile, false);\n }\n return destFile;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying resource '\"+srcFile.getName()+\"'\", ex);\n }\n } else {\n getLog().warn(\"No source file '\"+srcFile.getName()+\"' to copy\");\n return null;\n }\n }", "abstract void addNewSourceDirectory(final File targetDirectory);", "@PostMapping(\"/copyfolder\")\n public String copyFolder(@RequestParam String currentPath, @RequestParam(name = \"copiedFolders\") List<String> folders, @RequestParam(name = \"ft_2_active\") String destination, RedirectAttributes redirectAttributes) {\n if(null != folders && folders.size() > 0) {\n ArrayList<String> successMessages = new ArrayList<>();\n ArrayList<String> errorMessages = new ArrayList<>();\n logger.log(Level.INFO, \"Copying folder(s)...\");\n for (String folder : folders) {\n if (uiCommandService.copyFile(folder, destination)){\n successMessages.add(\"Successfully copied \" + new File(folder).getName() + \" to \" + destination + \"!\");\n } else {\n errorMessages.add(\"Could not copy \" + new File(folder).getName() + \" to \" + destination + \"!\");\n }\n }\n logger.log(Level.INFO, \"Finished copying folder(s)!\");\n redirectAttributes.addFlashAttribute(\"success_messages\",successMessages);\n redirectAttributes.addFlashAttribute(\"error_messages\",errorMessages);\n }\n return \"redirect:/imageview?location=\" + currentPath.replace(\"\\\\\", \"/\");\n }", "public void mkdirP(String dirPath) {\n\n\t\t// check if you need to go anywhere further\n\t\tif (dirPath.lastIndexOf(\"/\") == 0) {\n\t\t\treturn;// done\n\t\t} else {\n\t\t\t// parse directories...\n\t\t\tArrayList<String> direcs = new ArrayList<>();\n\t\t\tString temp = dirPath;\n\t\t\tboolean cont = true;\n\t\t\ttemp = temp.substring(1);\n\t\t\twhile (temp.length() > 1 && cont) {\n\n\t\t\t\t// add the substring to the list of directories that need to be\n\t\t\t\t// checked and/or created\n\t\t\t\tdirecs.add(temp.substring(0, temp.indexOf(\"/\")));\n\t\t\t\t// if there are more \"/\"s left, repeat\n\t\t\t\tif (temp.contains(\"/\")) {\n\t\t\t\t\ttemp = temp.substring(temp.indexOf(\"/\") + 1);\n\t\t\t\t}\n\t\t\t\t// else break out of the loop\n\t\t\t\telse {\n\t\t\t\t\tcont = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// do one last check to see if there are any extra characters left\n\t\t\tif (temp.length() > 0) {\n\t\t\t\t// there is still something left\n\t\t\t\tdirecs.add(temp);\n\t\t\t}\n\n\t\t\t// go through each directory, checking if it exists. if not, create\n\t\t\t// the directory and repeat.\n\t\t\tDirectoryObjects current = directory;\n\n\t\t\tfor (String p : direcs) {\n\n\t\t\t\tif (current.getDirectoryByName(p) != null) {\n\t\t\t\t\tcurrent = current.getDirectoryByName(p);\n\t\t\t\t} else {\n\t\t\t\t\tcurrent.getSubdirectories().add(new DirectoryObjects(p));\n\t\t\t\t\tcurrent = current.getDirectoryByName(p);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "void moveFileToDirectoryWithConvertedFiles(String pathToFile);", "private static void moveFiles(String src, String dest, int Num) // \n\t{\n\t File directoryPath = new File(src);\n\t \n\t // Creating filter for directories files, to select files only\n\t FileFilter fileFilter = new FileFilter(){\n\t public boolean accept(File dir) \n\t { \n\t if (dir.isFile()) \n\t {\n\t return true;\n\t } \n\t else \n\t {\n\t return false;\n\t }\n\t }\n\t }; \n\t \n\t // Get list of files in the source folder\n\t File[] list = directoryPath.listFiles(fileFilter);\n\t \n\t int i = 0;\n\t \n\t // Move Num file to destination folder\n\t while ((i < Num) && (i < list.length))\n\t {\n\t \tString srcFileName = src + \"/\" + list[i].getName();\n\t \tString destFileName = dest + \"/\" + list[i].getName();\n\t \tmoveFile(srcFileName, destFileName);\n\t \ti++;\t \t\n\t } \n\t}", "public static void copy(String suffix) {\r\n boolean success = false;\r\n boolean doVideo = true;\r\n String imgSrcDir = zipDir0 + \"/R\";\r\n String videoSrcDir = zipDir0 + \"/Video\";\r\n String imgDstDir = rImagesDir0 + \"/Images\" + suffix;\r\n String videoDstDir = rVideoDir0 + \"/Video\" + suffix;\r\n File imgSrcDirFile = new File(imgSrcDir);\r\n File videoSrcDirFile = new File(videoSrcDir);\r\n File imgDstDirFile = new File(imgDstDir);\r\n File videoDstDirFile = new File(videoDstDir);\r\n\r\n // Check and create directories\r\n if(!imgSrcDirFile.isDirectory()) {\r\n System.err.println(\"Not a directory: \" + imgSrcDirFile.getPath());\r\n System.exit(1);\r\n }\r\n if(!videoSrcDirFile.isDirectory()) {\r\n doVideo = false;\r\n }\r\n if(!imgDstDirFile.isDirectory()) {\r\n success = imgDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + imgDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n if(doVideo && !videoDstDirFile.isDirectory()) {\r\n success = videoDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + videoDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n\r\n // Images\r\n System.out.println(\"\\nCopying images:\");\r\n System.out.println(\"From: \" + imgSrcDirFile.getPath());\r\n System.out.println(\"To: \" + imgDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(imgSrcDirFile, imgDstDirFile, saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + imgSrcDirFile.getPath()\r\n + \"\\n To: \" + imgDstDirFile.getPath() + \"\\n\");\r\n }\r\n\r\n // Video\r\n System.out.println(\"\\nCopying video:\");\r\n if(!doVideo) {\r\n System.out.println(\"No video found\");\r\n return;\r\n }\r\n System.out.println(\"From: \" + videoSrcDirFile.getPath());\r\n System.out.println(\"To: \" + videoDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(videoSrcDirFile, videoDstDirFile,\r\n saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + videoSrcDirFile.getPath()\r\n + \"\\n To: \" + videoDstDirFile.getPath() + \"\\n\");\r\n }\r\n }", "public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "public static void packToZip(String sourceDirPath, String zipFilePath) throws IOException {\n Path p;\n p = Files.createFile(Paths.get(zipFilePath));\n try (ZipOutputStream zs = new ZipOutputStream(Files.newOutputStream(p))) {\n Path pp = Paths.get(sourceDirPath);\n Files.walk(pp)\n .filter(path -> !Files.isDirectory(path))\n .forEach(path -> {\n if (!path.toString().endsWith(\".zip\")) {\n ZipEntry zipEntry = new ZipEntry(pp.relativize(path).toString());\n try {\n zs.putNextEntry(zipEntry);\n Files.copy(path, zs);\n zs.closeEntry();\n } catch (IOException e) {\n System.err.println(e);\n }\n }\n });\n }\n }", "public static boolean move(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n // delete all files in dst firstly because of different folder if has dstDataPath\n if(!fs.delete(new Path(destPath), true)) {\n // ignore delete failed, it's ok.\n }\n\n if(fs.exists(new Path(srcPath))) {\n // copy file only when source file exists.\n fs.rename(new Path(srcPath), new Path(destPath));\n return true;\n }\n\n return false;\n }", "private File copyFiles(String filename, String directoryName) throws IOException { //after\n boolean success = false;\n String finalPath = this.rootLocation + \"/\" + directoryName +\"/\"+ filename;\n String tmpPath = this.tmpLocation + \"/\"+ filename;\n File finalFile = new File(finalPath);\n File directory = new File(this.rootLocation + \"/\" +directoryName);\n if (!directory.exists()) {\n directory.mkdir();\n }\n File tmpFile = new File(tmpPath);\n if(tmpFile.exists() && !tmpFile.isDirectory() && directory.exists() && directory.isDirectory()){\n if(finalFile.exists() && !finalFile.isDirectory()){\n finalFile = getNewName(finalPath);\n log.debug(\"compareToFiles -> rename to \"+ finalFile.getName());\n }\n success = copyFileUsingStream(tmpFile, finalFile);\n }\n\n log.debug(\"success copy...\"+success);\n return finalFile;\n }", "@Override\n\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\tSystem.out.println(dir.toAbsolutePath());\n\t\tPath RelativizedPath = SourceRoot.relativize(dir);\n\t\tSystem.out.println(RelativizedPath.toAbsolutePath());\n\t\tPath ResolvedPath = TargetRoot.resolve(RelativizedPath);\n\t\tSystem.out.println(ResolvedPath.toAbsolutePath());\n\t\t\n\t\ttry {\n\t\t\tFiles.copy(dir,ResolvedPath,StandardCopyOption.REPLACE_EXISTING);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t}\n\t\t\n\t\t\n\t\t\ttry {\n\t\t\t\tFiles.deleteIfExists(dir);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t\treturn FileVisitResult.CONTINUE;\n\t}", "@Override\r\n\tpublic boolean copyFolder(String path, String dirName, String newDirName) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\r\n\t}", "private void moveDatabase(File srcDir, File dstDir) {\n // store the sub-folders\n File[] files = srcDir.listFiles();\n\n // create the destination folder\n dstDir.mkdirs();\n\n // move to destination\n for (File f : files) {\n f.renameTo(new File(dstDir, f.getName()));\n }\n }", "public static void moveTo(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n if(!fs.exists(new Path(destPath))) {\n throw new RuntimeException(destPath + \" does not exist.\");\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "public static void runFolders(File srcDir, String strSkinFolderName, String _relativePath,\n String folderContentType) {\n\n String relativePath = _relativePath;\n\n File[] list = srcDir.listFiles();\n\n for (int i = 0; i < list.length; i++) {\n File fileItem = list[i];\n if (fileItem.isDirectory()) {\n String prevRelativePath = new String(relativePath);\n relativePath += \"/\" + fileItem.getName();\n runFolders(fileItem, strSkinFolderName, relativePath, folderContentType);\n relativePath = prevRelativePath;\n } else {\n try {\n if (log4j.isDebugEnabled())\n log4j.debug(list[i] + \" Parent: \" + fileItem.getParent() + \" getName() \"\n + fileItem.getName() + \" canonical: \" + fileItem.getCanonicalPath());\n if (folderContentType == \"RTL\") {\n count++;\n modifySkin(list[i]);\n } else if (folderContentType == \"LTR\") {\n count++;\n }\n } catch (Exception e) {\n log4j.error(\"IOException: \" + e);\n }\n }\n }\n }", "void updateDirectory(File targetdir, File sourcedir, File backupdir) throws Exception{\n\t\tArrayList<File> sourcesubs = new ArrayList<File>();\n\t\tFile[] sourcefiles = sourcedir.listFiles();\n\t\tFile targetfile = null;\n\t\tString sourceinfo = null;\n\t\tString targetinfo = null;\n\t\tString promptMessage = \"\";\n\t\tObject[] promptOptions = {\n\t\t\t\"Yes\",\n\t\t\t\"Yes to All\",\n\t\t\t\"Cancel\"\n\t\t};\n\n\t\t//If targetdir starts with one of folder in 'excludedFolderArray', then ignore it (don't update this folder).\n\t\tfor(File excludedFolder:excludedFolderList){\n\t\t\tif(targetdir.toPath().startsWith(excludedFolder.toPath())){\n\t\t\t\tprogressor.setProgressInfo(progress, \"Ignoring target directory '\"+targetdir.getCanonicalPath()+\"', which will NOT be updated.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tSimpleDateFormat date = new SimpleDateFormat(\"MM/dd/yyyy hh:mm a\");\n\t\ttry{\n\t\t\tfor(File file:sourcefiles){\n\t\t\t\tif(file.isDirectory()){\n\t\t\t\t\tif(recurse) sourcesubs.add(file);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (allfilecopy){\n\t\t\t\t\tif (! allFileIncluded(file)) continue;\n\t\t\t\t} else {\n\t\t\t\t\tif(! fileIncluded(file)) continue;\n\t\t\t\t}\n\n\t\t\t\ttargetfile = new File(targetdir, file.getName());\n\t\t\t\tif(targetfile.exists()){\n\t\t\t\t\tif(targetfile.lastModified() >= file.lastModified()) continue;\n\t\t\t\t}\n\t\t\t\tif(!force && !quiet){\n\t\t\t\t\tsourceinfo = \"Source: \"+ file.getAbsolutePath()+ \"\\n\"\n\t\t\t\t\t\t\t + \"TimeStamp: \"+ date.format(new Date(file.lastModified()));\n\t\t\t\t\tif (file.lastModified() > targetfile.lastModified())\n\t\t\t\t\t\tsourceinfo += \" (newer)\";\n\t\t\t\t\tsourceinfo += \"\\nSize: \"+ file.length();\n\t\t\t\t\tif( file.length() > targetfile.length())\n\t\t\t\t\t\tsourceinfo += \" (larger)\";\n\n\t\t\t\t\ttargetinfo = \"Target: \"+ targetfile.getAbsolutePath()+ \"\\n\"\n\t\t\t\t\t\t\t + \"TimeStamp: \"+ date.format(new Date(targetfile.lastModified()));\n\t\t\t\t\tif (targetfile.lastModified() > file.lastModified())\n\t\t\t\t\t\ttargetinfo += \" (newer)\";\n\t\t\t\t\ttargetinfo += \"\\nSize: \"+ targetfile.length();\n\t\t\t\t\tif( targetfile.length() > file.length())\n\t\t\t\t\t\ttargetinfo += \" (larger)\";\n\n\t\t\t\t\tpromptMessage = \"\\n Preparing to \";\n\t\t\t\t\tif(targetfile.exists() && dobackup)\n\t\t\t\t\t\tpromptMessage += \"Backup and \";\n\t\t\t\t\tpromptMessage += \"Copy/Replace:\\n\\n\"\n\t\t\t\t\t\t\t + sourceinfo\n\t\t\t\t\t\t\t + \"\\n\\n\"\n\t\t\t\t\t\t\t + targetinfo\n\t\t\t\t\t\t\t + \"\\nDo you wish to proceed?\\n\\n\";\n\n\t\t\t\t\tint selected = JOptionPane.showOptionDialog(null,\n\t\t\t\t\t\t\tpromptMessage,\n\t\t\t\t\t\t\tprompt,\n\t\t\t\t\t\t\tJOptionPane.YES_NO_CANCEL_OPTION,\n\t\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE,\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\tpromptOptions,\n\t\t\t\t\t\t\tpromptOptions[0]);\n\t\t\t\t\tif(selected == JOptionPane.CLOSED_OPTION || selected == 2){\n\t\t\t\t\t\tcanceled = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif(selected == 1) force = true;\n\t\t\t\t}\n\t\t\t\tif( targetfile.exists() && dobackup) backupFile(targetfile, backupdir);\n\t\t\t\tcopyFile(file, targetfile);\n\t\t\t\tmodifiedFiles++;\n\t\t\t}\n\t\t\tif (recurse){\n\t\t\t\tIterator<File> it = sourcesubs.iterator();\n\t\t\t\twhile(it.hasNext()){\n\t\t\t\t\tFile newsourcedir = it.next();\n\t\t\t\t\tFile newtargetdir = new File(targetdir, newsourcedir.getName());\n\t\t\t\t\tif(!newtargetdir.isDirectory()) newtargetdir.mkdir();\n\t\t\t\t\tFile newbackupdir = null;\n\t\t\t\t\tif(dobackup) {\n\t\t\t\t\t\tnewbackupdir = new File(backupdir, newsourcedir.getName());\n\t\t\t\t\t\tif(!newbackupdir.isDirectory()) newbackupdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tupdateDirectory(newtargetdir, newsourcedir, newbackupdir);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception x){\n\t\t\t// restore any backups, if we can!\n\t\t\terrors.println(\"Failed to update directory \"+ targetdir.getAbsolutePath());\n\t\t\terrors.println(\" due to \"+ x.getClass().getSimpleName()+\": \"+x.getMessage());\n\t\t\tif(backups.size() > 0) {\n\t\t\t\terrors.println(\"Attempting to restore from backups at \"+ backupdir.getAbsolutePath());\n\t\t\t}\n\t\t\tSet<File> keys = backups.keySet();\n\t\t\tFile target = null;\n\t\t\tFile backup = null;\n\t\t\tfor(File key: keys){\n\t\t\t\ttry{\n\t\t\t\t\ttarget = key;\n\t\t\t\t\tbackup = backups.get(key);\n\t\t\t\t\tcopyFile(backup, target);\n\t\t\t\t}catch(IOException y){\n\t\t\t\t\terrors.println(\"Unable to restore backup file \"+ backup.getAbsolutePath()+\" to \"+ target.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow x;\n\t\t}\n\t}", "private void copyRootDirectory(WorkUnit workUnit) throws IOException, InterruptedException {\n\n MigrationHistory history = historyMgr.startStep(workUnit.migration, StepEnum.SVN_COPY_ROOT_FOLDER,\n (workUnit.commandManager.isFirstAttemptMigration() ? \"\" : Constants.REEXECUTION_SKIPPING) +\n \"Copying Root Folder\");\n\n if (workUnit.commandManager.isFirstAttemptMigration()) {\n\n String gitCommand = \"\";\n if (isWindows) {\n // /J Copy using unbuffered I/O. Recommended for very large files.\n gitCommand = format(\"Xcopy /E /I /H /Q %s %s_copy\", workUnit.root, workUnit.root);\n } else {\n // cp -a /source/. /dest/ (\"-a\" is recursive \".\" means files and folders including hidden)\n // root has no trailling / e.g. folder_12345\n gitCommand = format(\"cp -a %s %s_copy\", workUnit.root, workUnit.root);\n }\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n }\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n }", "@Override\n public boolean doWork() {\n\n logger.debug(\"CopyCommand->doWork()\");\n\n // Parameter ermitteln\n strSrcFile = getValueForKey(CONST_PARAM_SCRFILE);\n strDestFile = getValueForKey(CONST_PARAM_DESTFILE);\n bIsDirectory = Boolean.parseBoolean(getValueForKey(CONST_PARAM_ISDIRECTORY));\n\n // TODO: richtigen Replaces einfuegen\n VarReplace objVarRepl = new VarReplace();\n strSrcFile = objVarRepl.replacePlaceholder(strSrcFile);\n strDestFile = objVarRepl.replacePlaceholder(strDestFile);\n\n if ((strSrcFile == null) || (strDestFile == null)) {\n return false;\n }\n else if (new File(strSrcFile).isDirectory()) {\n try {\n FileUtils.copyDirectory(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n }\n return true;\n\n }\n else {\n try {\n if (new File(strDestFile).getName().startsWith(\"v\")\n || new File(strDestFile).getName().startsWith(\"z\")) {\n strDestFile = new File(strDestFile).getParent() + File.separator\n + new File(strDestFile).getName().toUpperCase();\n }\n logger.debug(\"srcFile: \" + strSrcFile + \", destFile: \" + strDestFile);\n\n if (!new File(strSrcFile).getParentFile().exists()) {\n logger.debug(\"srcFile parent folder existiert nicht: \" + new File(strSrcFile).getParent());\n }\n\n if (!new File(strSrcFile).exists()) {\n logger.debug(\"srcFile existiert nicht: \" + new File(strSrcFile).getAbsolutePath());\n }\n\n if (!new File(strDestFile).getParentFile().exists()) {\n logger.debug(\"destFile parent folder existstiert nicht: \"\n + new File(strDestFile).getParentFile().getAbsolutePath());\n new File(strDestFile).getParentFile().mkdirs();\n }\n\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n\n ioe.printStackTrace();\n\n while (iCounter < 20) {\n\n logger.debug(\"IOException loop: \" + iCounter);\n\n try {\n logger.debug(\"wait 20 seconds\");\n Thread.sleep(TimeUnit.SECONDS.toMillis(20));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n try {\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n logger.debug(\"break loop\");\n break;\n }\n catch (IOException e) {\n\n logger.debug(\"again an exception: \" + e.getMessage());\n }\n\n iCounter++ ;\n\n logger.debug(\"try it ounce again\");\n\n }\n\n }\n return true;\n }\n\n }", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "public static void compressFolder(String dirPath, String zipFileName) throws Exception {\n\t\tFile destination = new File(zipFileName);\n\t\tFile source = new File(dirPath);\n\t\tOutputStream archiveStream = new FileOutputStream(destination);\n\t\tArchiveOutputStream archive = new ArchiveStreamFactory().createArchiveOutputStream(ArchiveStreamFactory.ZIP,\n\t\t\t\tarchiveStream);\n\n\t\tCollection<File> fileList = FileUtils.listFiles(source, null, true);\n\n\t\t//loop through all files and add them one by one to the archive\n\t\tfor (File file : fileList) {\n\t\t\tString entryName = getEntryName(source, file);\n\t\t\tZipArchiveEntry entry = new ZipArchiveEntry(entryName);\n\t\t\tarchive.putArchiveEntry(entry);\n\n\t\t\tBufferedInputStream input = new BufferedInputStream(new FileInputStream(file));\n\n\t\t\tIOUtils.copy(input, archive);\n\t\t\tinput.close();\n\t\t\tarchive.closeArchiveEntry();\n\t\t}\n\n\t\tarchive.finish();\n\t\tarchiveStream.close();\n\t}", "public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }", "public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException {\r\n File[] files;\r\n \r\n Check.checkArg(from.isDirectory());\r\n \r\n files = from.listFiles(filter);\r\n to.mkdirs();\r\n \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n //File curto = new File(to, files[i].getName());\r\n //curto.mkdirs();\r\n copyTree(files[i], to, filter);\r\n }\r\n else {\r\n File curto = new File(to, files[i].getName());\r\n copyFile(files[i], curto);\r\n }\r\n }\r\n \r\n }", "private static Path replacePath(Path srcFile, Path srcPath, Path dstPath) {\n\n // get actual path\n String path = srcFile.toAbsolutePath().toString();\n // delete source path from actual path\n String cut = path.substring(srcPath.toAbsolutePath().toString().length(), path.length());\n\n if (!cut.startsWith(File.separator)) {\n cut = File.separator + cut;\n }\n // add destination path with remaining actual path\n String newPath = dstPath.toAbsolutePath().toString() + cut;\n\n return new File(newPath).toPath();\n }", "public static void moveLocalFiles(String sourcePath, String destinationPath) throws Exception {\n\t //Get all csv files from open ar based on filenamefilter\n\t File source = new File(sourcePath);\n\t File destination = new File(destinationPath);\n\t File[] files = source.listFiles(new FilenameFilter(\"csv\"));\n\t if (null != files && files.length > 0) {\n\t\tfor (File file : files) {\n\t\t moveFile(file, new File(destination, file.getName()));\n\t\t}\n\t } else {\n\t }\n }", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "private void executeCopyFiles( final File folderResources, final File folderJava, final File targetJavaAppStub,\n final File jarWithDependsSource )\n throws MojoExecutionException\n {\n this.logger.info( \"Copying files ...\" );\n\n final File jarWithDependsTarget = new File( folderJava, jarWithDependsSource.getName() );\n\n if ( JAVA_APP_STUB.exists() == false )\n {\n throw new MojoExecutionException( \"Could not find Java Application stub at: \"\n + JAVA_APP_STUB.getAbsolutePath() );\n }\n\n copyFile( JAVA_APP_STUB, targetJavaAppStub );\n copyFile( jarWithDependsSource, jarWithDependsTarget );\n\n if ( this.data.getAppIcon() != null )\n {\n copyFile( this.data.getAppIcon(), new File( folderResources, this.data.getAppIcon().getName() ) );\n }\n\n if ( this.data.getAdditionalResources() != null )\n {\n for ( int i = 0, n = this.data.getAdditionalResources().size(); i < n; i++ )\n {\n final String rsrc = (String) this.data.getAdditionalResources().get( i );\n\n final File source = new File( this.data.getBaseDirectory(), rsrc );\n final File target = new File( folderResources, source.getName() );\n\n copyFile( source, target );\n }\n }\n }", "public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}", "public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }", "public static void extractResources(File jar, String subdir, File dest) throws IOException {\n if (jar.isDirectory()) {\n if (subdir.startsWith(\"/\")) {\n subdir = subdir.substring(1);\n }\n FileUtility.copyDirectory(new File(jar, subdir), dest);\n } else {\n if (!subdir.startsWith(\"/\")) {\n subdir = \"/\" + subdir;\n }\n tryExtractFolder(jar, subdir, dest);\n }\n }", "public static void createDirectory(String srcDir, String nameDir) {\n try {\n Path path = Paths.get(srcDir + \"/\" + nameDir);\n\n Files.createDirectories(path);\n System.out.println(\"Directory is created\");\n } catch (IOException e) {\n System.err.println(\"ERROR CREATION! \" + e.getMessage());\n }\n\n }", "public static <V, I> void copy(final DAG<V, I> src, final DAG<V, I> dest) {\n for (final V rootVertex : src.getRootVertices()) {\n dest.addVertex(rootVertex);\n dfsCopy(src, rootVertex, dest);\n }\n }", "public String zipDirectoryFullPath(String sourceDirectoryPath, String zipOutputPath) throws Exception {\n \t // DECLARATION:\n \t if(sourceDirectoryPath.endsWith(\"\\\\\")) { sourceDirectoryPath = sourceDirectoryPath.substring(0, sourceDirectoryPath.length() - 1); }\n \t sourceDirectoryPath = sourceDirectoryPath.replace(\"\\\\\", \"/\");\n \t zipOutputPath = zipOutputPath.replace(\"\\\\\", \"/\");\n \t // MESSAGE:\n \t fileWriterPrinter(\"\\nSOURCE DIRECTORY: \" + sourceDirectoryPath);\n \t fileWriterPrinter(\" ZIP OUTPUT PATH: \" + zipOutputPath + \"\\n\");\n\t\t \n\t\t File dirObj = new File(sourceDirectoryPath);\n\t\t ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipOutputPath));\n\t\t System.out.println(\"Creating : \" + zipOutputPath);\n\t\t addDir(dirObj, out);\n\t\t out.close();\n\t\t return zipOutputPath;\n\t\t }", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "private static <V, I> void dfsCopy(final DAG<V, I> srcDAG, final V src, final DAG<V, I> destDAG) {\n final Map<V, I> edges = srcDAG.getEdges(src);\n for (final Map.Entry<V, I> edge : edges.entrySet()) {\n final V nextVertex = edge.getKey();\n final boolean newVertexAdded = destDAG.addVertex(nextVertex);\n destDAG.addEdge(src, nextVertex, edge.getValue());\n if (newVertexAdded) {\n dfsCopy(srcDAG, nextVertex, destDAG);\n }\n }\n }", "public TcDirEntry copy(TcDirEntry source, String destDirectory, String destName) {\r\n\t\ttry {\r\n\t\t\tsynchronized (SysRpcTcCopyDirEntryIn) {\r\n\t\t\t\tSysRpcTcCopyDirEntryIn.srcDirEntryPath = ((TcSysRpcDirEntry) source).getHandle();\r\n\t\t\t\tSysRpcTcCopyDirEntryIn.destDirPath = TcSysRpcDirEntry.convertDirEntryPathToHandle(destDirectory);\r\n\t\t\t\tSysRpcTcCopyDirEntryIn.destdirEntryName = destName;\r\n\t\t\t\tSysRpcTcCopyDirEntryIn.kind.value = source.getKind();\r\n\t\t\t\tclient.client.SysRpcTcCopyDirEntry_1(SysRpcTcCopyDirEntryIn, SysRpcTcCopyDirEntryOut);\r\n\t\t\t\tif (SysRpcTcCopyDirEntryOut.retVal) {\r\n\t\t\t\t\tTcDirEntry dirEntry = new TcSysRpcDirEntry(SysRpcTcCopyDirEntryOut.dirEntryPath.toString(), client);\r\n\t\t\t\t\treturn dirEntry;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tdisconnected(\"Disconnect in TcDirectoryModel - copy: \");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private static void extract (Path zipPath, Path destination)\n\t\tthrows IOException\n\t{\n\t\tif (Files.isDirectory (zipPath))\n\t\t{\n\t\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t\t.newDirectoryStream (zipPath);)\n\t\t\t{\n\t\t\t\tfor (Path file : directoryStream)\n\t\t\t\t{\n\t\t\t\t\textract (file, destination);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPath fileOutZip = destination\n\t\t\t\t.resolve (\"./\" + zipPath.normalize ().toString ()).normalize ();\n\t\t\tFiles.createDirectories (fileOutZip.getParent ());\n\t\t\tFiles.copy (zipPath, fileOutZip, Utils.COPY_OPTION);\n\t\t}\n\t}", "public File createSubDirectories(String directoryPath) {\n File myFilesDir = new File(this.assetFolderPath, directoryPath);\n\n if(!myFilesDir.isDirectory()) {\n myFilesDir.mkdirs();\n }\n return myFilesDir;\n }", "public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }", "void copyToBranch(ID sourceBranchId, ID targetBranchId);", "public boolean copy(File target) {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t\ttarget = new File(target.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).copy(target);\n\t\t\t\t\t\t\telse if (file.isFile()) ((File) file).copyFile(target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (this.isFile()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "private void selectedFolderMovedFromNavTree(Folder selectedFolder, Folder destinationFolder) {\n Folder parentFolder = view.getParentFolder(selectedFolder);\n\n if (DiskResourceUtil.isDescendantOfFolder(parentFolder, destinationFolder)) {\n // The destination is under the parent, so if we prune the parent and set the destination\n // as the selected folder, the parent will lazy-load down to the destination.\n view.removeChildren(parentFolder);\n } else if (DiskResourceUtil.isDescendantOfFolder(destinationFolder, parentFolder)) {\n // The parent is under the destination, so we only need to view the destination folder's\n // contents and refresh its children.\n presenter.doRefreshFolder(destinationFolder);\n } else {\n // Refresh the parent folder since it has lost a child.\n presenter.doRefreshFolder(parentFolder);\n // Refresh the destination folder since it has gained a child.\n presenter.doRefreshFolder(destinationFolder);\n }\n\n // View the destination folder's contents.\n presenter.setSelectedFolderByPath(destinationFolder);\n }", "public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}", "void move(Path repoRoot, Path source, Path target);", "public static void copyRemoteFiles(String ip, String userName, String password, String sourcePath, String destinationPath) throws Exception {\n\tOutputStream outputStream = null;\n\tFTPClient ftpClient = null;\n\ttry {\n\t File destination = new File(destinationPath);\n\t ftpClient = new FTPClient();\n\t log.info(\"Connecting to ftp...\" + new Timestamp(System.currentTimeMillis()));\n\t ftpClient.connect(ip);\n\t ftpClient.login(userName, password);\n\t FTPFile[] files = ftpClient.listFiles(sourcePath);\n\t if (null != files && files.length > 0) {\n\t\tlog.info(\"Moving files \" + sourcePath + \" to \" + destinationPath + \" started...\" + new Timestamp(System.currentTimeMillis()));\n\t\tfor (FTPFile file : files) {\n\t\t outputStream = new FileOutputStream(new File(destination, file.getName()));\n\t\t String sourceFilePath = sourcePath + file.getName();\n\t\t ftpClient.retrieveFile(sourceFilePath, outputStream);\n\t\t closeOutputStream(outputStream);\n\t\t ftpClient.deleteFile(sourceFilePath);\n\t\t}\n\t\tlog.info(\"Moving files from \" + sourcePath + \" to \" + destinationPath + \" finished...\" + new Timestamp(System.currentTimeMillis()));\n\t } else {\n\t\tlog.info(\"No files found in \" + sourcePath);\n\t }\n\t} catch (Exception e) {\n\t log.info(\"Moving files from \" + sourcePath + \" to \" + destinationPath + \" failed...\" + new Timestamp(System.currentTimeMillis()));\n\t throw e;\n\t} finally {\n\t closeFtp(ftpClient);\n\t closeOutputStream(outputStream);\n\t}\n }", "public void copy(String name, String oldPath, String newPath);", "private void copyResourcesFromDirectory(ContentCollection directory,\r\n\t String toSite_ref, Map<String, String> documentSecurityMap){\r\n \ttry {\r\n \tList<ContentEntity> members = directory.getMemberResources();\r\n \t for (Iterator<ContentEntity> iMbrs = members.iterator(); iMbrs\r\n \t\t .hasNext();) {\r\n \t\tContentEntity next = (ContentEntity) iMbrs.next();\r\n\r\n \t\tString thisEntityRef = next.getId();\r\n\r\n\r\n \t\t//if this is a directory\r\n \t\tif (\"org.sakaiproject.content.types.folder\".equals(next.getResourceType())){\r\n \t\tContentCollection subdirectory =(ContentCollection) next;\r\n\r\n \t\t\t//we get the new destination directory\r\n \t\tString toSubSite_ref = toSite_ref +\r\n \t\t\tthisEntityRef.substring(directory.getId().lastIndexOf(\"/\") + 1);\r\n\r\n \t\t//we call recursively the same function\r\n \t\tcopyResourcesFromDirectory(subdirectory,\r\n \t\t\ttoSubSite_ref, documentSecurityMap);\r\n \t\t}\r\n \t\telse{\r\n \t\tString permission = documentSecurityMap.get(thisEntityRef);\r\n\r\n \t\t// we copy if doc exists in CO or if it is doc references\r\n \t\tif (permission != null || \"org.sakaiproject.citation.impl.CitationList\".equals(next.getResourceType())) {\r\n \t\t contentHostingService.copyIntoFolder(thisEntityRef,\r\n \t\t\t toSite_ref);\r\n \t\t}\r\n \t\t}\r\n \t }\r\n \t} catch (Exception e) {\r\n \t log.error(\"Unable to copy the resources from directory\", e);\r\n \t}\r\n }", "void moveFile(String pathToFile, String pathDirectory);", "public static boolean copyFile(String src, String dst) {\n FileChannel inChannel = null;\n FileChannel outChannel = null;\n try {\n inChannel = new FileInputStream(new File(src)).getChannel();\n outChannel = new FileOutputStream(new File(dst)).getChannel();\n inChannel.transferTo(0, inChannel.size(), outChannel);\n } catch (FileNotFoundException e) {\n MessageGenerator.briefError(\"ERROR could not find/access file(s): \" + src + \" and/or \" + dst);\n return false;\n } catch (IOException e) {\n MessageGenerator.briefError(\"ERROR copying file: \" + src + \" to \" + dst);\n return false;\n } finally {\n try {\n if (inChannel != null)\n inChannel.close();\n if (outChannel != null)\n outChannel.close();\n } catch (IOException e) {\n MessageGenerator.briefError(\"Error closing files involved in copying: \" + src + \" and \" + dst);\n return false;\n }\n }\n return true;\n }", "public boolean renameFolder(String srcPath, String dstPath)\n\t\t\tthrows HDFSServerManagementException {\n\n\t\tDataAccessService dataAccessService = HDFSAdminComponentManager\n\t\t\t\t.getInstance().getDataAccessService();\n\t\tFileSystem hdfsFS = null;\n\t\tboolean isFolderExists = false;\n\t\ttry {\n\t\t\thdfsFS = dataAccessService.mountCurrentUserFileSystem();\n\t\t} catch (IOException e) {\n\t\t\tString msg = \"Error occurred while trying to mount file system.\";\n\t\t\thandleException(msg, e);\n\t\t}\n\t\ttry {\n\t\t\tif (hdfsFS != null && !hdfsFS.exists(new Path(dstPath))) {\n\t\t\t\treturn hdfsFS.rename(new Path(srcPath), new Path(dstPath));\n\t\t\t} else {\n\t\t\t\tisFolderExists = true;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tString msg = \"Error occurred while trying to rename folder.\";\n\t\t\thandleException(msg, e);\n\t\t}\n\t\thandleItemExistState(isFolderExists, true, true);\n\t\treturn false;\n\t}", "@Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n if (!this.sourceDirectory.equals(dir)) {\n // Create this directory in the target and make it our current target.\n Path newDirectory = this.currentTargetDirectory.resolve(dir.getFileName());\n boolean didCreate = newDirectory.toFile().mkdir();\n Assert.assertTrue(didCreate);\n logger.output(\"Created directory: \" + newDirectory);\n this.currentTargetDirectory = newDirectory;\n }\n return FileVisitResult.CONTINUE;\n }", "public static void copyFile(final File from, final File toDir) throws IOException {\n if (!from.canRead()) {\n throw new IOException(\"Cannot read file '\" + from + \"'.\");\n }\n if (toDir.exists() && (!toDir.canWrite())) {\n throw new IOException(\"Cannot write to file '\" + toDir + \"'.\");\n }\n toDir.getParentFile().mkdirs();\n FileUtils.copyFile(from, toDir);\n }", "public static void zip(File src, File destDir, String charSetName, boolean includeSrc) throws IOException {\n\t\tString fileName = src.getName();\n\t\tif (!src.isDirectory()) {\n\t\t\tint pos = fileName.lastIndexOf(\".\");\n\t\t\tif (pos > 0) {\n\t\t\t\tfileName = fileName.substring(0, pos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfileName += \".zip\";\n\t\tensureDirectory(destDir);\n\t\t\n\t\tFile zippedFile = new File(destDir, fileName);\n\t\tif (!zippedFile.exists())\n\t\t\tzippedFile.createNewFile();\n\t\t\n\t\tzip(src, new FileOutputStream(zippedFile), charSetName, includeSrc);\n\t}", "public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }", "public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic boolean renameFolder(final File source,\n\t\t\t\t\t\t\t\tfinal File target)\n\t\t\tthrows WritePermissionException\n\t{\n\t\t// First try the normal rename.\n\t\tif (source.renameTo(target)) {\n\t\t\treturn true;\n\t\t}\n\t\tif (target.exists()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Try the Storage Access Framework if it is just a rename within the same parent folder.\n\t\tif (Util.hasLollipop() && source.getParent().equals(target.getParent())) {\n\t\t\tUsefulDocumentFile document = getDocumentFile(source, true, true);\n\t\t\tif (document == null)\n\t\t\t\treturn false;\n\t\t\tif (document.renameTo(target.getName())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Try the manual way, moving files individually.\n\t\tif (!mkdir(target)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tFile[] sourceFiles = source.listFiles();\n\n\t\tif (sourceFiles == null) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor (File sourceFile : sourceFiles) {\n\t\t\tString fileName = sourceFile.getName();\n\t\t\tFile targetFile = new File(target, fileName);\n\t\t\tif (!copyFile(sourceFile, targetFile)) {\n\t\t\t\t// stop on first error\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Only after successfully copying all files, delete files on source folder.\n\t\tfor (File sourceFile : sourceFiles) {\n\t\t\tif (!deleteFile(sourceFile)) {\n\t\t\t\t// stop on first error\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static void copyPath(int[] target, int[] destination) {\n\t\tfor (int i = 0; i < target.length; i++) {\n\t\t\tdestination[i] = target[i];\n\t\t}\n\t}" ]
[ "0.69396544", "0.6768692", "0.67316717", "0.67314863", "0.66885555", "0.6422031", "0.6329417", "0.63249135", "0.62844706", "0.6098268", "0.5980226", "0.5958184", "0.58373326", "0.58210516", "0.5728974", "0.56002015", "0.5559889", "0.5510365", "0.5504858", "0.54736936", "0.5378684", "0.529983", "0.5255177", "0.5181603", "0.5158238", "0.5048618", "0.5040916", "0.5001026", "0.49876782", "0.4959572", "0.49476933", "0.49347952", "0.47928154", "0.4791896", "0.4732705", "0.47207266", "0.47085723", "0.46618122", "0.4657447", "0.4633931", "0.4620524", "0.45726767", "0.4560167", "0.45532814", "0.4549811", "0.4537238", "0.44920003", "0.44907823", "0.44783145", "0.44410688", "0.44390327", "0.4413634", "0.4412172", "0.4410988", "0.44036308", "0.4396585", "0.43688214", "0.43650284", "0.43393704", "0.43289074", "0.43253702", "0.42894593", "0.42869207", "0.42648184", "0.42492786", "0.42268822", "0.42249912", "0.4213781", "0.4200941", "0.41789833", "0.4174502", "0.4174126", "0.416961", "0.4167537", "0.41666132", "0.41647595", "0.4161514", "0.41554984", "0.41332316", "0.41193873", "0.41093495", "0.40926772", "0.40885377", "0.40766174", "0.4072757", "0.40498832", "0.4046742", "0.40260062", "0.4000834", "0.39883107", "0.39787364", "0.3959624", "0.39535686", "0.39418674", "0.3938517", "0.39313883", "0.39275867", "0.3924294", "0.39207307", "0.39049158" ]
0.8050478
0
Copies the folder contents of the folder specified by src to folder specified as dst. It will copy all files in it to the new location. If the recursive flag is set, it will copy everything recursively in the folder src to dst.
public static boolean copyFolderContents(String src, String dst, boolean recursive) { File srcDirectory = new File(src); File dstDirectory = new File(dst); if (srcDirectory.exists() && srcDirectory.isDirectory()) { if (!dstDirectory.exists()) { MessageGenerator.briefError("ERROR: Could find destination directory " + dstDirectory.getAbsolutePath()); } for (File file : srcDirectory.listFiles()) { if (!file.isDirectory()) { if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath())) { return false; } } else if (file.isDirectory() && recursive) { if (!copyFolder(file.getAbsolutePath(), dst, true)) { MessageGenerator.briefError("ERROR: While copying folder " + file.getAbsolutePath() + " to " + dst + File.separator + file.getName()); return false; } } } return true; } MessageGenerator.briefError("ERROR: copyFolderContents() - Cannot find directory: " + src); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}", "public static boolean copyFolder(String srcDirectoryPath, String dstDirectoryPath, boolean recursive) {\n File srcDirectory = new File(srcDirectoryPath);\n File dstDirectory = new File(dstDirectoryPath + File.separator + srcDirectory.getName());\n if (srcDirectory.exists() && srcDirectory.isDirectory()) {\n if (!dstDirectory.exists()) {\n dstDirectory.mkdirs();\n }\n for (File file : srcDirectory.listFiles()) {\n if (!file.isDirectory()) {\n if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath() + File.separator + file.getName())) {\n return false;\n }\n } else if (file.isDirectory() && recursive) {\n if (!copyFolder(file.getAbsolutePath(), dstDirectory.getAbsolutePath(), true)) {\n return false;\n }\n }\n\n }\n return true;\n }\n MessageGenerator.briefError(\"ERROR: copyFolder() - Cannot find directory: \" + srcDirectoryPath);\n return false;\n }", "public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }", "public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]), new File(dstDir, children[i]));\n } else {\n copyFile(srcDir, dstDir);\n }\n }", "private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }", "public void copyDirectory(File srcDir, File dstDir) throws IOException {\n\t\tif (srcDir.isDirectory()) {\n\t\t\tif (srcDir.getName().startsWith(\".\")) {// Si es un directorio oculto\n\t\t\t\t\t\t\t\t\t\t\t\t\t// no lo copiamos\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Si el directorio no existe\n\t\t\tif (!dstDir.exists()) {\n\t\t\t\tif(logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"El directorio no existe lo creamos. \" + dstDir);\n\t\t\t\tdstDir.mkdirs();\n\t\t\t}\n\n\t\t\tString[] children = srcDir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\n\t\t\t\tcopyDirectory(new File(srcDir, children[i]), new File(dstDir,\n\t\t\t\t\t\tchildren[i]));\n\n\t\t\t}\n\t\t} else {\n\t\t\t// This method is implemented in e1071 Copying a File\n\t\t\tcopyFile(srcDir, dstDir);\n\t\t}\n\t}", "public static void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n System.out.println(sourceFolder.toString());\n System.out.println(destinationFolder.toString());\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n //System.out.println(\"Directory created :: \" + destinationFolder); // debug\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n Files.copy(\n sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n //System.out.println(\"File copied :: \" + destinationFolder); // debug\n }\n }", "public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }", "public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }", "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "public static void copyAll(File root, File dest) throws IOException {\n if(root.isDirectory()){\n for(File child : root.listFiles()){\n File childDest = new File(dest, child.getName());\n if(child.isDirectory()){\n if(!childDest.exists() && !childDest.mkdirs())\n throw new IOException(\"Failed to create dir \"+childDest.getPath());\n copyAll(child, childDest);\n }else{\n Files.copy(child.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }\n }else{\n File childDest = new File(dest, root.getName());\n if(!dest.exists() && !dest.mkdirs())\n throw new IOException(\"Failed to create dir \"+dest.getPath());\n Files.copy(root.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }", "public void copyDirectory(String srcDirName, String dstDirName)\n\t\t\tthrows IOException {\n\t\tFile srcDir = new File(srcDirName);\n\t\tFile dstDir = new File(dstDirName);\n\t\tcopyDirectory(srcDir, dstDir);\n\t}", "public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }", "public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}", "public static void copyAll(File source, File dest, boolean replaceExisting) throws IOException {\n\n Files.walkFileTree(source.toPath(), new FileTreeWalker(FileTreeWalker.Action.COPY,\n source.toPath(), dest.toPath(), replaceExisting));\n\n }", "public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}", "public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }", "private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }", "public static void copyDirectory(File destDir, File sourceDir, boolean mkdirs) throws Exception {\r\n\t\tif (!destDir.exists() && !destDir.isDirectory()) {\r\n\t\t\tif (mkdirs) destDir.mkdirs();\r\n\t\t\telse return;\r\n\t\t}\r\n\t\tFile[] containedFiles = sourceDir.listFiles();\r\n\t\tfor (int i = 0; i < containedFiles.length; i++) {\r\n\t\t\tFile aFile = containedFiles[i];\r\n\t\t\tif (aFile.isFile()) copy(destDir, aFile);\r\n\t\t\telse {\r\n\t\t\t\tString dirName = aFile.getName();\r\n\t\t\t\tFile newDir = new File(destDir.getAbsolutePath() + File.separatorChar + dirName);\r\n\t\t\t\tcopyDirectory(newDir, aFile, mkdirs);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}", "public static void copyFolder(final String sourcePath, final String targetPath)\n\t{\n\t\tFile tfile = new File(targetPath);\n\t\ttfile.mkdirs();\n\t\tFile sfile = new File(sourcePath);\n\t\tfinal FilenameFilter ffilter = new FilenameFilter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File dir, String name)\n\t\t\t{\n\t\t\t\tif( name.startsWith(\".svn\"))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tFile[] files = sfile.listFiles(ffilter);\n\t\t\n\t\tArrayList <File> cpFile = new ArrayList<File>();\n\t\tfor( int i=0;i<files.length;i++)\n\t\t{\n\t\t\tfinal File souFile = files[i];\n\t\t\tif( souFile.isDirectory())\n\t\t\t{\n\t\t\t\tfinal String souPath = souFile.getAbsolutePath();\n\t\t\t\tfinal String tarpath = targetPath + File.separator + souFile.getName();\n\t\t\t\ttraverseDir(souPath, ffilter, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n//\t\t\t\t\t\tcopyFile(file.getAbsolutePath(), tarpath +File.separator + file.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tcopyFolder(file.getAbsolutePath(), tarpath);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcpFile.add(souFile);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcopyFiles(targetPath, cpFile);\n\t\t\n\t\t\n\t}", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }", "void copyFolder(OrionCMContext ctx, Long sourceId, Long targetFolderId, List<SolutionParam> solutions) throws PhoenixDataAccessException, IOException;", "public static void copyDirectory(File sourceDir, File targetDir) throws IOException {\n File[] srcFiles = sourceDir.listFiles();\n if (srcFiles != null) {\n for (int i = 0; i < srcFiles.length; i++) {\n File dest = new File(targetDir, srcFiles[i].getName());\n if (srcFiles[i].isDirectory() && FileUtils.safeIsRealDirectory(srcFiles[i])) {\n if (!dest.exists()) {\n dest.mkdirs();\n }\n copyDirectory(srcFiles[i], dest);\n } else {\n if (!dest.exists()) {\n dest.createNewFile();\n }\n copyFile(srcFiles[i].getAbsolutePath(), new File(targetDir,\n srcFiles[i].getName()).getAbsolutePath());\n }\n }\n }\n }", "public static void copyPath(Path source, Path target) {\n try {\n Files.copy(source, target);\n if (Files.isDirectory(source)) {\n try (Stream<Path> files = Files.list(source)) {\n files.forEach(p -> copyPath(p, target.resolve(p.getFileName())));\n }\n }\n } catch (IOException e) { e.printStackTrace(); }\n }", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "public static <V, I> void copy(final DAG<V, I> src, final DAG<V, I> dest) {\n for (final V rootVertex : src.getRootVertices()) {\n dest.addVertex(rootVertex);\n dfsCopy(src, rootVertex, dest);\n }\n }", "public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}", "public static boolean copyFile(String src, String dst) {\n FileChannel inChannel = null;\n FileChannel outChannel = null;\n try {\n inChannel = new FileInputStream(new File(src)).getChannel();\n outChannel = new FileOutputStream(new File(dst)).getChannel();\n inChannel.transferTo(0, inChannel.size(), outChannel);\n } catch (FileNotFoundException e) {\n MessageGenerator.briefError(\"ERROR could not find/access file(s): \" + src + \" and/or \" + dst);\n return false;\n } catch (IOException e) {\n MessageGenerator.briefError(\"ERROR copying file: \" + src + \" to \" + dst);\n return false;\n } finally {\n try {\n if (inChannel != null)\n inChannel.close();\n if (outChannel != null)\n outChannel.close();\n } catch (IOException e) {\n MessageGenerator.briefError(\"Error closing files involved in copying: \" + src + \" and \" + dst);\n return false;\n }\n }\n return true;\n }", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "@Override\n public boolean doWork() {\n\n logger.debug(\"CopyCommand->doWork()\");\n\n // Parameter ermitteln\n strSrcFile = getValueForKey(CONST_PARAM_SCRFILE);\n strDestFile = getValueForKey(CONST_PARAM_DESTFILE);\n bIsDirectory = Boolean.parseBoolean(getValueForKey(CONST_PARAM_ISDIRECTORY));\n\n // TODO: richtigen Replaces einfuegen\n VarReplace objVarRepl = new VarReplace();\n strSrcFile = objVarRepl.replacePlaceholder(strSrcFile);\n strDestFile = objVarRepl.replacePlaceholder(strDestFile);\n\n if ((strSrcFile == null) || (strDestFile == null)) {\n return false;\n }\n else if (new File(strSrcFile).isDirectory()) {\n try {\n FileUtils.copyDirectory(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n }\n return true;\n\n }\n else {\n try {\n if (new File(strDestFile).getName().startsWith(\"v\")\n || new File(strDestFile).getName().startsWith(\"z\")) {\n strDestFile = new File(strDestFile).getParent() + File.separator\n + new File(strDestFile).getName().toUpperCase();\n }\n logger.debug(\"srcFile: \" + strSrcFile + \", destFile: \" + strDestFile);\n\n if (!new File(strSrcFile).getParentFile().exists()) {\n logger.debug(\"srcFile parent folder existiert nicht: \" + new File(strSrcFile).getParent());\n }\n\n if (!new File(strSrcFile).exists()) {\n logger.debug(\"srcFile existiert nicht: \" + new File(strSrcFile).getAbsolutePath());\n }\n\n if (!new File(strDestFile).getParentFile().exists()) {\n logger.debug(\"destFile parent folder existstiert nicht: \"\n + new File(strDestFile).getParentFile().getAbsolutePath());\n new File(strDestFile).getParentFile().mkdirs();\n }\n\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n\n ioe.printStackTrace();\n\n while (iCounter < 20) {\n\n logger.debug(\"IOException loop: \" + iCounter);\n\n try {\n logger.debug(\"wait 20 seconds\");\n Thread.sleep(TimeUnit.SECONDS.toMillis(20));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n try {\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n logger.debug(\"break loop\");\n break;\n }\n catch (IOException e) {\n\n logger.debug(\"again an exception: \" + e.getMessage());\n }\n\n iCounter++ ;\n\n logger.debug(\"try it ounce again\");\n\n }\n\n }\n return true;\n }\n\n }", "public void copy(RasterImage src, RasterImage dst) {\n\t\t// TODO: just copy the image\n\n\t\tfor (int i = 0; i < dst.argb.length; i++) {\n\t\t\tdst.argb[i] = src.argb[i];\n\t\t}\n\t}", "public static void copy(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n // delete all files in dst firstly because of different folder if has dstDataPath\n if(!fs.delete(new Path(destPath), true)) {\n // ignore delete failed, it's ok.\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "public static void copy(File srcDir, File relSrcFile, File destDir, File relDestFile) throws IOException {\n File finalSrcFile = (srcDir != null) ? new File(srcDir, relSrcFile.getPath()) : relSrcFile;\n File relDestDir = relDestFile.getParentFile();\n if (relDestDir != null) {\n File finalDestDir = (destDir != null) ? new File(destDir, relDestDir.getPath()) : relDestDir;\n finalDestDir.mkdirs();\n }\n File finalDestFile = new File(destDir, relDestFile.getPath());\n Files.copy(finalSrcFile.toPath(), finalDestFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n }", "public void copyAll(String src_path, String dest_path) {\n String sub_directory = null;\n for (String device : this.execAdbDevices()) {\n sub_directory = this.deviceid_hostname_map.get(device);\n this.copy(device, src_path, dest_path + File.separator + sub_directory);\n }\n }", "public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "public static void copy(String suffix) {\r\n boolean success = false;\r\n boolean doVideo = true;\r\n String imgSrcDir = zipDir0 + \"/R\";\r\n String videoSrcDir = zipDir0 + \"/Video\";\r\n String imgDstDir = rImagesDir0 + \"/Images\" + suffix;\r\n String videoDstDir = rVideoDir0 + \"/Video\" + suffix;\r\n File imgSrcDirFile = new File(imgSrcDir);\r\n File videoSrcDirFile = new File(videoSrcDir);\r\n File imgDstDirFile = new File(imgDstDir);\r\n File videoDstDirFile = new File(videoDstDir);\r\n\r\n // Check and create directories\r\n if(!imgSrcDirFile.isDirectory()) {\r\n System.err.println(\"Not a directory: \" + imgSrcDirFile.getPath());\r\n System.exit(1);\r\n }\r\n if(!videoSrcDirFile.isDirectory()) {\r\n doVideo = false;\r\n }\r\n if(!imgDstDirFile.isDirectory()) {\r\n success = imgDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + imgDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n if(doVideo && !videoDstDirFile.isDirectory()) {\r\n success = videoDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + videoDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n\r\n // Images\r\n System.out.println(\"\\nCopying images:\");\r\n System.out.println(\"From: \" + imgSrcDirFile.getPath());\r\n System.out.println(\"To: \" + imgDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(imgSrcDirFile, imgDstDirFile, saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + imgSrcDirFile.getPath()\r\n + \"\\n To: \" + imgDstDirFile.getPath() + \"\\n\");\r\n }\r\n\r\n // Video\r\n System.out.println(\"\\nCopying video:\");\r\n if(!doVideo) {\r\n System.out.println(\"No video found\");\r\n return;\r\n }\r\n System.out.println(\"From: \" + videoSrcDirFile.getPath());\r\n System.out.println(\"To: \" + videoDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(videoSrcDirFile, videoDstDirFile,\r\n saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + videoSrcDirFile.getPath()\r\n + \"\\n To: \" + videoDstDirFile.getPath() + \"\\n\");\r\n }\r\n }", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "public void copyDirectories(File sourceFolder, File destinationFolder, Transformer<String> targetFileNameTransformer, boolean overwriteExistingFiles, String... fileNamesToIgnore)\n throws IOException {\n if (sourceFolder == null) {\n throw new IllegalArgumentException(\"src may not be null!\");\n }\n if (!sourceFolder.exists()) {\n throw new FileNotFoundException(\"source folder does not exist:\" + sourceFolder);\n }\n if (destinationFolder == null) {\n throw new IllegalArgumentException(\"dest may not be null!\");\n }\n Set<String> fileNamesToIgnoreSet = new HashSet<>();\n if (fileNamesToIgnore != null) {\n for (String fileNameToIgnore : fileNamesToIgnore) {\n if (fileNamesToIgnore == null) {\n continue;\n }\n fileNamesToIgnoreSet.add(fileNameToIgnore);\n }\n }\n copyRecursive(sourceFolder, destinationFolder, targetFileNameTransformer, overwriteExistingFiles, fileNamesToIgnoreSet);\n }", "private static void moveFiles(String src, String dest, int Num) // \n\t{\n\t File directoryPath = new File(src);\n\t \n\t // Creating filter for directories files, to select files only\n\t FileFilter fileFilter = new FileFilter(){\n\t public boolean accept(File dir) \n\t { \n\t if (dir.isFile()) \n\t {\n\t return true;\n\t } \n\t else \n\t {\n\t return false;\n\t }\n\t }\n\t }; \n\t \n\t // Get list of files in the source folder\n\t File[] list = directoryPath.listFiles(fileFilter);\n\t \n\t int i = 0;\n\t \n\t // Move Num file to destination folder\n\t while ((i < Num) && (i < list.length))\n\t {\n\t \tString srcFileName = src + \"/\" + list[i].getName();\n\t \tString destFileName = dest + \"/\" + list[i].getName();\n\t \tmoveFile(srcFileName, destFileName);\n\t \ti++;\t \t\n\t } \n\t}", "public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}", "static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "private File copyResources(String srcFileName, File sourceDir, File destinationDir) throws MojoExecutionException {\n File srcFile = new File(sourceDir.getAbsolutePath()+File.separator+srcFileName);\n if (srcFile.exists()) {\n getLog().info(\"Copying \"+srcFile.getName()+\"...\");\n try {\n File destFile = new File(destinationDir.getAbsolutePath()+File.separator+srcFile.getName());\n if (srcFile.isDirectory()) {\n FileUtils.copyDirectory(srcFile, destFile, false);\n } else {\n FileUtils.copyFile(srcFile, destFile, false);\n }\n return destFile;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying resource '\"+srcFile.getName()+\"'\", ex);\n }\n } else {\n getLog().warn(\"No source file '\"+srcFile.getName()+\"' to copy\");\n return null;\n }\n }", "public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }", "private static <V, I> void dfsCopy(final DAG<V, I> srcDAG, final V src, final DAG<V, I> destDAG) {\n final Map<V, I> edges = srcDAG.getEdges(src);\n for (final Map.Entry<V, I> edge : edges.entrySet()) {\n final V nextVertex = edge.getKey();\n final boolean newVertexAdded = destDAG.addVertex(nextVertex);\n destDAG.addEdge(src, nextVertex, edge.getValue());\n if (newVertexAdded) {\n dfsCopy(srcDAG, nextVertex, destDAG);\n }\n }\n }", "private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }", "private void moveDatabase(File srcDir, File dstDir) {\n // store the sub-folders\n File[] files = srcDir.listFiles();\n\n // create the destination folder\n dstDir.mkdirs();\n\n // move to destination\n for (File f : files) {\n f.renameTo(new File(dstDir, f.getName()));\n }\n }", "public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException {\r\n File[] files;\r\n \r\n Check.checkArg(from.isDirectory());\r\n \r\n files = from.listFiles(filter);\r\n to.mkdirs();\r\n \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n //File curto = new File(to, files[i].getName());\r\n //curto.mkdirs();\r\n copyTree(files[i], to, filter);\r\n }\r\n else {\r\n File curto = new File(to, files[i].getName());\r\n copyFile(files[i], curto);\r\n }\r\n }\r\n \r\n }", "public void copyDirectories(File sourceFolder, File destinationFolder, boolean overwriteExistingFiles, String... fileNamesToIgnore) throws IOException {\n copyDirectories(sourceFolder, destinationFolder, null, overwriteExistingFiles, fileNamesToIgnore);\n }", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }", "private void copyPaste(VMResource copiedRes, long targetId, TreeNode treeNode) {\n\n // copy and paste for Folder\n if (copiedRes instanceof VMDirectory) {\n String name = copiedRes.getName();\n if (treeNode != null && isSameNameExist(treeNode, name, true, \"\")) {\n name += \" - Copy\";\n if (copyNumber != 0) {\n name += \" (\" + copyNumber + \")\";\n }\n }\n VMDirectory newDir = new VMDirectory();\n newDir.setName(name);\n ZGCreateDirCommand createDirCommand = new ZGCreateDirCommand(editResourceService, viewHandler, targetId, newDir);\n createDirCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createDirCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createDirCommand.getParentId()), createDirCommand.getDirectory(), createDirCommand.getFileId(),\n false);\n getCopiedResources().get(copiedRes).forEach(res -> {\n copyPaste(res, createDirCommand.getDirectory().getId(), null);\n });\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createDirCommand.getParentId()), createDirCommand.getDirectory(), createDirCommand.getFileId(),\n false);\n // copy and paste for child resources\n getCopiedResources().get(copiedRes).forEach(res -> {\n copyPaste(res, createDirCommand.getDirectory().getId(), null);\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n\n });\n\n CompoundCommand c = new CompoundCommand();\n c.append(createDirCommand);\n manager.execute(c.unwrap());\n\n } else if (copiedRes instanceof VMFile) { // copy and paste for file\n VMFile oldFile = (VMFile) copiedRes;\n editResourceService.getFileContent(oldFile.getId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n String fileExtension = oldFile.getExtensionStr();\n VMFile newFile = new VMFile();\n // create new file name\n String fileName = oldFile.getName();\n if (treeNode != null && isSameNameExist(treeNode, fileName, false, fileExtension)) {\n fileName += \" - Copy\";\n if (copyNumber != 0) {\n fileName += \" (\" + copyNumber + \")\";\n }\n }\n newFile.setName(fileName);\n // get data from old file\n byte[] datas = new byte[result.length];\n for (int i = 0; i < result.length; i++) {\n datas[i] = (byte) (result[i] & 0xFF);\n }\n // Set file extension\n newFile.setExtensionStr(fileExtension);\n\n // create new file command\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, targetId, newFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(), createFileCommand.getFileId(),\n false);\n editResourceService.saveFile(createFileCommand.getFileId(), datas, new AsyncCallback<Void>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Void result) {\n fileTreeNodeFactory.getFileTreeNode(tree, createFileCommand.getParentId(), createFileCommand.getFile());\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getFileId()));\n }\n });\n }\n\n @Override\n public void executeEvent() {\n // save old file data\n editResourceService.saveFile(createFileCommand.getFileId(), datas, new AsyncCallback<Void>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Void result) {\n fileTreeNodeFactory.getFileTreeNode(tree, createFileCommand.getParentId(), createFileCommand.getFile());\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getFileId()));\n }\n });\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(), createFileCommand.getFileId(),\n false);\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }\n\n });\n }\n }", "private boolean doSingleFileMove(Path src, Path dst) throws IOException {\n RecoverableWriter writer;\n try {\n writer = fileSystem.createRecoverableWriter();\n } catch (UnsupportedOperationException ignore) {\n // Some writer not support RecoverableWriter, so fallback to per record moving.\n // For example, see the constructor of HadoopRecoverableWriter. Although it not support\n // RecoverableWriter, but HadoopPathBasedBulkFormatBuilder can support streaming\n // writing.\n return false;\n }\n\n RecoverableFsDataOutputStream out = writer.open(dst);\n try (FSDataInputStream in = fileSystem.open(src)) {\n IOUtils.copyBytes(in, out, false);\n } catch (Throwable t) {\n out.close();\n throw t;\n }\n out.closeForCommit().commit();\n return true;\n }", "private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "private void copyResourcesFromDirectory(ContentCollection directory,\r\n\t String toSite_ref, Map<String, String> documentSecurityMap){\r\n \ttry {\r\n \tList<ContentEntity> members = directory.getMemberResources();\r\n \t for (Iterator<ContentEntity> iMbrs = members.iterator(); iMbrs\r\n \t\t .hasNext();) {\r\n \t\tContentEntity next = (ContentEntity) iMbrs.next();\r\n\r\n \t\tString thisEntityRef = next.getId();\r\n\r\n\r\n \t\t//if this is a directory\r\n \t\tif (\"org.sakaiproject.content.types.folder\".equals(next.getResourceType())){\r\n \t\tContentCollection subdirectory =(ContentCollection) next;\r\n\r\n \t\t\t//we get the new destination directory\r\n \t\tString toSubSite_ref = toSite_ref +\r\n \t\t\tthisEntityRef.substring(directory.getId().lastIndexOf(\"/\") + 1);\r\n\r\n \t\t//we call recursively the same function\r\n \t\tcopyResourcesFromDirectory(subdirectory,\r\n \t\t\ttoSubSite_ref, documentSecurityMap);\r\n \t\t}\r\n \t\telse{\r\n \t\tString permission = documentSecurityMap.get(thisEntityRef);\r\n\r\n \t\t// we copy if doc exists in CO or if it is doc references\r\n \t\tif (permission != null || \"org.sakaiproject.citation.impl.CitationList\".equals(next.getResourceType())) {\r\n \t\t contentHostingService.copyIntoFolder(thisEntityRef,\r\n \t\t\t toSite_ref);\r\n \t\t}\r\n \t\t}\r\n \t }\r\n \t} catch (Exception e) {\r\n \t log.error(\"Unable to copy the resources from directory\", e);\r\n \t}\r\n }", "public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }", "private int copy(String from, String to, int flag) {\n\n File fromFile = new File(rootPath + from);\n if (!fromFile.exists()) {\n return ERROR_FILE_NOT_EXIST;\n }\n\n if ((flag & FLAG_FORCE) != 0) {\n delete(to);\n }\n\n if (createFile(to) < 0) {\n return ERROR_FILE_ALREADY_EXIST;\n }\n\n File toFile = new File(rootPath + to);\n if (!toFile.setWritable(true)) {\n return ERROR;\n }\n\n try {\n BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(fromFile));\n BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(toFile));\n byte[] buf = new byte[BUF_SIZE];\n // TODO : it limits file size to INTEGER!!\n int offset = 0;\n int read = 0;\n while((read = inputStream.read(buf)) >= 0) {\n outputStream.write(buf, offset, read);\n offset += read;\n }\n inputStream.close();\n outputStream.close();\n } catch (FileNotFoundException e) {\n // file not found\n return ERROR_FILE_NOT_EXIST;\n } catch (IOException e) {\n // IO Exception\n return ERROR;\n }\n\n return OK;\n }", "private static void moveFilesToFolder(List<File> files, String strFolderPath) throws IOException {\n File folderPath = Paths.get(strFolderPath).toFile();\n folderPath.mkdir();\n\n for (File file : files) {\n Path dst = Paths.get(folderPath.getAbsolutePath(), file.getName());\n Path src = file.toPath();\n if (dst.toFile().exists() && !src.equals(dst)) {\n String dstStr = dst.toString();\n String fileExt = FilenameUtils.getExtension(dstStr);\n String newPath = FilenameUtils.removeExtension(dstStr) + \" (Copy).\" + fileExt;\n Files.move(src, new File(newPath).toPath(), StandardCopyOption.ATOMIC_MOVE);\n } else {\n Files.move(src, dst, StandardCopyOption.ATOMIC_MOVE);\n }\n }\n }", "@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}", "public static void copyPaths (Path path1, Path path2){\n // Creating files\n File d1 = path1.toFile();\n File d2 = path2.toFile();\n \n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "public static void copyDirectory(String destDirStr, String sourceDirStr, boolean mkdirs) throws Exception {\r\n\t\tFile destDir = new File(destDirStr);\r\n\t\tFile sourceDir = new File(sourceDirStr);\r\n\t\tcopyDirectory(destDir, sourceDir, mkdirs);\r\n\t}", "public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }", "private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}", "private void executeCopyFiles( final File folderResources, final File folderJava, final File targetJavaAppStub,\n final File jarWithDependsSource )\n throws MojoExecutionException\n {\n this.logger.info( \"Copying files ...\" );\n\n final File jarWithDependsTarget = new File( folderJava, jarWithDependsSource.getName() );\n\n if ( JAVA_APP_STUB.exists() == false )\n {\n throw new MojoExecutionException( \"Could not find Java Application stub at: \"\n + JAVA_APP_STUB.getAbsolutePath() );\n }\n\n copyFile( JAVA_APP_STUB, targetJavaAppStub );\n copyFile( jarWithDependsSource, jarWithDependsTarget );\n\n if ( this.data.getAppIcon() != null )\n {\n copyFile( this.data.getAppIcon(), new File( folderResources, this.data.getAppIcon().getName() ) );\n }\n\n if ( this.data.getAdditionalResources() != null )\n {\n for ( int i = 0, n = this.data.getAdditionalResources().size(); i < n; i++ )\n {\n final String rsrc = (String) this.data.getAdditionalResources().get( i );\n\n final File source = new File( this.data.getBaseDirectory(), rsrc );\n final File target = new File( folderResources, source.getName() );\n\n copyFile( source, target );\n }\n }\n }", "public void copy(String name, String oldPath, String newPath);", "@Override\n\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\tSystem.out.println(dir.toAbsolutePath());\n\t\tPath RelativizedPath = SourceRoot.relativize(dir);\n\t\tSystem.out.println(RelativizedPath.toAbsolutePath());\n\t\tPath ResolvedPath = TargetRoot.resolve(RelativizedPath);\n\t\tSystem.out.println(ResolvedPath.toAbsolutePath());\n\t\t\n\t\ttry {\n\t\t\tFiles.copy(dir,ResolvedPath,StandardCopyOption.REPLACE_EXISTING);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t}\n\t\t\n\t\t\n\t\t\ttry {\n\t\t\t\tFiles.deleteIfExists(dir);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t\treturn FileVisitResult.CONTINUE;\n\t}", "private void copyRootDirectory(WorkUnit workUnit) throws IOException, InterruptedException {\n\n MigrationHistory history = historyMgr.startStep(workUnit.migration, StepEnum.SVN_COPY_ROOT_FOLDER,\n (workUnit.commandManager.isFirstAttemptMigration() ? \"\" : Constants.REEXECUTION_SKIPPING) +\n \"Copying Root Folder\");\n\n if (workUnit.commandManager.isFirstAttemptMigration()) {\n\n String gitCommand = \"\";\n if (isWindows) {\n // /J Copy using unbuffered I/O. Recommended for very large files.\n gitCommand = format(\"Xcopy /E /I /H /Q %s %s_copy\", workUnit.root, workUnit.root);\n } else {\n // cp -a /source/. /dest/ (\"-a\" is recursive \".\" means files and folders including hidden)\n // root has no trailling / e.g. folder_12345\n gitCommand = format(\"cp -a %s %s_copy\", workUnit.root, workUnit.root);\n }\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n }\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n }", "public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private static Path replacePath(Path srcFile, Path srcPath, Path dstPath) {\n\n // get actual path\n String path = srcFile.toAbsolutePath().toString();\n // delete source path from actual path\n String cut = path.substring(srcPath.toAbsolutePath().toString().length(), path.length());\n\n if (!cut.startsWith(File.separator)) {\n cut = File.separator + cut;\n }\n // add destination path with remaining actual path\n String newPath = dstPath.toAbsolutePath().toString() + cut;\n\n return new File(newPath).toPath();\n }", "private boolean copyFile(File dest) {\n\t\tboolean result = false;\n\n\t\ttry {\n\t\t\tif (this.exists()) {\n\t\t\t\tif (!dest.exists()) dest.mkdirs();\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.createNewFile();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isFile()) {\n\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isFile()) {\n\t\t\t\t\tif (dest.exists()) {\n\t\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\t\tdest.createNewFile();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.getName().equals(dest.getName())) {\n\t\t\t\t\t\t//targetFile.deleteOnExit();\n\t\t\t\t\t\t//targetFile = new File(targetFile.getAbsolutePath());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tBufferedInputStream inBuff = null;\n\t\t\t\tBufferedOutputStream outBuff = null;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tinBuff = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\t\toutBuff = new BufferedOutputStream(new FileOutputStream(dest));\n\n\t\t\t\t\tbyte[] b = new byte[1024 * 5];\n\t\t\t\t\tint length;\n\t\t\t\t\twhile ((length = inBuff.read(b)) != -1) {\n\t\t\t\t\t\toutBuff.write(b, 0, length);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toutBuff.flush();\n\t\t\t\t\t\n\t\t\t\t\tresult = true;\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (inBuff != null) inBuff.close();\n\t\t\t\t\t\tif (outBuff != null) outBuff.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public boolean copy(File target) {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t\ttarget = new File(target.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).copy(target);\n\t\t\t\t\t\t\telse if (file.isFile()) ((File) file).copyFile(target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (this.isFile()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "private void selectedFolderMovedFromNavTree(Folder selectedFolder, Folder destinationFolder) {\n Folder parentFolder = view.getParentFolder(selectedFolder);\n\n if (DiskResourceUtil.isDescendantOfFolder(parentFolder, destinationFolder)) {\n // The destination is under the parent, so if we prune the parent and set the destination\n // as the selected folder, the parent will lazy-load down to the destination.\n view.removeChildren(parentFolder);\n } else if (DiskResourceUtil.isDescendantOfFolder(destinationFolder, parentFolder)) {\n // The parent is under the destination, so we only need to view the destination folder's\n // contents and refresh its children.\n presenter.doRefreshFolder(destinationFolder);\n } else {\n // Refresh the parent folder since it has lost a child.\n presenter.doRefreshFolder(parentFolder);\n // Refresh the destination folder since it has gained a child.\n presenter.doRefreshFolder(destinationFolder);\n }\n\n // View the destination folder's contents.\n presenter.setSelectedFolderByPath(destinationFolder);\n }", "void moveFolder(Long sourceId, Long targetFolderId, List<SolutionParam> solutions);", "void copyToBranch(ID sourceBranchId, ID targetBranchId);", "public static void copyFile(final String fromPath, final String toPath) throws IOException {\n FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath));\n }", "public static void extractResources(File jar, String subdir, File dest) throws IOException {\n if (jar.isDirectory()) {\n if (subdir.startsWith(\"/\")) {\n subdir = subdir.substring(1);\n }\n FileUtility.copyDirectory(new File(jar, subdir), dest);\n } else {\n if (!subdir.startsWith(\"/\")) {\n subdir = \"/\" + subdir;\n }\n tryExtractFolder(jar, subdir, dest);\n }\n }", "public static boolean move(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n // delete all files in dst firstly because of different folder if has dstDataPath\n if(!fs.delete(new Path(destPath), true)) {\n // ignore delete failed, it's ok.\n }\n\n if(fs.exists(new Path(srcPath))) {\n // copy file only when source file exists.\n fs.rename(new Path(srcPath), new Path(destPath));\n return true;\n }\n\n return false;\n }", "public static void copyFile(File from, File to) throws IOException {\r\n FileInputStream in = new FileInputStream(from);\r\n copyFile(in, to);\r\n }", "private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }", "public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}", "public static void moveTo(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n if(!fs.exists(new Path(destPath))) {\n throw new RuntimeException(destPath + \" does not exist.\");\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "private void copyOrMove(Action action, Path dir) throws IOException {\n\n try {\n if (action == Action.COPY) {\n Path newdir = target.resolve(source.relativize(dir));\n Files.copy(dir, newdir, copyMoveOptions);\n } else if (action == Action.MOVE) {\n Path newdir = target.resolve(source.relativize(dir));\n Files.move(dir, newdir, copyMoveOptions);\n }\n } catch (AtomicMoveNotSupportedException e) {\n // Remove the atomic move from the list and try again\n List<CopyOption> optionsTemp = Arrays.asList(copyMoveOptions);\n optionsTemp.remove(StandardCopyOption.ATOMIC_MOVE);\n copyMoveOptions = optionsTemp.toArray(new CopyOption[optionsTemp.size()]);\n\n copyOrMove(action, dir);\n }\n\n }", "public void copyDirectory(File sourceLocation, File targetLocation)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tif (sourceLocation.isDirectory()) {\r\n\t\t\tif (!targetLocation.exists()) {\r\n\t\t\t\ttargetLocation.mkdir();\r\n\t\t\t}\r\n\r\n\t\t\tString[] children = sourceLocation.list();\r\n\t\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\t\tcopyDirectory(new File(sourceLocation, children[i]), new File(\r\n\t\t\t\t\t\ttargetLocation, children[i]));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInputStream in = new FileInputStream(sourceLocation);\r\n\t\t\tOutputStream out = new FileOutputStream(targetLocation);\r\n\t\t\t// Copy the bits from instream to outstream\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\tint len;\r\n\t\t\twhile ((len = in.read(buf)) > 0) {\r\n\t\t\t\tout.write(buf, 0, len);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t}", "private static void addDirectory(ZipOutputStream zout, File fileSource, File sourceDir) {\n\n\t\t// get sub-folder/files list\n\t\tFile[] files = fileSource.listFiles();\n\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\ttry {\n\t\t\t\tString name = files[i].getAbsolutePath();\n\t\t\t\tname = name.substring((int) sourceDir.getAbsolutePath().length());\n\t\t\t\t// if the file is directory, call the function recursively\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\taddDirectory(zout, files[i], sourceDir);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * we are here means, its file and not directory, so\n\t\t\t\t * add it to the zip file\n\t\t\t\t */\n\n\n\t\t\t\t// create object of FileInputStream\n\t\t\t\tFileInputStream fin = new FileInputStream(files[i]);\n\n\t\t\t\tzout.putNextEntry(new ZipEntry(name));\n\n\t\t\t\tIOUtils.copy(fin, zout);\n\t\t\t\t\n\t\t\t\tzout.closeEntry();\n\n\t\t\t\t// close the InputStream\n\t\t\t\tfin.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tioe.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "@PostMapping(\"/copyfolder\")\n public String copyFolder(@RequestParam String currentPath, @RequestParam(name = \"copiedFolders\") List<String> folders, @RequestParam(name = \"ft_2_active\") String destination, RedirectAttributes redirectAttributes) {\n if(null != folders && folders.size() > 0) {\n ArrayList<String> successMessages = new ArrayList<>();\n ArrayList<String> errorMessages = new ArrayList<>();\n logger.log(Level.INFO, \"Copying folder(s)...\");\n for (String folder : folders) {\n if (uiCommandService.copyFile(folder, destination)){\n successMessages.add(\"Successfully copied \" + new File(folder).getName() + \" to \" + destination + \"!\");\n } else {\n errorMessages.add(\"Could not copy \" + new File(folder).getName() + \" to \" + destination + \"!\");\n }\n }\n logger.log(Level.INFO, \"Finished copying folder(s)!\");\n redirectAttributes.addFlashAttribute(\"success_messages\",successMessages);\n redirectAttributes.addFlashAttribute(\"error_messages\",errorMessages);\n }\n return \"redirect:/imageview?location=\" + currentPath.replace(\"\\\\\", \"/\");\n }", "private void pathFill(Vertex<E> src, Vertex<E> dst, ArrayList<E> path) {\r\n\t\tif(src == dst) {\r\n\t\t\tpath.add(src.getElement());\r\n\t\t} else {\r\n\t\t\tpathFill(src, dst.getPredecessor(), path);\r\n\t\t\tpath.add(dst.getElement());\r\n\t\t}\r\n\t}", "void move(Path repoRoot, Path source, Path target);", "public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }", "void updateDirectory(File targetdir, File sourcedir, File backupdir) throws Exception{\n\t\tArrayList<File> sourcesubs = new ArrayList<File>();\n\t\tFile[] sourcefiles = sourcedir.listFiles();\n\t\tFile targetfile = null;\n\t\tString sourceinfo = null;\n\t\tString targetinfo = null;\n\t\tString promptMessage = \"\";\n\t\tObject[] promptOptions = {\n\t\t\t\"Yes\",\n\t\t\t\"Yes to All\",\n\t\t\t\"Cancel\"\n\t\t};\n\n\t\t//If targetdir starts with one of folder in 'excludedFolderArray', then ignore it (don't update this folder).\n\t\tfor(File excludedFolder:excludedFolderList){\n\t\t\tif(targetdir.toPath().startsWith(excludedFolder.toPath())){\n\t\t\t\tprogressor.setProgressInfo(progress, \"Ignoring target directory '\"+targetdir.getCanonicalPath()+\"', which will NOT be updated.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tSimpleDateFormat date = new SimpleDateFormat(\"MM/dd/yyyy hh:mm a\");\n\t\ttry{\n\t\t\tfor(File file:sourcefiles){\n\t\t\t\tif(file.isDirectory()){\n\t\t\t\t\tif(recurse) sourcesubs.add(file);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (allfilecopy){\n\t\t\t\t\tif (! allFileIncluded(file)) continue;\n\t\t\t\t} else {\n\t\t\t\t\tif(! fileIncluded(file)) continue;\n\t\t\t\t}\n\n\t\t\t\ttargetfile = new File(targetdir, file.getName());\n\t\t\t\tif(targetfile.exists()){\n\t\t\t\t\tif(targetfile.lastModified() >= file.lastModified()) continue;\n\t\t\t\t}\n\t\t\t\tif(!force && !quiet){\n\t\t\t\t\tsourceinfo = \"Source: \"+ file.getAbsolutePath()+ \"\\n\"\n\t\t\t\t\t\t\t + \"TimeStamp: \"+ date.format(new Date(file.lastModified()));\n\t\t\t\t\tif (file.lastModified() > targetfile.lastModified())\n\t\t\t\t\t\tsourceinfo += \" (newer)\";\n\t\t\t\t\tsourceinfo += \"\\nSize: \"+ file.length();\n\t\t\t\t\tif( file.length() > targetfile.length())\n\t\t\t\t\t\tsourceinfo += \" (larger)\";\n\n\t\t\t\t\ttargetinfo = \"Target: \"+ targetfile.getAbsolutePath()+ \"\\n\"\n\t\t\t\t\t\t\t + \"TimeStamp: \"+ date.format(new Date(targetfile.lastModified()));\n\t\t\t\t\tif (targetfile.lastModified() > file.lastModified())\n\t\t\t\t\t\ttargetinfo += \" (newer)\";\n\t\t\t\t\ttargetinfo += \"\\nSize: \"+ targetfile.length();\n\t\t\t\t\tif( targetfile.length() > file.length())\n\t\t\t\t\t\ttargetinfo += \" (larger)\";\n\n\t\t\t\t\tpromptMessage = \"\\n Preparing to \";\n\t\t\t\t\tif(targetfile.exists() && dobackup)\n\t\t\t\t\t\tpromptMessage += \"Backup and \";\n\t\t\t\t\tpromptMessage += \"Copy/Replace:\\n\\n\"\n\t\t\t\t\t\t\t + sourceinfo\n\t\t\t\t\t\t\t + \"\\n\\n\"\n\t\t\t\t\t\t\t + targetinfo\n\t\t\t\t\t\t\t + \"\\nDo you wish to proceed?\\n\\n\";\n\n\t\t\t\t\tint selected = JOptionPane.showOptionDialog(null,\n\t\t\t\t\t\t\tpromptMessage,\n\t\t\t\t\t\t\tprompt,\n\t\t\t\t\t\t\tJOptionPane.YES_NO_CANCEL_OPTION,\n\t\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE,\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\tpromptOptions,\n\t\t\t\t\t\t\tpromptOptions[0]);\n\t\t\t\t\tif(selected == JOptionPane.CLOSED_OPTION || selected == 2){\n\t\t\t\t\t\tcanceled = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif(selected == 1) force = true;\n\t\t\t\t}\n\t\t\t\tif( targetfile.exists() && dobackup) backupFile(targetfile, backupdir);\n\t\t\t\tcopyFile(file, targetfile);\n\t\t\t\tmodifiedFiles++;\n\t\t\t}\n\t\t\tif (recurse){\n\t\t\t\tIterator<File> it = sourcesubs.iterator();\n\t\t\t\twhile(it.hasNext()){\n\t\t\t\t\tFile newsourcedir = it.next();\n\t\t\t\t\tFile newtargetdir = new File(targetdir, newsourcedir.getName());\n\t\t\t\t\tif(!newtargetdir.isDirectory()) newtargetdir.mkdir();\n\t\t\t\t\tFile newbackupdir = null;\n\t\t\t\t\tif(dobackup) {\n\t\t\t\t\t\tnewbackupdir = new File(backupdir, newsourcedir.getName());\n\t\t\t\t\t\tif(!newbackupdir.isDirectory()) newbackupdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tupdateDirectory(newtargetdir, newsourcedir, newbackupdir);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception x){\n\t\t\t// restore any backups, if we can!\n\t\t\terrors.println(\"Failed to update directory \"+ targetdir.getAbsolutePath());\n\t\t\terrors.println(\" due to \"+ x.getClass().getSimpleName()+\": \"+x.getMessage());\n\t\t\tif(backups.size() > 0) {\n\t\t\t\terrors.println(\"Attempting to restore from backups at \"+ backupdir.getAbsolutePath());\n\t\t\t}\n\t\t\tSet<File> keys = backups.keySet();\n\t\t\tFile target = null;\n\t\t\tFile backup = null;\n\t\t\tfor(File key: keys){\n\t\t\t\ttry{\n\t\t\t\t\ttarget = key;\n\t\t\t\t\tbackup = backups.get(key);\n\t\t\t\t\tcopyFile(backup, target);\n\t\t\t\t}catch(IOException y){\n\t\t\t\t\terrors.println(\"Unable to restore backup file \"+ backup.getAbsolutePath()+\" to \"+ target.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow x;\n\t\t}\n\t}", "final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }", "@Override\r\n\tpublic boolean copyFolder(String path, String dirName, String newDirName) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\r\n\t}", "public void copyConfig()\n {\n if (srcParts == null || dstParts == null)\n {\n logger.error(\"VObjectTreeCopier.copyConfig: null source or destination\");\n return;\n }\n if (hasRootTranslation)\n {\n srcParts[rootTranslationIdx].getTranslation(buf);\n dstParts[rootTranslationIdx].setTranslation(buf);\n }\n if (hasTranslation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getTranslation(buf);\n dstParts[i].setTranslation(buf);\n }\n }\n if (hasRotation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getRotation(buf);\n dstParts[i].setRotation(buf);\n }\n }\n if (hasScale)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getScale(buf);\n dstParts[i].setScale(buf);\n }\n }\n if (hasVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getVelocity(buf);\n dstParts[i].setVelocity(buf);\n }\n }\n if (hasAngularVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getAngularVelocity(buf);\n dstParts[i].setAngularVelocity(buf);\n }\n }\n\n }", "public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}", "public static void moveFile(Component parentComponent, String source, String destination)\r\n {\r\n File des = new File(destination);\r\n File src = new File(source);\r\n try(FileOutputStream fout = new FileOutputStream(des); FileInputStream in = new FileInputStream(src))\r\n {\r\n BufferedInputStream bin = new BufferedInputStream(in);\r\n byte[] pic = new byte[(int)src.length()];\r\n bin.read(pic, 0, pic.length - 1);\r\n des.createNewFile();\r\n fout.write(pic, 0, pic.length - 1);\r\n fout.flush();\r\n JOptionPane.showMessageDialog(parentComponent, \"File Successfully Copied!\");\r\n }\r\n catch(IOException xcp)\r\n {\r\n xcp.printStackTrace(System.err);\r\n }\r\n }", "public static void copyFile(final File from, final File toDir) throws IOException {\n if (!from.canRead()) {\n throw new IOException(\"Cannot read file '\" + from + \"'.\");\n }\n if (toDir.exists() && (!toDir.canWrite())) {\n throw new IOException(\"Cannot write to file '\" + toDir + \"'.\");\n }\n toDir.getParentFile().mkdirs();\n FileUtils.copyFile(from, toDir);\n }", "public static void main(String[] args) throws IOException {\n\t\tString sourcePathHdfs=args[0];\n\t\tString destinationPath=args[1];\n\t\tnew CopyToLocal().copyToLocal(sourcePathHdfs, destinationPath);\n\t\t\n\t}" ]
[ "0.7368847", "0.6643814", "0.6560944", "0.6516039", "0.64423186", "0.6346977", "0.63112146", "0.62963974", "0.6252431", "0.6084528", "0.6033176", "0.58585376", "0.58386433", "0.5795647", "0.5758667", "0.5713814", "0.5685403", "0.56608814", "0.56497777", "0.556959", "0.555254", "0.5512158", "0.546343", "0.54604423", "0.54161286", "0.5392649", "0.538249", "0.53480697", "0.53182214", "0.52857435", "0.52663773", "0.5245016", "0.5240816", "0.5209843", "0.5201721", "0.5200368", "0.5178042", "0.5173801", "0.5173147", "0.5150549", "0.5141407", "0.5099067", "0.50434136", "0.49906167", "0.49144426", "0.49106196", "0.4891385", "0.48775306", "0.48433888", "0.48350823", "0.482825", "0.4820456", "0.48078892", "0.47684819", "0.47243854", "0.4718615", "0.46895465", "0.46893537", "0.46765712", "0.4669336", "0.46689832", "0.4627304", "0.46244267", "0.4617694", "0.46159342", "0.4612329", "0.46105117", "0.4601459", "0.45943704", "0.45928612", "0.45856947", "0.45720792", "0.45692447", "0.45675352", "0.45666608", "0.45601833", "0.45474538", "0.453719", "0.45342895", "0.4523957", "0.45151764", "0.45143512", "0.4504752", "0.45020097", "0.45013058", "0.44848517", "0.4457284", "0.44508722", "0.44394445", "0.44381323", "0.44087565", "0.4402037", "0.43842447", "0.43798137", "0.43633598", "0.43599108", "0.4342897", "0.43296847", "0.43234456", "0.43175986" ]
0.75126386
0
===================================================================================// / Simple Device/WireEnumeration Load Methods & Helpers ===================================================================================// Gets and returns the value of the environment variable rapidSmithPathVariableName
public static String getRapidSmithPath() { String path = System.getenv(rapidSmithPathVariableName); if (path == null) { String nl = System.getProperty("line.separator"); MessageGenerator.briefErrorAndExit("Error: You do not have the " + rapidSmithPathVariableName + " set in your environment." + nl + " Please set this environment variable to the " + "location of your rapidSmith project." + nl + " For example: " + rapidSmithPathVariableName + "=" + "/home/fred/workspace/rapidSmith"); } if (path.endsWith(File.separator)) { path.substring(0, path.length() - 1); } return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\t\t\t// get the property value and print it out\n\t\t Map<String, Object> map = new HashMap<>();\n\t\t\tfor (Entry<Object, Object> entry : prop.entrySet()) {\n\t\t\t\tmap.put((String) entry.getKey(), entry.getValue());\n\t\t\t}\n\t\t\tEnvironmentVariablesForWeb.setEnvironmentPropertyMap(map);\n\t\t\t/*EnvironmentVariables.PLATFORM_NAME = prop.getProperty(\"PLATFORM_NAME\");\n\t\t\tEnvironmentVariables.VERSION_NAME = prop.getProperty(\"VERSION_NAME\");\n\t\t\tEnvironmentVariables.DEVICE_NAME = prop.getProperty(\"DEVICE_NAME\");\n\t\t\tSystem.out.println(EnvironmentVariables.PLATFORM_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.VERSION_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.DEVICE_NAME);*/\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t }", "String getEnvironmentProperty(String key);", "public String getPath(String strPathName) {\t\t\n\t\tPathproperties = new Properties();\n\t try {\n\t FileInputStream Master = new FileInputStream(filePath);\n\t Pathproperties.load(Master);\n\t Master.close();\n\t }catch (IOException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t return Pathproperties.getProperty(strPathName);\n\t}", "protected String getMyVarPath(String path){\n\t\treturn \"getVariableData('\"+VARNAME+\"', 'part1', '/nswomoxsd:receive/nswomoxsd:evt/\"+path+\"') \";\n\t}", "private String getBinaryPath() {\n return System.getProperty(SeLionConstants.WEBDRIVER_GECKO_DRIVER_PROPERTY,\n Config.getConfigProperty(ConfigProperty.SELENIUM_GECKODRIVER_PATH));\n }", "public static final String getSystemString(String key) {\n\t\tString value = null;\n\t\ttry {\n\t\t\tvalue = System.getProperty(key);\n\t\t} catch (NullPointerException e) {\n\n\t\t\tif (THROW_ON_LOAD_FAILURE)\n\t\t\t\tthrow e;\n\t\t}\n\t\treturn value;\n\t}", "String getEnvironment();", "public String getPropertyPath();", "public String getPropertyPath();", "public IEnvVarBuildPath[] getEnvVarBuildPaths();", "private static String stringValue(String key) {\n String value = context.envString(toEnvvar(key));\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n value = System.getProperty(key);\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n value = context.configString(key);\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n return null;\n }", "public String getAttributeFileLibPath();", "public String getSystemPath() throws PropertyDoesNotExistException {\r\n\t\tif (this.settings.containsKey(\"systemPath\")) {\r\n\t\t\treturn this.settings.getProperty(\"systemPath\");\r\n\t\t}\r\n\t\tthrow new PropertyDoesNotExistException(\"Can't find property 'systemPath'\");\r\n\t}", "private static String loadPropertiesFileByEnvironement(String propertiesPath) {\n\t\t\tSystem.setProperty(\"ENV\", \"dev\");\n\t\tString env = System.getProperty(\"ENV\");\n\t\tString [] ts = propertiesPath.split(\"/\");\n\t\tfor(int i = 0;i<ts.length;i++){\n\t\t\tif(ts[i].contains(\".cfg.\")){\n\t\t\t\tts[i] = env+\"_\"+ts[i];\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tString newPathProperties = \"\";\n\t\tfor(String s : ts)\n\t\t\tnewPathProperties=newPathProperties +\"/\"+s;\n\t\tnewPathProperties = newPathProperties.substring(1,newPathProperties.length());\n\t\treturn newPathProperties;\n\t}", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "public native void getenv(java.lang.String key);", "public static String getProperty(String property) {\n try {\n if (BluetoothConsts.PROPERTY_BLUETOOTH_API_VERSION.equals(property)) {\n return BlueCoveImpl.BLUETOOTH_API_VERSION;\n } else if (BluetoothConsts.PROPERTY_OBEX_API_VERSION.equals(property)) {\n return BlueCoveImpl.OBEX_API_VERSION;\n } else if (BlueCoveLocalDeviceProperties.LOCAL_DEVICE_PROPERTY_BLUECOVE_VERSION.equals(property)) {\n return BlueCoveImpl.version;\n } else if (BlueCoveLocalDeviceProperties.LOCAL_DEVICE_PROPERTY_STACK.equals(property)) {\n return BlueCoveImpl.instance().getBluetoothStack().getStackID();\n } else if (BlueCoveLocalDeviceProperties.LOCAL_DEVICE_PROPERTY_FEATURE_L2CAP.equals(property)) {\n return BlueCoveImpl.instance().getLocalDeviceFeature(BluetoothStack.FEATURE_L2CAP);\n } else if (BlueCoveLocalDeviceProperties.LOCAL_DEVICE_PROPERTY_FEATURE_SERVICE_ATTRIBUTES.equals(property)) {\n return BlueCoveImpl.instance().getLocalDeviceFeature(BluetoothStack.FEATURE_SERVICE_ATTRIBUTES);\n } else if (BlueCoveLocalDeviceProperties.LOCAL_DEVICE_PROPERTY_FEATURE_SET_DEVICE_SERVICE_CLASSES.equals(property)) {\n return BlueCoveImpl.instance().getLocalDeviceFeature(BluetoothStack.FEATURE_SET_DEVICE_SERVICE_CLASSES);\n } else if (BlueCoveLocalDeviceProperties.LOCAL_DEVICE_PROPERTY_OPEN_CONNECTIONS.equals(property)) {\n return String.valueOf(RemoteDeviceHelper.openConnections());\n }\n return BlueCoveImpl.instance().getBluetoothStack().getLocalDeviceProperty(property);\n } catch (BluetoothStateException e) {\n throw (RuntimeException) UtilsJavaSE.initCause(new RuntimeException(e.getMessage()), e);\n }\n }", "private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }", "private String getAndroidResourcePathFromSystemProperty() {\n String resourcePath = System.getProperty(\"android.sdk.path\");\n if (resourcePath != null) {\n return new File(resourcePath, getAndroidResourceSubPath()).toString();\n }\n return null;\n }", "public String getRoadpicpath() {\n\t\treturn roadpicpath;\n\t}", "public String getResourcePath() {\n return BARDConstants.API_BASE + \"/biology/\" + serial;\n }", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "protected Pose[] getUserDefinedPath() {\n\t\treturn handler.getDesiredPath();\n\t}", "private static ModelFileEnv m114844k() {\n if (!C7163a.m22363a() || !f93230L.mo93342a(AVSettings.Property.ModelFileTestEnv)) {\n return ModelFileEnv.ONLINE;\n }\n return ModelFileEnv.TEST;\n }", "public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }", "public String getProperty(String key) {\n\t\treturn Optional.ofNullable(env.get(key)).orElseGet(()->\"\");\n\t}", "protected String getenv(String varname) {\n\t\t//return System.getProperty(varname);\n\t\treturn \"\"; //TODO allow virtual system variables for each computer, that are remembered on restart\n\t}", "public static String get(String key) throws UnknownID, IOFailure, ArgumentNotValid {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"String key\");\n\t\tString val = System.getProperty(key);\n\t\tif (val != null) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Key not in System.properties try loaded data instead\n\t\tsynchronized (fileSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : fileSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\n\t\t// Key not in file based settings, try classpath settings instead\n\t\tsynchronized (defaultClasspathSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : defaultClasspathSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n */\n\t\tthrow new UnknownID(\"No match for key '\" + key + \"' in settings\");\n\t}", "private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }", "public String getBftSmartKeyLoader() throws IOException {\r\n String keyLoader = \"ECDSA\";\r\n\r\n FileReader fr = new FileReader(Configuration.BFT_SMART_CONFIG_FILE);\r\n BufferedReader rd = new BufferedReader(fr);\r\n\r\n String line;\r\n while ((line = rd.readLine()) != null) {\r\n if (line.startsWith(\"#\"))\r\n continue;\r\n\r\n StringTokenizer str = new StringTokenizer(line, \"=\");\r\n if (str.countTokens() > 1) {\r\n switch (str.nextToken().trim()) {\r\n case \"system.communication.defaultKeyLoader\":\r\n keyLoader = str.nextToken().trim();\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n return keyLoader;\r\n }", "static public Object getAttributeFromPath(XmlObject object, String path) throws XMLBuildException {\r\n\t\tString[] var = path.split(\"\\\\.\");\r\n\t\tObject x = null;\r\n\t\tif (var[0].equals(\"this\"))\r\n\t\t\tx = object;\r\n\t\telse\r\n\t\t\tx = object.getSymbolTable().get(var[0]);\r\n\r\n\t\tObject current = x;\r\n\t\tfor (int i = 1; i < var.length; i++) {\r\n\t\t\tcurrent = getAttributes(current, var[i]);\r\n\t\t}\r\n\t\treturn current;\r\n\t}", "public String getPathName() {\n if (pathName == null) {\n if (isWindows()) {\n for (String key : getEnv().keySet()) {\n if (key.toLowerCase(Locale.getDefault()).equals(\"path\")) { // NOI18N\n pathName = key.substring(0, 4);\n return pathName;\n }\n }\n }\n pathName = \"PATH\"; // NOI18N\n }\n return pathName;\n }", "private static String getProperty(String property) {\n\t\tString value = System.getProperty(property);\r\n\t\tif (value == null) {\r\n\t\t\tvalue = System.getenv(property);\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "public synchronized String getIdentifier(String adaptorFullPath_p, String owBootstrapName_p)\r\n {\r\n String result = null;\r\n FileInputStream propStream = null;\r\n try\r\n {\r\n Properties currentProperties = adapter2PropsMap.get(adaptorFullPath_p);\r\n if (currentProperties == null)\r\n {\r\n currentProperties = new Properties();\r\n File propFile = new File(getPropertiesFullPath(adaptorFullPath_p));\r\n if (propFile.exists())\r\n {\r\n propStream = new FileInputStream(propFile);\r\n currentProperties.load(propStream);\r\n }\r\n }\r\n result = currentProperties.getProperty(owBootstrapName_p);\r\n }\r\n catch (Exception e)\r\n {\r\n LOG.error(\"Cannot read the mappings!\", e);\r\n }\r\n finally\r\n {\r\n if (propStream != null)\r\n {\r\n try\r\n {\r\n propStream.close();\r\n }\r\n catch (IOException e)\r\n {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n return result;\r\n }", "static String getBrowserPath()\n \t{\n \t\tint os = PropertiesAndDirectories.os();\n \t\tString result = browserPath;\n \t\tif (result == null)\n \t\t{\n \t\t\tswitch (os)\n \t\t\t{\n \t\t\tcase PropertiesAndDirectories.XP:\n \t\t\tcase PropertiesAndDirectories.VISTA_AND_7:\n \t\t\t\tif (!Pref.lookupBoolean(\"navigate_with_ie\"))\n \t\t\t\t\tresult = FIREFOX_PATH_WINDOWS;\n \t\t\t\tif (result != null)\n \t\t\t\t{\n \t\t\t\t\tFile existentialTester = new File(result);\n \t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t{\n \t\t\t\t\t\tresult = FIREFOX_PATH_WINDOWS_64;\n \t\t\t\t\t\texistentialTester = new File(result);\n \t\t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tresult = IE_PATH_WINDOWS;\n \t\t\t\t\t\t\texistentialTester = new File(result);\n \t\t\t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t\t\t\tresult = null;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase PropertiesAndDirectories.MAC:\n \t\t\t\tresult = \"/usr/bin/open\";\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\terror(PropertiesAndDirectories.getOsName(), \"go(ParsedURL) not supported\");\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif (result != null)\n \t\t\t{\n \t\t\t\tbrowserPath = result;\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}", "public String getLaunchPath() {\n return this.LaunchPath;\n }", "private int devid(String path){\n\t\n\t/*\n\t NOTA: Deberia sacar los nombres de los path de cada una de las clases. \n\t Quizas guardandolos en ellas como constantes estaticas publicas\n\t */\n\tif (path!=null){\n\t if (path.equals(\"/\"))\n\t\treturn ROOT;\n\t else if (path.indexOf(\"/audio\")==0)\n\t\treturn AUDIODEV;\n\t else if (path.indexOf(\"/contacts\")==0)\n\t\treturn CONTACTDEV;\n\t else if (path.indexOf(\"/kbd\")==0)\n\t\treturn KBDDEV;\n\t else if (path.indexOf(\"/files\")==0)\n\t\treturn FILEDEV;\n\t else if (path.indexOf(\"/sms\")==0)\n\t\treturn MSGDEV;\n\t else\n\t\treturn UNKNOWDEV;\n\t}else\n\t return UNKNOWDEV;\n }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "String getDeviceName();", "public static String m582i() {\r\n try {\r\n Class cls = Class.forName(\"android.os.SystemProperties\");\r\n Object newInstance = cls.newInstance();\r\n return (String) cls.getMethod(\"get\", new Class[]{String.class, String.class}).invoke(newInstance, new Object[]{\"gsm.version.baseband\", \"no message\"});\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }", "java.lang.String getXpath();", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n currentPath_ = s;\n return s;\n }\n }", "public static synchronized String getPropValue(String key, String path)\r\n/* */ {\r\n/* 21 */ if (p == null) {\r\n/* 22 */ String npath = path + \"WEB-INF/classes/config.properties\";\r\n/* 23 */ InputStream is = null;\r\n/* */ try {\r\n/* 25 */ is = new FileInputStream(npath);\r\n/* */ } catch (FileNotFoundException e1) {\r\n/* 27 */ e1.printStackTrace();\r\n/* */ }\r\n/* 29 */ p = new Properties();\r\n/* */ try {\r\n/* 31 */ p.load(is);\r\n/* */ } catch (IOException e) {\r\n/* 33 */ e.printStackTrace();\r\n/* */ }\r\n/* */ }\r\n/* 36 */ return p.getProperty(JobStandConfs.work_base_dir);\r\n/* */ }", "@Override\n public Optional<File> getRemappedBinary(String path) {\n if (!SystemInfo.isMac || path.indexOf(File.separatorChar) >= 0) {\n return Optional.empty();\n }\n String shellPath = EnvironmentUtil.getValue(\"PATH\");\n return Optional.ofNullable(\n PathEnvironmentVariableUtil.findInPath(path, shellPath, /* filter= */ null));\n }", "public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;", "public String getXpath() { \n\t\treturn getXpathElement().getValue();\n\t}", "@DISPID(76)\r\n\t// = 0x4c. The runtime will prefer the VTID if present\r\n\t@VTID(74)\r\n\tjava.lang.String path();", "public DevicePath getDevicePath(Device device);", "private String inferRPath()\n {\n String path;\n\n //preferentially use R config setup in scripting props. only works if running locally.\n if (PipelineJobService.get().getLocationType() == PipelineJobService.LocationType.WebServer)\n {\n LabKeyScriptEngineManager svc = LabKeyScriptEngineManager.get();\n for (ExternalScriptEngineDefinition def : svc.getEngineDefinitions())\n {\n if (RScriptEngineFactory.isRScriptEngine(def.getExtensions()))\n {\n path = new File(def.getExePath()).getParent();\n getJob().getLogger().info(\"Using RSciptEngine path: \" + path);\n return path;\n }\n }\n }\n\n //then pipeline config\n String packagePath = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath(\"R\");\n if (StringUtils.trimToNull(packagePath) != null)\n {\n getJob().getLogger().info(\"Using path from pipeline config: \" + packagePath);\n return packagePath;\n }\n\n //then RHOME\n Map<String, String> env = System.getenv();\n if (env.containsKey(\"RHOME\"))\n {\n getJob().getLogger().info(\"Using path from RHOME: \" + env.get(\"RHOME\"));\n return env.get(\"RHOME\");\n }\n\n //else assume it's in the PATH\n getJob().getLogger().info(\"Unable to infer R path, using null\");\n\n return null;\n }", "public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;", "private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }", "public String accessLocationPropFile(){\n\t\tProperties prop = new Properties();\n\t\tString loc=\"\";\n\t\ttry {\n\t\t\t//load a properties file\n\t\t\tprop.load(new FileInputStream(\"C:/Users/SARA/Desktop/OpenMRS/de/DeIdentifiedPatientDataExportModule/api/src/main/resources/config1.properties\"));\n\t\t\tInteger a = getRandomBetween(1, 3);\n\t\t\tloc = prop.getProperty(a.toString());\n\n\t\t} catch (IOException ex) {\n\t\t\tlog.error(\"IOException in accessing Location File\", ex);\n\t\t}\n\t\treturn loc;\n\t}", "public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }", "protected static int getVariable(String variableKey) {\r\n\t\t\r\n\t\tString valueFromPropertyFile = Settings.getProperty(variableKey);\r\n\t\t\r\n\t\tif (valueFromPropertyFile.charAt(0) == 'R') { // random value requested\r\n\t\t\t\r\n\t\t\treturn random.nextInt(getUpperBound(valueFromPropertyFile) + 1);\r\n\t\t\t\r\n\t\t} else { // absolute value specified\r\n\t\t\t\r\n\t\t\treturn new Integer(valueFromPropertyFile);\r\n\t\t}\r\n\t\t\r\n\t}", "public static String getPathCache()\r\n/* 43: */ throws IOException\r\n/* 44: */ {\r\n/* 45: 44 */ log.finest(\"OSHandler.getPathCache\");\r\n/* 46: 45 */ return getProperty(\"path\");\r\n/* 47: */ }", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public String getSingleCountryPath(){\r\n\t\t \r\n\t\t String singleCountryPath = properties.getProperty(\"singleCountryPath\");\r\n\t\t if(singleCountryPath != null) return singleCountryPath;\r\n\t\t else throw new RuntimeException(\"singleCountryPath not specified in the configuration.properties file.\");\r\n\t }", "Properties getEnvironment();", "Properties getEnvironment();", "public static String getProperty (String key) {\n return SystemProperties.getProperty(key);\n }", "public SoPath getPath() {\n\t\t return path; \n\t}", "public String getApplicationPhyPath()\n {\n return configfile.application_phy_path;\n }", "private char[] getPath() {\n\t\treturn null;\n\t}", "java.lang.String getEnv(int index);", "public static String GetBaseAddress() {\n\t\t// Load Projects Settings XML file\n\t\tDocument doc = Utilities.LoadDocumentFromFilePath(IDE.projectFolderPath + \"\\\\ProjectSettings.xml\");\n\t\tString baseAddress = \"\";\n\t\tif (doc != null) {\n\t\t\t// Get all \"files\"\n\t\t\tNodeList baseAddressNode = doc.getDocumentElement().getElementsByTagName(\"baseAddress\");\n\t\t\t// Handle result\n\t\t\tif (baseAddressNode.getLength() > 0) {\n\t\t\t\tbaseAddress = Utilities.getXmlNodeAttribute(baseAddressNode.item(0), \"value\");\n\t\t\t}\n\t\t}\n\t\treturn baseAddress;\n\t}", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "static String readXML(String keyName){\n File fXmlFile = new File(\".\"+ConstantsClass.PATHWAY_TO_AUXILIARY_FILES+\"/configuration.xml\");\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = null;\n try {\n dBuilder = dbFactory.newDocumentBuilder();\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n }\n Document doc = null;\n try {\n doc = dBuilder.parse(fXmlFile);\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n doc.getDocumentElement().normalize();\n return doc.getElementsByTagName(keyName).item(0).getTextContent();\n }", "public static String getPropertyFromFile(String propName)throws ISException{\n InputStream inputStream;\n Properties prop = new Properties();\n try {\n inputStream = new FileInputStream(new File(System.getenv(\"conf.home\")+\"\\\\application.properties\"));\n prop.load(inputStream);\n if(prop==null){\n throw new ISException(\"getProperty: Cannot open property file!\");\n }\n return prop.getProperty(propName);\n } catch(Exception e){\n throw new ISException(\"getProperty: Cannot open property file!\");\n }\n }", "public static String readPropertyFile(String pathofFile, String Key)\r\n\t\t{\r\n\t\t\tString value = \"\";\r\n\t\t\treturn value;\r\n\t\t}", "public String getBuildingLocation() {\n return (String) getAttributeInternal(BUILDINGLOCATION);\n }", "@DISPID(34)\r\n\t// = 0x22. The runtime will prefer the VTID if present\r\n\t@VTID(39)\r\n\tjava.lang.String path();", "boolean k2h_load_debug_env();", "public Map<String, String> getEnvironment();", "public static String getNewPath() {\n return homePath + Integer.toString(++elementCounter) + \".ser\";\n }", "private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }", "public static String m19634b() {\n String str;\n try {\n str = Environment.getExternalStorageDirectory().getAbsolutePath();\n } catch (Throwable unused) {\n str = null;\n }\n return str == null ? \"\" : str.trim();\n }", "public String getDefaultEnvironmentVariableName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDefaultEnvironmentVariableName\");\n\t\t\treturn SemanticVersionBuildWrapper.DEFAULT_ENVIRONMENT_VARIABLE_NAME;\n\t\t}", "public static String getPropertyValue(String filename,String variable) {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\t\tString result;\n\t\tString home = System.getProperty(\"conf.dir\");\n\t\ttry {\n\t\t\tinput = new FileInputStream(home+\"/\"+filename);\n\t\t\tprop.load(input);\n\t\t\tresult=prop.getProperty(variable);\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"Error occured while getting properties: \",e);\n\t\t\tresult=null;\n\t\t}\n\t\treturn result;\n\t}", "EnvironmentLoader getEnvironmentLoader();", "public String getRecordPath() {\n return recordPath;\n }", "public static String getEnvironmentVariableValue(String strVariable) {\r\n return System.getenv(strVariable);\r\n }", "String getConstant();", "public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }", "public String getDeviceNameGetPoint() {\n\t\treturn deviceNameGetPoint;\n\t}", "private void getEnvironment(Environment env, FileProcess file) {\n\t\tint t = 0;\n\t\tboolean setReg = false, setFlag = false, setMem = false;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn;\n\t\t\t} else if (temp.contains(\"Register\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\n\t\t\t\t\tenv.getRegister().setRegisterValue(r[0], new LongValue(Long.parseLong(r[1], 16)));\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tsetReg = true;\n\t\t\t} else if (temp.contains(\"Flag\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\n\t\t\t\t\tif (r[1].toLowerCase().contains(\"true\")) {\n\t\t\t\t\t\tenv.getFlag().setFlagValue(r[0], new BooleanValue(true));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tenv.getFlag().setFlagValue(r[0], new BooleanValue(false));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetFlag = true;\n\t\t\t} else if (temp.contains(\"Memory\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\t\t\t\t\tString addr = r[0].replace(\"0x\", \"\");\n\t\t\t\t\tlong x = Long.parseLong(addr, 16);\n\t\t\t\t\tbyte y = (byte) Long.parseLong(reduce(r[1], 8), 16);\n\t\t\t\t\tenv.getMemory().setByteMemoryValue(x, new LongValue(y));\n\t\t\t\t}\n\t\t\t\tsetMem = true;\n\t\t\t} \n\t\t\tt++;\n\t\t\t\n\t\t\tif (setReg && setFlag && setMem) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public String getWebEnv(int i){\n return this.webEnvs.get(i);\n }", "public com.google.protobuf.ByteString\n getCurrentPathBytes() {\n java.lang.Object ref = currentPath_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n currentPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getAttributeValue(WebDriver screenName, String ObjectxPath, String attributeName, String Element_Name)\n\t\t\tthrows Exception {\n\t\ttry {\n\t\t\tWebElement inputText = screenName.findElement(By.xpath(ObjectxPath));\n\t\t\tExtent_Reporting.Log_Pass(Element_Name + \" exist\", Element_Name + \" has \" + inputText.getText());\n\t\t\treturn inputText.getAttribute(attributeName);\n\t\t} catch (Throwable t) {\n\t\t\tExtent_Reporting.Log_Fail(Element_Name + \" does not Exist\", Element_Name + \" does not Exist\", screenName);\n\t\t\tt.printStackTrace();\n\t\t\tthrow new Exception(\"Element Not Present\");\n\t\t}\n\t}", "String constant();", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "private String get(String key)\n {\n return settings.getProperty(key);\n }", "public static File loadFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n String filePath = prefs.get(\"filePath\", null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getTermPath() {\r\n return (String) getAttributeInternal(TERMPATH);\r\n }", "protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "public String getString(String path) {\n return yml.getString(path);\n }", "public static String GetData(String key) throws Exception {\r\n PropertiesConfiguration properties;\r\n if (GetConfigData(\"getDataFromEnvironment\").equals(\"testEnvironment\")) {\r\n properties = new PropertiesConfiguration(\r\n System.getProperty(\"user.dir\") + \"//src//test//resource//dataRepo//testEnvironment.properties\");\r\n } else if (GetConfigData(\"getDataFromEnvironment\").equals(\"sandboxEnvironment\")) {\r\n properties = new PropertiesConfiguration(\r\n System.getProperty(\"user.dir\") + \"//src//test//resource//dataRepo//sandboxEnvironment.properties\");\r\n } else {\r\n throw new Exception(\"mentioned environment is not iplemented to get data\");\r\n }\r\n\r\n return properties.getString(key);\r\n }", "public String getSystemEnv() {\n return \"\";\n }" ]
[ "0.53734446", "0.51003605", "0.47997066", "0.47489768", "0.47349554", "0.47343892", "0.46541125", "0.46541062", "0.46541062", "0.46019194", "0.4594151", "0.45935872", "0.45808595", "0.45693222", "0.4558617", "0.4509688", "0.44934484", "0.44922724", "0.44725934", "0.44532967", "0.44350997", "0.4393987", "0.43694824", "0.43661773", "0.43288806", "0.4312115", "0.43058705", "0.42951506", "0.42916903", "0.4285619", "0.42813116", "0.42772207", "0.42410374", "0.42406428", "0.42381245", "0.42378306", "0.42366326", "0.42345405", "0.42286998", "0.42252225", "0.42205197", "0.42160657", "0.42149907", "0.42113245", "0.42047554", "0.41981944", "0.4191931", "0.4190403", "0.41837627", "0.41788995", "0.4176904", "0.41746455", "0.41706687", "0.41693962", "0.41679305", "0.41677794", "0.41677794", "0.4167508", "0.4166238", "0.4166238", "0.41642237", "0.41626853", "0.41575903", "0.4153655", "0.4152431", "0.41496903", "0.41488802", "0.4147525", "0.41370922", "0.4131314", "0.41283223", "0.41264156", "0.4124997", "0.41196156", "0.4119183", "0.4115267", "0.41064525", "0.41028002", "0.4096778", "0.40940735", "0.409209", "0.4085603", "0.40810412", "0.40732437", "0.40679896", "0.40671247", "0.40616637", "0.40595195", "0.40566412", "0.40518683", "0.40481138", "0.4047766", "0.40472618", "0.40469646", "0.40403292", "0.4040051", "0.40348694", "0.40197963", "0.40193704", "0.40166986" ]
0.6989275
0
Gets and returns the path of the folder where the part files resides for partName.
public static String getPartFolderPath(String partName) { return getRapidSmithPath() + File.separator + deviceFolderName + File.separator + PartNameTools.getFamilyNameFromPart(partName) + File.separator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n PartNameTools.removeSpeedGrade(partName) +\n deviceFileSuffix;\n }", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "public static String getPartFolderPath(FamilyType familyType) {\n familyType = PartNameTools.getBaseTypeFromFamilyType(familyType);\n return getRapidSmithPath() +\n File.separator +\n deviceFolderName +\n File.separator +\n familyType.toString().toLowerCase() +\n File.separator;\n }", "public static String getPrimitiveDefsFileName(String partName) {\n return getPartFolderPath(partName) + primitiveDefFileName;\n }", "String folderPath();", "public static String getAppFolder(String file_name) {\n return Environment.getExternalStorageDirectory().getAbsolutePath() + \"/Chitchato/\";\n }", "public Path resolve(String part) {\n return Paths.get(part);\n }", "public Part lookupPart(String partName) {\n for(Part part : allParts) {\n if(part.getName().equals(partName)) {\n return part;\n }\n }\n \n return null;\n }", "private String filenameHelper(String withFolder) {\n\t\tint pos = -1;\n\t\tfor (int k = 0; k < withFolder.length() - 1; k++) {\n\t\t\tif (withFolder.charAt(k) == '/') {\n\t\t\t\tpos = k;\n\t\t\t}\n\t\t}\n\t\tif (pos < 0)\n\t\t\treturn withFolder;\n\t\telse\n\t\t\treturn withFolder.substring(pos + 1);\n\t}", "public File getFolderNameToSave() {\n\t\tFile destDir = ctxt.getExternalFilesDir(Tattle_Config_Constants.SD_FOLDER_NAME + File.separator);\n\t\tif (!destDir.exists()) {\n\t\t\tdestDir.mkdir();\n\t\t}\n\t\treturn destDir;\n\t}", "public String getPath(String name) {\n int count = 0;\n File file = files.get(count);\n while(!file.getName().equals(name)) {\n if(count == files.size()) {\n return null;\n }\n file = files.get(++count);\n }\n return file.getAbsolutePath();\n }", "public static String folder(String filename) {\n return new File(filename).getParentFile().getAbsolutePath() + \"/\";\n }", "public Object getPart(String partName);", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public String getPathToJarFolder(){\n Class cls = ReadWriteFiles.class;\r\n ProtectionDomain domain = cls.getProtectionDomain();\r\n CodeSource source = domain.getCodeSource();\r\n URL url = source.getLocation();\r\n try {\r\n URI uri = url.toURI();\r\n path = uri.getPath();\r\n \r\n // get path without the jar\r\n String[] pathSplitArray = path.split(\"/\");\r\n path = \"\";\r\n for(int i = 0; i < pathSplitArray.length-1;i++){\r\n path += pathSplitArray[i] + \"/\";\r\n }\r\n \r\n return path;\r\n \r\n } catch (URISyntaxException ex) {\r\n LoggingAspect.afterThrown(ex);\r\n return null;\r\n }\r\n }", "public String getPath() {\n String result = \"\";\n Directory curDir = this;\n // Keep looping while the current directories parent exists\n while (curDir.parent != null) {\n // Create the full path string based on the name\n result = curDir.getName() + \"/\" + result;\n curDir = (Directory) curDir.getParent();\n }\n // Return the full string\n result = \"/#/\" + result;\n return result;\n }", "private String get_FilePath(String put, int ind) {\n\n File file = new File(put);\n File[] files = file.listFiles();\n\n try {\n if (files[ind].isFile()) {\n return files[ind].getAbsolutePath();\n }\n } catch (Exception e) {\n Log.d(TAG, \"Exception error : \" + e.getMessage());\n }\n return null;\n }", "private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}", "public static String getDir(String name) {\n\t\tint s = name.lastIndexOf(FILE_SEP);\n\t\treturn s == -1 ? null : name.substring(0, s);\n\t}", "private String extractFileName(Part part) {\n\t String contentDisp = part.getHeader(\"content-disposition\");\r\n\t String[] items = contentDisp.split(\";\");\r\n\t for (String s : items) {\r\n\t if (s.trim().startsWith(\"filename\")) {\r\n\t // C:\\file1.zip\r\n\t // C:\\Note\\file2.zip\r\n\t String clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t clientFileName = clientFileName.replace(\"\\\\\", \"/\");\r\n\t int i = clientFileName.lastIndexOf('/');\r\n\t // file1.zip\r\n\t // file2.zip\r\n\t return clientFileName.substring(i + 1);\r\n\t }\r\n\t }\r\n\t return null;\r\n\t }", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "java.lang.String getDirName();", "String getPathName();", "String getPathName();", "public static ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> partsContainingSubstring = FXCollections.observableArrayList();\n\n // The for loop variable to the left of the colon is a temporary variable containing a single element from the collection on the right\n // With each iteration through the loop, Java pulls the next element from the collection and assigns it to the temp variable.\n for (Part currentPart : Inventory.getAllParts()) {\n if (currentPart.getName().toLowerCase().contains(partName.toLowerCase())) {\n partsContainingSubstring.add(currentPart);\n }\n }\n return partsContainingSubstring;\n }", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "public static String filenamePart(String path) {\n char sep = System.getProperty(\"file.separator\", \"/\").charAt(0);\n int i = path.lastIndexOf(sep);\n return (i < 0)? path : path.substring(i+1);\n }", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public File getWorldFolder(String worldName);", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "String getPartitionName();", "String getPartitionName();", "public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }", "public static String getFamilyNameFromPart(String partName) {\n return getFamilyTypeFromPart(partName).toString().toLowerCase();\n }", "@Override\n\tpublic String getDirName() {\n\t\treturn StringUtils.substringBeforeLast(getLocation(), \"/\");\n\t}", "public String getPathName();", "public static String getExactFamilyNameFromPart(String partName) {\n return getExactFamilyTypeFromPart(partName).toString().toLowerCase();\n }", "static Path getOutputPath(Configuration conf, String name) {\n String root = conf.get(WORKING_DIR, \"tmp/reasoning\");\n return new Path(root + \"/\" + name);\n }", "public String getRelativePath() {\n if (repository == null) {\n return name;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(name);\n return b.toString();\n }\n }", "public static String getPath() {\n\t\t\n\t\tJFileChooser chooser = new JFileChooser();\n\t \tFileNameExtensionFilter filtroImagen =new FileNameExtensionFilter(\"*.TXT\", \"txt\");\n\t \tchooser.setFileFilter(filtroImagen);\n\t \tFile f = null;\n\t \t\n\t\ttry {\n\t\t\tf = new File(new File(\".\").getCanonicalPath());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString path = \"\";\n\t\t\n\t\ttry {\n\t\t\tchooser.setCurrentDirectory(f);\n\t\t\tchooser.setCurrentDirectory(null);\n\t\t\tchooser.showOpenDialog(null);\n\t \n\t\t\tpath = chooser.getSelectedFile().toString();\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t return path;\n\t}", "public static String generatePartitionPath(LinkedHashMap<String, String> partitionSpec) {\n if (partitionSpec.isEmpty()) {\n return \"\";\n }\n StringBuilder suffixBuf = new StringBuilder();\n int i = 0;\n for (Map.Entry<String, String> e : partitionSpec.entrySet()) {\n if (i > 0) {\n suffixBuf.append(Path.SEPARATOR);\n }\n suffixBuf.append(escapePathName(e.getKey()));\n suffixBuf.append('=');\n suffixBuf.append(escapePathName(e.getValue()));\n i++;\n }\n suffixBuf.append(Path.SEPARATOR);\n return suffixBuf.toString();\n }", "public static String findFileNameRoot(String cwlFilePath) {\r\n String cwlFileName = null;\r\n if (cwlFilePath != null) {\r\n cwlFileName = Paths.get(cwlFilePath).getFileName().toString();\r\n int suffixIndex = cwlFileName.lastIndexOf('.');\r\n if (suffixIndex != -1) {\r\n cwlFileName = cwlFileName.substring(0, suffixIndex);\r\n }\r\n }\r\n return cwlFileName;\r\n }", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "public static String getFolderName(String filePath) {\n\n if (isFileExist(filePath)) {\n return filePath;\n }\n\n int filePosi = filePath.lastIndexOf(File.separator);\n return (filePosi == -1) ? \"\" : filePath.substring(0, filePosi);\n }", "public String getPath() {\n if (foundNemo) {\n return path;\n } else {\n path = \"Uh Oh!! Could not find Nemo!!\";\n return path;\n }\n }", "String getFilepath();", "public String getFolder() {\n return myFolder;\n }", "private Path makeFilePath(String name) {\n Path baseFilePath = Paths.get(portManager.getBfp());\n if (name.length() > 4 && name.substring(name.length() - 5).equals(\".json\")) {\n return baseFilePath.resolve(name);\n } else {\n return baseFilePath.resolve(name + \".json\");\n }\n }", "public ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> namedParts = FXCollections.observableArrayList();\n for ( Part part : allParts ) {\n if(part.getName().toLowerCase().contains(partName.toLowerCase())) {\n namedParts.add(part);\n }\n }\n return namedParts;\n }", "public String getPath()\n\t{\n\t\tString previousPath = File.separator;\n\t\t\n\t\t//if there is a parent\n\t\tif(getParentDirectory() != null)\n\t\t{\n\t\t\t//write over the previous path with the parent's path and a slash\n\t\t\t// /path/to/parent\n\t\t\tpreviousPath = getParentDirectory().getPath() + File.separator;\n\t\t}\n\t\t//else- no parent, this is the root \"/\"\n\t\t\n\t\t//add the name, /path/to/parent/thisdir \n\t\treturn previousPath + getName();\t\t\n\t}", "protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }", "String getScratchDirectoryPath(String name);", "public String getPartNumber(int partNumber){\n if(partNumbers.size() > partNumber) return partNumbers.get(partNumber);\n else return null;\n }", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\n }", "Path getMainCatalogueFilePath();", "public String getPath();", "public String getPath();", "public String getPath();", "public static String GetLoLFolder() {\n\t\tFile file = null;\n String path = null;\n\t\ttry {\n\n JFileChooser chooser = new JFileChooser();\n chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n chooser.setDialogTitle(\"Please set your Location of \\\"lol.launcher.exe\\\"\");\n chooser.setBackground(Gui.myColor);\n chooser.setForeground(Color.LIGHT_GRAY);\n chooser.setFileFilter(new FileFilter() {\n public boolean accept(File f) {\n return f.getName().toLowerCase().endsWith(\"lol.launcher.exe\")\n || f.isDirectory();\n }\n\n public String getDescription() {\n return \"lol.launcher.exe(*.exe)\";\n }\n });\n int rueckgabeWert = chooser.showOpenDialog(null);\n if (rueckgabeWert == JFileChooser.APPROVE_OPTION) {\n file = chooser.getSelectedFile();\n if (file.getName().contains(\"lol.launcher.exe\")) {\n System.out.println(\"- Found League of Legends Installation\");\n path = chooser.getSelectedFile().getParent();\n File FilePath = new File(\"Path\");\n FileWriter writer;\n writer = new FileWriter(FilePath);\n writer.write(path);\n writer.flush();\n writer.close();\n } else {\n System.out\n .println(\"- No League of Legends Installation found :(\");\n path = \"No installation found\";\n }\n }\n } catch (IOException e)\n {\n logger.error(\"Write Error\");\n }\n\t\treturn path;\n\t}", "private String getDirectoryForBackup() {\n\t\tString backupPath = configurationService.getValue(BACKUP_FOLDER_CONFIG);\n\t\tif (backupPath == null) {\n\t\t\t// if backup path null throw error, backup folder must be set\n\t\t\tthrow new ResultCodeException(CoreResultCode.BACKUP_FOLDER_NOT_FOUND,\n\t\t\t\t\tImmutableMap.of(\"property\", BACKUP_FOLDER_CONFIG));\n\t\t}\n\t\t// apend script default backup folder\n\t\tbackupPath = backupPath + \"/\" + SCRIPT_DEFAULT_BACKUP_FOLDER;\n\t\t// add date folder\n\t\tZonedDateTime date = ZonedDateTime.now();\n\t\tDecimalFormat decimalFormat = new DecimalFormat(\"00\");\n\t\treturn backupPath + date.getYear() + decimalFormat.format(date.getMonthValue())\n\t\t\t\t+ decimalFormat.format(date.getDayOfMonth()) + \"/\";\n\t}", "private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }", "java.lang.String getFilePath();", "public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }", "File getTilePathBase();", "public Object folderPath() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().folderPath();\n }", "String getExternalPath(String path);", "public static String packageNameToPath(String pkgName) {\n \tif (pkgName == null) return null;\n \tString path = pkgName.replace('.', File.separatorChar);\n \treturn path;\n }", "public String pathToSave() {\n String path;\n File folder;\n do {\n System.out.print(\"Introduce la ruta en la que quieres guardar el fichero(separando directorios por guiones: directorio1-directorio2-directorio3): \");\n path = Utils.getString();\n path = String.valueOf(System.getProperty(\"user.dir\")).substring(0, 2) + \"\\\\\" + path.replace('-', '\\\\');\n folder = new File(path);\n if (!folder.exists()) {\n System.out.println(\"El directorio introducido no existe intentalo de nuevo...\");\n } else {\n if (!folder.isDirectory()) {\n System.out.println(\"Eso no es un directorio intentalo de nuevo...\");\n }\n }\n } while (!folder.exists() && !folder.isDirectory());\n return path;\n }", "private String setFileDestinationPath(){\n String filePathEnvironment = Environment.getExternalStorageDirectory().getAbsolutePath();\n Log.d(TAG, \"Full path edited \" + filePathEnvironment + \"/earwormfix/\" + generatedFilename + EXTENSION_JPG);\n return filePathEnvironment+ \"/earwormfix/\" + generatedFilename + EXTENSION_JPG;\n }", "public static String getFileName(Part part) {\n final String partHeader = part.getHeader(\"content-disposition\");\n for (String content : part.getHeader(\"content-disposition\").split(\";\")) {\n if (content.trim().startsWith(\"filename\")) {\n return content.substring(content.indexOf('=') + 1).trim()\n .replace(\"\\\"\", \"\");\n }\n }\n return \"\";\n }", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "public Path getOutputPath() {\n\t\t\n\t\tString name = getSimulationName();\t\t\n\t\tint l = name.length();\n\t\tString sim_name = name.substring(0, l-11); // \"_SIM_FOLDER\" contains 11 character\n\t\t\n\t\tPath path = Paths.get(outpath + \"\\\\\"+ sim_name);\n\t\tif(!Files.exists(path)) {\n\t\t try {\n\t\t Files.createDirectories(path);\n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t}\n\t\treturn path;\n\t}", "private static String getDirname(String pathToFile) {\n\t\tString result = null;\n\t\tPath originalFile = Paths.get(pathToFile);\n\t\tPath resultDir = originalFile.getParent();\n\t\tif(resultDir != null) {\n\t\t\tlogger.debug(\"A parent path exists: {}\", resultDir.toString());\n\t\t\tresultDir.normalize(); // remove redundant elements from the path\n\t\t\tresult = resultDir.toString() + \"/\";\n\t\t\tlogger.debug(\"Normalized parent path: {}\", result);\n\t\t}\n\t\treturn result;\n\t}", "String getDirectoryPath();", "public static String getOutputFolderName() {\n\t\treturn PropertiesFile.getSystemRoot()+PropertiesFile.getInstance().getProperty(\"default_folder\");\n\t}", "@Override\n\tpublic ArrayList<Product> findByName(String partName) {\n\t\tArrayList<Product> p = productRepository.findProductByName(partName);\n\t\treturn p;\n\t}", "public String getFolderPath(){\n\t\treturn folderPath;\n\t}", "public String getPath() {\n\t\treturn file.getPath();\n\t}", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "static String localPath(String name) {\n\t\tchar c = File.separatorChar;\n\t\treturn name.replace((char) (c ^ '/' ^ '\\\\'), c);\n\t}", "public String generateFileName(String midName)\r\n {\r\n return dir + nameBase + midName + nameSuffix;\r\n }", "private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}", "public String getWorkDirectory(){\n String wd = \"\";\n try {\n wd = new File(\"test.txt\").getCanonicalPath().replace(\"/test.txt\",\"\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return wd;\n }", "public static String getFileDirectory(String urlFileGenerated) {\r\n\r\n\t\tString result = \"\";\r\n\r\n\t\tif (urlFileGenerated != null) {\r\n\t\t\tresult = urlFileGenerated.substring(0, urlFileGenerated.lastIndexOf(\"/\") + 1);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\r\n\t}", "protected abstract String childFolderPath();", "public String getRelativePath();", "public static String getConfigFolder() {\n\t\tString progArg = System.getProperty(ConfigConstants.CONFIG_DIR_PROG_ARGUMENT);\n\t\tif (progArg != null) {\n\t\t\treturn progArg;\n\t\t} else {\n\t\t\treturn configFolder;\n\t\t}\n\t}", "public String getOutputFolder() {\n return txtOutputFolder().getText();\n }", "public String getFolderName() {\n return folderName;\n }", "private static String[] splitPartName(String partName) {\n if (partName == null) {\n partName = \"\";\n }\n\n int last_match = 0;\n LinkedList<String> splitted = new LinkedList<String>();\n Matcher m = partNamePattern.matcher(partName);\n while (m.find()) {\n if (!partName.substring(last_match, m.start()).trim().isEmpty()) {\n splitted.add(partName.substring(last_match, m.start()));\n }\n if (!m.group().trim().isEmpty()) {\n splitted.add(m.group());\n }\n last_match = m.end();\n }\n if (!partName.substring(last_match).trim().isEmpty()) {\n splitted.add(partName.substring(last_match));\n }\n return splitted.toArray(new String[splitted.size()]);\n }", "private String getOutputFolder(String path){\n\n //Remove the portion of the path which is prior to our repositories file path\n path = StringUtils.removeStart(FilenameUtils.getFullPath(path), REPOSITORY_LOCATION);\n //Return the path without leading and ending / and ensures the file path uses forward slashes instead of backslashes\n return StringUtils.strip(StringUtils.strip(path,\"/\"),\"\\\\\").replace(\"\\\\\", \"/\");\n }", "protected String path() {\n return path(getName());\n }", "private static String getDirectoryPath() {\n // Replace the path here with your own\n File file = new File(Environment.getExternalStorageDirectory(),\n \"/GenericAndroidSoundboard/Audio/\");\n // Create the directory if it doesn't exist\n if (!file.exists()) {\n file.mkdirs();\n }\n\n // Get the path to the newly created directory\n return Environment.getExternalStorageDirectory()\n .getAbsolutePath() + \"/GenericAndroidSoundboard/Audio/\";\n }", "public static Part lookupPart(int partId) {\n for (int index = 0; index < Inventory.getAllParts().size(); index++) {\n Part currentPart = Inventory.getAllParts().get(index);\n if (currentPart.getId() == partId) {\n return currentPart;\n }\n }\n return null;\n }" ]
[ "0.6738737", "0.6427651", "0.5890102", "0.56374556", "0.5606001", "0.5560412", "0.5544312", "0.5518548", "0.54512113", "0.5411386", "0.539669", "0.5375006", "0.5371152", "0.52963436", "0.52871317", "0.527435", "0.52723444", "0.5246153", "0.5245809", "0.52437174", "0.52283096", "0.52046317", "0.5191535", "0.5191535", "0.5167917", "0.51627696", "0.5149573", "0.5131892", "0.5131892", "0.5131892", "0.5131892", "0.5131892", "0.51256686", "0.5109505", "0.5109505", "0.5106479", "0.51018167", "0.51018167", "0.50966597", "0.50772834", "0.5076359", "0.50745255", "0.50735503", "0.5065588", "0.5060135", "0.5056544", "0.5046538", "0.50215256", "0.5016684", "0.50155324", "0.50116235", "0.5005965", "0.50034285", "0.5002902", "0.4997246", "0.4978515", "0.49767628", "0.49724108", "0.49660045", "0.49611193", "0.49545696", "0.49442646", "0.49442646", "0.49442646", "0.49294093", "0.4922716", "0.4912325", "0.4906645", "0.49036014", "0.48981938", "0.4896745", "0.48927906", "0.48888004", "0.4888054", "0.4886409", "0.48825932", "0.48821104", "0.48788527", "0.48778355", "0.48745033", "0.48710722", "0.4864769", "0.48639235", "0.48622048", "0.48571035", "0.48473805", "0.48454607", "0.4844069", "0.4822403", "0.48177278", "0.48171908", "0.48146462", "0.4805005", "0.47976846", "0.47950754", "0.47937325", "0.4785953", "0.478133", "0.47800127", "0.47781605" ]
0.82208693
0
Gets and returns the path of the folder where the family type resides.
public static String getPartFolderPath(FamilyType familyType) { familyType = PartNameTools.getBaseTypeFromFamilyType(familyType); return getRapidSmithPath() + File.separator + deviceFolderName + File.separator + familyType.toString().toLowerCase() + File.separator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object folderPath() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().folderPath();\n }", "String folderPath();", "public String getFolder() {\r\n return folder;\r\n }", "public String getFolder() {\n return myFolder;\n }", "public static String getWireEnumeratorFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + wireEnumeratorFileName;\n }", "public String getFolderName() {\n return owner.getName();\n }", "public String getFolderPath(){\n\t\treturn folderPath;\n\t}", "public String getFolderPath() {\n return folderPath;\n }", "public File getFolder() {\n return folder;\n }", "FileObject getBaseFolder();", "public static String getGameFolder() {\n\t\treturn gameFolder;\n\t}", "String getDirectoryPath();", "public String getFamilyRoot(String familyId);", "public static String getUserFolder() {\n\n String sPath;\n String sConfDir;\n\n \n // default is to use system's home folder setting\n sPath = System.getProperty(\"user.home\") + File.separator + \"sextante\"; \n \n // check if SEXTANTE.confDir has been set\n sConfDir = System.getProperty(\"SEXTANTE.confDir\"); \t\n if ( sConfDir != null ) {\n \t sConfDir = sConfDir.trim();\n \t \tif ( sConfDir.length() > 0 ) {\n \t \t\t// check if we have to append a separator char\n \t \t\tif ( sConfDir.endsWith(File.separator) ) {\n \t \t\t\tsPath = sConfDir;\n \t \t\t} else {\n \t \t\t\tsPath = sConfDir + File.separator;\n\t\t\t\t}\n\t\t\t}\n }\n\n final File sextanteFolder = new File(sPath);\n if (!sextanteFolder.exists()) {\n \t sextanteFolder.mkdir();\n }\n return sPath;\n\n }", "public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }", "public static String getGeneratorOutputFolder() {\n\t\treturn getOutputFolderName() + \"/\" + PropertiesFile.getInstance().getProperty(\"output_qualifier\");\n\t}", "public FileObject getFolder() {\r\n return folder;\r\n }", "public String getPath() {\n switch(this) {\n case USER: return \"users\";\n case GROUP: return \"groups\";\n case CLIENT: return \"clients\";\n case IDP: return \"identity-provider-settings\";\n case REALM_ROLE: return \"realms\";\n case CLIENT_ROLE: return \"clients\";\n default: return \"\";\n }\n }", "public Folder getFolder() {\n\t\treturn folder;\n\t}", "public String getDir();", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "public BoxFolder.Info getFolder() {\n return this.folder;\n }", "public java.lang.String getFolderId() {\n java.lang.Object ref = folderId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n folderId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getFolderId() {\n java.lang.Object ref = folderId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n folderId_ = s;\n return s;\n }\n }", "public BoxFolder getFolder() {\n return mFolder;\n }", "public String getFolderName() {\n return folderName;\n }", "protected String getSahiFolder() {\n String packageName = \"/sahi\";\n Path sahHomeFolder = resolveResource(AbstractSakuliTest.class, packageName);\n if (Files.exists(sahHomeFolder)) {\n return sahHomeFolder.normalize().toAbsolutePath().toString();\n }\n throw new SakuliRuntimeException(\"Cannot load SAHI_HOME folder! Should be normally under 'target/classes/\" + packageName + \"'\");\n }", "java.lang.String getFolderId();", "String getDir();", "public String getDirectory() {\n return directoryProperty().get();\n }", "public Path getRepositoryGroupBaseDir();", "public Folder getFolder() {\n\t\treturn null;\n\t}", "private static String getFolderName (\n String[] mimeTypes, \n String profile\n ) {\n StringBuffer sb = new StringBuffer ();\n sb.append (\"Editors\");\n int i, k = mimeTypes.length;\n for (i = 0; i < k; i++)\n sb.append ('/').append (mimeTypes [i]);\n if (profile != null)\n sb.append ('/').append (profile);\n return sb.append ('/').toString ();\n }", "protected abstract String childFolderPath();", "public String getOutputFolder() {\n return txtOutputFolder().getText();\n }", "public String getPath();", "public String getPath();", "public String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public Collection<PersonalFolder> getFolderPath() {\r\n\t\treturn folderPath;\r\n\t}", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "private File getFolder() throws FileNotFoundException, IOException {\n File folder = getConfigurationFolder(new File(\".\").getCanonicalFile());\n if (!folder.isDirectory()) {\n folder = getConfigurationFolder(new File(getInstallationFolder().getPath())\n .getCanonicalFile().getParentFile().getParentFile());\n }\n\n return folder;\n }", "java.lang.String getDirName();", "public File getFolderNameToSave() {\n\t\tFile destDir = ctxt.getExternalFilesDir(Tattle_Config_Constants.SD_FOLDER_NAME + File.separator);\n\t\tif (!destDir.exists()) {\n\t\t\tdestDir.mkdir();\n\t\t}\n\t\treturn destDir;\n\t}", "@Override\n\tpublic File getHieraFolder() {\n\t\t\n\t\tString hieraFolder = Configuration.getHieraFolder();\n\t\tif (hieraFolder != null) {\n\t\t\tFile file = new File(hieraFolder);\n\t\t\tif (! file.exists()){\n\t\t\t\tthrow new RuntimeException(\"Hiera folder '\"+file.getAbsolutePath()+\"' specified with property '\"+Configuration.DEPLOYMENT_CONFIG_HIERA_FOLDER+\"' does not exist.\");\n\t\t\t}\n\t\t\treturn file;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\t// this is a bit hidden. But it shouldn't be created when we run tests\n\t\t\t\t// and the if here tells us if we are in a test.\n\t\t\t\tgitManager = new EMGitManager(jobId, getApplicationVersion(applicationShortName).getRelatedJiraIssue(), organisation);\n\t\t\t\tgitManager.checkoutHiera();\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(\"Git failed during making the checkout branch, fatal\", e);\n\t\t\t}\n\t\t\treturn gitManager.getCheckoutDir();\n\t\t}\n\t}", "public static String getOutputFolderName() {\n\t\treturn PropertiesFile.getSystemRoot()+PropertiesFile.getInstance().getProperty(\"default_folder\");\n\t}", "public String getVillageFolderName() {\n\t\treturn folderName;\n\t}", "public URI getAbsoluteLobFolder();", "public URI getLobFolder();", "@DISPID(1610743810) //= 0x60020002. The runtime will prefer the VTID if present\r\n @VTID(9)\r\n uic.prominent.ScreenLogging.wsh.Folder folder();", "public FileObject getWsDDFolder();", "public static String getConfigFolder() {\n\t\tString progArg = System.getProperty(ConfigConstants.CONFIG_DIR_PROG_ARGUMENT);\n\t\tif (progArg != null) {\n\t\t\treturn progArg;\n\t\t} else {\n\t\t\treturn configFolder;\n\t\t}\n\t}", "public File getWorldFolder(String worldName);", "public String getDirectoryPath() {\n return EXTERNAL_PATH;\n }", "FsPath baseDir();", "public String getPath() {\n if (foundNemo) {\n return path;\n } else {\n path = \"Uh Oh!! Could not find Nemo!!\";\n return path;\n }\n }", "public String getPath (Class<?> cn) {\n return PATH + cn.getSimpleName().toLowerCase() + FILE_EXTENSION;\n }", "public Stem getInheritedFromFolder() {\r\n \r\n return this.inheritedFromFolderIdString == null ? null : GrouperDAOFactory.getFactory().getStem().findByUuid(this.inheritedFromFolderIdString, false);\r\n\r\n }", "public String directory () {\n\t\treturn directory;\n\t}", "java.io.File getBaseDir();", "String getFamily();", "String getFamily();", "public static String getOutputFolder() {\n\n if ((m_sOutputFolder == null) || m_sOutputFolder.trim().equals(\"\")) {\n return System.getProperty(\"user.home\");\n }\n else {\n return m_sOutputFolder;\n }\n\n }", "public File getDirectory() {\n\t\treturn file.getParentFile();\n\t}", "public static String getPrimitiveDefsFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + primitiveDefFileName;\n }", "com.google.apps.drive.activity.v2.DriveItem.DriveFolder getDriveFolder();", "public String getDestinationFolder()\n\t{\n\t\treturn destinationFolder;\n\t}", "public static String getMangaFolder(Context context) {\n if (Environment.getExternalStorageState() == Environment.MEDIA_MOUNTED) {\n return context.getExternalFilesDir(null) + File.separator\n + Constants.INSTANCE.getMANGAFOLDER();\n } else {\n return context.getFilesDir() + File.separator\n + Constants.INSTANCE.getMANGAFOLDER();\n }\n }", "public String getRootFolder() {\n return m_RootFolder;\n }", "public String getPathName();", "@Override\n\tpublic String getGANModelDirectory() {\n\t\treturn GANProcess.PYTHON_BASE_PATH+\"LodeRunnerGAN\";\n\t}", "public static String getFolderType(String dir) {\n\t\treturn FOLDERTYPES.get(dir);\n\t}", "private static String getRioHomeDirectory() {\n String rioHome = RioHome.get();\n if(!rioHome.endsWith(File.separator))\n rioHome = rioHome+File.separator;\n return rioHome;\n }", "public static String getRootFolderName() {\n\n return rootFolderName;\n }", "public String getSearchPath() {\n String path = null;\n if (parent != null) {\n path = parent.getSearchPath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"%s\", name);\n }\n return path;\n }", "public Path getDataDirectory();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getFolderIdBytes() {\n java.lang.Object ref = folderId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n folderId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public abstract String getPath();", "public abstract String getPath();", "String getPathName();", "String getPathName();", "public GuiStem getGuiFolderWithSettings() {\n if (this.grouperObjectTypesAttributeValue == null) {\n return null;\n }\n \n String stemId = this.grouperObjectTypesAttributeValue.getObjectTypeOwnerStemId();\n Stem stem = GrouperDAOFactory.getFactory().getStem().findByUuid(stemId, false);\n \n if (stem == null) {\n return null;\n }\n \n return new GuiStem(stem);\n }", "@Nullable String getPath();", "@Override\n\tpublic String getDirName() {\n\t\treturn StringUtils.substringBeforeLast(getLocation(), \"/\");\n\t}", "public String getLocalRepositoryRootFolder() {\n\t\tString userFolder = IdatrixPropertyUtil.getProperty(\"idatrix.local.reposity.root\",getRepositoryRootFolder() );\n\t\tint index = userFolder.indexOf(\"://\");\n\t\tif(index > -1 ) {\n\t\t\tuserFolder = userFolder.substring(index+3);\n\t\t}\n\t\treturn userFolder;\n\t}", "private NodeRef getCaseFolder(){\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n List<String> pathElements = new ArrayList<String>();\n pathElements.add(TradeMarkModel.CABINET_FOLDER_NAME);\n pathElements.add(TradeMarkModel.CASE_FOLDER_NAME);\n NodeRef nr = null;\n try {\n nr = fileFolderService.resolveNamePath(repositoryHelper.getCompanyHome(), pathElements).getNodeRef();\n } catch (FileNotFoundException e) {\n if(LOG.isInfoEnabled()){\n LOG.info(e.getMessage(), e);\n } \n LOG.error(e.getMessage(), e);\n }\n return nr;\n }", "public String getInheritedFromFolderIdString() {\r\n return this.inheritedFromFolderIdString;\r\n }", "public String getFolderId() {\n return folderId;\n }", "public com.google.protobuf.ByteString\n getFolderIdBytes() {\n java.lang.Object ref = folderId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n folderId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getFolderId() {\r\n return folderId;\r\n }", "public String getRepositoryRootFolder() {\n\t\tString userFolder = UnixPathUtil.unixPath(IdatrixPropertyUtil.getProperty(\"idatrix.metadata.reposity.root\",\"/data/ETL/reposity/\"));\n\t\tif (CloudApp.getInstance().getRepository() instanceof KettleFileRepository) {\n\t\t\tKettleFileRepository fileRepo = (KettleFileRepository) CloudApp.getInstance().getRepository();\n\t\t\tuserFolder = fileRepo.getRepositoryMeta().getBaseDirectory();\n\t\t}\n\t\treturn userFolder;\n\t}", "@Override\n public String getFolderSegment() {\n if (mValue != null) {\n return getFolderSegment(mValue);\n }\n\n return \"\"; //$NON-NLS-1$\n }", "public String getLocationPath();", "public String getPath() {\n String result = \"\";\n Directory curDir = this;\n // Keep looping while the current directories parent exists\n while (curDir.parent != null) {\n // Create the full path string based on the name\n result = curDir.getName() + \"/\" + result;\n curDir = (Directory) curDir.getParent();\n }\n // Return the full string\n result = \"/#/\" + result;\n return result;\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}" ]
[ "0.72026557", "0.65829694", "0.63535255", "0.63306123", "0.6173868", "0.6159837", "0.6138848", "0.6128212", "0.61078364", "0.6086962", "0.6085208", "0.5951799", "0.591318", "0.5906158", "0.5905738", "0.58979356", "0.5877598", "0.5865675", "0.5861688", "0.58572716", "0.58516437", "0.5846489", "0.5842848", "0.5798415", "0.5771159", "0.574332", "0.5739401", "0.57381755", "0.5735826", "0.5726028", "0.57237405", "0.5708817", "0.57051885", "0.57042474", "0.570139", "0.56790143", "0.56790143", "0.56790143", "0.567818", "0.567818", "0.567818", "0.567818", "0.567818", "0.5660575", "0.56518716", "0.5646519", "0.56392235", "0.5637826", "0.5619873", "0.5604238", "0.56033415", "0.5602004", "0.56006324", "0.55986005", "0.5596535", "0.55870885", "0.55734134", "0.55643344", "0.5560159", "0.55522186", "0.55500066", "0.5549468", "0.5546277", "0.55345345", "0.5534423", "0.5534423", "0.55307037", "0.5523106", "0.55076313", "0.5501906", "0.5495679", "0.54888463", "0.5483376", "0.54793686", "0.5476236", "0.5472025", "0.546984", "0.54632306", "0.54537815", "0.54358065", "0.54307556", "0.54188865", "0.54188865", "0.5417334", "0.5417334", "0.5416715", "0.5416201", "0.54085195", "0.5408299", "0.54081225", "0.5399325", "0.53985804", "0.53927517", "0.5387206", "0.5375042", "0.53553694", "0.5352083", "0.5350365", "0.53496367", "0.53492" ]
0.76652884
0
Gets the device file path and name for the given partName.
public static String getDeviceFileName(String partName) { return getPartFolderPath(partName) + PartNameTools.removeSpeedGrade(partName) + deviceFileSuffix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getPartFolderPath(String partName) {\n return getRapidSmithPath() +\n File.separator +\n deviceFolderName +\n File.separator +\n PartNameTools.getFamilyNameFromPart(partName) +\n File.separator;\n }", "public static String getDeviceVersion(String partName) {\n String fileName = getDeviceFileName(partName);\n String version;\n try {\n Hessian2Input his = FileTools.getInputStream(fileName);\n version = his.readString();\n his.close();\n } catch (FileNotFoundException e) {\n return null;\n } catch (IOException e) {\n return null;\n }\n\n return version;\n }", "public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade(partName);\n Device device = Device.getInstance(canonicalName);\n String path = getDeviceFileName(canonicalName);\n\n // Don't reload the device if same part is already loaded\n if (device.getPartName() != null) {\n return device;\n }\n\n if (!device.readDeviceFromCompactFile(path)) {\n return null;\n } else {\n return device;\n }\n }", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "public static String getPrimitiveDefsFileName(String partName) {\n return getPartFolderPath(partName) + primitiveDefFileName;\n }", "public Object getPart(String partName);", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String extractFileName(Part part) {\n\t String contentDisp = part.getHeader(\"content-disposition\");\r\n\t String[] items = contentDisp.split(\";\");\r\n\t for (String s : items) {\r\n\t if (s.trim().startsWith(\"filename\")) {\r\n\t // C:\\file1.zip\r\n\t // C:\\Note\\file2.zip\r\n\t String clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t clientFileName = clientFileName.replace(\"\\\\\", \"/\");\r\n\t int i = clientFileName.lastIndexOf('/');\r\n\t // file1.zip\r\n\t // file2.zip\r\n\t return clientFileName.substring(i + 1);\r\n\t }\r\n\t }\r\n\t return null;\r\n\t }", "public static String getFamilyNameFromPart(String partName) {\n return getFamilyTypeFromPart(partName).toString().toLowerCase();\n }", "public static String getExactFamilyNameFromPart(String partName) {\n return getExactFamilyTypeFromPart(partName).toString().toLowerCase();\n }", "public Path resolve(String part) {\n return Paths.get(part);\n }", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\n }", "String getPathName();", "String getPathName();", "public DevicePath getDevicePath(Device device);", "private String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }", "public static String getFileName(Part part) {\n final String partHeader = part.getHeader(\"content-disposition\");\n for (String content : part.getHeader(\"content-disposition\").split(\";\")) {\n if (content.trim().startsWith(\"filename\")) {\n return content.substring(content.indexOf('=') + 1).trim()\n .replace(\"\\\"\", \"\");\n }\n }\n return \"\";\n }", "public String name() {\n return (parts.length > 0) ? parts[parts.length - 1] : null;\n }", "private String extractFileName(final Part part) {\n\t\tfinal String contentDisp = part.getHeader(\"content-disposition\");\n\t\tfinal String[] items = contentDisp.split(\";\");\n\t\tfor (final String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length()-1);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public String getPathName();", "private String extractFileName(Part part) {\n String contentDisp = part.getHeader(\"content-disposition\");\n String[] items = contentDisp.split(\";\");\n for (String s : items) {\n if (s.trim().startsWith(\"filename\")) {\n return s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n }\n }\n return \"\";\n }", "private String extractFileName(Part part) {\n String contentDisp = part.getHeader(\"content-disposition\");\n String[] items = contentDisp.split(\";\");\n for (String s : items) {\n if (s.trim().startsWith(\"filename\")) {\n return s.substring(s.indexOf(\"=\") + 2, s.length()-1);\n }\n }\n return \"\";\n }", "String getDiskFileName();", "public static String filenamePart(String path) {\n char sep = System.getProperty(\"file.separator\", \"/\").charAt(0);\n int i = path.lastIndexOf(sep);\n return (i < 0)? path : path.substring(i+1);\n }", "private String getFilePath(int tenantId, String transportAdaptorName) {\n\n if (transportAdaptorFileMap.size() > 0) {\n List<InputTransportAdaptorFile> inputTransportAdaptorFileList = transportAdaptorFileMap.get(tenantId);\n if (inputTransportAdaptorFileList != null) {\n for (InputTransportAdaptorFile inputTransportAdaptorFile : inputTransportAdaptorFileList) {\n if ((inputTransportAdaptorFile.getTransportAdaptorName().equals(transportAdaptorName))) {\n return inputTransportAdaptorFile.getFilePath();\n }\n }\n }\n }\n return null;\n }", "private String grabNameFile(String absPath)\n {\n \t\n \t// parse filename from absolute path\n \tString[] delimSlashes = absPath.split(\"/\");\n \tString fn = delimSlashes[delimSlashes.length - 1];\n \tif (fn.substring(0, 5).equals(\"files\"))\n \t{\n \t\tfn = fn.substring(5); // removes \"files\" from the beginning which is prepended by the Android Beam API\n \t}\n \t\n \t// split string based on underscores\n \tString[] result = fn.split(\"_\");\n \t\n \tif (result.length < 3)\n \t{\n \t\t//error, this means first/last name wasn't appended\n \t\treturn null;\n \t}\n \t\n \t// the order of the names is (last,first) when sent by the sender:\n \tmFirstName = result[1];\n \tmLastName = result[0];\n \t\n \treturn fn;\n }", "public String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "private String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length()-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public String getDeviceName() {\r\n return name_;\r\n }", "public Part lookupPart(String partName) {\n for(Part part : allParts) {\n if(part.getName().equals(partName)) {\n return part;\n }\n }\n \n return null;\n }", "String getPartWithPort();", "public static By getContactNameInLLInfo(String partNum){\n\t\t return By.xpath(\"//p[contains(.,'Insight Part #: \"+partNum+\"')]/following::div[@class='row expanded is-collapse-child'][1]//input[@name='licenseInformation.CONTACT_NAME']\");\n\t }", "private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}", "public String getName() {\n int index = getSplitIndex();\n return path.substring(index + 1);\n }", "private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "private static String[] splitPartName(String partName) {\n if (partName == null) {\n partName = \"\";\n }\n\n int last_match = 0;\n LinkedList<String> splitted = new LinkedList<String>();\n Matcher m = partNamePattern.matcher(partName);\n while (m.find()) {\n if (!partName.substring(last_match, m.start()).trim().isEmpty()) {\n splitted.add(partName.substring(last_match, m.start()));\n }\n if (!m.group().trim().isEmpty()) {\n splitted.add(m.group());\n }\n last_match = m.end();\n }\n if (!partName.substring(last_match).trim().isEmpty()) {\n splitted.add(partName.substring(last_match));\n }\n return splitted.toArray(new String[splitted.size()]);\n }", "private String extractFileName(Part part) {\n\nString contentDisp = part.getHeader(\"content-disposition\");\n\nString[] items = contentDisp.split(\";\");\n\nfor (String s : items) {\n\nif (s.trim().startsWith(\"filename\")) {\n\nreturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\n}\n\n}\n\nreturn \"\";\n\n}", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "public String getFile(Element temp){\r\n\t\t//Element temp = getPlace(where,\"Characters\");\r\n\t\treturn temp.getChildText(\"Path\") + temp.getChildText(\"File\");\r\n\t}", "public static String generatePartitionPath(LinkedHashMap<String, String> partitionSpec) {\n if (partitionSpec.isEmpty()) {\n return \"\";\n }\n StringBuilder suffixBuf = new StringBuilder();\n int i = 0;\n for (Map.Entry<String, String> e : partitionSpec.entrySet()) {\n if (i > 0) {\n suffixBuf.append(Path.SEPARATOR);\n }\n suffixBuf.append(escapePathName(e.getKey()));\n suffixBuf.append('=');\n suffixBuf.append(escapePathName(e.getValue()));\n i++;\n }\n suffixBuf.append(Path.SEPARATOR);\n return suffixBuf.toString();\n }", "public static String getFilename (int cid) {\n \tint count = 0;\n\t\tint num = cid;\n\t\tString filename=\"/part-r-\";\n\t\tif (num == 0)\n\t\t\tfilename=\"/part-r-00000\";\n\t\telse {\n // TODO\n // ------------------------------------------------------\n //\n // ------------------------------------------------------\n\t\t}\n\t\treturn filename;\n\t}", "public String name(int pos) {\n if (0 <= pos && pos < parts.length) {\n return parts[pos];\n } else {\n return null;\n }\n }", "String getDeviceName();", "public String getDeviceNameGetPoint() {\n\t\treturn deviceNameGetPoint;\n\t}", "String getPartitionName();", "String getPartitionName();", "public String getDeviceNameForMacro() {\r\n String name = getDeviceName();\r\n\r\n if(name.startsWith(\"PIC32\")) {\r\n return name.substring(3); // \"32MX795F512L\"\r\n } else if(name.startsWith(\"ATSAM\")) {\r\n return name.substring(2); // \"SAME70Q21\"\r\n } else {\r\n return name;\r\n }\r\n }", "public String getParsedFileName(String name, int index) {\r\n\t\t// We split until the first 3 (4-1) underscores.\r\n\t\tString[] parsedText = name.split(\"_\", 4);\r\n\r\n\t\t// format: latency_estclk_luts_filename\r\n\t\t// format: 0_1_2_3\r\n\t\tswitch (index) {\r\n\t\tcase 0:\r\n\t\t\t// We return the latency.\r\n\t\t\treturn parsedText[0];\r\n\t\tcase 1:\r\n\t\t\t// We return the estimated clock.\r\n\t\t\treturn parsedText[1];\r\n\t\tcase 2:\r\n\t\t\t// We return the luts.\r\n\t\t\treturn parsedText[2];\r\n\t\tcase 3:\r\n\t\t\t// We return the file name.\r\n\t\t\treturn parsedText[3];\r\n\t\tdefault:\r\n\t\t\treturn (\"Out of bounds in getParsedFileName\");\r\n\t\t}\r\n\t}", "private String getFilename() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String filename = getExternalStoragePublicDirectory(DIRECTORY_PICTURES).getPath().toString() + \"/\" + timeStamp + \".jpg\";\n\n return filename;\n }", "public String getPartNumber(int partNumber){\n if(partNumbers.size() > partNumber) return partNumbers.get(partNumber);\n else return null;\n }", "@Override\r\n public String getBaseName() {\r\n if (baseName == null) {\r\n final int idx = getPath().lastIndexOf(SEPARATOR_CHAR);\r\n if (idx == -1) {\r\n baseName = getPath();\r\n } else {\r\n baseName = getPath().substring(idx + 1);\r\n }\r\n }\r\n\r\n return baseName;\r\n }", "public String getPathName()\n \t{\n \t\tif ( arcname!=null )\n \t\t\treturn arcname + ARC_SEPARATOR + pathname;\n \t\treturn pathname;\n \t}", "private Path makeFilePath(String name) {\n Path baseFilePath = Paths.get(portManager.getBfp());\n if (name.length() > 4 && name.substring(name.length() - 5).equals(\".json\")) {\n return baseFilePath.resolve(name);\n } else {\n return baseFilePath.resolve(name + \".json\");\n }\n }", "private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}", "public String getDeviceName() {\n return mUsbDevice.getDeviceName();\n }", "public String getPathName() {\n\t\treturn pathName;\n\t}", "@Override\n\tpublic PartInfo getPartInfoBy(long partId) {\n\t\treturn this.simpleDao.getPartInfoBy(partId);\n\t}", "java.lang.String getFilePath();", "public static ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> partsContainingSubstring = FXCollections.observableArrayList();\n\n // The for loop variable to the left of the colon is a temporary variable containing a single element from the collection on the right\n // With each iteration through the loop, Java pulls the next element from the collection and assigns it to the temp variable.\n for (Part currentPart : Inventory.getAllParts()) {\n if (currentPart.getName().toLowerCase().contains(partName.toLowerCase())) {\n partsContainingSubstring.add(currentPart);\n }\n }\n return partsContainingSubstring;\n }", "public Part getPart(String name) throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form.getPart(name);\n }", "java.lang.String getDisk();", "public String getFullPathName() {\r\n return fullPathName;\r\n }", "@Override\n\tpublic ArrayList<Product> findByName(String partName) {\n\t\tArrayList<Product> p = productRepository.findProductByName(partName);\n\t\treturn p;\n\t}", "private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }", "protected String extractProductName(String record) {\n var payload = new JSONObject(record);\n if (payload.has(\"payload\")) {\n payload = payload.getJSONObject(\"payload\");\n }\n JSONArray array1 = payload.getJSONArray(\"files\");\n logger.info(\"Product name:\");\n for (int j = 0; j < array1.length(); j++) {\n JSONObject obj2 = array1.getJSONObject(j);\n //System.out.println(obj2);\n if (obj2.has(\"productName\")){\n String productName = obj2.getString(\"productName\");\n System.out.println(productName);\n return productName;\n }\n }\n System.out.println(\"Product name not retrieved.\");\n return null;\n }", "java.lang.String getFilename();", "java.lang.String getFilename();", "public java.lang.String getPart()\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(PART$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\n public IndexPartStatistics getIndexPartStatistics(String part) {\n IndexPartStatistics stats = this.currentMemoryIndex.getIndexPartStatistics(part);\n for (DiskIndex di : this.geometricParts.getIndexes()) {\n stats.add(di.getIndexPartStatistics(part));\n }\n // fix the part name\n stats.partName = part;\n return stats;\n }", "public String extractName(String line) {\n\t\t// Linux case\n\t\tif (line.contains(\"/\")) {\n\t\t\treturn line.substring(line.lastIndexOf(\"/\") + 1, line.indexOf(\".\"));\n\t\t}\n\t\t// Root dir case\n\t\treturn line.substring(1, line.indexOf(\".\")).trim();\n\t}", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "String getScratchDirectoryPath(String name);", "private String getUserConfiguredDeviceName() {\n\t\tString nameFromSystemDevice = Settings.Secure.getString(getContentResolver(), \"device_name\");\n\t\tif (!isEmpty(nameFromSystemDevice)) return nameFromSystemDevice;\n\t\treturn null;\n\t}", "public Part getPartPorUID(String text) throws RemoteException;", "@DISPID(77)\r\n\t// = 0x4d. The runtime will prefer the VTID if present\r\n\t@VTID(75)\r\n\tjava.lang.String fullPath();", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "public static String m19634b() {\n String str;\n try {\n str = Environment.getExternalStorageDirectory().getAbsolutePath();\n } catch (Throwable unused) {\n str = null;\n }\n return str == null ? \"\" : str.trim();\n }", "public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }", "public String getMountedObbPath(String rawPath) throws RemoteException;", "public static String getFilePath(int index) {\n Logger.d(TAG, \"getFilePath() entry\");\n Cursor cursor = null;\n String filePath = null;\n try {\n cursor =\n mContext.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null, null);\n cursor.moveToFirst();\n for (int i = 0 ; i < index ; i++) {\n cursor.moveToNext();\n }\n filePath = cursor.getString(cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA));\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n Logger.d(TAG, \"getFilePath() exit with the file path \" + filePath);\n return filePath;\n }", "public org.apache.xmlbeans.XmlNCName xgetPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNCName target = null;\n target = (org.apache.xmlbeans.XmlNCName)get_store().find_element_user(PART$2, 0);\n return target;\n }\n }", "public String getSimpleName() { return FilePathUtils.getFileName(_name); }", "@DISPID(76)\r\n\t// = 0x4c. The runtime will prefer the VTID if present\r\n\t@VTID(74)\r\n\tjava.lang.String path();", "public String part1() {\n return \"Part1\";\n }", "public String getFilePath(int fileidx) {\n return null;\r\n }", "static String localPath(String name) {\n\t\tchar c = File.separatorChar;\n\t\treturn name.replace((char) (c ^ '/' ^ '\\\\'), c);\n\t}", "public String getName() {\n return dtedDir + \"/\" + filename;\n }", "@DISPID(35)\r\n\t// = 0x23. The runtime will prefer the VTID if present\r\n\t@VTID(40)\r\n\tjava.lang.String fullPath();", "String getSnapshotDiskFileName();", "public String getMountedObbPath(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_getMountedObbPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }", "private String get_FilePath(String put, int ind) {\n\n File file = new File(put);\n File[] files = file.listFiles();\n\n try {\n if (files[ind].isFile()) {\n return files[ind].getAbsolutePath();\n }\n } catch (Exception e) {\n Log.d(TAG, \"Exception error : \" + e.getMessage());\n }\n return null;\n }", "public String getAppPathname();", "public String path(File f) {\r\n int sep = f.toString().lastIndexOf(\"\\\\\");\r\n return f.toString().substring(0, sep);\r\n }", "public ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> namedParts = FXCollections.observableArrayList();\n for ( Part part : allParts ) {\n if(part.getName().toLowerCase().contains(partName.toLowerCase())) {\n namedParts.add(part);\n }\n }\n return namedParts;\n }", "private String createScreenshotFilePath() {\n String fileName = new SimpleDateFormat(FILE_NAME_FORMAT).format(new Date());\n String filePath = MainMenu.PUBLIC_EXTERNAL_PICTURES_ORION_PATH + fileName;\n return filePath;\n }" ]
[ "0.71155334", "0.65394896", "0.6423224", "0.62183785", "0.5649399", "0.5603163", "0.5597417", "0.5597417", "0.55936825", "0.546949", "0.54440963", "0.5432678", "0.54264945", "0.5361976", "0.5361976", "0.5358276", "0.53270566", "0.5312807", "0.53097844", "0.52790415", "0.52738297", "0.52424484", "0.5225771", "0.52147824", "0.52092534", "0.5206428", "0.52005297", "0.5167857", "0.51664937", "0.5158042", "0.51530284", "0.51428515", "0.5122427", "0.50707585", "0.50686705", "0.5065182", "0.5022986", "0.5010805", "0.5009222", "0.5006131", "0.49900773", "0.4988593", "0.4988043", "0.49761647", "0.49617156", "0.49522042", "0.49499303", "0.49495178", "0.494029", "0.4911567", "0.4911567", "0.4905887", "0.49000302", "0.4899639", "0.48877275", "0.48826438", "0.4882064", "0.4874745", "0.486559", "0.4848138", "0.4840495", "0.48368946", "0.4833111", "0.4831122", "0.48225102", "0.48099485", "0.47974446", "0.47963962", "0.47959262", "0.47822443", "0.47760183", "0.47760183", "0.47680196", "0.4764643", "0.47552925", "0.4750734", "0.4742319", "0.473579", "0.47343892", "0.4733413", "0.4721527", "0.47173452", "0.4704693", "0.47030303", "0.4701143", "0.47000092", "0.46974203", "0.4689935", "0.46679148", "0.4653672", "0.46528107", "0.46492678", "0.4643256", "0.46349302", "0.4631084", "0.4625668", "0.46244937", "0.46194077", "0.4619042", "0.46045128" ]
0.824896
0
Loads the appropriate Device file based on the part name. Accounts for speed grade in file name.
public static Device loadDevice(String partName) { String canonicalName = PartNameTools.removeSpeedGrade(partName); Device device = Device.getInstance(canonicalName); String path = getDeviceFileName(canonicalName); // Don't reload the device if same part is already loaded if (device.getPartName() != null) { return device; } if (!device.readDeviceFromCompactFile(path)) { return null; } else { return device; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n PartNameTools.removeSpeedGrade(partName) +\n deviceFileSuffix;\n }", "public static String getDeviceVersion(String partName) {\n String fileName = getDeviceFileName(partName);\n String version;\n try {\n Hessian2Input his = FileTools.getInputStream(fileName);\n version = his.readString();\n his.close();\n } catch (FileNotFoundException e) {\n return null;\n } catch (IOException e) {\n return null;\n }\n\n return version;\n }", "public Device readFromDeviceFile(String fileName, String address) {\n\n Element eElement = null;\n File file = new File(SifebUtil.DEV_FILE_DIR + fileName + \".xml\");\n try {\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(file);\n doc.getDocumentElement().normalize();\n System.out.println(\"Root element :\" + doc.getDocumentElement().getNodeName());\n NodeList nList = doc.getElementsByTagName(\"Device\");\n Node nNode = nList.item(0);\n eElement = (Element) nNode;\n } catch (ParserConfigurationException | SAXException | IOException e) {\n e.printStackTrace();\n }\n\n return getDevFromElement(eElement, address);\n }", "private void parseSpecificDevice(final String name,\n final XMLStreamReader reader)\n throws ParsingException, XMLStreamException {\n if (Parameter.valueOf(name.toUpperCase())\n == Parameter.PERIPHERALDEVICE) {\n PeripheralDevice peripheralDevice\n = buildPeripheralDevice(reader);\n getDevices().add(peripheralDevice);\n } else {\n if (Parameter.valueOf(name.toUpperCase())\n == Parameter.INNERDEVICE) {\n InnerDevice innerDevice = buildInnerDevice(reader);\n getDevices().add(innerDevice);\n }\n }\n }", "public Bitmap LoadFromFile(String _fullFilename) {\n\t //if (bmp != null) { bmp.recycle(); }\n\t BitmapFactory.Options bo = new BitmapFactory.Options();\t\t\n\t\t\n\t if( bo == null ) return null;\n\t \n\t if( controls.GetDensityAssets() > 0 )\n\t bo.inDensity = controls.GetDensityAssets();\n\t \n\t return BitmapFactory.decodeFile(_fullFilename, bo);\n }", "private void getDynamicProfie() {\n getDeviceName();\n }", "void loadProducts(String filename);", "public IDevice getNamedDevice(String simpleName) {\n\t\ttry {\n\t\t\treturn (IDevice) getObjectInstance(\"com.console.springernature.paint.model.\"+simpleName);\n\t\t} catch (ClassCastException e) {\n\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t} catch (Throwable e) {\n\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t}\n\t\treturn null;\n\t}", "public Device(String name, String typeName, Room room) {\n this.name = name.replace(\" \", \"_\");\n this.typeName = name.replace(\" \", \"_\");\n this.room = room;\n }", "void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "public abstract void loadFile(Model mod, String fn) throws IOException;", "private Device getDevFromElement(Element devElement, String address) {\n\n String devId = devElement.getElementsByTagName(\"Id\").item(0).getTextContent();\n NodeList nodeList = devElement.getElementsByTagName(\"Names\").item(0).getChildNodes();\n Map<Locale, String> actNames = new HashMap<>();\n\n for (int i = 0; i < nodeList.getLength(); i++) {\n NodeList nameNodes = nodeList.item(i).getChildNodes();\n String locale = nameNodes.item(0).getTextContent();\n String name = nameNodes.item(1).getTextContent();\n actNames.put(new Locale(locale.split(\"_\")[0], locale.split(\"_\")[1]), name);\n }\n\n String type = devElement.getElementsByTagName(\"Type\").item(0).getTextContent();\n String image = devElement.getElementsByTagName(\"Image\").item(0).getTextContent();\n // create device\n Device device = new Device(devId, actNames, Integer.parseInt(address), type, image);\n\n NodeList capList = devElement.getElementsByTagName(\"Capabilities\").item(0).getChildNodes();\n\n for (int j = 0; j < capList.getLength(); j++) {\n String capId = capList.item(j).getTextContent();\n Capability cap = readFromCapabilityFile(capId);\n cap.setDevice(device);\n device.addCapability(cap);\n }\n return device;\n }", "public void initFromResource() {\n String[] hwStrings = Resources.getSystem().getStringArray(17236074);\n if (hwStrings != null) {\n for (String hwString : hwStrings) {\n HardwareConfig hw = new MtkHardwareConfig(hwString);\n if (hw.type == 0) {\n updateOrInsert(hw, mModems);\n } else if (hw.type == 1) {\n updateOrInsert(hw, mSims);\n }\n }\n }\n }", "public static void load(String filename, Supervisor k) throws FileNotFoundException{\n String source = \"\";\n try {\n Scanner in = new Scanner(new FileReader(filename));\n while(in.hasNext()){\n source = source + in.next();\n }\n } catch (FileNotFoundException ex) {\n //throw ex;\n System.out.println(\"Could not read config file: \" + ex);\n System.out.println(\"trying to create a new one...\");\n String stsa = \"Done!\\n\";\n try (\n Writer writer = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(filename), \"utf-8\"))) {\n writer.write(\"\");\n writer.close();\n }\n \n catch (IOException ex1) {\n stsa = \"\";\n System.out.println(\"FAILED, SKIPPING CONFIG READ BECOUSE:\");\n Logger.getGlobal().warning(ex1.toString());\n System.out.println(\"Console version: \" + ex1.toString());\n }\n System.out.print(stsa);\n }\n LinkedList<String[]> raw = fetch(source);\n \n if(k.Logic == null){\n Logger.getGlobal().warning(\"ENGINE NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n if(k.Logic.Vrenderer == null){\n Logger.getGlobal().warning(\"ENGINE RENDERER NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n \n for(String[] x: raw){\n String value = x[1];\n if(!k.features_overrideAllStandard)\n switch(x[0]){\n case \"nausea\":\n int numValue = 0;\n try{\n numValue = Integer.parseInt(value);\n }\n catch(Exception e){\n quickTools.alert(\"configReader\", \"invalid nausea value\");\n break;\n }\n if(numValue > 0){\n k.Logic.Vrenderer.dispEffectsEnabled = true;\n }\n //k.Logic.Vrenderer.di\n break;\n default:\n\n break;\n }\n customFeatures(x[0], x[1], k);\n }\n }", "private File m5344d() {\n if (Process.myUid() == 1000) {\n return null;\n }\n File file;\n boolean equals;\n try {\n equals = \"mounted\".equals(Environment.getExternalStorageState());\n } catch (Exception e) {\n equals = false;\n }\n if (!C1222aj.m5343c() || equals) {\n File file2 = new File(C1222aj.m5334a(this.f4232a).getPath() + File.separator + \"carrierdata\");\n if (file2.exists() && file2.isDirectory()) {\n File[] listFiles = file2.listFiles();\n if (listFiles != null && listFiles.length > 0) {\n ArrayList a = C1222aj.m5336a(listFiles);\n if (a.size() == 1) {\n if (((File) a.get(0)).length() < ((long) this.f4235d)) {\n file = (File) a.get(0);\n return file;\n }\n } else if (a.size() >= 2) {\n file = (File) a.get(0);\n File file3 = (File) a.get(1);\n if (file.getName().compareTo(file3.getName()) <= 0) {\n file = file3;\n }\n return file;\n }\n }\n }\n }\n file = null;\n return file;\n }", "TargetDevice(String devname) throws com.microchip.crownking.Anomaly,\r\n org.xml.sax.SAXException,\r\n java.io.IOException,\r\n javax.xml.parsers.ParserConfigurationException,\r\n IllegalArgumentException {\r\n\r\n pic_ = (xPIC) xPICFactory.getInstance().get(devname);\r\n name_ = normalizeDeviceName(devname);\r\n\r\n if(Family.PIC32 == pic_.getFamily() || Family.ARM32BIT == pic_.getFamily()) {\r\n instructionSets_ = new ArrayList<>(pic_.getInstructionSet().getSubsetIDs());\r\n\r\n String setId = pic_.getInstructionSet().getID();\r\n if(setId != null && !setId.isEmpty()) {\r\n instructionSets_.add(setId);\r\n }\r\n } else {\r\n String what = \"Device \" + devname + \" is not a recognized MIPS32 or Arm device.\";\r\n throw new IllegalArgumentException(what);\r\n }\r\n }", "void massiveModeLoading( File dataPath );", "abstract protected void setDeviceName(String deviceName);", "private void loadGame(String fileName){\n\n }", "public void readMachineDescription(String filename){readMachineDescription(new File(filename));}", "protected HardwareDevice getHardwareOn(String name, Object hardwareDeviceMapping) {\n\n HardwareDevice hardwareDevice = null;\n try {\n HardwareMap.DeviceMapping<HardwareDevice> deviceMapping = (HardwareMap.DeviceMapping<HardwareDevice>) hardwareDeviceMapping;\n hardwareDevice = (HardwareDevice)deviceMapping.get(name);\n }\n catch (Throwable e)\n {\n try {\n ActiveOpMode.handleCatchAllException(e, getTelemetryUtil());\n } catch (InterruptedException e1) {\n //DbgLog.msg(e.getLocalizedMessage());\n }\n\n }\n\n return hardwareDevice;\n }", "private static String m584j() {\r\n FileReader fileReader;\r\n Throwable th;\r\n String str = null;\r\n BufferedReader bufferedReader;\r\n try {\r\n fileReader = new FileReader(\"/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq\");\r\n try {\r\n bufferedReader = new BufferedReader(fileReader, 8192);\r\n try {\r\n String readLine = bufferedReader.readLine();\r\n if (C0159a.m556a(readLine)) {\r\n try {\r\n bufferedReader.close();\r\n } catch (IOException e) {\r\n }\r\n try {\r\n fileReader.close();\r\n } catch (IOException e2) {\r\n }\r\n } else {\r\n str = readLine.trim();\r\n try {\r\n bufferedReader.close();\r\n } catch (IOException e3) {\r\n }\r\n try {\r\n fileReader.close();\r\n } catch (IOException e4) {\r\n }\r\n }\r\n } catch (IOException e5) {\r\n try {\r\n bufferedReader.close();\r\n } catch (IOException e6) {\r\n }\r\n try {\r\n fileReader.close();\r\n } catch (IOException e7) {\r\n }\r\n return str;\r\n } catch (Throwable th2) {\r\n th = th2;\r\n try {\r\n bufferedReader.close();\r\n } catch (IOException e8) {\r\n }\r\n try {\r\n fileReader.close();\r\n } catch (IOException e9) {\r\n }\r\n throw th;\r\n }\r\n } catch (IOException e10) {\r\n bufferedReader = null;\r\n bufferedReader.close();\r\n fileReader.close();\r\n return str;\r\n } catch (Throwable th3) {\r\n Throwable th4 = th3;\r\n bufferedReader = null;\r\n th = th4;\r\n bufferedReader.close();\r\n fileReader.close();\r\n throw th;\r\n }\r\n } catch (IOException e11) {\r\n bufferedReader = null;\r\n fileReader = null;\r\n bufferedReader.close();\r\n fileReader.close();\r\n return str;\r\n } catch (Throwable th32) {\r\n fileReader = null;\r\n th = th32;\r\n bufferedReader = null;\r\n bufferedReader.close();\r\n fileReader.close();\r\n throw th;\r\n }\r\n return str;\r\n }", "@Override\n\tpublic void LoadUSB()\n\t{\n\t\t\n\t\tSystem.out.println(\"▓ňU┼╠\");\n\t\t\n\t}", "private File m5346f() {\n if (Process.myUid() == 1000) {\n return null;\n }\n File file;\n boolean equals;\n try {\n equals = \"mounted\".equals(Environment.getExternalStorageState());\n } catch (Exception e) {\n equals = false;\n }\n if (!C1222aj.m5343c() || equals) {\n File a = C1222aj.m5334a(this.f4232a);\n if (a != null) {\n File file2 = new File(a.getPath() + File.separator + \"carrierdata\");\n if (file2.exists() && file2.isDirectory()) {\n File[] listFiles = file2.listFiles();\n if (listFiles != null && listFiles.length > 0) {\n ArrayList a2 = C1222aj.m5336a(listFiles);\n if (a2.size() >= 2) {\n a = (File) a2.get(0);\n file = (File) a2.get(1);\n if (a.getName().compareTo(file.getName()) <= 0) {\n file = a;\n }\n return file;\n }\n }\n }\n }\n }\n file = null;\n return file;\n }", "private void loadFromSdCard() throws IOException {\n\t\tif (!Environment.getExternalStorageState().equals(\n\t\t\t\tEnvironment.MEDIA_MOUNTED)) {\n\t\t\tthrow new IOException(getResources().getString(\n\t\t\t\t\tR.string.error_noExternalStorage));\n\t\t}\n\n\t\tStringBuffer whiteBoardFilePath = new StringBuffer(\n\t\t\t\tWHITEBOARD_DATA_FOLDER_PATH);\n\t\twhiteBoardFilePath.append(whiteBoard.id).append(\".dat\");\n\n\t\ttry {\n\t\t\tmDataStore.deserializeDataStore(new FileInputStream(new File(\n\t\t\t\t\twhiteBoardFilePath.toString())));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not load save file\");\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"I/O error loading save file\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static FamilyType getExactFamilyTypeFromPart(String partName) {\n partName = removeSpeedGrade(partName);\n partName = partName.toLowerCase();\n if (!partName.startsWith(\"x\")) {\n return null;\n }\n // Chop up partName into regular pieces for matching\n String[] tokens = splitPartName(partName);\n\n // Match part name with family\n if (tokens[0].equals(\"xcv\")) {\n if (tokens.length >= 3 && tokens[2].startsWith(\"e\")) {\n return FamilyType.VIRTEXE;\n } else {\n return FamilyType.VIRTEX;\n }\n } else if (tokens[0].equals(\"xc\")) {\n if (tokens[1].equals(\"2\")) {\n if (tokens[2].equals(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"e\")) {\n return FamilyType.SPARTAN2E;\n } else {\n return FamilyType.SPARTAN2;\n }\n } else if (tokens[2].startsWith(\"vp\")) {\n return FamilyType.VIRTEX2P;\n } else if (tokens[2].startsWith(\"v\")) {\n return FamilyType.VIRTEX2;\n }\n } else if (tokens[1].equals(\"3\")) {\n if (tokens[2].equals(\"sd\")) {\n return FamilyType.SPARTAN3ADSP;\n } else if (tokens[2].startsWith(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"e\")) {\n return FamilyType.SPARTAN3E;\n } else if (tokens.length >= 5 && tokens[4].startsWith(\"a\")) {\n return FamilyType.SPARTAN3A;\n } else {\n return FamilyType.SPARTAN3;\n }\n }\n } else if (tokens[1].equals(\"4\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.VIRTEX4;\n }\n } else if (tokens[1].equals(\"5\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.VIRTEX5;\n }\n } else if (tokens[1].equals(\"6\")) {\n if (tokens[2].startsWith(\"v\")) {\n if (tokens.length >= 5 && (tokens[4].startsWith(\"l\") || tokens[4].startsWith(\"tl\"))) {\n return FamilyType.VIRTEX6L;\n } else {\n return FamilyType.VIRTEX6;\n }\n } else if (tokens[2].startsWith(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"l\")) {\n return FamilyType.SPARTAN6L;\n } else {\n return FamilyType.SPARTAN6;\n }\n }\n } else if (tokens[1].equals(\"7\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.VIRTEX7;\n } else if (tokens[2].startsWith(\"a\")) {\n return FamilyType.ARTIX7;\n } else if (tokens[2].startsWith(\"k\")) {\n return FamilyType.KINTEX7;\n }\n }\n } else if (tokens[0].equals(\"xa\")) {\n if (tokens[1].equals(\"2\") && tokens.length >= 5 && tokens[4].startsWith(\"e\")) {\n return FamilyType.ASPARTAN2E;\n } else if (tokens[1].equals(\"3\")) {\n if (tokens[2].equals(\"sd\")) {\n return FamilyType.ASPARTAN3ADSP;\n } else if (tokens[2].startsWith(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"e\")) {\n return FamilyType.ASPARTAN3E;\n } else if (tokens.length >= 5 && tokens[4].startsWith(\"a\")) {\n return FamilyType.ASPARTAN3A;\n } else {\n return FamilyType.ASPARTAN3;\n }\n }\n } else if (tokens[1].equals(\"6\")) {\n return FamilyType.ASPARTAN6;\n }\n } else if (tokens[0].equals(\"xq\")) {\n if (tokens[1].equals(\"2\")) {\n if (tokens[2].equals(\"v\")) {\n return FamilyType.QVIRTEX2;\n } else if (tokens[2].equals(\"vp\")) {\n return FamilyType.QVIRTEX2P;\n }\n\n } else if (tokens[1].equals(\"4\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.QVIRTEX4;\n }\n } else if (tokens[1].equals(\"5\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.QVIRTEX5;\n }\n } else if (tokens[1].equals(\"6\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.QVIRTEX6;\n } else if (tokens[2].startsWith(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"l\")) {\n return FamilyType.QSPARTAN6L;\n } else {\n return FamilyType.QSPARTAN6;\n }\n }\n } else if (tokens[1].equals(\"7\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.QVIRTEX7;\n } else if (tokens[2].startsWith(\"a\")) {\n return FamilyType.QARTIX7;\n } else if (tokens[2].startsWith(\"k\")) {\n return FamilyType.QKINTEX7;\n }\n }\n } else if (tokens[0].equals(\"xqv\")) {\n if (tokens.length >= 3 && tokens[2].startsWith(\"e\")) {\n return FamilyType.QVIRTEXE;\n } else {\n return FamilyType.QVIRTEX;\n }\n } else if (tokens[0].equals(\"xqvr\")) {\n return FamilyType.QRVIRTEX;\n } else if (tokens[0].equals(\"xqr\")) {\n if (tokens[1].equals(\"2\")) {\n return FamilyType.QRVIRTEX2;\n } else if (tokens[1].equals(\"4\")) {\n return FamilyType.QRVIRTEX4;\n } else if (tokens[1].equals(\"5\")) {\n return FamilyType.QRVIRTEX5;\n } else if (tokens[1].equals(\"6\")) {\n return FamilyType.QRVIRTEX6;\n } else if (tokens[1].equals(\"7\")) {\n return FamilyType.QRVIRTEX7;\n }\n }\n return null;\n }", "public DeviceModel(Context ctx) {\n\n if (Constants.BETA)\n Log.i(\"DeviceModel\", \"SDK Version = \"+android.os.Build.VERSION.SDK);\n\n emulated = (isHoneyComb) && Environment.isExternalStorageEmulated();\n int count = (isKitKat) ? ctx.getExternalFilesDirs(null).length+1 : 2;\n\n free = new long[count];\n used = new long[count];\n total = new long[count];\n path = new String[count];\n store = new String[count];\n freeKb = new String[count];\n usedKb = new String[count];\n totalKb = new String[count];\n isAvail = new boolean[count];\n\n /**\n * Internal Storage\n */\n path[0] = Environment.getRootDirectory().getAbsolutePath();\n store[0] = path[0];\n total[0] = getTotal(path[0]);\n free[0] = getFree(path[0]);\n used[0] = total[0] - free[0];\n freeKb[0] = humanize(used[0]);\n usedKb[0] = humanize(free[0]);\n totalKb[0] = humanize(total[0]);\n isAvail[0] = !emulated;\n if (Constants.BETA) dump(0);\n\n /**\n * External Storage\n */\n// path[1] = Environment.getDataDirectory().getAbsolutePath();\n// store[1] = path[1];\n// total[1] = getTotal(path[1]);\n// free[1] = getFree(path[1]);\n// used[1] = total[1] - free[1];\n// freeKb[1] = humanize(used[1]);\n// usedKb[1] = humanize(free[1]);\n// totalKb[1] = humanize(total[1]);\n// isAvail[1] = true;\n// if (Constants.BETA) dump(0);\n\n if (isKitKat) {\n\n File ext[] = ctx.getExternalFilesDirs(null);\n for (int i=1; i<=ext.length; i++) {\n\n path[i] = ext[i-1].getAbsolutePath();\n store[i] = path[i].replace(TAIL, \"\");\n total[i] = getTotal(path[i]);\n free[i] = getFree(path[i]);\n used[i] = total[i] - free[i];\n usedKb[i] = humanize(free[i]);\n freeKb[i] = humanize(used[i]);\n totalKb[i] = humanize(total[i]);\n\n String state = Environment.getStorageState(ext[i-1]);\n isAvail[i] = Environment.MEDIA_MOUNTED.equals(state)\n && !(Environment.MEDIA_MOUNTED_READ_ONLY.equals(state));\n if (Constants.BETA) dump(i);\n\n }\n\n } else {\n\n path[1] = Environment.getExternalStorageDirectory().getAbsolutePath();\n store[1] = path[1].replace(TAIL, \"\");\n total[1] = getTotal(path[1]);\n free[1] = getFree(path[1]);\n used[1] = total[1] - free[1];\n freeKb[1] = humanize(used[1]);\n usedKb[1] = humanize(free[1]);\n totalKb[1] = humanize(total[1]);\n\n String state = Environment.getExternalStorageState();\n isAvail[1] = Environment.MEDIA_MOUNTED.equals(state)\n && !(Environment.MEDIA_MOUNTED_READ_ONLY.equals(state));\n if (Constants.BETA) dump(1);\n\n }\n\n\n }", "private static void loadSoFromInternalStorage(String fileName) throws UnsatisfiedLinkError {\n String path = System.getProperties().get(\"java.io.tmpdir\").toString().replace(\"/cache\", \"/files/\" + fileName);\n File file = new File(path);\n SecurityManager security = System.getSecurityManager();\n if (security != null) {\n security.checkLink(file.getAbsolutePath());\n }\n System.load(file.getAbsolutePath());\n }", "public abstract void loadDeviceSettings(DeviceSettings deviceSettings);", "private void setDetector() {\n\n try {\n AssetManager assetManager = getAssets();\n String[] fileList = assetManager.list(modelPath);\n String modelType = dlaasD.ReturnModelType(assetManager, modelPath);\n\n if (fileList.length != 0) {\n\n if (modelType.equals(\"mobilenet_1\")) {\n detector = new MobileNet(rs, assetManager, modelPath);\n } else {\n\n detector = new MobileNetSSD(rs, assetManager, modelPath);\n }\n } else {\n if (modelType.equals(\"mobilenet_1\")) {\n String modelDir = Environment.getExternalStorageDirectory().getPath() + \"/\" + modelPath;\n detector = new MobileNet(rs, assetManager, modelDir);\n } else {\n String modelDir = Environment.getExternalStorageDirectory().getPath() + \"/\" + modelPath;\n detector = new MobileNetSSD(rs, assetManager, modelDir);\n }\n\n }\n } catch (IOException e) {\n Log.d(\"onFindModule: \", e.toString());\n e.printStackTrace();\n }\n }", "public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}", "public Automobile buildAutoObject(String fileName) throws AutoException {\n Automobile automobile = null;\n try{\n String path = System.getProperty(\"user.dir\");\n String fileNameWithPath = path + File.separator + fileName;\n if(DEBUG) {\n System.out.printf(\" File Name with Path : %s\", fileNameWithPath);\n }\n // Missing file name exception.\n if (fileName.isEmpty()) {\n throw new AutoException(AutoException.ErrorNumber.MISSING_FILE_NAME);\n }\n\n FileReader file = new FileReader(fileNameWithPath);\n BufferedReader buff = new BufferedReader(file);\n boolean eof = false;\n String make = \"\";\n String model = \"\";\n float basePrice = 0;\n int numberOfOption = 0;\n final int MAX_OPTIONSET_SIZE = 5;\n\n String[] optionSets = new String[MAX_OPTIONSET_SIZE];\n\n while(!eof) {\n String line = buff.readLine();\n if(line == null){\n eof = true;\n } else {\n String[] carConfigurationParts = line.split(\":\");\n if (carConfigurationParts.length > 1) {\n if(carConfigurationParts[0].equalsIgnoreCase(\"Base Price\")) {\n String basePriceStr = carConfigurationParts[1];\n if(basePriceStr != null) {\n basePriceStr = basePriceStr.trim();\n }\n basePrice = Float.parseFloat(basePriceStr);\n } else if(carConfigurationParts[0].equalsIgnoreCase(\"Make\")) {\n String makeStr = carConfigurationParts[1];\n if(makeStr != null) {\n makeStr = makeStr.trim();\n }\n make = makeStr;\n }else if(carConfigurationParts[0].equalsIgnoreCase(\"Model\")) {\n String modelStr = carConfigurationParts[1];\n if(modelStr != null) {\n modelStr = modelStr.trim();\n }\n model = modelStr;\n } else {\n // OptionSet, Options\n optionSets[numberOfOption] = line;\n numberOfOption++;\n }\n }\n }\n }\n // cosing buffers.\n buff.close();\n // constructing Automotive Object Instance through constructor.\n if(basePrice != 0 && model != \"\") {\n automobile = new Automobile(make, model, basePrice, numberOfOption);\n }\n // Setting OptionSets, Options to Automotive\n int optionSetInsertionPosition = 0;\n for(String optionSetLine : optionSets) {\n if(optionSetLine != null) {\n String[] optionsSetParts = optionSetLine.split(\":\");\n String optionSetName = optionsSetParts[0];\n String optionsPartSection = optionsSetParts[1];\n // Adding optionSet\n if (optionSetName != null) {\n optionSetName = optionSetName.trim();\n String options[] = optionsPartSection.split(\",\");\n // Setting OptionSet values.\n automobile.addOptionSet(optionSetName);\n // Adding Options to OptionSet\n int optInsertionPosition = 0;\n for (String option : options) {\n option = option.trim();\n String optionWithPrice[] = option.split(\"=\");\n String optionName = optionWithPrice[0];\n float optionPrice = 0;\n if (optionWithPrice.length > 1) {\n String priceStr = optionWithPrice[1];\n priceStr = priceStr.trim();\n optionPrice = Float.parseFloat(priceStr);\n }\n // Setting option values .\n automobile.addOption(optionSetName, optionName, optionPrice);\n optInsertionPosition++;\n }\n }\n optionSetInsertionPosition++;\n }\n }\n\n }catch(IOException e) {\n e.printStackTrace();\n }\n return automobile;\n }", "private String normalizeDeviceName(String devname) {\r\n devname = devname.toUpperCase();\r\n\r\n if(devname.startsWith(\"SAM\")) {\r\n devname = \"AT\" + devname;\r\n } else if(devname.startsWith(\"32\")) {\r\n devname = \"PIC\" + devname;\r\n } else if(devname.startsWith(\"P32\")) {\r\n devname = \"PIC\" + devname.substring(1);\r\n }\r\n\r\n return devname;\r\n }", "public abstract Source load(ModuleName name);", "public com.mediatek.internal.telephony.uicc.IccFileRequest onGetFilePara(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.uicc.SsIccFileFetcher.onGetFilePara(java.lang.String):com.mediatek.internal.telephony.uicc.IccFileRequest, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.uicc.SsIccFileFetcher.onGetFilePara(java.lang.String):com.mediatek.internal.telephony.uicc.IccFileRequest\");\n }", "private boolean checkDeviceName(String name) {\n switch (name) {\n case \"LAPTOP\" :\n case \"PRINTER\" :\n case \"ROUTER\" :\n return true;\n default:\n return false;\n }\n }", "public void loadQuickly(){\r\n System.out.println(\"I am going to try to load your games.\");\r\n String quickLoadPath = this.savePath + File.separator + \"QuickSave.ser\";\r\n this.load(quickLoadPath);\r\n }", "private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }", "private File m5342c(long j) {\n boolean z = false;\n if (Process.myUid() == 1000) {\n return null;\n }\n File file;\n boolean equals;\n try {\n equals = \"mounted\".equals(Environment.getExternalStorageState());\n } catch (Exception e) {\n equals = z;\n }\n if (!C1222aj.m5343c() || equals) {\n StatFs statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());\n if (((long) statFs.getAvailableBlocks()) * ((long) statFs.getBlockSize()) <= ((long) (this.f4234c / 2))) {\n return null;\n }\n File file2 = new File(C1222aj.m5334a(this.f4232a).getPath() + File.separator + \"carrierdata\");\n if (!(file2.exists() && file2.isDirectory())) {\n file2.mkdirs();\n }\n file = new File(file2.getPath() + File.separator + j);\n try {\n z = file.createNewFile();\n } catch (IOException e2) {\n }\n } else {\n file = null;\n }\n return !z ? null : file;\n }", "public String read_from_disc(ChunkName name) throws IOException {\n\tString path = this.path_name(name);\n\tbyte[] encoded = Files.readAllBytes(Paths.get(path));\n\treturn this.encoding.decode(ByteBuffer.wrap(encoded)).toString();\n }", "public void load(String vs, String fs){\n\t\tsuper.load(vs, fs);\n\t\t\n\t\t// inherited Load doesn't keep program enabled for 'safety', so we\n\t // re-enable here so we can reference ourselves...\n\t m_program.enable();\n\n\t m_borderIndex = m_program.getAttribLocation(\"border\", false);\n\n\t GLES20.glUniform1i(m_program.getUniformLocation(\"sampler\"), 0); // texunit index zero.\n\n\t m_thicknessIndex = m_program.getUniformLocation(\"thickness\");\n\t m_texBorderIndex = m_program.getUniformLocation(\"texBorder\");\n\n\t m_program.disable();\n\t}", "public static void load(String name) throws RuntimeException, IOException{\n\t\tif(!name.startsWith(\"/\")) name = \"/\"+name;\n\t\tFile libFile = NativeUtils.getAsLocalFile(name);\n\t\tUtils.sleep(500); // wait a bit to be sure the library is ready to be read\n\t\tSystem.load(libFile.getAbsolutePath());\n\t}", "@Override\n\tpublic Device loadwDeviceById(int id) {\n\t\treturn (Device) dataAccessUtil.findById(Device.class,id);\n\t}", "@Override\n\t\t\tpublic Device fromString(String arg0) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic Device fromString(String arg0) {\n\t\t\t\treturn null;\n\t\t\t}", "public static String removeSpeedGrade(String partName) {\n if (partName != null && partName.contains(\"-\")) {\n return partName.substring(0, partName.indexOf(\"-\"));\n } else {\n return partName;\n }\n }", "protected FileObject findFile(List<String> loadPaths, String moduleName) {\n\t\tif(moduleName.startsWith(\"./\")) {\n\t\t\tmoduleName = moduleName.substring(2);\n\t\t}\n\t\tString fileName = normalizeName(moduleName);\n\t\tFileObject file = null;\n\t\tfor (String loadPath : loadPaths) {\n\t\t\t// require('foo');\n\t\t\tfor (String startPath : this.startPaths) {\n\t\t\t\ttry {\n\t\t\t\t\tString newName = startPath+loadPath+fileName;\n\t\t\t\t\tfile = fetchFile(newName);\n\t\t\t\t\tif(file != null){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//System.out.println(\"Error getting file \"+moduleName+\": \"+ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn file;\n\t}", "public abstract SoundContainer loadSound( String filename ) throws IOException;", "String getDeviceName();", "private void loadFromDisk(String filename) throws IOException {\n Reader r = new FileReader(filename);\r\n load(r);\r\n }", "public void load(String filePath){\r\n File loadFile = new File(filePath);\r\n if (!loadFile.exists()){\r\n System.out.println(\"I failed. There are no saved games.\");\r\n return;\r\n }\r\n FileInputStream fis = null;\r\n ObjectInputStream in = null;\r\n try {\r\n fis = new FileInputStream(filePath);\r\n in = new ObjectInputStream(fis);\r\n long versionUID = (long) in.readObject();\r\n if (versionUID != this.serialVersionUID) {\r\n throw new UnsupportedClassVersionError(\"Version mismatch for save game!\");\r\n }\r\n this.p = (Character) in.readObject();\r\n this.map = (SpecialRoom[][]) in.readObject();\r\n\r\n } catch (FileNotFoundException ex){\r\n System.out.println(\"The saved game was not found!\");\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n System.out.println(\"There was an error reading your save game :(\");\r\n ex.printStackTrace();\r\n System.out.println(\")\");\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(\"The version of the save game is not compatible with this game!\");\r\n ex.printStackTrace();\r\n } catch (UnsupportedClassVersionError ex) {\r\n System.out.println(ex.getMessage());\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n System.out.println(\"An unknown error occurred!\");\r\n }\r\n\r\n }", "@Override\n\tpublic void run() {\n\t\tList<ProfileData> base=this.readBattery(this.batteryBasedFile);\n\t\tList<ProfileData> cpuFull=this.readBattery(this.batteryCPUFile);\n\t\t\n\t\tDefaultNetworkEnergyManager nem = MANAGER_FACTORY.createNetworkEnergyManager(networkEnergyManagerEnable, wifiSignalStrength);\n\t\tDefaultBatteryManager sb=MANAGER_FACTORY.createBatteryManager(2, startCharge, startUptime, batteryCapacityInJoules);\n\t\tfor(ProfileData b:base)\n\t\t\tsb.addProfileData(0, b);\n\t\tfor(ProfileData b:cpuFull)\n\t\t\tsb.addProfileData(1, b);\n\t\t\n\t\tDefaultExecutionManager se=MANAGER_FACTORY.createExecutionManager();\t\t\n\t\tse.setMips(this.flops);\n\t\tDevice d= MANAGER_FACTORY.createDevice(this.nodeId, sb, se, nem);\n\t\t\n\t\tsimLock.lock();\n\t\tNetworkModel.getModel().addNewNode(d);\n\t\tSimulation.addEntity(d);\n\t\tthis.dId=Simulation.getEntityId(this.nodeId);\n\t\tsimLock.unlock();\n\t\t\n\t\tsb.setDevice(d);\n\t\tse.setDevice(d);\n\t\tnem.setDevice(d);\n\t\tse.setBatteryManager(sb);\n\t\tnem.setBatteryManager(sb);\n\t\tsb.setSEASExecutionManager(se);\n\t\t\t\t\t\t\n\t\tthis.readCPUEvents();\n\t\t\n\t\tthis.eventLock.lock();\n\t\tEvent e=Event.createEvent(Event.NO_SOURCE, this.startTime, this.dId, Device.EVENT_TYPE_DEVICE_START, null);\n\t\tthis.eventLock.unlock();\n\t\tthis.simLock.lock();\n\t\tSimulation.addEvent(e);\n\t\tthis.simLock.unlock();\n\t}", "public void readDriverFile(String path)\n {\n FileIO fileIO = new FileIO();\n fileIO.setFileName(path);\n String fileData = fileIO.readFile();\n String[] data = fileData.split(\"\\\\n\"); // split data by new line character\n for(int i = 0 ; i < data.length ; i++)\n {\n String[] values = data[i].split(\",\"); //split each row by ,\n getDrivers().addDriver(values[0], Integer.parseInt(values[1]), values[2], true); // add a new driver to the collection\n } \n }", "private String requestHardwareStatusFileName( final URL baseURL ) throws Exception {\n\t\tfinal String fileName = JOptionPane.showInputDialog( getMainWindow(), \"Enter a unique hardware status file name: \" );\n\t\tif ( fileName != null ) {\n\t\t\tfinal String urlSpec = fileName.endsWith( \".xdxf\" ) ? fileName : fileName + \".xdxf\";\n\t\t\tif ( existingURL( baseURL, urlSpec ) ) {\n\t\t\t\treturn requestHardwareStatusFileName( baseURL );\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn urlSpec;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public String getCpuTemperature_Xperia(){\n\n double maxTemp = 0.0;\n RandomAccessFile reader;\n //////// core 1\n try {\n reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone7/temp\", \"r\" );\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp += Double.parseDouble(line);\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n //////// core 2\n try {\n reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone8/temp\", \"r\" );\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp += Double.parseDouble(line);\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n //////// core 3\n try {\n reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone9/temp\", \"r\" );\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp += Double.parseDouble(line);\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n //////// core 4\n try {\n reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone10/temp\", \"r\" );\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp += Double.parseDouble(line);\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n\n return String.valueOf(maxTemp / 4);\n }", "public void getDeviceByModelNumber()\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Model number \");\r\n\t\t\tString searchModelNumber = sc.nextLine();\r\n\t\t\t\r\n\t\t\tDevice d = record.getDeviceByModelNumber(searchModelNumber);\r\n\t\t\tprintDeviceDetails(d);\r\n\t\t}", "public final void loadPart(InHouse param) {\n partToUpdate = (InHouse) param;\n partSource.selectToggle(inHouseRadio);\n sourceNameField.setText(String.valueOf(param.getMachineID()));\n MachineID = param.getMachineID();\n idField.setText(String.valueOf(param.getPartID()));\n partNameField.setText(param.getName());\n invField.setText(String.valueOf(param.getInStock()));\n priceField.setText(String.valueOf(param.getPrice()));\n minField.setText(String.valueOf(param.getMin()));\n maxField.setText(String.valueOf(param.getMax()));\n }", "public void setDeviceName(String argDeviceName) {\n\t deviceName = argDeviceName;\n }", "public static KidDatabaseDisk loadFileFromText(String filename, int chunk) {\n\n KidDatabaseDisk result = new KidDatabaseDisk();\n result.fileName = filename;\n try(BufferedReader br = new BufferedReader(new FileReader(filename+\".txt\"))) {\n for (String line; (line = br.readLine()) != null; ) {\n String[] pieces = line.split(\"\\t\");\n result.add(new Kid(pieces[0]));\n result.sequenceLength.add(Integer.parseInt(pieces[1]));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n result.sequence128db = new RocksDbKlue(filename+\".disk.\"+String.format(\"%02d\", chunk), false);\n return result;\n }", "public void loadConfigurationFromDisk() {\r\n try {\r\n FileReader fr = new FileReader(CONFIG_FILE);\r\n BufferedReader rd = new BufferedReader(fr);\r\n\r\n String line;\r\n while ((line = rd.readLine()) != null) {\r\n if (line.startsWith(\"#\")) continue;\r\n if (line.equalsIgnoreCase(\"\")) continue;\r\n\r\n StringTokenizer str = new StringTokenizer(line, \"=\");\r\n if (str.countTokens() > 1) {\r\n String aux;\r\n switch (str.nextToken().trim()) {\r\n case \"system.voidchain.protocol_version\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.protocolVersion = aux;\r\n continue;\r\n case \"system.voidchain.transaction.max_size\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.transactionMaxSize = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.block.num_transaction\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.numTransactionsInBlock = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.storage.data_file_extension\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.dataFileExtension = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.walletFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.data_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.dataDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.blockFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.walletFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.memory.block_megabytes\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.memoryUsedForBlocks = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.sync.block_sync_port\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockSyncPort = Integer.parseInt(aux);\r\n }\r\n continue;\r\n case \"system.voidchain.crypto.ec_param\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.ecParam = aux;\r\n continue;\r\n case \"system.voidchain.core.block_proposal_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockProposalTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n case \"system.voidchain.blockchain.chain_valid_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockchainValidTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n fr.close();\r\n rd.close();\r\n\r\n if (this.firstRun)\r\n this.firstRun = false;\r\n } catch (IOException e) {\r\n logger.error(\"Could not load configuration\", e);\r\n }\r\n }", "private Promise<ApduFile> openApduFile(ElementaryFileID fileID) {\n Promise<byte[]> firstChunk;\n if (fileID.isShortIDAvailable()) {\n firstChunk = this.presentationLayer.readBinary(fileID, (byte)0);//If short file id is available, a read will also instantly select the file.\n } else {\n firstChunk = this.presentationLayer.selectEF(fileID).then((v) -> this.presentationLayer.readBinary((byte)0));//Select and read the first part.\n }\n return firstChunk.then((data) -> {\n try {\n ApduFile result = new ApduFile(data);\n return Promise.resolve(result);\n }catch (Exception e) {\n return Promise.reject(e);\n }\n });\n }", "@Override\n public InputStream readFileInternal(String _fileName) throws IOException\n { // Reads a file from the devices internal storage. Takes a filename as a parameter and throws an IOException if failed.\n return context.openFileInput(_fileName);\n }", "public QuizPlayer serialReadFile() {\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(); //If any error is caught the program will re ask the user for input.\r\n try {\r\n ObjectInputStream inputStream =\r\n new ObjectInputStream(new FileInputStream(fileObject));\r\n q = (QuizPlayer) inputStream.readObject();\r\n\r\n\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Cannot find file. Please Enter a different file Name\");\r\n\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problems with file input. Please Enter a different file name\");\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problems with file input. Please Enter a differet file name\");\r\n }\r\n\r\n\r\n return q;\r\n }", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "void distributedSingleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "public T getAutoInstance(String devName) {\n S settings = sGen.apply(devName);\n for (Class clz : subClasses) {\n T device;\n try {\n device = (T) clz.getDeclaredConstructor(sClass).newInstance(settings);\n } catch (InvocationTargetException e) { \n if (e.getCause() instanceof Device.IDException) {\n continue; //This just means the device wasn't identified. Try the next device\n } else {\n throw new RuntimeException(e.getCause());\n }\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException me) {\n throw new RuntimeException(me);\n }\n Globals.mm().logs().logMessage(String.format(\"Autofinder found device of type %s for device label %s.\", device.getClass().toString(), devName));\n return device; //We only get this far if the object successfully initializes.\n }\n return null; //Nothing was identified.\n }", "public BiomartAccess(String fname) \n {\n m_file = new File(fname);\n }", "public void openDiskFile(String musicFileName) throws IOException;", "private Path makeFilePath(String name) {\n Path baseFilePath = Paths.get(portManager.getBfp());\n if (name.length() > 4 && name.substring(name.length() - 5).equals(\".json\")) {\n return baseFilePath.resolve(name);\n } else {\n return baseFilePath.resolve(name + \".json\");\n }\n }", "public void deviceLoaded(Device device);", "public Partie Charger() {\n if (SaveNum > 0 && SaveNum < 10) {\n //System.out.println(SaveNum);\n try {\n // System.out.println(slot[SaveNum - 1]);\n FileInputStream fis = new FileInputStream(slot[SaveNum - 1]);\n //System.out.println(\"recu\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n //System.out.println(\"recu\");\n Object p = ois.readObject();\n //System.out.println(\"recu\");\n ois.close();\n if (p instanceof Partie) {\n SaveNum = 20;\n return (Partie) p;\n }\n } catch (IOException | NullPointerException | ClassNotFoundException e) {\n System.out.println(\"Erreur lors du chargement du fichier\");\n }\n }\n return part;\n }", "protected void setPartitionDotFile(final String str) {\n\t\tthis.partitionDot = str;\n\t}", "private void doYourOpenUsbDevice(UsbDevice usbDevice) {\n connection = mUsbManager.openDevice(usbDevice);\n //add your operation code here\n\n if (connection == null) {\n Log.e(LOG_TAG, \"UsbDeviceConnection null\");\n }\n\n ProbeTable customTable = new ProbeTable();\n customTable.addProduct(0x067B, 0x2303, ProlificSerialDriver.class);\n customTable.addProduct(0x04E2, 0x1410, CdcAcmSerialDriver.class);\n\n UsbSerialProber prober = new UsbSerialProber(customTable);\n\n List<UsbSerialDriver> availableDrivers = prober.findAllDrivers(mUsbManager);\n if (availableDrivers.isEmpty()) {\n\n Log.e(LOG_TAG, \"No available drivers\");\n\n return;\n }\n\n // Open a connection to the first available driver.\n UsbSerialDriver driver = availableDrivers.get(0);\n// mUsbManager.requestPermission(driver.getDevice(), mPermissionIntent);\n boolean hasPermission = mUsbManager.hasPermission(driver.getDevice());\n\n Log.e(LOG_TAG, \"is permission \" + hasPermission);\n\n if (connection == null) {\n\n // You probably need to call UsbManager.requestPermission(driver.getDevice(), ..)\n return;\n }\n\n\n sPort = driver.getPorts().get(0);\n\n\n boundRate = Integer.parseInt(preferences.getString(\"boundRate\", \"9600\"));\n\n dataBits = Integer.parseInt(preferences.getString(\"dataBits\", \"8\"));\n\n String parityStr = preferences.getString(\"parity\", \"NONE\");\n\n\n if (parityStr.equalsIgnoreCase(\"ODD\")) {\n parity = UsbSerialPort.PARITY_ODD;\n } else if (parityStr.equalsIgnoreCase(\"EVEN\")) {\n parity = UsbSerialPort.PARITY_EVEN;\n } else if (parityStr.equalsIgnoreCase(\"NONE\")) {\n parity = UsbSerialPort.PARITY_NONE;\n } else {\n Toast.makeText(getApplicationContext(),\n \"Please select valid parity from settings\", Toast.LENGTH_SHORT).show();\n }\n\n\n String stopBitsStr = preferences.getString(\"stopBits\", \"1\");\n\n if (stopBitsStr.equalsIgnoreCase(\"1\")) {\n stopBits = UsbSerialPort.STOPBITS_1;\n } else if (stopBitsStr.equalsIgnoreCase(\"1.5\")) {\n stopBits = UsbSerialPort.STOPBITS_1_5;\n } else if (stopBitsStr.equalsIgnoreCase(\"2\")) {\n stopBits = UsbSerialPort.STOPBITS_2;\n } else {\n Toast.makeText(getApplicationContext(),\n \"Please select valid stop bits from settings\", Toast.LENGTH_SHORT).show();\n }\n\n\n try {\n sPort.open(connection);\n sPort.setParameters(boundRate, dataBits, stopBits, parity);\n sPort.setRTS(true);\n sPort.setDTR(true);\n\n tvResult.append(\"Connected to device.\\n\");\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n\n// showStatus(mDumpTextView, \"CD - Carrier Detect\", sPort.getCD());\n// showStatus(mDumpTextView, \"CTS - Clear To Send\", sPort.getCTS());\n// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n// showStatus(mDumpTextView, \"DTR - Data Terminal Ready\", sPort.getDTR());\n// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n// showStatus(mDumpTextView, \"RI - Ring Indicator\", sPort.getRI());\n// showStatus(mDumpTextView, \"RTS - Request To Send\", sPort.getRTS());\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error setting up device: \" + e.getMessage(), e);\n tvResult.append(\"Error opening device: \" + e.getMessage());\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n try {\n sPort.close();\n } catch (IOException e2) {\n // Ignore.\n }\n sPort = null;\n return;\n }\n tvResult.append(\"Serial device: \" + sPort.getClass().getSimpleName());\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n\n onDeviceStateChange();\n\n Log.e(LOG_TAG, \"Setting: \" + boundRate + \" \" + dataBits + \" \" + parity + \" \" + stopBits);\n\n// if (preferences.getString(\"boundRate\", null) != null) {\n//\n// boundRate = Integer.parseInt(preferences.getString(\"boundRate\", null));\n//\n//\n// if (preferences.getString(\"dataBits\", null) != null) {\n//\n// dataBits = Integer.parseInt(preferences.getString(\"dataBits\", null));\n//\n//\n// if (preferences.getString(\"parity\", null) != null) {\n//\n// String parityStr = preferences.getString(\"parity\", null);\n//\n// if (parityStr.equalsIgnoreCase(\"ODD\")) {\n// parity = UsbSerialPort.PARITY_ODD;\n// } else if (parityStr.equalsIgnoreCase(\"EVEN\")) {\n// parity = UsbSerialPort.PARITY_EVEN;\n// } else if (parityStr.equalsIgnoreCase(\"NONE\")) {\n// parity = UsbSerialPort.PARITY_NONE;\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select valid parity from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// if (preferences.getString(\"stopBits\", null) != null) {\n//\n// String stopBitsStr = preferences.getString(\"stopBits\", null);\n//\n// if (stopBitsStr.equalsIgnoreCase(\"1\")) {\n// stopBits = UsbSerialPort.STOPBITS_1;\n// } else if (stopBitsStr.equalsIgnoreCase(\"1.5\")) {\n// stopBits = UsbSerialPort.STOPBITS_1_5;\n// } else if (stopBitsStr.equalsIgnoreCase(\"2\")) {\n// stopBits = UsbSerialPort.STOPBITS_2;\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select valid stop bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// try {\n// sPort.open(connection);\n// sPort.setParameters(boundRate, dataBits, stopBits, parity);\n// sPort.setRTS(true);\n// sPort.setDTR(true);\n//\n// tvResult.append(\"Connected to device.\\n\");\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n//\n//// showStatus(mDumpTextView, \"CD - Carrier Detect\", sPort.getCD());\n//// showStatus(mDumpTextView, \"CTS - Clear To Send\", sPort.getCTS());\n//// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n//// showStatus(mDumpTextView, \"DTR - Data Terminal Ready\", sPort.getDTR());\n//// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n//// showStatus(mDumpTextView, \"RI - Ring Indicator\", sPort.getRI());\n//// showStatus(mDumpTextView, \"RTS - Request To Send\", sPort.getRTS());\n//\n// } catch (IOException e) {\n// Log.e(LOG_TAG, \"Error setting up device: \" + e.getMessage(), e);\n// tvResult.append(\"Error opening device: \" + e.getMessage());\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n// try {\n// sPort.close();\n// } catch (IOException e2) {\n// // Ignore.\n// }\n// sPort = null;\n// return;\n// }\n// tvResult.append(\"Serial device: \" + sPort.getClass().getSimpleName());\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n//\n// onDeviceStateChange();\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Stop bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Parity bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Data bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Bound rate from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n// Log.e(LOG_TAG, \"Setting: \" + boundRate + \" \" + dataBits + \" \" + parity + \" \" + stopBits);\n }", "public void setDeviceName(String deviceName) {\n this.deviceName = deviceName;\n }", "public static String getDeviceModel() {\n String deviceName = SystemProperties.get(\"prize.system.boot.rsc\");\n // prize modify for bug66476 by houjian end\n deviceName = !TextUtils.isEmpty(deviceName) ? deviceName : Build.MODEL + DeviceInfoUtils.getMsvSuffix();\n //prize modified by xiekui, fix bug 74122, 20190408-start\n return UtilsExt.useDeviceInfoSettingsExt() == null ? deviceName : UtilsExt.useDeviceInfoSettingsExt().customeModelInfo(deviceName);\n //prize modified by xiekui, fix bug 74122, 20190408-end\n }", "public void diskAddedsound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"diskplacement.wav\");\n playSound(pathSoundFile);\n }", "public static void readAcu() throws IOException, ClassNotFoundException, SQLException\n\t{\n\tString line;\n\tFile worksheet = new File(\"/Users/sturtevantauto/Pictures/Car_Pictures/XPS/6715329.acu\");\n\t\tBufferedReader reader = new BufferedReader(new FileReader(worksheet));\n\t\tint i = 1;\n\t\tString namebegin = null;\n\t\tboolean sw = false;\n\t\tint linebegin = 0;\n\t\twhile ((line = reader.readLine()) != null)\n\t\t{\n\t\t\tif(line.contains(\"-\"))\n\t\t\t{\n\t\t\t\tString[] lines = line.split(\"-\");\n\t\t\t\tif(Character.isDigit(lines[0].charAt((lines[0].length() - 1))))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] endlines = lines[1].split(\" \");\n\t\t\t\t\t\t\tendlines[0] = endlines[0].trim();\n\t\t\t\t\t\t\tint partnum = Integer.parseInt(lines[0].substring((lines[0].length() - 3), lines[0].length()));\n\t\t\t\t\t\t\tString partend = endlines[0];\n\t\t\t\t\t\t\t//System.out.println(findLine(DATReader.findPartName(partnum)));\n\t\t\t\t\t\t\tString name = DATReader.findPartName(partnum);\n\t\t\t\t\t\t\tif(!name.equals(namebegin))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnamebegin = name;\n\t\t\t\t\t\t\tsw = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(sw)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsw = false;\n\t\t\t\t\t\t\tlinebegin = findLine(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] linetext = findText(linebegin, i, name);\n\t\t\t\t\t\t\tint q = 1;\n\t\t\t\t\t\t\tfor(String print : linetext)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(print != null)\n\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\tprint = print.replace(\".\", \"\");\n\t\t\t\t\t\t\t\tSystem.out.println(q + \": \" + print);\n\t\t\t\t\t\t\t\tq++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlinebegin = i;\n\t\t\t\t\t\t\t//System.out.println(partnum + \"-\" + partend);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t }\n\t\treader.close();\n\n\t}", "@Override\n\tpublic Path load(String keyName) {\n\t\treturn null;\n\t}", "public static ArrayList<String> getAvailableParts(FamilyType type) {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\" + File.separator + type.toString().toLowerCase());\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String part : dir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n return allParts;\n }", "public StillModel loadModel(String filepath);", "public String getBftSmartKeyLoader() throws IOException {\r\n String keyLoader = \"ECDSA\";\r\n\r\n FileReader fr = new FileReader(Configuration.BFT_SMART_CONFIG_FILE);\r\n BufferedReader rd = new BufferedReader(fr);\r\n\r\n String line;\r\n while ((line = rd.readLine()) != null) {\r\n if (line.startsWith(\"#\"))\r\n continue;\r\n\r\n StringTokenizer str = new StringTokenizer(line, \"=\");\r\n if (str.countTokens() > 1) {\r\n switch (str.nextToken().trim()) {\r\n case \"system.communication.defaultKeyLoader\":\r\n keyLoader = str.nextToken().trim();\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n return keyLoader;\r\n }", "public PlateSpecifications loadSpecs(String nickname);", "public Object load(String compName) {\n\t\tif (this.preLoaded) {\n\t\t\treturn this.cachedOnes.get(compName);\n\t\t}\n\t\tString fileName = componentFolder + this.folder\n\t\t\t\t+ compName.replace(DELIMITER, FOLDER_CHAR) + EXTN;\n\t\tException exp = null;\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tobj = this.cls.newInstance();\n\t\t\tif (XmlUtil.xmlToObject(fileName, obj) == false) {\n\t\t\t\t/*\n\t\t\t\t * load failed. obj is not valid any more.\n\t\t\t\t */\n\t\t\t\tobj = null;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texp = e;\n\t\t}\n\n\t\tif (exp != null) {\n\t\t\tTracer.trace(exp, \"error while loading component \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\tif (obj == null) {\n\t\t\tTracer.trace(\"error while loading component \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\t/*\n\t\t * we insist that components be stored with the right naming convention\n\t\t */\n\t\tComponent comp = (Component) obj;\n\t\tString fullName = comp.getQualifiedName();\n\n\t\tif (compName.equalsIgnoreCase(fullName) == false) {\n\t\t\tTracer.trace(\"Component has a qualified name of \" + fullName\n\t\t\t\t\t+ \" that is different from its storage name \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\treturn comp;\n\t}", "public void read(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Reading project spec '\" + _specName + \"'...\");\r\n\r\n\t\tbook.getFileRegistry().setProjectFilename(_specName);\r\n\t\t\r\n\t\t// verify a compatible sim-file format\r\n\t\tint version =_dataModel.getVersion(); \r\n\t\tif (!isCompatibleSpecFormat(version))\r\n\t\t{\r\n\t\t\tthrow new SB_FileException(\"Incompatible project file format: engine version \"\r\n\t\t\t\t\t\t\t\t\t\t+ Version.FILE_FORMAT_MAX_VERSION + \", file version \" + version);\r\n\t\t}\r\n\r\n\t\tbook.getFileRegistry().setFormatVersion(version);\r\n\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Specification format version \" + version,SB_Logger.INIT);\r\n\r\n\t\t// read file version information\r\n\t\tbook.getFileRegistry().setSpecVersion(version);\r\n\r\n\t\treadDescriptors(book);\r\n\t\treadClasses(book);\r\n\t\treadActions(book);\r\n\t\treadPredicates(book);\r\n\r\n\t\treadJavaScript(book);\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t readGlobals(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t readConstants(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex) {\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t\t\r\n\t\treadBehaviors(book);\r\n\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Project spec file '\" + _specName + \"' loaded.\",SB_Logger.INIT);\r\n\t}", "@JsonCreator\n public static DiskMode fromString(String name) {\n return fromString(name, DiskMode.class);\n }", "public void readFile(File f) {\r\n if(f.getName().endsWith(\".txt\")) {\r\n if(f.getName().equals(\"USQRecorders.txt\")) {\r\n readAndTxt(f); \r\n lab_android.setText(\"Android read in\");\r\n }else if(f.getName().equals(\"mdl_log.txt\")) {\r\n readModLog(f);\r\n lab_moodle.setText(\"Moodle read in\");\r\n }else if(f.getName().equals(\"mdl_chat_messages.txt\") || f.getName().equals(\"mdl_forum_posts.txt\") || f.getName().equals(\"mdl_quiz_attempts.txt\")) {\r\n \treadtabs(f);\r\n }else{\r\n //illegal file name\r\n //JOptionPane.showMessageDialog(null, \"only accept .txt file named 'USQRecorders.txt','mdl_log.txt','mdl_chat_messages.txt','mdl_forum_posts.txt' and 'mdl_quiz_attempts.txt'\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if(fromzip == false) {\r\n copyOldtxt(f);\r\n }\r\n } else if(f.getName().endsWith(\".zip\")) {\r\n if(f.getName().endsWith(\".zip\"))fromzip=true;\r\n readZip(f);\r\n copyOldtxt(f);\r\n //delete original\r\n File del = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File dels[] = del.listFiles();\r\n for(int i=0 ; i<dels.length ; i++){\r\n dels[i].delete();\r\n }\r\n File tmp = new File(workplace + \"/temp/USQ_IMAGE/\");\r\n tmp.delete();\r\n tmp = new File(workplace + \"/temp\");\r\n tmp.delete();\r\n lab_android.setText(\"Android read in\");\r\n } else if(f.getName().endsWith(\".png\")) {\r\n readImage(f);\r\n }\r\n }", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "public void initDevice() {\r\n\t\t\r\n\t}", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "public void fileLoaderMethod(String filename) {\n\t\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\t\n\t\tfileloc += filename;\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\tString code = \"\";\n\t\t\n\t\tif(!fl.exists()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The specified file doesnt exist at the given location.\");\n\t\t} else {\t\n\t\t\ttry {\n\t\t\t\tFileReader flrd = new FileReader(fileloc);\n\t\t\t\tBufferedReader bufread = new BufferedReader(flrd);\t\t\n\t\t\t\tString str;\n\t\t\t\twhile((str = bufread.readLine()) != null) {\n\t\t\t\t\tcode += str + \"\\n\";\n\t\t\t\t}\t\t\n\t\t\t\tbufread.close();\n\t\t\t\tflrd.close();\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\n\t\tinterpretorMainMethod(code, 0);\n\t}", "private VmDevice readVmDevice(XmlNode node, Guid deviceId) {\n VmDevice vmDevice = new VmDevice();\n vmDevice.setId(new VmDeviceId(deviceId, vmBase.getId()));\n if (node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS).innerText)) {\n vmDevice.setAddress(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS).innerText));\n } else {\n vmDevice.setAddress(\"\");\n }\n if (node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS).innerText)) {\n vmDevice.setAlias(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS).innerText));\n } else {\n vmDevice.setAlias(\"\");\n }\n XmlNode specParamsNode = node.SelectSingleNode(OvfProperties.VMD_SPEC_PARAMS, _xmlNS);\n if (specParamsNode != null\n && !StringUtils.isEmpty(specParamsNode.innerText)) {\n vmDevice.setSpecParams(getMapNode(specParamsNode));\n } else {\n // Empty map\n vmDevice.setSpecParams(Collections.<String, Object>emptyMap());\n }\n if (node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS).innerText)) {\n vmDevice.setType(VmDeviceGeneralType.forValue(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS).innerText)));\n } else {\n int resourceType = getResourceType(node, OvfProperties.VMD_RESOURCE_TYPE);\n vmDevice.setType(VmDeviceGeneralType.forValue(VmDeviceType.getoVirtDevice(resourceType)));\n }\n if (node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS).innerText)) {\n vmDevice.setDevice(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS).innerText));\n } else {\n setDeviceByResource(node, vmDevice);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS).innerText)) {\n vmDevice.setBootOrder(Integer.valueOf(node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS).innerText));\n } else {\n vmDevice.setBootOrder(0);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS).innerText)) {\n vmDevice.setIsPlugged(Boolean.valueOf(node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS).innerText));\n } else {\n vmDevice.setIsPlugged(Boolean.TRUE);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS).innerText)) {\n vmDevice.setIsReadOnly(Boolean.valueOf(node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS).innerText));\n } else {\n vmDevice.setIsReadOnly(Boolean.FALSE);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS) != null\n && StringUtils.isNotEmpty(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)) {\n vmDevice.setCustomProperties(DevicePropertiesUtils.getInstance().convertProperties(\n String.valueOf(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)));\n } else {\n vmDevice.setCustomProperties(null);\n }\n\n if (node.SelectSingleNode(OvfProperties.VMD_SNAPSHOT_PROP, _xmlNS) != null\n && StringUtils.isNotEmpty(node.SelectSingleNode(OvfProperties.VMD_SNAPSHOT_PROP, _xmlNS).innerText)) {\n vmDevice.setSnapshotId(new Guid(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)));\n }\n\n return vmDevice;\n }", "private void Load( String szFileName )\n throws FileNotFoundException, NullPointerException, AppException\n {\n FileInputStream fs = null;\n File f = null;\n long nFileSize;\n \n f = new File( szFileName );\n if( !f.exists() || !f.canRead() )\n throw new FileNotFoundException( \"File \" + f.getPath() );\n\n try\n {\n nFileSize = f.length();\n fs = new FileInputStream( f );\n\n CharsetDecoder utf8Decoder = Charset.forName( \"UTF-8\" ).newDecoder();\n byte[] Data = null;\n\n // Read user name length and user name in UTF8\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n int nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize < nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= nLength;\n Data = new byte[nLength];\n fs.read( Data );\n m_UserName = utf8Decoder.decode( ByteBuffer.wrap( Data ) ).toString();\n\n // Read user unique ID\n if( nFileSize < 16 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= 16;\n m_Key = new byte[16];\n fs.read( m_Key );\n\n // Read template length and template data\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize != nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n m_Template = new byte[nLength];\n fs.read( m_Template );\n fs.close();\n }\n catch( SecurityException e )\n {\n if( f == null )\n throw new AppException( \"Denies read access to the file \" + f.getPath() );\n else {\n throw new AppException( \"Denies read access to the file \" + szFileName );\n }\n }\n catch( IOException e)\n {\n if( f == null )\n throw new AppException( \"Bad file \" + f.getPath() );\n else\n throw new AppException( \"Bad file \" + szFileName );\n }\n }", "private <T> void loadAllFromFolder(String name,Class<T> type){\n\t\tFileHandle dirHandle;\n\t\tif (Gdx.app.getType() == ApplicationType.Desktop) {\n\t\t dirHandle = new FileHandle(\"./bin/\"+name);\n\t\t \n\t\t} else {\n\t\t dirHandle = Gdx.files.internal(name);\n\t\t}\n\t\t \n\t\tfor (FileHandle entry: dirHandle.list()) {\n\t\t assetManager.load(entry.path(),type);\n\t\t}\n\t}", "public ProductModel getDevice(String did) {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getDevice()\");\r\n\t\treturn deviceData.getDevice(did);\r\n\t}", "private void loadGameFiles(){\n\t}", "private native static int load_object(String componentFileName);", "private void loadTiles(String filename) {\n\t\ttry {\n\t\t\tScanner s;\n\n\t\t\tif (StealthGame.EXPORT)\n\t\t\t\ts = new Scanner(ResourceLoader.load(filename));\n\t\t\telse\n\t\t\t\ts = new Scanner(new File(filename));\n\n\t\t\tif (s.hasNextLine()) {\n\t\t\t\tname = s.nextLine();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Room has no name\");\n\t\t\t}\n\t\t\txSize = s.nextInt();\n\t\t\tySize = s.nextInt();\n\t\t\ttiles = new Tile[xSize][ySize];\n\t\t\tint xPos = 0;\n\t\t\tint yPos = 0;\n\t\t\tint tileNum = 0;\n\n\t\t\t// List of doors to be given destinations\n\n\t\t\twhile (s.hasNext()) {\n\n\t\t\t\tif (s.hasNextInt()) {\n\t\t\t\t\tparseInt(s, xPos, yPos, tileNum);\n\n\t\t\t\t\txPos++;\n\t\t\t\t\ttileNum++;\n\n\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\tyPos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Not a basic floor, door or wall\n\t\t\t\telse {\n\t\t\t\t\tString str = s.next();\n\t\t\t\t\tif (str.length() == 1) {\n\t\t\t\t\t\tparseChar(xPos, yPos, tileNum, str);\n\n\t\t\t\t\t\txPos++;\n\t\t\t\t\t\ttileNum++;\n\n\t\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\t\tyPos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (str.equals(\"door\")) {\n\t\t\t\t\t\t\tparseDoorDestination(s);\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\ts.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Room - Error loading file - IOException : \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "public void loadHackerFile(HackerFile hf) {\n \n resetVariables();\n \n // should I load the description, etc from the HF? Should I even save it in the HF? I don't see any reason.\n this.name = hf.getName();\n\n HashMap content = hf.getContent();\n \n // <specialAttribute1><name><value><short_desc><long_desc>\n HashMap special1 = hf.getSpecial(1);\n HashMap special2 = hf.getSpecial(2);\n \n String a1 = (String)special1.get(\"name\");\n\t\tString v1 = (String)special1.get(\"value\");\n\t\tif(v1.equals(\"\")){\n\t\t\tv1 = \"0\";\n\t\t}\n float value = (new Float(\"\" + v1)).floatValue();\n if (a1.equals(\"emptyPettyCash()fail\")) {\n this.pettyCashFailPct = value;\n } else if (a1.equals(\"emptyPettyCash()reduce\")) {\n this.pettyCashReducePct = 1.0f-value;\n } else if (a1.equals(\"stealFile()fail\")) {\n this.stealFileFailPct = value;\n } else if (a1.equals(\"changeDailyPay()fail\")) {\n this.dailyPayChangeFailPct = value;\n } else if (a1.equals(\"changeDailyPay()reduce\")) {\n this.dailyPayChangeReducePct = 1.0f-value;\n } else if (a1.equals(\"installScript()fail\")) {\n this.installScriptFailPct = value;\n }\n \n String a2 = (String)special2.get(\"name\");\n\t\tString v2 = (String)special2.get(\"value\");\n\t\tif(v2.equals(\"\")){\n\t\t\tv2 = \"0\";\n\t\t}\n value = (new Float(\"\" + v2)).floatValue();\n if (a2.equals(\"emptyPettyCash()fail\")) {\n this.pettyCashFailPct = value;\n } else if (a2.equals(\"emptyPettyCash()reduce\")) {\n this.pettyCashReducePct = value;\n } else if (a2.equals(\"stealFile()fail\")) {\n this.stealFileFailPct = value;\n } else if (a2.equals(\"changeDailyPay()fail\")) {\n this.dailyPayChangeFailPct = value;\n } else if (a2.equals(\"changeDailyPay()reduce\")) {\n this.dailyPayChangeReducePct = value;\n } else if (a2.equals(\"installScript()fail\")) {\n this.installScriptFailPct = value;\n }\n \n // damage modifiers for this specific firewall\n this.bankDamageModifier = (new Float(\"\" + content.get(\"bank_damage_modifier\")).floatValue());\n this.redirectDamageModifier = (new Float(\"\" + content.get(\"redirect_damage_modifier\")).floatValue());\n this.attackDamageModifier = (new Float(\"\" + content.get(\"attack_damage_modifier\")).floatValue());\n this.ftpDamageModifier = (new Float(\"\" + content.get(\"ftp_damage_modifier\")).floatValue());\n this.httpDamageModifier = (new Float(\"\" + content.get(\"http_damage_modifier\")).floatValue());\n \n // attack back value for this firewall\n\t\tif(content.get(\"attack_damage\") == null){\n\t\t\tcontent.put(\"attack_damage\",\"0\");\n\t\t}\n this.attackDamage = (new Float(\"\" + content.get(\"attack_damage\"))).floatValue(); // how much attack damage does this firewall do back\n\t\t\n this.equipLevel = (int)(float)(new Float(\"\" + content.get(\"equip_level\"))).floatValue();\n this.cpuCost = hf.getCPUCost();\n\t\tif(name.equals(\"\")){\n\t\t\tname = (String)content.get(\"name\");\n\t\t}\n this.hackerFile = hf;\n }", "@Override\r\n public void open() throws HardwareInterfaceException {\r\n if(!UsbIoUtilities.usbIoIsAvailable) return;\r\n \r\n //device has already been UsbIo Opened by now, in factory\r\n \r\n // opens the USBIOInterface device, configures it, binds a reader thread with buffer pool to read from the device and starts the thread reading events.\r\n // we got a UsbIo object when enumerating all devices and we also made a device list. the device has already been\r\n // opened from the UsbIo viewpoint, but it still needs firmware download, setting up pipes, etc.\r\n \r\n if(isOpened){\r\n log.warning(\"already opened interface and setup device\");\r\n return;\r\n }\r\n \r\n int status;\r\n \r\n gUsbIo=new UsbIo();\r\n gDevList=UsbIo.createDeviceList(GUID);\r\n status = gUsbIo.open(0,gDevList,GUID);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"can't open USB device: \"+UsbIo.errorText(status));\r\n }\r\n \r\n // get device descriptor\r\n status = gUsbIo.getDeviceDescriptor(deviceDescriptor);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"getDeviceDescriptor: \"+UsbIo.errorText(status));\r\n } else {\r\n log.log(Level.INFO, \"getDeviceDescriptor: Vendor ID (VID) {0} Product ID (PID) {1}\", new Object[]{HexString.toString((short)deviceDescriptor.idVendor), HexString.toString((short)deviceDescriptor.idProduct)});\r\n }\r\n \r\n // set configuration -- must do this BEFORE downloading firmware!\r\n USBIO_SET_CONFIGURATION Conf = new USBIO_SET_CONFIGURATION();\r\n Conf.ConfigurationIndex = CONFIG_INDEX;\r\n Conf.NbOfInterfaces = CONFIG_NB_OF_INTERFACES;\r\n Conf.InterfaceList[0].InterfaceIndex = CONFIG_INTERFACE;\r\n Conf.InterfaceList[0].AlternateSettingIndex = CONFIG_ALT_SETTING;\r\n Conf.InterfaceList[0].MaximumTransferSize = CONFIG_TRAN_SIZE;\r\n status = gUsbIo.setConfiguration(Conf);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n// gUsbIo.destroyDeviceList(gDevList);\r\n // if (status !=0xE0001005)\r\n log.log(Level.WARNING, \"setting configuration: {0}\", UsbIo.errorText(status));\r\n }\r\n \r\n // get device descriptor\r\n status = gUsbIo.getDeviceDescriptor(deviceDescriptor);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"getDeviceDescriptor: \"+UsbIo.errorText(status));\r\n } else {\r\n log.log(Level.INFO, \"getDeviceDescriptor: Vendor ID (VID) {0} Product ID (PID) {1}\", new Object[]{HexString.toString((short)deviceDescriptor.idVendor), HexString.toString((short)deviceDescriptor.idProduct)});\r\n }\r\n \r\n if (deviceDescriptor.iSerialNumber!=0)\r\n this.numberOfStringDescriptors=3;\r\n \r\n // get string descriptor\r\n status = gUsbIo.getStringDescriptor(stringDescriptor1,(byte)1,0);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"getStringDescriptor: \"+UsbIo.errorText(status));\r\n } else {\r\n log.log(Level.INFO, \"getStringDescriptor 1: {0}\", stringDescriptor1.Str);\r\n }\r\n \r\n // get string descriptor\r\n status = gUsbIo.getStringDescriptor(stringDescriptor2,(byte)2,0);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"getStringDescriptor: \"+UsbIo.errorText(status));\r\n } else {\r\n log.log(Level.INFO, \"getStringDescriptor 2: {0}\", stringDescriptor2.Str);\r\n }\r\n \r\n if (this.numberOfStringDescriptors==3) {\r\n // get serial number string descriptor\r\n status = gUsbIo.getStringDescriptor(stringDescriptor3,(byte)3,0);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"getStringDescriptor: \"+UsbIo.errorText(status));\r\n } else {\r\n log.log(Level.INFO, \"getStringDescriptor 3: {0}\", stringDescriptor3.Str);\r\n }\r\n }\r\n \r\n // get outPipe information and extract the FIFO size\r\n USBIO_CONFIGURATION_INFO configurationInfo = new USBIO_CONFIGURATION_INFO();\r\n status = gUsbIo.getConfigurationInfo(configurationInfo);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"getConfigurationInfo: \"+UsbIo.errorText(status));\r\n }\r\n \r\n if(configurationInfo.NbOfPipes==0){\r\n// gUsbIo.cyclePort();\r\n throw new HardwareInterfaceException(\"didn't find any pipes to bind to\");\r\n }\r\n \r\n servoCommandWriter=new ServoCommandWriter();\r\n status=servoCommandWriter.bind(0,(byte)ENDPOINT_OUT,gDevList,GUID);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"can't bind command writer to endpoint: \"+UsbIo.errorText(status));\r\n }\r\n USBIO_PIPE_PARAMETERS pipeParams=new USBIO_PIPE_PARAMETERS();\r\n pipeParams.Flags=UsbIoInterface.USBIO_SHORT_TRANSFER_OK;\r\n status=servoCommandWriter.setPipeParameters(pipeParams);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n UsbIo.destroyDeviceList(gDevList);\r\n throw new HardwareInterfaceException(\"startAEWriter: can't set pipe parameters: \"+UsbIo.errorText(status));\r\n }\r\n \r\n servoCommandWriter.startThread(3);\r\n isOpened=true;\r\n submittedCmdAfterOpen=false;\r\n }" ]
[ "0.63575864", "0.5412033", "0.5268038", "0.5258099", "0.5086801", "0.5039787", "0.50303715", "0.49833027", "0.4977854", "0.48842767", "0.48823008", "0.48584256", "0.48565075", "0.48541427", "0.48453805", "0.4835859", "0.48229814", "0.48124847", "0.4778198", "0.4760918", "0.4745579", "0.47027764", "0.47027475", "0.46631157", "0.46557945", "0.46491134", "0.46475762", "0.46193442", "0.46079364", "0.46012166", "0.45830217", "0.4581865", "0.45815268", "0.45787275", "0.4563219", "0.45509058", "0.4548408", "0.45422155", "0.45405108", "0.4537341", "0.45312056", "0.45288125", "0.4524012", "0.4513146", "0.45123664", "0.45123664", "0.45062295", "0.45036393", "0.4499227", "0.449748", "0.4494695", "0.44919166", "0.44823065", "0.44732788", "0.44732782", "0.44712606", "0.44517484", "0.4446086", "0.44270283", "0.4426437", "0.44243318", "0.44233656", "0.44159102", "0.4412494", "0.44121596", "0.44051835", "0.4401232", "0.4390604", "0.4386984", "0.4384084", "0.437989", "0.4378568", "0.4367022", "0.43646905", "0.43597808", "0.43590584", "0.43578926", "0.4355445", "0.43540522", "0.43525591", "0.43489748", "0.4341842", "0.43386394", "0.4334701", "0.4334338", "0.4334186", "0.43302083", "0.43242607", "0.4321367", "0.43193823", "0.4314989", "0.43133348", "0.43131253", "0.4312547", "0.4308292", "0.43080878", "0.43064046", "0.43031636", "0.43018323", "0.43016136" ]
0.74198574
0
Gets the wire enumerator file path and name for the given partName.
public static String getWireEnumeratorFileName(String partName) { return getPartFolderPath(partName) + wireEnumeratorFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WireEnumerator loadWireEnumerator(String partName) {\n FamilyType familyType = PartNameTools.getFamilyTypeFromPart(partName);\n return loadWireEnumerator(familyType);\n }", "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n PartNameTools.removeSpeedGrade(partName) +\n deviceFileSuffix;\n }", "public static String getPartFolderPath(String partName) {\n return getRapidSmithPath() +\n File.separator +\n deviceFolderName +\n File.separator +\n PartNameTools.getFamilyNameFromPart(partName) +\n File.separator;\n }", "public Object getPart(String partName);", "public Part getPart(String name) throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form.getPart(name);\n }", "public Path resolve(String part) {\n return Paths.get(part);\n }", "public static String getWireEnumeratorFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + wireEnumeratorFileName;\n }", "public static String getPrimitiveDefsFileName(String partName) {\n return getPartFolderPath(partName) + primitiveDefFileName;\n }", "public static String getDeviceVersion(String partName) {\n String fileName = getDeviceFileName(partName);\n String version;\n try {\n Hessian2Input his = FileTools.getInputStream(fileName);\n version = his.readString();\n his.close();\n } catch (FileNotFoundException e) {\n return null;\n } catch (IOException e) {\n return null;\n }\n\n return version;\n }", "public Part lookupPart(String partName) {\n for(Part part : allParts) {\n if(part.getName().equals(partName)) {\n return part;\n }\n }\n \n return null;\n }", "private String extractFileName(Part part) {\n\t String contentDisp = part.getHeader(\"content-disposition\");\r\n\t String[] items = contentDisp.split(\";\");\r\n\t for (String s : items) {\r\n\t if (s.trim().startsWith(\"filename\")) {\r\n\t // C:\\file1.zip\r\n\t // C:\\Note\\file2.zip\r\n\t String clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t clientFileName = clientFileName.replace(\"\\\\\", \"/\");\r\n\t int i = clientFileName.lastIndexOf('/');\r\n\t // file1.zip\r\n\t // file2.zip\r\n\t return clientFileName.substring(i + 1);\r\n\t }\r\n\t }\r\n\t return null;\r\n\t }", "public String name() {\n return (parts.length > 0) ? parts[parts.length - 1] : null;\n }", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String getName() {\n int index = getSplitIndex();\n return path.substring(index + 1);\n }", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "private String getFilePath(int tenantId, String transportAdaptorName) {\n\n if (transportAdaptorFileMap.size() > 0) {\n List<InputTransportAdaptorFile> inputTransportAdaptorFileList = transportAdaptorFileMap.get(tenantId);\n if (inputTransportAdaptorFileList != null) {\n for (InputTransportAdaptorFile inputTransportAdaptorFile : inputTransportAdaptorFileList) {\n if ((inputTransportAdaptorFile.getTransportAdaptorName().equals(transportAdaptorName))) {\n return inputTransportAdaptorFile.getFilePath();\n }\n }\n }\n }\n return null;\n }", "private Path makeFilePath(String name) {\n Path baseFilePath = Paths.get(portManager.getBfp());\n if (name.length() > 4 && name.substring(name.length() - 5).equals(\".json\")) {\n return baseFilePath.resolve(name);\n } else {\n return baseFilePath.resolve(name + \".json\");\n }\n }", "java.lang.String getFilePath();", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "public static String getFileName(Part part) {\n final String partHeader = part.getHeader(\"content-disposition\");\n for (String content : part.getHeader(\"content-disposition\").split(\";\")) {\n if (content.trim().startsWith(\"filename\")) {\n return content.substring(content.indexOf('=') + 1).trim()\n .replace(\"\\\"\", \"\");\n }\n }\n return \"\";\n }", "public static ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> partsContainingSubstring = FXCollections.observableArrayList();\n\n // The for loop variable to the left of the colon is a temporary variable containing a single element from the collection on the right\n // With each iteration through the loop, Java pulls the next element from the collection and assigns it to the temp variable.\n for (Part currentPart : Inventory.getAllParts()) {\n if (currentPart.getName().toLowerCase().contains(partName.toLowerCase())) {\n partsContainingSubstring.add(currentPart);\n }\n }\n return partsContainingSubstring;\n }", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "private String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String getFile(Element temp){\r\n\t\t//Element temp = getPlace(where,\"Characters\");\r\n\t\treturn temp.getChildText(\"Path\") + temp.getChildText(\"File\");\r\n\t}", "String getPathName();", "String getPathName();", "Path getModBookFilePath();", "private String extractFileName(Part part) {\n String contentDisp = part.getHeader(\"content-disposition\");\n String[] items = contentDisp.split(\";\");\n for (String s : items) {\n if (s.trim().startsWith(\"filename\")) {\n return s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n }\n }\n return \"\";\n }", "private String extractFileName(Part part) {\n String contentDisp = part.getHeader(\"content-disposition\");\n String[] items = contentDisp.split(\";\");\n for (String s : items) {\n if (s.trim().startsWith(\"filename\")) {\n return s.substring(s.indexOf(\"=\") + 2, s.length()-1);\n }\n }\n return \"\";\n }", "public String getPathName();", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "@Override\r\n public String getBaseName() {\r\n if (baseName == null) {\r\n final int idx = getPath().lastIndexOf(SEPARATOR_CHAR);\r\n if (idx == -1) {\r\n baseName = getPath();\r\n } else {\r\n baseName = getPath().substring(idx + 1);\r\n }\r\n }\r\n\r\n return baseName;\r\n }", "public static String getExactFamilyNameFromPart(String partName) {\n return getExactFamilyTypeFromPart(partName).toString().toLowerCase();\n }", "com.google.protobuf.ByteString\n getFilePathBytes();", "public java.lang.String getPart()\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(PART$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private String extractFileName(final Part part) {\n\t\tfinal String contentDisp = part.getHeader(\"content-disposition\");\n\t\tfinal String[] items = contentDisp.split(\";\");\n\t\tfor (final String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length()-1);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "String getPartWithPort();", "public static String getFamilyNameFromPart(String partName) {\n return getFamilyTypeFromPart(partName).toString().toLowerCase();\n }", "private String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length()-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "com.google.protobuf.ByteString\n getFilenameBytes();", "com.google.protobuf.ByteString\n getFilenameBytes();", "public String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "public String getName() {\n return _file.getAbsolutePath();\n }", "public ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> namedParts = FXCollections.observableArrayList();\n for ( Part part : allParts ) {\n if(part.getName().toLowerCase().contains(partName.toLowerCase())) {\n namedParts.add(part);\n }\n }\n return namedParts;\n }", "public org.apache.xmlbeans.XmlNCName xgetPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNCName target = null;\n target = (org.apache.xmlbeans.XmlNCName)get_store().find_element_user(PART$2, 0);\n return target;\n }\n }", "public String getNameFile(){\n\t\t\treturn this.nameFile;\n\t\t}", "private String get_FilePath(String put, int ind) {\n\n File file = new File(put);\n File[] files = file.listFiles();\n\n try {\n if (files[ind].isFile()) {\n return files[ind].getAbsolutePath();\n }\n } catch (Exception e) {\n Log.d(TAG, \"Exception error : \" + e.getMessage());\n }\n return null;\n }", "public String getPlayFile();", "private String extractFileName(Part part) {\n\nString contentDisp = part.getHeader(\"content-disposition\");\n\nString[] items = contentDisp.split(\";\");\n\nfor (String s : items) {\n\nif (s.trim().startsWith(\"filename\")) {\n\nreturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\n}\n\n}\n\nreturn \"\";\n\n}", "public String getSpectrumFilePath(String fileName) {\n\n \n return spectrumFiles.get(fileName);\n\n }", "public String getPathName() {\n\t\treturn pathName;\n\t}", "String getFilePath();", "public final String getFilePath() {\n\t\treturn m_info.getPath();\n\t}", "public String getFilePath(Extension extension) {\n\t\treturn extension.eResource().getURI().toString();\n\t}", "public static int findLine(String partname) throws IOException\n\t{\n\t\tString line;\n\t\tFile worksheet = new File(\"/Users/sturtevantauto/Pictures/Car_Pictures/XPS/6715329.acu\");\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(worksheet));\n\t\t\tint i = 1;\n\t\t\tint linenum = 0;\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(line.contains(partname))\n\t\t\t\t\tlinenum = i;\n\t\t\t\t\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treader.close();\n\t\t\treturn linenum;\n\t}", "private String grabNameFile(String absPath)\n {\n \t\n \t// parse filename from absolute path\n \tString[] delimSlashes = absPath.split(\"/\");\n \tString fn = delimSlashes[delimSlashes.length - 1];\n \tif (fn.substring(0, 5).equals(\"files\"))\n \t{\n \t\tfn = fn.substring(5); // removes \"files\" from the beginning which is prepended by the Android Beam API\n \t}\n \t\n \t// split string based on underscores\n \tString[] result = fn.split(\"_\");\n \t\n \tif (result.length < 3)\n \t{\n \t\t//error, this means first/last name wasn't appended\n \t\treturn null;\n \t}\n \t\n \t// the order of the names is (last,first) when sent by the sender:\n \tmFirstName = result[1];\n \tmLastName = result[0];\n \t\n \treturn fn;\n }", "public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "public String getSimpleName() { return FilePathUtils.getFileName(_name); }", "protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}", "public String getURLFilePathname() {\n return mPathname;\n }", "public GamePart getSavePart(String fileName) {\n \tString saveState = fileName + \"/\" + SAVE + \".xml\";\n \tFile file = new File(saveState);\n return (GamePart) xstream.fromXML(convertXMLFileToString(file));\n }", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "String getFilename();", "public String getParsedFileName(String name, int index) {\r\n\t\t// We split until the first 3 (4-1) underscores.\r\n\t\tString[] parsedText = name.split(\"_\", 4);\r\n\r\n\t\t// format: latency_estclk_luts_filename\r\n\t\t// format: 0_1_2_3\r\n\t\tswitch (index) {\r\n\t\tcase 0:\r\n\t\t\t// We return the latency.\r\n\t\t\treturn parsedText[0];\r\n\t\tcase 1:\r\n\t\t\t// We return the estimated clock.\r\n\t\t\treturn parsedText[1];\r\n\t\tcase 2:\r\n\t\t\t// We return the luts.\r\n\t\t\treturn parsedText[2];\r\n\t\tcase 3:\r\n\t\t\t// We return the file name.\r\n\t\t\treturn parsedText[3];\r\n\t\tdefault:\r\n\t\t\treturn (\"Out of bounds in getParsedFileName\");\r\n\t\t}\r\n\t}", "public String getFileChosen() \n {\n return fileName.getText();\n }", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "public String getFilePath(int fileidx) {\n return null;\r\n }", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public int getFile() {\n validify();\n return Client.INSTANCE.pieceGetFile(ptr);\n }", "public String getFilePath(String s) {\n switch(s) {\n case \"fb\":\n return this.fb;\n case \"fbInitialRankingFile\":\n return this.fbInitialRankingFile;\n case \"fbExpansionQueryFile\":\n return this.fbExpansionQueryFile;\n default:\n throw new IllegalArgumentException\n (\"Illegal argument: IndriExpansion doesn't have argument \" + s);\n }\n }", "public String getOpenFilePath() {\n\t\treturn filePath.getText();\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getFilePathBytes() {\n return instance.getFilePathBytes();\n }", "public static String getBinaryFile(){\r\n return Input.getString(\"What is the name of the binary file? Please add .dat file extension: \");\r\n }", "public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade(partName);\n Device device = Device.getInstance(canonicalName);\n String path = getDeviceFileName(canonicalName);\n\n // Don't reload the device if same part is already loaded\n if (device.getPartName() != null) {\n return device;\n }\n\n if (!device.readDeviceFromCompactFile(path)) {\n return null;\n } else {\n return device;\n }\n }", "public static String filenamePart(String path) {\n char sep = System.getProperty(\"file.separator\", \"/\").charAt(0);\n int i = path.lastIndexOf(sep);\n return (i < 0)? path : path.substring(i+1);\n }", "Path getPath(String name) throws IOException;", "com.google.protobuf.ByteString\n getFileNameBytes();", "public String getPathname() {return this.pathname;}", "private String getFile() {\r\n\t\tJFileChooser fileChooser = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\r\n\t\tfileChooser.setDialogTitle(\"Choose a file to open: \");\r\n\t\tfileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\tint success = fileChooser.showOpenDialog(null);\r\n\t\tif (success == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile selectedFile = fileChooser.getSelectedFile();\r\n\t\t\tString fileName = selectedFile.getName();\r\n\t\t\treturn fileName;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "private Descriptors.FieldDescriptor f(String name) {\n Descriptors.FieldDescriptor result;\n if (extensionRegistry == null) {\n result = baseDescriptor.findFieldByName(name);\n } else {\n result = file.findExtensionByName(name + \"_extension\");\n }\n Assert.assertNotNull(result);\n return result;\n }" ]
[ "0.6374881", "0.6274142", "0.624104", "0.56646854", "0.5602854", "0.54953724", "0.5410109", "0.5408847", "0.5369876", "0.5353706", "0.53518057", "0.5326175", "0.52866703", "0.52866703", "0.52719176", "0.51685905", "0.51661265", "0.51258755", "0.5105973", "0.5093399", "0.50917095", "0.507888", "0.50714284", "0.505952", "0.505783", "0.505783", "0.50475526", "0.50382936", "0.50382936", "0.5030991", "0.5030526", "0.50283724", "0.5027176", "0.5019962", "0.50162613", "0.5014988", "0.49923894", "0.49906784", "0.49758217", "0.49755642", "0.4975105", "0.49597588", "0.49550438", "0.49550438", "0.49395362", "0.4925713", "0.492268", "0.4895176", "0.48912865", "0.48851165", "0.48825666", "0.4866474", "0.48612908", "0.48493424", "0.48363", "0.48320976", "0.48264524", "0.48227426", "0.48161763", "0.48108995", "0.4808365", "0.4808054", "0.48043323", "0.48039353", "0.47966072", "0.478731", "0.4786295", "0.47765788", "0.47742936", "0.4771214", "0.4769947", "0.4769947", "0.4769947", "0.4769947", "0.4769947", "0.4769947", "0.4769947", "0.4769947", "0.47668552", "0.47638", "0.47638", "0.47638", "0.47638", "0.47638", "0.47638", "0.47638", "0.47638", "0.47638", "0.475065", "0.4749566", "0.4749498", "0.4747486", "0.47444722", "0.47383347", "0.47297943", "0.4729112", "0.4726473", "0.469459", "0.46921268", "0.468975" ]
0.8340639
0
Gets the wire enumerator file path and name for the given familyType.
public static String getWireEnumeratorFileName(FamilyType familyType) { return getPartFolderPath(familyType) + wireEnumeratorFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WireEnumerator loadWireEnumerator(FamilyType familyType) {\n familyType = PartNameTools.getBaseTypeFromFamilyType(familyType);\n WireEnumerator we = WireEnumerator.getInstance(familyType);\n String path = getWireEnumeratorFileName(familyType);\n if (we.getFamilyName() != null) {\n return we;\n }\n\n if (!we.readCompactEnumFile(path, familyType)) {\n return null;\n } else {\n return we;\n }\n }", "public static String getPartFolderPath(FamilyType familyType) {\n familyType = PartNameTools.getBaseTypeFromFamilyType(familyType);\n return getRapidSmithPath() +\n File.separator +\n deviceFolderName +\n File.separator +\n familyType.toString().toLowerCase() +\n File.separator;\n }", "public static String getPrimitiveDefsFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + primitiveDefFileName;\n }", "public String getFileType(){\n\t\treturn type;\n\t}", "com.google.protobuf.ByteString\n getFilePathBytes();", "com.google.protobuf.ByteString\n getFileLocBytes();", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "public abstract String protoPath();", "String getFamily();", "String getFamily();", "public java.lang.String getFiletype() {\n return filetype;\n }", "Path getAddressBookFilePath();", "public String getFileType() {\n return fileType;\n }", "public java.lang.String getFileLoc() {\n java.lang.Object ref = fileLoc_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileLoc_ = s;\n }\n return s;\n }\n }", "public TFileType getFileType() {\n\n\t\treturn type;\n\t}", "public static String getFileType(){\n\t\t//Get the selected file type\n\t\tString type = (String) fileType.getSelectedItem();\n\t\t//Re-enable the combobox, since download has already started\n\t\tfileType.setEnabled(true);\n\t\t//Reset the default file type\n\t\tfileType.setSelectedIndex(0);\n\t\treturn type;\n\t}", "public String getFiletype() {\n return filetype;\n }", "java.lang.String getFileLoc();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "public String getFileType()\n {\n if (m_fileOptions.m_type == null ||\n m_fileOptions.m_type.length() <= 0)\n {\n return getTypeFromExtension();\n }\n\n return m_fileOptions.m_type;\n }", "com.google.protobuf.ByteString\n getFileNameBytes();", "public FileType getFileType() {\n return fileType;\n }", "public String getPathName();", "java.lang.String getFilePath();", "public Integer getFileType() {\n return fileType;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getFilePathBytes() {\n return instance.getFilePathBytes();\n }", "protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}", "public edu.umich.icpsr.ddi.FileTypeType getFileType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileTypeType target = null;\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().find_element_user(FILETYPE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}", "public java.lang.String getFileLoc() {\n java.lang.Object ref = fileLoc_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n fileLoc_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getPathName();", "String getPathName();", "public String getImageFamily() {\n return this.imageFamily;\n }", "public Object fileName() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().fileName();\n }", "public Family getFamily() {\r\n return pic_.getFamily();\r\n }", "public String getType()\n {\n return VFS.FILE_TYPE;\n }", "private NodeRef getEvidenceBankFolder() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n List<String> pathElements = new ArrayList<String>();\n pathElements.add(TradeMarkModel.DOCUMENT_LIBRARY_FOLDER_NAME);\n pathElements.add(TradeMarkModel.EVIDENCE_BANK_FOLDER_NAME);\n pathElements.add(TradeMarkModel.TWOAEVIDENCE_LIBRARY_FOLDER_NAME);\n NodeRef nr = null;\n try {\n nr = fileFolderService.resolveNamePath(repositoryHelper.getCompanyHome(), pathElements).getNodeRef();\n } catch (FileNotFoundException e) {\n if(LOG.isInfoEnabled()){\n LOG.info(e.getMessage(), e);\n } \n LOG.error(e.getMessage(), e);\n }\n return nr;\n }", "public edu.umich.icpsr.ddi.FileNameType getFileName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileNameType target = null;\n target = (edu.umich.icpsr.ddi.FileNameType)get_store().find_element_user(FILENAME$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "com.google.protobuf.ByteString\n getFilenameBytes();", "com.google.protobuf.ByteString\n getFilenameBytes();", "public ReactorResult<java.lang.String> getAllFileType_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), FILETYPE, java.lang.String.class);\r\n\t}", "public String getLocationOfFiles() {\n\t\ttry {\n\t\t\tFile f = new File(\n\t\t\t\t\tgetRepositoryManager().getMetadataRecordsLocation() + \"/\" + getFormatOfRecords() + \"/\" + getKey());\n\t\t\treturn f.getAbsolutePath();\n\t\t} catch (Throwable e) {\n\t\t\tprtlnErr(\"Unable to get location of files: \" + e);\n\t\t\treturn \"\";\n\t\t}\n\t}", "private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }", "public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }", "public String getFamily()\n {\n return _family;\n }", "Path getDeliverableBookFilePath();", "String getFilePath();", "public com.google.protobuf.ByteString getFile() {\n return file_;\n }", "public String getFamily() {\n return this.family;\n }", "public String getExtName(String szMIMEType)\r\n { \r\n if (szMIMEType == null)\r\n return null;\r\n\r\n Object extension = m_hashTableExt.get(szMIMEType);\r\n\r\n if (extension == null) \r\n return null;\r\n return (String)extension;\r\n }", "ILitePackFamily getFamily();", "public abstract String getFileFormatName();", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "public com.google.protobuf.ByteString\n getFileLocBytes() {\n java.lang.Object ref = fileLoc_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n fileLoc_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getReadMimeType(int formatIndex);", "public com.google.protobuf.ByteString getFile() {\n return file_;\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n edu.usfca.cs.dfs.StorageMessages.FileLocation, edu.usfca.cs.dfs.StorageMessages.FileLocation.Builder, edu.usfca.cs.dfs.StorageMessages.FileLocationOrBuilder> \n getFileLocationFieldBuilder() {\n if (fileLocationBuilder_ == null) {\n if (!(msgCase_ == 9)) {\n msg_ = edu.usfca.cs.dfs.StorageMessages.FileLocation.getDefaultInstance();\n }\n fileLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n edu.usfca.cs.dfs.StorageMessages.FileLocation, edu.usfca.cs.dfs.StorageMessages.FileLocation.Builder, edu.usfca.cs.dfs.StorageMessages.FileLocationOrBuilder>(\n (edu.usfca.cs.dfs.StorageMessages.FileLocation) msg_,\n getParentForChildren(),\n isClean());\n msg_ = null;\n }\n msgCase_ = 9;\n onChanged();;\n return fileLocationBuilder_;\n }", "public abstract String getFileLocation();", "private String getReferentialFilename(final String requestTypeLabel) \n throws CvqException {\n \n if (requestTypeLabel.equals(\"All\")) {\n return commonReferentialFilename;\n } else {\n Iterator servicesIt = parsedRequestServices.iterator();\n IRequestService associatedService = null;\n while (servicesIt.hasNext()) {\n IRequestService service = (IRequestService) servicesIt.next();\n if (service.getLabel().equals(requestTypeLabel))\n associatedService = service;\n }\n \n if (associatedService == null)\n throw new CvqException(\"No service found for \" + requestTypeLabel);\n \n return associatedService.getLocalReferentialFilename();\n }\n }", "public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }", "Path getModBookFilePath();", "private String getResourceName(ResourceType type) {\n // get the name from the filename.\n String name = getFile().getName();\n\n int pos = name.indexOf('.');\n if (pos != -1) {\n name = name.substring(0, pos);\n }\n\n return name;\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n }\n }", "public com.google.protobuf.ByteString\n getFileLocBytes() {\n java.lang.Object ref = fileLoc_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n fileLoc_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString getMimeTypeBytes();", "public String getRecordFile();", "java.lang.String getFilename();", "java.lang.String getFilename();", "edu.usfca.cs.dfs.StorageMessages.FileLocation getFileLocation();", "@java.lang.Override\n public java.lang.String getFilePath() {\n return instance.getFilePath();\n }", "@Override\n public String getFilenameXPathKey() {\n return ebsco_filename;\n }", "public String getBasename()\n {\n // Default implementation: getBasename of path \n return _nodeVRL.getBasename(); \n }", "public String getReadFileExtension(int formatIndex);", "public final String getFilePath() {\n\t\treturn m_info.getPath();\n\t}", "com.google.protobuf.ByteString\n getMimeTypeBytes();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "String[] getFileTypes();", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getMimeType() throws VlException\n {\n return MimeTypes.getDefault().getMimeType(this.getPath());\n }", "FileFormat getFormat();", "public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}", "com.google.protobuf.ByteString\n getSrcPathBytes();", "public String getPathName()\n {\n return getString(\"PathName\");\n }" ]
[ "0.65200907", "0.5712707", "0.553505", "0.53496474", "0.5312365", "0.5300194", "0.52554137", "0.5196478", "0.5188126", "0.5188126", "0.5173538", "0.51576155", "0.5138546", "0.51155597", "0.5075129", "0.50509083", "0.50478566", "0.504318", "0.49961752", "0.49961752", "0.49961752", "0.49961752", "0.49961752", "0.49961752", "0.49961752", "0.49961752", "0.49956977", "0.49856725", "0.49840906", "0.49819705", "0.4981178", "0.49759346", "0.49691936", "0.49666122", "0.4952099", "0.49423108", "0.49379465", "0.49369824", "0.49369824", "0.49046192", "0.48870745", "0.48761737", "0.48597485", "0.48480132", "0.48319703", "0.48311234", "0.48311234", "0.48259118", "0.47962198", "0.4787906", "0.47839543", "0.4768184", "0.47673142", "0.47514698", "0.47423545", "0.47365218", "0.47078866", "0.47057816", "0.47050065", "0.47034845", "0.46973464", "0.46933407", "0.46842158", "0.467033", "0.46680233", "0.46594584", "0.46573088", "0.46527606", "0.4652028", "0.46467468", "0.46467468", "0.46413863", "0.46409336", "0.4634008", "0.4633559", "0.4633559", "0.46289206", "0.46286958", "0.46258947", "0.46231124", "0.46225032", "0.46189728", "0.461738", "0.46157265", "0.46157265", "0.46157265", "0.46157265", "0.46157265", "0.46157265", "0.46157265", "0.46157265", "0.46157265", "0.46108592", "0.460998", "0.460998", "0.4607472", "0.46060878", "0.46021178", "0.45996913", "0.4599465" ]
0.8282715
0
Loads the appropriate WireEnumerator file based on the part name. Accounts for speed grade in file name.
public static WireEnumerator loadWireEnumerator(String partName) { FamilyType familyType = PartNameTools.getFamilyTypeFromPart(partName); return loadWireEnumerator(familyType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "private void loadGame(String fileName){\n\n }", "public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade(partName);\n Device device = Device.getInstance(canonicalName);\n String path = getDeviceFileName(canonicalName);\n\n // Don't reload the device if same part is already loaded\n if (device.getPartName() != null) {\n return device;\n }\n\n if (!device.readDeviceFromCompactFile(path)) {\n return null;\n } else {\n return device;\n }\n }", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "public abstract Source load(ModuleName name);", "public abstract void load() throws IOException;", "public static void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}", "public void readFile(String name)\n\t{\n\t\tFileInputStream fis = null;\n\t\tObjectInputStream in = null;\n\t\ttry\n\t\t{\n\t\t\tfis = new FileInputStream(name);\n\t\t\tin = new ObjectInputStream(fis);\n\t\t\t// ind = (WebIndexer)in.readObject();\n\t\t\tTree xcd = (Tree)in.readObject();\n\t\t\tind = new WebIndexer(xcd);\n\t\t\tin.close();\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch(ClassNotFoundException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\t\t\n\t}", "public static WireEnumerator loadWireEnumerator(FamilyType familyType) {\n familyType = PartNameTools.getBaseTypeFromFamilyType(familyType);\n WireEnumerator we = WireEnumerator.getInstance(familyType);\n String path = getWireEnumeratorFileName(familyType);\n if (we.getFamilyName() != null) {\n return we;\n }\n\n if (!we.readCompactEnumFile(path, familyType)) {\n return null;\n } else {\n return we;\n }\n }", "public void load(String filePath){\r\n File loadFile = new File(filePath);\r\n if (!loadFile.exists()){\r\n System.out.println(\"I failed. There are no saved games.\");\r\n return;\r\n }\r\n FileInputStream fis = null;\r\n ObjectInputStream in = null;\r\n try {\r\n fis = new FileInputStream(filePath);\r\n in = new ObjectInputStream(fis);\r\n long versionUID = (long) in.readObject();\r\n if (versionUID != this.serialVersionUID) {\r\n throw new UnsupportedClassVersionError(\"Version mismatch for save game!\");\r\n }\r\n this.p = (Character) in.readObject();\r\n this.map = (SpecialRoom[][]) in.readObject();\r\n\r\n } catch (FileNotFoundException ex){\r\n System.out.println(\"The saved game was not found!\");\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n System.out.println(\"There was an error reading your save game :(\");\r\n ex.printStackTrace();\r\n System.out.println(\")\");\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(\"The version of the save game is not compatible with this game!\");\r\n ex.printStackTrace();\r\n } catch (UnsupportedClassVersionError ex) {\r\n System.out.println(ex.getMessage());\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n System.out.println(\"An unknown error occurred!\");\r\n }\r\n\r\n }", "public Structure load(String name) {\n \t\treturn null;\n \t}", "@Override\n\tpublic void init(String file_name) { deserialize(file_name); }", "public IniFile(String name) {\r\n this.filename = name;\r\n isavailable = parse(name);\r\n }", "private void loadGameFiles(){\n\t}", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "public abstract SoundContainer loadSound( String filename ) throws IOException;", "public void loadGame() throws IOException\r\n\t{\r\n\t\tjava.io.BufferedReader reader;\r\n\t String line;\r\n\t String[] elements;\r\n\t int ammo = 0;\r\n\t String state = null;\r\n\t try\r\n\t {\r\n\t reader = new java.io.BufferedReader(new java.io.FileReader(\"Game.ser\"));\r\n\t line = reader.readLine();\r\n\t elements = line.split(\":\");\r\n\t state = elements[0];\r\n\t ammo = Integer.decode(elements[1]);\r\n\t \r\n\t reader.close();\r\n\t \r\n\t\t gamePanel.getView().getPlayer().setAmmo(ammo);\r\n\t\t gamePanel.getView().getPlayer().setState(state);\r\n\t }\r\n\t catch(Exception e)\r\n\t {\r\n\t System.out.println(\"Can't load this save\");\r\n\t }\r\n\t \r\n\t \r\n\r\n\t}", "File getLoadLocation();", "public void loadQuickly(){\r\n System.out.println(\"I am going to try to load your games.\");\r\n String quickLoadPath = this.savePath + File.separator + \"QuickSave.ser\";\r\n this.load(quickLoadPath);\r\n }", "load createload(String name)\n {\n load iLoad = iIncomingLobsFactory.createload(name);\n \n return initload(iLoad);\n }", "protected void loadFile(String s) {\n\t\tpush();\n\t\tfile.load(s, curves);\n\t\trecalculateCurves();\n\t\tpushNew();\n\t}", "public void load(String name) {\n\tSetupLoader.load(board, name);\n\tgb.init();\n\ttsp.init();\n\tcols = gb.getCols();\n\trows = gb.getRows();\n\n\tssp.setBoardDimensions(cols, rows);\n\tgetPromotionListModel().load(board.getPromotionList());\n\n\tgb.update();\n }", "public void\tload(String fileName) throws IOException;", "protected FileObject findFile(List<String> loadPaths, String moduleName) {\n\t\tif(moduleName.startsWith(\"./\")) {\n\t\t\tmoduleName = moduleName.substring(2);\n\t\t}\n\t\tString fileName = normalizeName(moduleName);\n\t\tFileObject file = null;\n\t\tfor (String loadPath : loadPaths) {\n\t\t\t// require('foo');\n\t\t\tfor (String startPath : this.startPaths) {\n\t\t\t\ttry {\n\t\t\t\t\tString newName = startPath+loadPath+fileName;\n\t\t\t\t\tfile = fetchFile(newName);\n\t\t\t\t\tif(file != null){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//System.out.println(\"Error getting file \"+moduleName+\": \"+ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn file;\n\t}", "protected abstract void loader() throws IOException;", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "public void loadFile()\n {\n\n FileDialog fd = null; //no value\n fd = new FileDialog(fd , \"Pick up a bubble file: \" , FileDialog.LOAD); //create popup menu \n fd.setVisible(true); // make visible manu\n String directory = fd.getDirectory(); // give the location of file\n String name = fd.getFile(); // give us what file is it\n String fullName = directory + name; //put together in one sting \n \n File rideNameFile = new File(fullName); //open new file with above directory and name\n \n Scanner nameReader = null;\n //when I try to pick up it read as scanner what I choose\n try\n {\n nameReader = new Scanner(rideNameFile);\n }\n catch (FileNotFoundException fnfe)//if dont find return this message below\n {\n return; // immedaitely exit from here\n }\n \n //if load button pressed, it remove all ride lines in the world\n if(load.getFound()){\n removeAllLines();\n } \n \n //read until is no more stings inside of file and until fullfill max rides\n while(nameReader.hasNextLine()&&currentRide<MAX_RIDES)\n {\n \n String rd= nameReader.nextLine();//hold and read string with name of ride\n RideLines nova =new RideLines(rd);\n rides[currentRide]=nova;\n \n //Create a RideLine with string given from file\n addObject(rides[currentRide++], 650, 20 + 40*currentRide);\n }\n \n //when is no more strings inside it close reader\n nameReader.close();\n }", "public abstract void loadFile(Model mod, String fn) throws IOException;", "protected Spec readSpecFromFile(Path path) throws IOException {\n Spec spec;\n\n try (FSDataInputStream fis = fs.open(path)) {\n spec = this.specSerDe.deserialize(ByteStreams.toByteArray(fis));\n }\n\n return spec;\n }", "private void loadFromXml(String fileName) throws IOException {\n\t\tElement root = new XmlReader().parse(Gdx.files.internal(fileName));\n\n\t\tthis.name = root.get(\"name\");\n\t\tGdx.app.log(\"Tactic\", \"Loading \" + this.name + \"...\");\n\n\t\tArray<Element> players = root.getChildrenByName(\"player\");\n\t\tint playerIndex = 0;\n\t\tfor (Element player : players) {\n\t\t\t//int shirt = player.getInt(\"shirt\"); // shirt number\n\t\t\t//Gdx.app.log(\"Tactic\", \"Location for player number \" + shirt);\n\n\t\t\t// regions\n\t\t\tArray<Element> regions = player.getChildrenByName(\"region\");\n\t\t\tfor (Element region : regions) {\n\t\t\t\tString regionName = region.get(\"name\"); // region name\n\n\t\t\t\tthis.locations[playerIndex][Location.valueOf(regionName).ordinal()] = new Vector2(region.getFloat(\"x\"), region.getFloat(\"y\"));\n\n\t\t\t\t//Gdx.app.log(\"Tactic\", locationId + \" read\");\n\t\t\t}\n\t\t\tplayerIndex++;\n\t\t}\t\n\t}", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "@Override\r\n\tpublic void loadMaze(String name , String fileName) {\r\n\t\tMyDecompressorInputStream inFile;\r\n\t\ttry {\r\n\t\t\tinFile = new MyDecompressorInputStream(new FileInputStream(fileName));\r\n\t\t\tbyte[] b = new byte[4096];\r\n\t\t\tif(mazeInFile.containsKey(fileName)==true)\r\n\t\t\t{\r\n\t\t\t\tif(inFile.read(b)!=-1)\r\n\t\t\t\t{\r\n\t\t\t\t\tMaze3d maze = new Maze3d(b);\r\n\t\t\t\t\tcontroller.loadMaze(maze,name);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tcontroller.printStr(\"Can't load maze\");\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tcontroller.printStr(\"File \" + fileName + \" is not exist!\");\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract void load();", "public Object load(String compName) {\n\t\tif (this.preLoaded) {\n\t\t\treturn this.cachedOnes.get(compName);\n\t\t}\n\t\tString fileName = componentFolder + this.folder\n\t\t\t\t+ compName.replace(DELIMITER, FOLDER_CHAR) + EXTN;\n\t\tException exp = null;\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tobj = this.cls.newInstance();\n\t\t\tif (XmlUtil.xmlToObject(fileName, obj) == false) {\n\t\t\t\t/*\n\t\t\t\t * load failed. obj is not valid any more.\n\t\t\t\t */\n\t\t\t\tobj = null;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texp = e;\n\t\t}\n\n\t\tif (exp != null) {\n\t\t\tTracer.trace(exp, \"error while loading component \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\tif (obj == null) {\n\t\t\tTracer.trace(\"error while loading component \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\t/*\n\t\t * we insist that components be stored with the right naming convention\n\t\t */\n\t\tComponent comp = (Component) obj;\n\t\tString fullName = comp.getQualifiedName();\n\n\t\tif (compName.equalsIgnoreCase(fullName) == false) {\n\t\t\tTracer.trace(\"Component has a qualified name of \" + fullName\n\t\t\t\t\t+ \" that is different from its storage name \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\treturn comp;\n\t}", "void massiveModeLoading( File dataPath );", "public void ParseFile(String strFilePath){\n\t\t_TEST stack = new _TEST();\t\t\t\t\t\t/* TEST */\n\t\tstack.PrintHeader(ID,\"strFilePath:String\", \"\");\t/* TEST */\n\t\tswitch(Integer.decode(strFilePath)){\n\t\tcase 0:\t\t\n\t\t\t/*\n\t\t\t* ********************************\n\t\t\t* ******* Egyszeru aramkor ******\n\t\t\t* ********************************\n\t\t\t* led0 = sw0 + gen0\n\t\t\t*/\t\t\n\t\t\t//osszekoto wire letrehozasa\t\t\n\t\t\tWire sw0_or0 = new Wire();\t\n\t\t\tWire gen0_or0 = new Wire();\t\n\t\t\tWire or0_led0 = new Wire();\t\n\t\t\t// egy switch , generator egy Or kapu ill egy led letrehozasa, konstruktorukban a wire-rel\n\t\t\tSWITCH sw0 = new SWITCH(sw0_or0);\n\t\t\tGENERATOR gen0 = new GENERATOR(3,5,gen0_or0);\n\t\t\tORGate or0 = new ORGate(sw0_or0,gen0_or0);\n\t\t\tLED led0 = new LED(or0_led0);\n\t\t\tor0.AddOutput(or0_led0);\n\t\t\t// Hozzaadjuk a hierarchiahoz\n\t\t\tComponentList.add(new ArrayList<iComponent>());\t//0. szint letrehozasa\n\t\t\tComponentList.get(0).add(sw0);\n\t\t\tComponentList.get(0).add(gen0);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); //1 szint letrehozasa\n\t\t\tComponentList.get(1).add(or0);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); // 2. szint letrehozasa\n\t\t\tComponentList.get(2).add(led0);\n\t\t\t// hozzaadjuk a Wireket\n\t\t\tWireList.add(sw0_or0);\n\t\t\tWireList.add(gen0_or0);\n\t\t\tWireList.add(or0_led0);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 1:\n\t\t\t/*\n\t\t\t* *****************************************\n\t\t\t* ******* aramkor visszacsatolassal ******\n\t\t\t* *****************************************\n\t\t\t* and0_and0 = sw01 & and0_and0\n\t\t\t* led01 = and0_and0\n\t\t\t*/\t\n\t\t\t//sw0:Switch, and0:andGate, led0:LED, sw0_and0:Wire, and0_and0:Wire,and0_led0:Wire\n\t\t\tWire sw01_and0 = new Wire();\t\n\t\t\tWire and0_and0 = new Wire();\n\t\t\tWire and0_led01 = new Wire();\n\t\t\t\n\t\t\tSWITCH sw01 = new SWITCH(sw01_and0);\n\t\t\tANDGate and0 = new ANDGate(and0_and0,sw01_and0){\n\t\t\t\t/**\n\t\t\t\t * mivel visszacsatolast tartalmaz, es nincs a skeletonban erre megfelelo lehetoseg, \n\t\t\t\t * felulirjuk a peldany step fuggvenyet, hogy megfeleloen mukodjon.\n\t\t\t\t */\n\t\t\t\tpublic boolean Step(){\n\t\t\t\t\tboolean Result = true;\t\t\t\t\t\t// A vegso eredmeny: Stabil-e az aramkor\n\t\t\t\t\t_TEST stack = new _TEST();\t\t\t\t\t/* TEST */\n\t\t\t\t\tstack.PrintHeader(ID,\"\",\"true:boolean\");\t/* TEST */\n\t\t\t\t\t//count magat\n\t\t\t\t\tPreviousValue = Count();\t\t\t\t\t// Megnezzuk az elso futas erredmenyet\n\t\t\t\t\t//feedback[0], elso kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//sajat maga, elso kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//feedback[0], masodik kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//ha bitt nem egyezne meg, az elozo prev.valueval, akkor instabil.\n\t\t\t\t\tstack.PrintTail(ID,\"\",Result + \":boolean\");\t/* TEST */\n\t\t\t\t\treturn Result;\n\t\t\t\t}\n\t\t\t};\n\t\t\tLED led01 = new LED(and0_led01);\n\t\t\t\n\t\t\tand0.AddOutput(and0_and0);\n\t\t\tand0.AddOutput(and0_led01);\n\t\t\t\n\t\t\tand0.AddToFeedbacks(and0);\n\t\t\t// Hozzaadjuk a hierarchiahoz\n\t\t\tComponentList.add(new ArrayList<iComponent>());\n\t\t\tComponentList.get(0).add(sw01);\n\t\t\tComponentList.add(new ArrayList<iComponent>());\n\t\t\tComponentList.get(1).add(and0);\n\t\t\tComponentList.add(new ArrayList<iComponent>());\n\t\t\tComponentList.get(2).add(led01);\n\n\t\t\t// hozzaadjuk a Wireket\n\t\t\tWireList.add(sw01_and0);\n\t\t\tWireList.add(and0_and0);\n\t\t\tWireList.add(and0_led01);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t/* ********************************\n\t\t\t* ******* Instabil aramkor ******\n\t\t\t* ********************************\n\t\t\t* inv0_and2 = !sw2 & inv0_and2\n\t\t\t* led3 = inv0_and2\n\t\t\t*/\t\t\n\t\t\t//osszekoto wire letrehozasa\t\t\n\t\t\tWire sw2_and2 = new Wire();\t\n\t\t\tWire and2_inv0 = new Wire();\t\n\t\t\tWire inv0_and2 = new Wire();\n\t\t\tWire inv0_led3 = new Wire();\n\t\t\t// egy switch , inverter egy AND kapu ill egy led letrehozasa, konstruktorukban a wire-rel\n\t\t\tSWITCH sw2 = new SWITCH(sw2_and2);\n\t\t\t//final kell, mert kulonben nem hivatkozhatunk ra a and peldanyatirt-bol\n\t\t\tfinal INVERTER inv0 = new INVERTER(and2_inv0);\n\t\t\tANDGate and2 = new ANDGate(sw2_and2,inv0_and2){\n\t\t\t\t/**\n\t\t\t\t * mivel visszacsatolast tartalmaz, es nincs a skeletonban erre megfelelo lehetoseg, \n\t\t\t\t * felulirjuk a peldany step fuggvenyet, hogy megfeleloen mukodjon.\n\t\t\t\t */\n\t\t\t\tpublic boolean Step(){\n\t\t\t\t\tboolean Result = true;\t\t\t\t\t\t// A vegso eredmeny: Stabil-e az aramkor\n\t\t\t\t\t_TEST stack = new _TEST();\t\t\t\t\t/* TEST */\n\t\t\t\t\tstack.PrintHeader(ID,\"\",\"true:boolean\");\t/* TEST */\n\t\t\t\t\tPreviousValue = Count();\t\t\t\t\t// Megnezzuk az elso futas erredmenyet\n\t\t\t\t\tinv0.Count();\t\t\t\t//feedback[0].Count(), elso ciklus\n\t\t\t\t\tPreviousValue = Count();\t//feedback 0 es 1 kozt magat frissiti\n\t\t\t\t\tinv0.Count();\t\t\t\t//feedback[0].Count(), masodik ciklus\n\t\t\t\t\tPreviousValue = Count();\t//frissiti magat. itt instabilitasi teszt jon a proto-ban\n\n\t\t\t\t\tstack.PrintTail(ID,\"\",Result + \":boolean\");\t/* TEST */\n\t\t\t\t\treturn Result;\n\t\t\t\t}\n\t\t\t};\n\t\t\tLED led3 = new LED(inv0_led3);\n\t\t\t\n\t\t\tand2.AddOutput(and2_inv0);\n\t\t\tinv0.AddOutput(inv0_and2);\n\t\t\t// Feedbacks\n\t\t\tand2.AddToFeedbacks(and2);\n\t\t\tand2.AddToFeedbacks(inv0);\n\t\t\t// Hozzaadjuk a hierarchiahoz\n\t\t\tComponentList.add(new ArrayList<iComponent>());\t//0. szint letrehozasa\n\t\t\tComponentList.get(0).add(sw2);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); //1 szint letrehozasa\n\t\t\tComponentList.get(1).add(and2);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); // 2. szint letrehozasa\n\t\t\tComponentList.get(2).add(inv0);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); // 3. szint letrehozasa\n\t\t\tComponentList.get(2).add(led3);\n\t\t\t// hozzaadjuk a Wireket\n\t\t\tWireList.add(sw2_and2);\n\t\t\tWireList.add(and2_inv0);\n\t\t\tWireList.add(inv0_and2);\n\t\t\tWireList.add(inv0_led3);\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"strFilePAth:String\",\"\");\n\t}", "public static void load(String filename, Supervisor k) throws FileNotFoundException{\n String source = \"\";\n try {\n Scanner in = new Scanner(new FileReader(filename));\n while(in.hasNext()){\n source = source + in.next();\n }\n } catch (FileNotFoundException ex) {\n //throw ex;\n System.out.println(\"Could not read config file: \" + ex);\n System.out.println(\"trying to create a new one...\");\n String stsa = \"Done!\\n\";\n try (\n Writer writer = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(filename), \"utf-8\"))) {\n writer.write(\"\");\n writer.close();\n }\n \n catch (IOException ex1) {\n stsa = \"\";\n System.out.println(\"FAILED, SKIPPING CONFIG READ BECOUSE:\");\n Logger.getGlobal().warning(ex1.toString());\n System.out.println(\"Console version: \" + ex1.toString());\n }\n System.out.print(stsa);\n }\n LinkedList<String[]> raw = fetch(source);\n \n if(k.Logic == null){\n Logger.getGlobal().warning(\"ENGINE NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n if(k.Logic.Vrenderer == null){\n Logger.getGlobal().warning(\"ENGINE RENDERER NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n \n for(String[] x: raw){\n String value = x[1];\n if(!k.features_overrideAllStandard)\n switch(x[0]){\n case \"nausea\":\n int numValue = 0;\n try{\n numValue = Integer.parseInt(value);\n }\n catch(Exception e){\n quickTools.alert(\"configReader\", \"invalid nausea value\");\n break;\n }\n if(numValue > 0){\n k.Logic.Vrenderer.dispEffectsEnabled = true;\n }\n //k.Logic.Vrenderer.di\n break;\n default:\n\n break;\n }\n customFeatures(x[0], x[1], k);\n }\n }", "private void loadInventory(String fileName){\t\t\r\n\t\tList<String> list = new ArrayList<String>();\r\n\r\n\t\ttry (Stream<String> stream = Files.lines(Paths.get(fileName))) {\r\n\t\t\t//Convert it into a List\r\n\t\t\tlist = stream.collect(Collectors.toList());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor(String itemList : list){\r\n\t\t\tString[] elements = itemList.split(\"--\");\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tswitch(elements[0].toUpperCase()){\r\n\t\t\t\t\tcase \"BURGER\":\r\n\t\t\t\t\t\t\tinventory.add(createBurger(elements));;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"SALAD\":\r\n\t\t\t\t\t\t\tinventory.add(createSalad(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"BEVERAGE\":\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createBeverage(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"SIDE\":\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createSide(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"DESSERT\":\r\n\t\t\t\t\t\t\tinventory.add(createDessert(elements));;\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public static Material loadMaterialFile(String name) {\r\n\t\tMaterial mat = assetManager.loadMaterial(name);\r\n\t\tmaterialMap.put(name, mat);\r\n\t\treturn mat;\r\n\t}", "private void loadFromFile(String fileName) {\n try {\n InputStream inputStream = this.openFileInput(fileName);\n if (inputStream != null) {\n ObjectInputStream input = new ObjectInputStream(inputStream);\n boardManager = (BoardManager) input.readObject();\n inputStream.close();\n }\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n } catch (ClassNotFoundException e) {\n Log.e(\"login activity\", \"File contained unexpected data type: \" + e.toString());\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void loadPairs() {\r\n\t\tthis.criticalPairs = null;\r\n\t\tPairContainer excludePairContainer = null;\r\n\t\tGraGra nullGraGra = BaseFactory.theFactory().createGraGra();\r\n\t\tthis.cpOption.enableLayered(true);\r\n\t\texcludePairContainer = ParserFactory.createEmptyCriticalPairs(\r\n\t\t\t\tnullGraGra, this.cpOption);\r\n\t\tPairIOGUI pairIOgui = new PairIOGUI((JFrame) this.parent,\r\n\t\t\t\texcludePairContainer);\r\n\t\tpairIOgui.setDirectoryName(this.treeView.getFileDirectory());\r\n\t\tObject o = pairIOgui.load();\r\n\t\tif (o == null)\r\n\t\t\treturn;\r\n\r\n\t\tString fileName = pairIOgui.getFileName();\r\n\r\n\t\tif (!(o instanceof LayeredPairContainer))\r\n\t\t\tthis.cpOption.enableLayered(false);\r\n\r\n\t\t// add loaded name to list of gragra names\r\n\t\tString str = excludePairContainer.getGrammar().getName() + \"(\"\r\n\t\t\t\t+ fileName + \")\";\r\n\t\tthis.gragraNamesVector.addElement(str);\r\n\t\tthis.gragraNames.setListData(this.gragraNamesVector);\r\n\t\tthis.gragraNames.setSelectedIndex(this.gragraNamesVector.size() - 1);\r\n\r\n\t\t// set critical pairs\r\n\t\tthis.criticalPairs = excludePairContainer;\r\n\t}", "public static Game loadGame(String fileName){\n Game game = null;\n try {\n File file1 = new File(fileName);\n FileInputStream fileInputStream = new FileInputStream(file1);\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\n game = (Game) objectInputStream.readObject();\n game.makeGUIVisible();\n }catch (Exception e){\n System.err.println(\"Error when loading file\");\n }\n return game;\n }", "public void load() throws ClassNotFoundException, IOException;", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic static void loadAsset(String name) {\r\n\t\tassetManager.loadAsset(name);\t\t\r\n\t}", "private void loadRack() {\n buildRack();\n for (LetterTile tile : rack)\n add(tile);\n }", "public void load() {\n }", "public void load (String argFileName) throws IOException;", "Energy getLoad();", "public void read(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Reading project spec '\" + _specName + \"'...\");\r\n\r\n\t\tbook.getFileRegistry().setProjectFilename(_specName);\r\n\t\t\r\n\t\t// verify a compatible sim-file format\r\n\t\tint version =_dataModel.getVersion(); \r\n\t\tif (!isCompatibleSpecFormat(version))\r\n\t\t{\r\n\t\t\tthrow new SB_FileException(\"Incompatible project file format: engine version \"\r\n\t\t\t\t\t\t\t\t\t\t+ Version.FILE_FORMAT_MAX_VERSION + \", file version \" + version);\r\n\t\t}\r\n\r\n\t\tbook.getFileRegistry().setFormatVersion(version);\r\n\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Specification format version \" + version,SB_Logger.INIT);\r\n\r\n\t\t// read file version information\r\n\t\tbook.getFileRegistry().setSpecVersion(version);\r\n\r\n\t\treadDescriptors(book);\r\n\t\treadClasses(book);\r\n\t\treadActions(book);\r\n\t\treadPredicates(book);\r\n\r\n\t\treadJavaScript(book);\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t readGlobals(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t readConstants(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex) {\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t\t\r\n\t\treadBehaviors(book);\r\n\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Project spec file '\" + _specName + \"' loaded.\",SB_Logger.INIT);\r\n\t}", "private void readBehavior(SB_SingletonBook book, Behavior behavior) throws SB_FileException {\n\t SB_BehaviorClass sbBehavior = new SB_BehaviorClass( book.getBehaviorRegistry().requestBehaviorId() );\r\n\r\n\t sbBehavior.load(behavior, book);\r\n\r\n\t book.getBehaviorRegistry().addBehavior(sbBehavior);\r\n\t book.getFileRegistry().associatePackage(_specName, sbBehavior.getName());\r\n\r\n\t}", "public void fileLoaderMethod(String filename) {\n\t\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\t\n\t\tfileloc += filename;\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\tString code = \"\";\n\t\t\n\t\tif(!fl.exists()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The specified file doesnt exist at the given location.\");\n\t\t} else {\t\n\t\t\ttry {\n\t\t\t\tFileReader flrd = new FileReader(fileloc);\n\t\t\t\tBufferedReader bufread = new BufferedReader(flrd);\t\t\n\t\t\t\tString str;\n\t\t\t\twhile((str = bufread.readLine()) != null) {\n\t\t\t\t\tcode += str + \"\\n\";\n\t\t\t\t}\t\t\n\t\t\t\tbufread.close();\n\t\t\t\tflrd.close();\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\n\t\tinterpretorMainMethod(code, 0);\n\t}", "public static void load(String name) throws RuntimeException, IOException{\n\t\tif(!name.startsWith(\"/\")) name = \"/\"+name;\n\t\tFile libFile = NativeUtils.getAsLocalFile(name);\n\t\tUtils.sleep(500); // wait a bit to be sure the library is ready to be read\n\t\tSystem.load(libFile.getAbsolutePath());\n\t}", "LoadGenerator createLoadGenerator();", "LoadGenerator createLoadGenerator();", "void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "void loadProducts(String filename);", "public Cartridge(String fileName) {\n\t\ttry {\n\t\t\tInputStream i = new FileInputStream(fileName);\n\t\t\tbyte[] header = new byte[16];\n\t\t\ti.read(header);\n\t\t\tif((header[6]&0x04)!=0) i.skip(512);\n\t\t\tnMapperID = (byte) ((((header[7]&0xFF)>>4)<<4)|((header[6]&0xFF)>>4));\n\t\t\tmirror = (header[6]&0x01)!=0;\n\t\t\tint nFileType = 1;\n\t\t\tif(nFileType==0) {\n\t\t\t\t\n\t\t\t}\n\t\t\tif(nFileType==1) {\n\t\t\t\tnPRGBanks = header[4];\n\t\t\t\tvPRGMemory = new byte[nPRGBanks*16384];\n\t\t\t\ti.read(vPRGMemory);\n\t\t\t\tnCHRBanks = header[5];\n\t\t\t\tvCHRMemory = new byte[nCHRBanks>0?nCHRBanks*8192:8192];\n\t\t\t\ti.read(vCHRMemory);\n\t\t\t}\n\t\t\tif(nFileType==2) {\n\t\t\t\t\n\t\t\t}\n\t\t\tswitch(nMapperID&0xFF) {\n\t\t\tcase 0: mapper = new Mapper000(nPRGBanks,nCHRBanks);break;\n\t\t\t}\n\t\t\ti.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\timageValid = true;\n\t}", "public void readxml() throws JAXBException, FileNotFoundException {\n Player loadplayer = xml_methods.load();\n logger.info(\"player name: \" + loadplayer.getName());\n if (!item.isEmpty()) {\n logger.trace(loadplayer.getitem(0).getName());\n }\n tfName.setText(loadplayer.getName());\n isset = true;\n player = loadplayer;\n\n }", "public Bitmap LoadFromFile(String _fullFilename) {\n\t //if (bmp != null) { bmp.recycle(); }\n\t BitmapFactory.Options bo = new BitmapFactory.Options();\t\t\n\t\t\n\t if( bo == null ) return null;\n\t \n\t if( controls.GetDensityAssets() > 0 )\n\t bo.inDensity = controls.GetDensityAssets();\n\t \n\t return BitmapFactory.decodeFile(_fullFilename, bo);\n }", "private void loadTiles(String filename) {\n\t\ttry {\n\t\t\tScanner s;\n\n\t\t\tif (StealthGame.EXPORT)\n\t\t\t\ts = new Scanner(ResourceLoader.load(filename));\n\t\t\telse\n\t\t\t\ts = new Scanner(new File(filename));\n\n\t\t\tif (s.hasNextLine()) {\n\t\t\t\tname = s.nextLine();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Room has no name\");\n\t\t\t}\n\t\t\txSize = s.nextInt();\n\t\t\tySize = s.nextInt();\n\t\t\ttiles = new Tile[xSize][ySize];\n\t\t\tint xPos = 0;\n\t\t\tint yPos = 0;\n\t\t\tint tileNum = 0;\n\n\t\t\t// List of doors to be given destinations\n\n\t\t\twhile (s.hasNext()) {\n\n\t\t\t\tif (s.hasNextInt()) {\n\t\t\t\t\tparseInt(s, xPos, yPos, tileNum);\n\n\t\t\t\t\txPos++;\n\t\t\t\t\ttileNum++;\n\n\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\tyPos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Not a basic floor, door or wall\n\t\t\t\telse {\n\t\t\t\t\tString str = s.next();\n\t\t\t\t\tif (str.length() == 1) {\n\t\t\t\t\t\tparseChar(xPos, yPos, tileNum, str);\n\n\t\t\t\t\t\txPos++;\n\t\t\t\t\t\ttileNum++;\n\n\t\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\t\tyPos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (str.equals(\"door\")) {\n\t\t\t\t\t\t\tparseDoorDestination(s);\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\ts.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Room - Error loading file - IOException : \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "public void loadVehicles() throws IOException {\n File veFile = new File(VE_FILE);\n\n //Checks is file created\n if (!veFile.exists()) {\n veFile.createNewFile(); //If not, creates new file\n System.out.print(\"The data file vehicles.txt is not exits. \" +\n \"Creating new data file vehicles.txt... \" +\n \"Done!\");\n this.numberOfVehicle = 0; //New data file with the number of Vehicle is 0\n } else {\n //If file is existed, so loading this data file\n System.out.print(\"The data file vehicles.txt is found. \" +\n \"Data of vehicles is loading...\");\n\n //Loads text file into buffer\n try (BufferedReader br = new BufferedReader(new FileReader(VE_FILE))) {\n String line, contractId, type, licensePlate, chassisId, enginesId;\n\n //Reads number of vehicles\n line = br.readLine();\n if (line == null) return;\n this.numberOfVehicle = Integer.parseInt(line);\n\n for (int i = 0; i < this.numberOfVehicle; i++) {\n //Reads Vehicle's information\n contractId = br.readLine();\n type = br.readLine();\n licensePlate = br.readLine();\n chassisId = br.readLine();\n enginesId = br.readLine();\n\n\n //Create new instance of Vehicle and adds to Vehicle bank\n this.vehicles.add(new Vehicle(Integer.parseInt(contractId), type, licensePlate, chassisId, enginesId));\n }\n }\n System.out.print(\"Done!\");\n }\n }", "public ReplayOrchestrator loadReplay(String gameName, String replayName)\r\n\t\tthrows FileNotFoundException, IOException {\r\n\t\tif (logger.isTraceEnabled())\r\n\t\t\tlogger.trace(\"Loading replay (\" + replayName + \")...\");\r\n\t\t\r\n\t\t// Create replay simulator\r\n\t\tthis.simulator = new ReplayOrchestrator(this, gameName, replayName);\r\n\t\t\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Replay loaded.\");\r\n\t\t\r\n\t\treturn (ReplayOrchestrator) simulator;\r\n\t}", "void load(Future<AggregatedProfileInfo> future, AggregatedProfileNamingStrategy filename);", "public void load() ;", "public void load() {\n\t}", "public static void load(String name, World w) {\n\t\tlineNumber = 0;\n\t\tfileName = name;\n\n\t\tFile f = new File(\"data/conversations/\" + name + \".lucy\");\n\n\t\tif (!f.exists()) {\n\t\t\tErrorLogger.log(\"Attempted to load conversations for \" + name\n\t\t\t\t\t+ \" but no file exists.\", 2);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(f));\n\t\t\t\tloadConversations(w);\n\n\t\t\t\tloadQuests(w);\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tErrorLogger.log(ioe, 4);\n\t\t\t}\n\t\t}\n\t}", "public static FroggerGame read(String name) throws IOException {\r\n FroggerGame frogger = new FroggerGame();\r\n\r\n Gson gson = new Gson();\r\n\r\n try (Reader reader = new FileReader(name)) {\r\n\r\n // this line is a modified line copied from https://mkyong.com/java/how-to-parse-json-with-gson/\r\n RuntimeTypeAdapterFactory<Sprite> adapter = RuntimeTypeAdapterFactory.of(Sprite.class, \"type\")\r\n .registerSubtype(Frog.class)\r\n .registerSubtype(Enemy.class)\r\n .registerSubtype(Car.class)\r\n .registerSubtype(Truck.class)\r\n .registerSubtype(Alligator.class)\r\n .registerSubtype(Item.class);\r\n gson = new GsonBuilder().registerTypeAdapterFactory(adapter).create();\r\n frogger = gson.fromJson(reader,FroggerGame.class);\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.print(\"We could not find that save file \\n We will start you a new game \\n\");\r\n }\r\n\r\n return frogger;\r\n }", "public void loadGame(File fileLocation, boolean replay);", "private <T> void loadAllFromFolder(String name,Class<T> type){\n\t\tFileHandle dirHandle;\n\t\tif (Gdx.app.getType() == ApplicationType.Desktop) {\n\t\t dirHandle = new FileHandle(\"./bin/\"+name);\n\t\t \n\t\t} else {\n\t\t dirHandle = Gdx.files.internal(name);\n\t\t}\n\t\t \n\t\tfor (FileHandle entry: dirHandle.list()) {\n\t\t assetManager.load(entry.path(),type);\n\t\t}\n\t}", "public void load (File file) throws Exception;", "public void processRaw(String rawfilepath){\n\t\tbyte tempbyte[] = new byte[131072];\n\t\ttempbyte = loadBytes(rawfilepath);\n\t\tfor (int i=0; i < header.length; i++){\n\t\t\theader[i]= tempbyte[i];\n\t\t}\n\t\tfor (int i = 0; i < EEPROM.length;){\n\t\t\tEEPROM[i] = tempbyte[i+1024];\n\t\t}\n\t\torganizeEEPROM();\n\t\tprocessData();\n\t\tsavefile();\n\t}", "public void loadPlayerCard(HashMap<Integer, PlayerCard> PlayerCard_HASH, String file_name){\r\n PlayerCardFactory playerCardFactory = new PlayerCardFactory();\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+file_name));\r\n \r\n while (scanner.hasNextLine()) {\r\n String line = scanner.nextLine();\r\n \r\n if(PlayerCard_HASH.size() == 0){\r\n line = scanner.nextLine();\r\n }\r\n \r\n PlayerCard playerCard = playerCardFactory.getPlayerCard(line);\r\n /*if(playerCard.getPlayerID() == 0)\r\n playerCard.setPlayerID(ConstantField.DEFAULT_UNDEFINED_PLAYID);\r\n if(playerCard.getOrder() == 0)\r\n playerCard.setOrder(ConstantField.DEFAULT_UNDEFINED_ORDER);\r\n */\r\n PlayerCard_HASH.put(playerCard.getId(), playerCard);\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayerCard\");\r\n }\r\n }", "public static void load() {\n }", "public void load (IFile file) throws Exception;", "public void load(String filename) {\n\t\tsetup();\n\t\tparseOBJ(getBufferedReader(filename));\n\t}", "@SuppressWarnings(\"unchecked\")\n public static void load() {\n\n System.out.print(\"Loading team data from file...\");\n\n try {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n\n FileInputStream fil = new FileInputStream(team_fil);\n ObjectInputStream in = new ObjectInputStream(fil);\n\n team_list = (ConcurrentHashMap<Integer, Team>) in.readObject();\n cleanTeams();\n\n fil.close();\n in.close();\n\n //Gå gjennom alle lagene og registrer medlemmene i team_members.\n Iterator<Team> lag = team_list.values().iterator();\n\n while (lag.hasNext()) {\n\n Team laget = lag.next();\n\n Iterator<TeamMember> medlemmer = laget.getTeamMembers();\n while (medlemmer.hasNext()) {\n registerMember(medlemmer.next().getCharacterID(), laget.getTeamID());\n }\n\n }\n\n System.out.println(\"OK! \" + team_list.size() + \" teams loaded.\");\n\n } catch (Exception e) {\n System.out.println(\"Error loading team data from file.\");\n }\n\n }", "@Override\r\n public void load(String[] arr) {\r\n\tString name = arr[arr.length - 1];\r\n\tString fileName = arr[arr.length - 2];\r\n\ttry {\r\n\t byte[] temp = new byte[4096];\r\n\t InputStream in = new MyDecompressorInputStream(new FileInputStream(fileName));\r\n\t int numOfBytes = in.read(temp);\r\n\t in.close();\r\n\t byte[] b = new byte[numOfBytes];\r\n\t for (int i = 0; i < b.length; i++) {\r\n\t\tb[i] = temp[i];\r\n\t }\r\n\t Maze3d maze = new Maze3d(b);\r\n\t hMaze.put(name, maze);\r\n\t setChanged();\r\n\t notifyObservers((\"load:\" + name).split(\":\"));\r\n\t} catch (FileNotFoundException e) {\r\n\t setChanged();\r\n\t notifyObservers(\"Error - the file was not found\");\r\n\t} catch (IOException e) {\r\n\t setChanged();\r\n\t notifyObservers(\"Error - IOException\");\r\n\t}\r\n }", "@Override\r\n public void load()\r\n {\r\n\tLevel.openMap(\"maps/Level1.map\", _width, _height);\r\n\t_level = Level.getInstance();\r\n\tCamera.getInstance().setBounds(_level.getWorldBoundaries());\r\n\t_printText = new Text(TILESHEET_TEXTURE, \"0123456789xUPC\", 0, 244, 32, 37, 4, 24, 28);\r\n\t_coin = new Sprite(\"Coin\", 6, _height - 34, 24, 24, Tiles.get(COIN_ANIM), false);\r\n\t_1UP = new Sprite(\"1UP\", 200, _height - 42, 42, 42, Tiles.get(MUSHROOM_GREEN), false);\r\n\tSoundLibrary.getInstance().loop(MUSIC_LEVEL);\r\n\tMario.clearData();\r\n }", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public void loadVehicle(Vehicle vehicle) {\n storage.addVehicle(vehicle);\n }", "private static void load(){\n }", "public static void readLotteryFiles() {\n\t\tfor (int index = 0; index < NpcHandler.npcs.length; index++) {\n\t\t\tNpc npc = NpcHandler.npcs[index];\n\t\t\tif (npc == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (npc.npcType == 11057) {\n\t\t\t\tlotteryNpcIndex = npc.npcIndex;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\ttotalTicketsPurchased = Integer.parseInt(FileUtility.readFirstLine(TOTAL_TICKETS_FILE));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tArrayList<String> data = FileUtility.readFile(LOTTERY_ENTRIES_FILE);\n\t\tfor (int index = 0; index < data.size(); index++) {\n\t\t\tString parse[] = data.get(index).split(ServerConstants.TEXT_SEPERATOR);\n\t\t\tString name = parse[0];\n\t\t\tint ticketsPurchased = Integer.parseInt(parse[1]);\n\t\t\tLotteryDatabase.lotteryDatabase.add(new LotteryDatabase(name, ticketsPurchased));\n\t\t}\n\t}", "public QuizPlayer serialReadFile() {\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(); //If any error is caught the program will re ask the user for input.\r\n try {\r\n ObjectInputStream inputStream =\r\n new ObjectInputStream(new FileInputStream(fileObject));\r\n q = (QuizPlayer) inputStream.readObject();\r\n\r\n\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Cannot find file. Please Enter a different file Name\");\r\n\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problems with file input. Please Enter a different file name\");\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problems with file input. Please Enter a differet file name\");\r\n }\r\n\r\n\r\n return q;\r\n }", "private static void initCode() {\n\t\tString ver = getRelocationAddition();\n\t\t\n\t\tif(ver == null) {\n\t\t\tcode = new UNKNOWN_VollotileCode();\n\t\t\tSystem.out.println(\"Could not find a Vollotile for the Current MC Version. Using Fallback.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_13_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_13_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_12_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_12_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_11_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_11_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_10_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_10_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_9_R2\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_9_R2_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_9_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_9_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_8_R3\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_8_R3_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_8_R2\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_8_R2_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_8_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_8_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_7_R4\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_7_R4_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_7_R3\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_7_R3_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_7_R2\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_7_R2_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_7_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_7_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_6_R3\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_6_R3_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_6_R2\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_6_R2_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_6_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_6_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(code == null) {\n\t\t\tcode = new UNKNOWN_VollotileCode();\n\t\t\tSystem.out.println(\"Could not find a Vollotile for the Current MC Version. Using Fallback.\");\n\t\t}\n\t}", "private BufferedImage loadPic(String name) {\n\t\tBufferedImage pic=null;\n\t\ttry {\n\t\t\tpic = ImageIO.read(new File(\"store/\"+name));\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\treturn pic;\n\t}", "public static Object load(String name, String version) {\r\n String origine;\r\n String nomFichier;\r\n FileInputStream f = null;\r\n ObjectInputStream in = null;\r\n Object resultat;\r\n \r\n // Construire le nom du fichier source de la\r\n // configuration\r\n //\r\n nomFichier = name + \"-\" + version + \".conf\";\r\n \r\n // Construire un fichier logique correspondant\r\n //\r\n try {\r\n f = new FileInputStream(nomFichier);\r\n }\r\n catch (Exception e) {\r\n return null;\r\n }\r\n \r\n // Construire un flux d'entree base sur le fichier\r\n // logique\r\n //\r\n try {\r\n in = new ObjectInputStream(f);\r\n }\r\n catch (Exception e) {\r\n return null;\r\n }\r\n \r\n // Acquerir et deserialiser le flux d'entree\r\n //\r\n try {\r\n resultat = in.readObject();\r\n }\r\n catch (Exception e) {\r\n return null;\r\n }\r\n \r\n // Controler la classe d'origine du resultat\r\n //\r\n origine = resultat.getClass().getName();\r\n if (origine != \"java.util.HashMap\" && origine != \"java.util.LinkedHashMap\") return null;\r\n \r\n System.out.println(\"Chargement du fichier \" + nomFichier + \" : OK\");\r\n return resultat;\r\n }", "public void load() {\n structure = SpigotUtils.structBetweenTwoLocations(pos1, pos2, material);\n }", "public GameLevel LoadGame() throws IOException {\n FileReader fr = null;\n BufferedReader reader = null;\n\n try {\n System.out.println(\"Reading \" + fileName + \" data/saves.txt\");\n\n fr = new FileReader(fileName);\n reader = new BufferedReader(fr);\n\n String line = reader.readLine();\n int levelNumber = Integer.parseInt(line);\n\n //--------------------------------------------------------------------------------------------\n\n if (levelNumber == 1){\n gameLevel = new Level1();\n } else if(levelNumber == 2){\n gameLevel = new Level2();\n JFrame debugView = new DebugViewer(gameLevel, 700, 700);\n } else {\n gameLevel = new Level3();\n }\n\n //------------------------------------------------------------------------------------------\n\n\n while ((line = reader.readLine()) != null){\n String[] tokens = line.split(\",\");\n String className = tokens[0];\n float x = Float.parseFloat(tokens[1]);\n float y = Float.parseFloat(tokens[2]);\n Vec2 pos = new Vec2(x, y);\n Body platform = null;\n\n if (className.equals(\"PlayableCharacter\")){\n PlayableCharacter playableCharacter = new PlayableCharacter(gameLevel, PlayableCharacter.getItemsCollected(),PlayableCharacter.isSpecialGravity(),game);\n playableCharacter.setPosition(pos);\n gameLevel.setPlayer(playableCharacter);\n\n }\n\n if (className.equals(\"LogPlatform\")){\n Body body = new LogPlatform(gameLevel, platform);\n body.setPosition(pos);\n }\n\n if (className.equals(\"Coin\")){\n Body body = new Coin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new Pickup(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"ReducedGravityCoin\")){\n Body body = new ReducedGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupRGC(gameLevel.getPlayer(), game)\n\n );\n }\n\n if (className.equals(\"AntiGravityCoin\")){\n Body body = new AntiGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupAGC(gameLevel.getPlayer(), game) );\n }\n\n if (className.equals(\"Rock\")){\n Body body = new Rock(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new FallCollisionListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Pellet\")){\n Body body = new Pellet(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new AddLifeCollisionListener(gameLevel.getPlayer(), game));\n }\n\n if (className.equals(\"Branch\")){\n Body body = new Branch(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new BranchListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Portal\")){\n Body portal = new Portal(gameLevel);\n portal.setPosition(pos);\n portal.addCollisionListener(new DoorListener(game));\n }\n\n if (className.equals(\"DeathPlatform\")){\n float w = Float.parseFloat(tokens[3]);\n float h = Float.parseFloat(tokens[4]);\n float deg = Float.parseFloat(tokens[5]);\n\n Body body = new DeathPlatform(gameLevel, w, h);\n body.setPosition(pos);\n body.addCollisionListener(new FallCollisionListener(gameLevel.getPlayer(), game));\n body.setFillColor(Color.black);\n body.setAngleDegrees(deg);\n\n }\n\n }\n\n return gameLevel;\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fr != null) {\n fr.close();\n }\n }\n }", "private static Trajectory readFile(String name) {\n\t\ttry {\n\t\t\tFile file = new File(cacheDirectory + name);\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tTrajectory t = (Trajectory) ois.readObject();\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t\treturn t;\n\t\t}\n\t\tcatch (Exception e) { return null; }\n\t}", "void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public BiomartAccess(String fname) \n {\n m_file = new File(fname);\n }", "public void readDriverFile(String path)\n {\n FileIO fileIO = new FileIO();\n fileIO.setFileName(path);\n String fileData = fileIO.readFile();\n String[] data = fileData.split(\"\\\\n\"); // split data by new line character\n for(int i = 0 ; i < data.length ; i++)\n {\n String[] values = data[i].split(\",\"); //split each row by ,\n getDrivers().addDriver(values[0], Integer.parseInt(values[1]), values[2], true); // add a new driver to the collection\n } \n }", "void loadOriginalGameState(String saveName, int level) throws IOException;", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "public void load(File source);", "public void loadFile(String fname) \n\t{\n\t\t// use Scanner used to read the file\n\t\ttry{\n\t\t\tScanner scan = new Scanner(new FileReader(fname));\n\t\t\t//read in number of row and column in the first line\n\t\t\treadRC(scan);\n\t\t\treadMaze(scan);\n\t\t\t//close the scanner\n\t\t\tscan.close();\t\t\t\t\t\t\t\t\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"FileNotFound\"+e.getMessage());\n\t\t}\n\t}", "private static void loadSoFromInternalStorage(String fileName) throws UnsatisfiedLinkError {\n String path = System.getProperties().get(\"java.io.tmpdir\").toString().replace(\"/cache\", \"/files/\" + fileName);\n File file = new File(path);\n SecurityManager security = System.getSecurityManager();\n if (security != null) {\n security.checkLink(file.getAbsolutePath());\n }\n System.load(file.getAbsolutePath());\n }", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}" ]
[ "0.62854284", "0.5414958", "0.539693", "0.5230656", "0.51569676", "0.5156216", "0.514615", "0.5144456", "0.5128416", "0.5105956", "0.50954235", "0.50939196", "0.5067629", "0.5065477", "0.50643617", "0.49891034", "0.4955332", "0.49296314", "0.4927469", "0.49252847", "0.49133193", "0.49118719", "0.49094182", "0.4909105", "0.48952243", "0.4884641", "0.487964", "0.48687932", "0.48573825", "0.48459557", "0.48121995", "0.4781896", "0.47673148", "0.47536525", "0.47294444", "0.47274616", "0.47217774", "0.47214988", "0.47182816", "0.4716977", "0.47125387", "0.4703655", "0.46939698", "0.46925503", "0.4686369", "0.46784633", "0.4654402", "0.46414155", "0.46311444", "0.46242726", "0.46082494", "0.46055877", "0.46031618", "0.46031618", "0.4595374", "0.4593101", "0.45886734", "0.45830518", "0.45819506", "0.45798522", "0.45720527", "0.4571261", "0.45710292", "0.45688725", "0.4568851", "0.4562583", "0.45613673", "0.45608824", "0.45580316", "0.45528197", "0.45462617", "0.4538841", "0.4538397", "0.45257014", "0.45079336", "0.45078507", "0.45071432", "0.45028803", "0.45018178", "0.4496927", "0.4493988", "0.44888905", "0.44869322", "0.44746977", "0.44713604", "0.44707432", "0.44675556", "0.44628277", "0.44585043", "0.4458156", "0.44528517", "0.4450678", "0.44505173", "0.44472793", "0.4445172", "0.44444385", "0.44430593", "0.443874", "0.443874", "0.443874" ]
0.6824747
0
Loads the appropriate WireEnumerator file based on the part name. Accounts for speed grade in file name.
public static WireEnumerator loadWireEnumerator(FamilyType familyType) { familyType = PartNameTools.getBaseTypeFromFamilyType(familyType); WireEnumerator we = WireEnumerator.getInstance(familyType); String path = getWireEnumeratorFileName(familyType); if (we.getFamilyName() != null) { return we; } if (!we.readCompactEnumFile(path, familyType)) { return null; } else { return we; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WireEnumerator loadWireEnumerator(String partName) {\n FamilyType familyType = PartNameTools.getFamilyTypeFromPart(partName);\n return loadWireEnumerator(familyType);\n }", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "private void loadGame(String fileName){\n\n }", "public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade(partName);\n Device device = Device.getInstance(canonicalName);\n String path = getDeviceFileName(canonicalName);\n\n // Don't reload the device if same part is already loaded\n if (device.getPartName() != null) {\n return device;\n }\n\n if (!device.readDeviceFromCompactFile(path)) {\n return null;\n } else {\n return device;\n }\n }", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "public abstract Source load(ModuleName name);", "public abstract void load() throws IOException;", "public static void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}", "public void readFile(String name)\n\t{\n\t\tFileInputStream fis = null;\n\t\tObjectInputStream in = null;\n\t\ttry\n\t\t{\n\t\t\tfis = new FileInputStream(name);\n\t\t\tin = new ObjectInputStream(fis);\n\t\t\t// ind = (WebIndexer)in.readObject();\n\t\t\tTree xcd = (Tree)in.readObject();\n\t\t\tind = new WebIndexer(xcd);\n\t\t\tin.close();\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch(ClassNotFoundException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\t\t\n\t}", "public void load(String filePath){\r\n File loadFile = new File(filePath);\r\n if (!loadFile.exists()){\r\n System.out.println(\"I failed. There are no saved games.\");\r\n return;\r\n }\r\n FileInputStream fis = null;\r\n ObjectInputStream in = null;\r\n try {\r\n fis = new FileInputStream(filePath);\r\n in = new ObjectInputStream(fis);\r\n long versionUID = (long) in.readObject();\r\n if (versionUID != this.serialVersionUID) {\r\n throw new UnsupportedClassVersionError(\"Version mismatch for save game!\");\r\n }\r\n this.p = (Character) in.readObject();\r\n this.map = (SpecialRoom[][]) in.readObject();\r\n\r\n } catch (FileNotFoundException ex){\r\n System.out.println(\"The saved game was not found!\");\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n System.out.println(\"There was an error reading your save game :(\");\r\n ex.printStackTrace();\r\n System.out.println(\")\");\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(\"The version of the save game is not compatible with this game!\");\r\n ex.printStackTrace();\r\n } catch (UnsupportedClassVersionError ex) {\r\n System.out.println(ex.getMessage());\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n System.out.println(\"An unknown error occurred!\");\r\n }\r\n\r\n }", "public Structure load(String name) {\n \t\treturn null;\n \t}", "@Override\n\tpublic void init(String file_name) { deserialize(file_name); }", "public IniFile(String name) {\r\n this.filename = name;\r\n isavailable = parse(name);\r\n }", "private void loadGameFiles(){\n\t}", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "public abstract SoundContainer loadSound( String filename ) throws IOException;", "public void loadGame() throws IOException\r\n\t{\r\n\t\tjava.io.BufferedReader reader;\r\n\t String line;\r\n\t String[] elements;\r\n\t int ammo = 0;\r\n\t String state = null;\r\n\t try\r\n\t {\r\n\t reader = new java.io.BufferedReader(new java.io.FileReader(\"Game.ser\"));\r\n\t line = reader.readLine();\r\n\t elements = line.split(\":\");\r\n\t state = elements[0];\r\n\t ammo = Integer.decode(elements[1]);\r\n\t \r\n\t reader.close();\r\n\t \r\n\t\t gamePanel.getView().getPlayer().setAmmo(ammo);\r\n\t\t gamePanel.getView().getPlayer().setState(state);\r\n\t }\r\n\t catch(Exception e)\r\n\t {\r\n\t System.out.println(\"Can't load this save\");\r\n\t }\r\n\t \r\n\t \r\n\r\n\t}", "File getLoadLocation();", "public void loadQuickly(){\r\n System.out.println(\"I am going to try to load your games.\");\r\n String quickLoadPath = this.savePath + File.separator + \"QuickSave.ser\";\r\n this.load(quickLoadPath);\r\n }", "load createload(String name)\n {\n load iLoad = iIncomingLobsFactory.createload(name);\n \n return initload(iLoad);\n }", "protected void loadFile(String s) {\n\t\tpush();\n\t\tfile.load(s, curves);\n\t\trecalculateCurves();\n\t\tpushNew();\n\t}", "public void load(String name) {\n\tSetupLoader.load(board, name);\n\tgb.init();\n\ttsp.init();\n\tcols = gb.getCols();\n\trows = gb.getRows();\n\n\tssp.setBoardDimensions(cols, rows);\n\tgetPromotionListModel().load(board.getPromotionList());\n\n\tgb.update();\n }", "protected FileObject findFile(List<String> loadPaths, String moduleName) {\n\t\tif(moduleName.startsWith(\"./\")) {\n\t\t\tmoduleName = moduleName.substring(2);\n\t\t}\n\t\tString fileName = normalizeName(moduleName);\n\t\tFileObject file = null;\n\t\tfor (String loadPath : loadPaths) {\n\t\t\t// require('foo');\n\t\t\tfor (String startPath : this.startPaths) {\n\t\t\t\ttry {\n\t\t\t\t\tString newName = startPath+loadPath+fileName;\n\t\t\t\t\tfile = fetchFile(newName);\n\t\t\t\t\tif(file != null){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//System.out.println(\"Error getting file \"+moduleName+\": \"+ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn file;\n\t}", "public void\tload(String fileName) throws IOException;", "protected abstract void loader() throws IOException;", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "public void loadFile()\n {\n\n FileDialog fd = null; //no value\n fd = new FileDialog(fd , \"Pick up a bubble file: \" , FileDialog.LOAD); //create popup menu \n fd.setVisible(true); // make visible manu\n String directory = fd.getDirectory(); // give the location of file\n String name = fd.getFile(); // give us what file is it\n String fullName = directory + name; //put together in one sting \n \n File rideNameFile = new File(fullName); //open new file with above directory and name\n \n Scanner nameReader = null;\n //when I try to pick up it read as scanner what I choose\n try\n {\n nameReader = new Scanner(rideNameFile);\n }\n catch (FileNotFoundException fnfe)//if dont find return this message below\n {\n return; // immedaitely exit from here\n }\n \n //if load button pressed, it remove all ride lines in the world\n if(load.getFound()){\n removeAllLines();\n } \n \n //read until is no more stings inside of file and until fullfill max rides\n while(nameReader.hasNextLine()&&currentRide<MAX_RIDES)\n {\n \n String rd= nameReader.nextLine();//hold and read string with name of ride\n RideLines nova =new RideLines(rd);\n rides[currentRide]=nova;\n \n //Create a RideLine with string given from file\n addObject(rides[currentRide++], 650, 20 + 40*currentRide);\n }\n \n //when is no more strings inside it close reader\n nameReader.close();\n }", "public abstract void loadFile(Model mod, String fn) throws IOException;", "protected Spec readSpecFromFile(Path path) throws IOException {\n Spec spec;\n\n try (FSDataInputStream fis = fs.open(path)) {\n spec = this.specSerDe.deserialize(ByteStreams.toByteArray(fis));\n }\n\n return spec;\n }", "private void loadFromXml(String fileName) throws IOException {\n\t\tElement root = new XmlReader().parse(Gdx.files.internal(fileName));\n\n\t\tthis.name = root.get(\"name\");\n\t\tGdx.app.log(\"Tactic\", \"Loading \" + this.name + \"...\");\n\n\t\tArray<Element> players = root.getChildrenByName(\"player\");\n\t\tint playerIndex = 0;\n\t\tfor (Element player : players) {\n\t\t\t//int shirt = player.getInt(\"shirt\"); // shirt number\n\t\t\t//Gdx.app.log(\"Tactic\", \"Location for player number \" + shirt);\n\n\t\t\t// regions\n\t\t\tArray<Element> regions = player.getChildrenByName(\"region\");\n\t\t\tfor (Element region : regions) {\n\t\t\t\tString regionName = region.get(\"name\"); // region name\n\n\t\t\t\tthis.locations[playerIndex][Location.valueOf(regionName).ordinal()] = new Vector2(region.getFloat(\"x\"), region.getFloat(\"y\"));\n\n\t\t\t\t//Gdx.app.log(\"Tactic\", locationId + \" read\");\n\t\t\t}\n\t\t\tplayerIndex++;\n\t\t}\t\n\t}", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "@Override\r\n\tpublic void loadMaze(String name , String fileName) {\r\n\t\tMyDecompressorInputStream inFile;\r\n\t\ttry {\r\n\t\t\tinFile = new MyDecompressorInputStream(new FileInputStream(fileName));\r\n\t\t\tbyte[] b = new byte[4096];\r\n\t\t\tif(mazeInFile.containsKey(fileName)==true)\r\n\t\t\t{\r\n\t\t\t\tif(inFile.read(b)!=-1)\r\n\t\t\t\t{\r\n\t\t\t\t\tMaze3d maze = new Maze3d(b);\r\n\t\t\t\t\tcontroller.loadMaze(maze,name);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tcontroller.printStr(\"Can't load maze\");\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tcontroller.printStr(\"File \" + fileName + \" is not exist!\");\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract void load();", "public Object load(String compName) {\n\t\tif (this.preLoaded) {\n\t\t\treturn this.cachedOnes.get(compName);\n\t\t}\n\t\tString fileName = componentFolder + this.folder\n\t\t\t\t+ compName.replace(DELIMITER, FOLDER_CHAR) + EXTN;\n\t\tException exp = null;\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tobj = this.cls.newInstance();\n\t\t\tif (XmlUtil.xmlToObject(fileName, obj) == false) {\n\t\t\t\t/*\n\t\t\t\t * load failed. obj is not valid any more.\n\t\t\t\t */\n\t\t\t\tobj = null;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texp = e;\n\t\t}\n\n\t\tif (exp != null) {\n\t\t\tTracer.trace(exp, \"error while loading component \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\tif (obj == null) {\n\t\t\tTracer.trace(\"error while loading component \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\t/*\n\t\t * we insist that components be stored with the right naming convention\n\t\t */\n\t\tComponent comp = (Component) obj;\n\t\tString fullName = comp.getQualifiedName();\n\n\t\tif (compName.equalsIgnoreCase(fullName) == false) {\n\t\t\tTracer.trace(\"Component has a qualified name of \" + fullName\n\t\t\t\t\t+ \" that is different from its storage name \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\treturn comp;\n\t}", "public void ParseFile(String strFilePath){\n\t\t_TEST stack = new _TEST();\t\t\t\t\t\t/* TEST */\n\t\tstack.PrintHeader(ID,\"strFilePath:String\", \"\");\t/* TEST */\n\t\tswitch(Integer.decode(strFilePath)){\n\t\tcase 0:\t\t\n\t\t\t/*\n\t\t\t* ********************************\n\t\t\t* ******* Egyszeru aramkor ******\n\t\t\t* ********************************\n\t\t\t* led0 = sw0 + gen0\n\t\t\t*/\t\t\n\t\t\t//osszekoto wire letrehozasa\t\t\n\t\t\tWire sw0_or0 = new Wire();\t\n\t\t\tWire gen0_or0 = new Wire();\t\n\t\t\tWire or0_led0 = new Wire();\t\n\t\t\t// egy switch , generator egy Or kapu ill egy led letrehozasa, konstruktorukban a wire-rel\n\t\t\tSWITCH sw0 = new SWITCH(sw0_or0);\n\t\t\tGENERATOR gen0 = new GENERATOR(3,5,gen0_or0);\n\t\t\tORGate or0 = new ORGate(sw0_or0,gen0_or0);\n\t\t\tLED led0 = new LED(or0_led0);\n\t\t\tor0.AddOutput(or0_led0);\n\t\t\t// Hozzaadjuk a hierarchiahoz\n\t\t\tComponentList.add(new ArrayList<iComponent>());\t//0. szint letrehozasa\n\t\t\tComponentList.get(0).add(sw0);\n\t\t\tComponentList.get(0).add(gen0);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); //1 szint letrehozasa\n\t\t\tComponentList.get(1).add(or0);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); // 2. szint letrehozasa\n\t\t\tComponentList.get(2).add(led0);\n\t\t\t// hozzaadjuk a Wireket\n\t\t\tWireList.add(sw0_or0);\n\t\t\tWireList.add(gen0_or0);\n\t\t\tWireList.add(or0_led0);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 1:\n\t\t\t/*\n\t\t\t* *****************************************\n\t\t\t* ******* aramkor visszacsatolassal ******\n\t\t\t* *****************************************\n\t\t\t* and0_and0 = sw01 & and0_and0\n\t\t\t* led01 = and0_and0\n\t\t\t*/\t\n\t\t\t//sw0:Switch, and0:andGate, led0:LED, sw0_and0:Wire, and0_and0:Wire,and0_led0:Wire\n\t\t\tWire sw01_and0 = new Wire();\t\n\t\t\tWire and0_and0 = new Wire();\n\t\t\tWire and0_led01 = new Wire();\n\t\t\t\n\t\t\tSWITCH sw01 = new SWITCH(sw01_and0);\n\t\t\tANDGate and0 = new ANDGate(and0_and0,sw01_and0){\n\t\t\t\t/**\n\t\t\t\t * mivel visszacsatolast tartalmaz, es nincs a skeletonban erre megfelelo lehetoseg, \n\t\t\t\t * felulirjuk a peldany step fuggvenyet, hogy megfeleloen mukodjon.\n\t\t\t\t */\n\t\t\t\tpublic boolean Step(){\n\t\t\t\t\tboolean Result = true;\t\t\t\t\t\t// A vegso eredmeny: Stabil-e az aramkor\n\t\t\t\t\t_TEST stack = new _TEST();\t\t\t\t\t/* TEST */\n\t\t\t\t\tstack.PrintHeader(ID,\"\",\"true:boolean\");\t/* TEST */\n\t\t\t\t\t//count magat\n\t\t\t\t\tPreviousValue = Count();\t\t\t\t\t// Megnezzuk az elso futas erredmenyet\n\t\t\t\t\t//feedback[0], elso kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//sajat maga, elso kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//feedback[0], masodik kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//ha bitt nem egyezne meg, az elozo prev.valueval, akkor instabil.\n\t\t\t\t\tstack.PrintTail(ID,\"\",Result + \":boolean\");\t/* TEST */\n\t\t\t\t\treturn Result;\n\t\t\t\t}\n\t\t\t};\n\t\t\tLED led01 = new LED(and0_led01);\n\t\t\t\n\t\t\tand0.AddOutput(and0_and0);\n\t\t\tand0.AddOutput(and0_led01);\n\t\t\t\n\t\t\tand0.AddToFeedbacks(and0);\n\t\t\t// Hozzaadjuk a hierarchiahoz\n\t\t\tComponentList.add(new ArrayList<iComponent>());\n\t\t\tComponentList.get(0).add(sw01);\n\t\t\tComponentList.add(new ArrayList<iComponent>());\n\t\t\tComponentList.get(1).add(and0);\n\t\t\tComponentList.add(new ArrayList<iComponent>());\n\t\t\tComponentList.get(2).add(led01);\n\n\t\t\t// hozzaadjuk a Wireket\n\t\t\tWireList.add(sw01_and0);\n\t\t\tWireList.add(and0_and0);\n\t\t\tWireList.add(and0_led01);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t/* ********************************\n\t\t\t* ******* Instabil aramkor ******\n\t\t\t* ********************************\n\t\t\t* inv0_and2 = !sw2 & inv0_and2\n\t\t\t* led3 = inv0_and2\n\t\t\t*/\t\t\n\t\t\t//osszekoto wire letrehozasa\t\t\n\t\t\tWire sw2_and2 = new Wire();\t\n\t\t\tWire and2_inv0 = new Wire();\t\n\t\t\tWire inv0_and2 = new Wire();\n\t\t\tWire inv0_led3 = new Wire();\n\t\t\t// egy switch , inverter egy AND kapu ill egy led letrehozasa, konstruktorukban a wire-rel\n\t\t\tSWITCH sw2 = new SWITCH(sw2_and2);\n\t\t\t//final kell, mert kulonben nem hivatkozhatunk ra a and peldanyatirt-bol\n\t\t\tfinal INVERTER inv0 = new INVERTER(and2_inv0);\n\t\t\tANDGate and2 = new ANDGate(sw2_and2,inv0_and2){\n\t\t\t\t/**\n\t\t\t\t * mivel visszacsatolast tartalmaz, es nincs a skeletonban erre megfelelo lehetoseg, \n\t\t\t\t * felulirjuk a peldany step fuggvenyet, hogy megfeleloen mukodjon.\n\t\t\t\t */\n\t\t\t\tpublic boolean Step(){\n\t\t\t\t\tboolean Result = true;\t\t\t\t\t\t// A vegso eredmeny: Stabil-e az aramkor\n\t\t\t\t\t_TEST stack = new _TEST();\t\t\t\t\t/* TEST */\n\t\t\t\t\tstack.PrintHeader(ID,\"\",\"true:boolean\");\t/* TEST */\n\t\t\t\t\tPreviousValue = Count();\t\t\t\t\t// Megnezzuk az elso futas erredmenyet\n\t\t\t\t\tinv0.Count();\t\t\t\t//feedback[0].Count(), elso ciklus\n\t\t\t\t\tPreviousValue = Count();\t//feedback 0 es 1 kozt magat frissiti\n\t\t\t\t\tinv0.Count();\t\t\t\t//feedback[0].Count(), masodik ciklus\n\t\t\t\t\tPreviousValue = Count();\t//frissiti magat. itt instabilitasi teszt jon a proto-ban\n\n\t\t\t\t\tstack.PrintTail(ID,\"\",Result + \":boolean\");\t/* TEST */\n\t\t\t\t\treturn Result;\n\t\t\t\t}\n\t\t\t};\n\t\t\tLED led3 = new LED(inv0_led3);\n\t\t\t\n\t\t\tand2.AddOutput(and2_inv0);\n\t\t\tinv0.AddOutput(inv0_and2);\n\t\t\t// Feedbacks\n\t\t\tand2.AddToFeedbacks(and2);\n\t\t\tand2.AddToFeedbacks(inv0);\n\t\t\t// Hozzaadjuk a hierarchiahoz\n\t\t\tComponentList.add(new ArrayList<iComponent>());\t//0. szint letrehozasa\n\t\t\tComponentList.get(0).add(sw2);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); //1 szint letrehozasa\n\t\t\tComponentList.get(1).add(and2);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); // 2. szint letrehozasa\n\t\t\tComponentList.get(2).add(inv0);\n\t\t\tComponentList.add(new ArrayList<iComponent>()); // 3. szint letrehozasa\n\t\t\tComponentList.get(2).add(led3);\n\t\t\t// hozzaadjuk a Wireket\n\t\t\tWireList.add(sw2_and2);\n\t\t\tWireList.add(and2_inv0);\n\t\t\tWireList.add(inv0_and2);\n\t\t\tWireList.add(inv0_led3);\n\t\t\tbreak;\n\t\t}\n\t\tstack.PrintTail(ID,\"strFilePAth:String\",\"\");\n\t}", "void massiveModeLoading( File dataPath );", "public static void load(String filename, Supervisor k) throws FileNotFoundException{\n String source = \"\";\n try {\n Scanner in = new Scanner(new FileReader(filename));\n while(in.hasNext()){\n source = source + in.next();\n }\n } catch (FileNotFoundException ex) {\n //throw ex;\n System.out.println(\"Could not read config file: \" + ex);\n System.out.println(\"trying to create a new one...\");\n String stsa = \"Done!\\n\";\n try (\n Writer writer = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(filename), \"utf-8\"))) {\n writer.write(\"\");\n writer.close();\n }\n \n catch (IOException ex1) {\n stsa = \"\";\n System.out.println(\"FAILED, SKIPPING CONFIG READ BECOUSE:\");\n Logger.getGlobal().warning(ex1.toString());\n System.out.println(\"Console version: \" + ex1.toString());\n }\n System.out.print(stsa);\n }\n LinkedList<String[]> raw = fetch(source);\n \n if(k.Logic == null){\n Logger.getGlobal().warning(\"ENGINE NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n if(k.Logic.Vrenderer == null){\n Logger.getGlobal().warning(\"ENGINE RENDERER NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n \n for(String[] x: raw){\n String value = x[1];\n if(!k.features_overrideAllStandard)\n switch(x[0]){\n case \"nausea\":\n int numValue = 0;\n try{\n numValue = Integer.parseInt(value);\n }\n catch(Exception e){\n quickTools.alert(\"configReader\", \"invalid nausea value\");\n break;\n }\n if(numValue > 0){\n k.Logic.Vrenderer.dispEffectsEnabled = true;\n }\n //k.Logic.Vrenderer.di\n break;\n default:\n\n break;\n }\n customFeatures(x[0], x[1], k);\n }\n }", "private void loadInventory(String fileName){\t\t\r\n\t\tList<String> list = new ArrayList<String>();\r\n\r\n\t\ttry (Stream<String> stream = Files.lines(Paths.get(fileName))) {\r\n\t\t\t//Convert it into a List\r\n\t\t\tlist = stream.collect(Collectors.toList());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor(String itemList : list){\r\n\t\t\tString[] elements = itemList.split(\"--\");\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tswitch(elements[0].toUpperCase()){\r\n\t\t\t\t\tcase \"BURGER\":\r\n\t\t\t\t\t\t\tinventory.add(createBurger(elements));;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"SALAD\":\r\n\t\t\t\t\t\t\tinventory.add(createSalad(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"BEVERAGE\":\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createBeverage(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"SIDE\":\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createSide(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"DESSERT\":\r\n\t\t\t\t\t\t\tinventory.add(createDessert(elements));;\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public static Material loadMaterialFile(String name) {\r\n\t\tMaterial mat = assetManager.loadMaterial(name);\r\n\t\tmaterialMap.put(name, mat);\r\n\t\treturn mat;\r\n\t}", "private void loadFromFile(String fileName) {\n try {\n InputStream inputStream = this.openFileInput(fileName);\n if (inputStream != null) {\n ObjectInputStream input = new ObjectInputStream(inputStream);\n boardManager = (BoardManager) input.readObject();\n inputStream.close();\n }\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n } catch (ClassNotFoundException e) {\n Log.e(\"login activity\", \"File contained unexpected data type: \" + e.toString());\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void loadPairs() {\r\n\t\tthis.criticalPairs = null;\r\n\t\tPairContainer excludePairContainer = null;\r\n\t\tGraGra nullGraGra = BaseFactory.theFactory().createGraGra();\r\n\t\tthis.cpOption.enableLayered(true);\r\n\t\texcludePairContainer = ParserFactory.createEmptyCriticalPairs(\r\n\t\t\t\tnullGraGra, this.cpOption);\r\n\t\tPairIOGUI pairIOgui = new PairIOGUI((JFrame) this.parent,\r\n\t\t\t\texcludePairContainer);\r\n\t\tpairIOgui.setDirectoryName(this.treeView.getFileDirectory());\r\n\t\tObject o = pairIOgui.load();\r\n\t\tif (o == null)\r\n\t\t\treturn;\r\n\r\n\t\tString fileName = pairIOgui.getFileName();\r\n\r\n\t\tif (!(o instanceof LayeredPairContainer))\r\n\t\t\tthis.cpOption.enableLayered(false);\r\n\r\n\t\t// add loaded name to list of gragra names\r\n\t\tString str = excludePairContainer.getGrammar().getName() + \"(\"\r\n\t\t\t\t+ fileName + \")\";\r\n\t\tthis.gragraNamesVector.addElement(str);\r\n\t\tthis.gragraNames.setListData(this.gragraNamesVector);\r\n\t\tthis.gragraNames.setSelectedIndex(this.gragraNamesVector.size() - 1);\r\n\r\n\t\t// set critical pairs\r\n\t\tthis.criticalPairs = excludePairContainer;\r\n\t}", "public static Game loadGame(String fileName){\n Game game = null;\n try {\n File file1 = new File(fileName);\n FileInputStream fileInputStream = new FileInputStream(file1);\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\n game = (Game) objectInputStream.readObject();\n game.makeGUIVisible();\n }catch (Exception e){\n System.err.println(\"Error when loading file\");\n }\n return game;\n }", "public void load() throws ClassNotFoundException, IOException;", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic static void loadAsset(String name) {\r\n\t\tassetManager.loadAsset(name);\t\t\r\n\t}", "private void loadRack() {\n buildRack();\n for (LetterTile tile : rack)\n add(tile);\n }", "public void load() {\n }", "public void load (String argFileName) throws IOException;", "Energy getLoad();", "public void read(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Reading project spec '\" + _specName + \"'...\");\r\n\r\n\t\tbook.getFileRegistry().setProjectFilename(_specName);\r\n\t\t\r\n\t\t// verify a compatible sim-file format\r\n\t\tint version =_dataModel.getVersion(); \r\n\t\tif (!isCompatibleSpecFormat(version))\r\n\t\t{\r\n\t\t\tthrow new SB_FileException(\"Incompatible project file format: engine version \"\r\n\t\t\t\t\t\t\t\t\t\t+ Version.FILE_FORMAT_MAX_VERSION + \", file version \" + version);\r\n\t\t}\r\n\r\n\t\tbook.getFileRegistry().setFormatVersion(version);\r\n\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Specification format version \" + version,SB_Logger.INIT);\r\n\r\n\t\t// read file version information\r\n\t\tbook.getFileRegistry().setSpecVersion(version);\r\n\r\n\t\treadDescriptors(book);\r\n\t\treadClasses(book);\r\n\t\treadActions(book);\r\n\t\treadPredicates(book);\r\n\r\n\t\treadJavaScript(book);\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t readGlobals(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t readConstants(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex) {\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t\t\r\n\t\treadBehaviors(book);\r\n\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\"** Project spec file '\" + _specName + \"' loaded.\",SB_Logger.INIT);\r\n\t}", "private void readBehavior(SB_SingletonBook book, Behavior behavior) throws SB_FileException {\n\t SB_BehaviorClass sbBehavior = new SB_BehaviorClass( book.getBehaviorRegistry().requestBehaviorId() );\r\n\r\n\t sbBehavior.load(behavior, book);\r\n\r\n\t book.getBehaviorRegistry().addBehavior(sbBehavior);\r\n\t book.getFileRegistry().associatePackage(_specName, sbBehavior.getName());\r\n\r\n\t}", "public void fileLoaderMethod(String filename) {\n\t\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\t\n\t\tfileloc += filename;\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\tString code = \"\";\n\t\t\n\t\tif(!fl.exists()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The specified file doesnt exist at the given location.\");\n\t\t} else {\t\n\t\t\ttry {\n\t\t\t\tFileReader flrd = new FileReader(fileloc);\n\t\t\t\tBufferedReader bufread = new BufferedReader(flrd);\t\t\n\t\t\t\tString str;\n\t\t\t\twhile((str = bufread.readLine()) != null) {\n\t\t\t\t\tcode += str + \"\\n\";\n\t\t\t\t}\t\t\n\t\t\t\tbufread.close();\n\t\t\t\tflrd.close();\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\n\t\tinterpretorMainMethod(code, 0);\n\t}", "public static void load(String name) throws RuntimeException, IOException{\n\t\tif(!name.startsWith(\"/\")) name = \"/\"+name;\n\t\tFile libFile = NativeUtils.getAsLocalFile(name);\n\t\tUtils.sleep(500); // wait a bit to be sure the library is ready to be read\n\t\tSystem.load(libFile.getAbsolutePath());\n\t}", "LoadGenerator createLoadGenerator();", "LoadGenerator createLoadGenerator();", "void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "void loadProducts(String filename);", "public Cartridge(String fileName) {\n\t\ttry {\n\t\t\tInputStream i = new FileInputStream(fileName);\n\t\t\tbyte[] header = new byte[16];\n\t\t\ti.read(header);\n\t\t\tif((header[6]&0x04)!=0) i.skip(512);\n\t\t\tnMapperID = (byte) ((((header[7]&0xFF)>>4)<<4)|((header[6]&0xFF)>>4));\n\t\t\tmirror = (header[6]&0x01)!=0;\n\t\t\tint nFileType = 1;\n\t\t\tif(nFileType==0) {\n\t\t\t\t\n\t\t\t}\n\t\t\tif(nFileType==1) {\n\t\t\t\tnPRGBanks = header[4];\n\t\t\t\tvPRGMemory = new byte[nPRGBanks*16384];\n\t\t\t\ti.read(vPRGMemory);\n\t\t\t\tnCHRBanks = header[5];\n\t\t\t\tvCHRMemory = new byte[nCHRBanks>0?nCHRBanks*8192:8192];\n\t\t\t\ti.read(vCHRMemory);\n\t\t\t}\n\t\t\tif(nFileType==2) {\n\t\t\t\t\n\t\t\t}\n\t\t\tswitch(nMapperID&0xFF) {\n\t\t\tcase 0: mapper = new Mapper000(nPRGBanks,nCHRBanks);break;\n\t\t\t}\n\t\t\ti.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\timageValid = true;\n\t}", "public void readxml() throws JAXBException, FileNotFoundException {\n Player loadplayer = xml_methods.load();\n logger.info(\"player name: \" + loadplayer.getName());\n if (!item.isEmpty()) {\n logger.trace(loadplayer.getitem(0).getName());\n }\n tfName.setText(loadplayer.getName());\n isset = true;\n player = loadplayer;\n\n }", "public Bitmap LoadFromFile(String _fullFilename) {\n\t //if (bmp != null) { bmp.recycle(); }\n\t BitmapFactory.Options bo = new BitmapFactory.Options();\t\t\n\t\t\n\t if( bo == null ) return null;\n\t \n\t if( controls.GetDensityAssets() > 0 )\n\t bo.inDensity = controls.GetDensityAssets();\n\t \n\t return BitmapFactory.decodeFile(_fullFilename, bo);\n }", "private void loadTiles(String filename) {\n\t\ttry {\n\t\t\tScanner s;\n\n\t\t\tif (StealthGame.EXPORT)\n\t\t\t\ts = new Scanner(ResourceLoader.load(filename));\n\t\t\telse\n\t\t\t\ts = new Scanner(new File(filename));\n\n\t\t\tif (s.hasNextLine()) {\n\t\t\t\tname = s.nextLine();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Room has no name\");\n\t\t\t}\n\t\t\txSize = s.nextInt();\n\t\t\tySize = s.nextInt();\n\t\t\ttiles = new Tile[xSize][ySize];\n\t\t\tint xPos = 0;\n\t\t\tint yPos = 0;\n\t\t\tint tileNum = 0;\n\n\t\t\t// List of doors to be given destinations\n\n\t\t\twhile (s.hasNext()) {\n\n\t\t\t\tif (s.hasNextInt()) {\n\t\t\t\t\tparseInt(s, xPos, yPos, tileNum);\n\n\t\t\t\t\txPos++;\n\t\t\t\t\ttileNum++;\n\n\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\tyPos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Not a basic floor, door or wall\n\t\t\t\telse {\n\t\t\t\t\tString str = s.next();\n\t\t\t\t\tif (str.length() == 1) {\n\t\t\t\t\t\tparseChar(xPos, yPos, tileNum, str);\n\n\t\t\t\t\t\txPos++;\n\t\t\t\t\t\ttileNum++;\n\n\t\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\t\tyPos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (str.equals(\"door\")) {\n\t\t\t\t\t\t\tparseDoorDestination(s);\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\ts.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Room - Error loading file - IOException : \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "public void loadVehicles() throws IOException {\n File veFile = new File(VE_FILE);\n\n //Checks is file created\n if (!veFile.exists()) {\n veFile.createNewFile(); //If not, creates new file\n System.out.print(\"The data file vehicles.txt is not exits. \" +\n \"Creating new data file vehicles.txt... \" +\n \"Done!\");\n this.numberOfVehicle = 0; //New data file with the number of Vehicle is 0\n } else {\n //If file is existed, so loading this data file\n System.out.print(\"The data file vehicles.txt is found. \" +\n \"Data of vehicles is loading...\");\n\n //Loads text file into buffer\n try (BufferedReader br = new BufferedReader(new FileReader(VE_FILE))) {\n String line, contractId, type, licensePlate, chassisId, enginesId;\n\n //Reads number of vehicles\n line = br.readLine();\n if (line == null) return;\n this.numberOfVehicle = Integer.parseInt(line);\n\n for (int i = 0; i < this.numberOfVehicle; i++) {\n //Reads Vehicle's information\n contractId = br.readLine();\n type = br.readLine();\n licensePlate = br.readLine();\n chassisId = br.readLine();\n enginesId = br.readLine();\n\n\n //Create new instance of Vehicle and adds to Vehicle bank\n this.vehicles.add(new Vehicle(Integer.parseInt(contractId), type, licensePlate, chassisId, enginesId));\n }\n }\n System.out.print(\"Done!\");\n }\n }", "public ReplayOrchestrator loadReplay(String gameName, String replayName)\r\n\t\tthrows FileNotFoundException, IOException {\r\n\t\tif (logger.isTraceEnabled())\r\n\t\t\tlogger.trace(\"Loading replay (\" + replayName + \")...\");\r\n\t\t\r\n\t\t// Create replay simulator\r\n\t\tthis.simulator = new ReplayOrchestrator(this, gameName, replayName);\r\n\t\t\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Replay loaded.\");\r\n\t\t\r\n\t\treturn (ReplayOrchestrator) simulator;\r\n\t}", "void load(Future<AggregatedProfileInfo> future, AggregatedProfileNamingStrategy filename);", "public void load() {\n\t}", "public void load() ;", "public static void load(String name, World w) {\n\t\tlineNumber = 0;\n\t\tfileName = name;\n\n\t\tFile f = new File(\"data/conversations/\" + name + \".lucy\");\n\n\t\tif (!f.exists()) {\n\t\t\tErrorLogger.log(\"Attempted to load conversations for \" + name\n\t\t\t\t\t+ \" but no file exists.\", 2);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(f));\n\t\t\t\tloadConversations(w);\n\n\t\t\t\tloadQuests(w);\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tErrorLogger.log(ioe, 4);\n\t\t\t}\n\t\t}\n\t}", "public static FroggerGame read(String name) throws IOException {\r\n FroggerGame frogger = new FroggerGame();\r\n\r\n Gson gson = new Gson();\r\n\r\n try (Reader reader = new FileReader(name)) {\r\n\r\n // this line is a modified line copied from https://mkyong.com/java/how-to-parse-json-with-gson/\r\n RuntimeTypeAdapterFactory<Sprite> adapter = RuntimeTypeAdapterFactory.of(Sprite.class, \"type\")\r\n .registerSubtype(Frog.class)\r\n .registerSubtype(Enemy.class)\r\n .registerSubtype(Car.class)\r\n .registerSubtype(Truck.class)\r\n .registerSubtype(Alligator.class)\r\n .registerSubtype(Item.class);\r\n gson = new GsonBuilder().registerTypeAdapterFactory(adapter).create();\r\n frogger = gson.fromJson(reader,FroggerGame.class);\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.print(\"We could not find that save file \\n We will start you a new game \\n\");\r\n }\r\n\r\n return frogger;\r\n }", "public void loadGame(File fileLocation, boolean replay);", "private <T> void loadAllFromFolder(String name,Class<T> type){\n\t\tFileHandle dirHandle;\n\t\tif (Gdx.app.getType() == ApplicationType.Desktop) {\n\t\t dirHandle = new FileHandle(\"./bin/\"+name);\n\t\t \n\t\t} else {\n\t\t dirHandle = Gdx.files.internal(name);\n\t\t}\n\t\t \n\t\tfor (FileHandle entry: dirHandle.list()) {\n\t\t assetManager.load(entry.path(),type);\n\t\t}\n\t}", "public void load (File file) throws Exception;", "public void processRaw(String rawfilepath){\n\t\tbyte tempbyte[] = new byte[131072];\n\t\ttempbyte = loadBytes(rawfilepath);\n\t\tfor (int i=0; i < header.length; i++){\n\t\t\theader[i]= tempbyte[i];\n\t\t}\n\t\tfor (int i = 0; i < EEPROM.length;){\n\t\t\tEEPROM[i] = tempbyte[i+1024];\n\t\t}\n\t\torganizeEEPROM();\n\t\tprocessData();\n\t\tsavefile();\n\t}", "public void loadPlayerCard(HashMap<Integer, PlayerCard> PlayerCard_HASH, String file_name){\r\n PlayerCardFactory playerCardFactory = new PlayerCardFactory();\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+file_name));\r\n \r\n while (scanner.hasNextLine()) {\r\n String line = scanner.nextLine();\r\n \r\n if(PlayerCard_HASH.size() == 0){\r\n line = scanner.nextLine();\r\n }\r\n \r\n PlayerCard playerCard = playerCardFactory.getPlayerCard(line);\r\n /*if(playerCard.getPlayerID() == 0)\r\n playerCard.setPlayerID(ConstantField.DEFAULT_UNDEFINED_PLAYID);\r\n if(playerCard.getOrder() == 0)\r\n playerCard.setOrder(ConstantField.DEFAULT_UNDEFINED_ORDER);\r\n */\r\n PlayerCard_HASH.put(playerCard.getId(), playerCard);\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayerCard\");\r\n }\r\n }", "public static void load() {\n }", "public void load (IFile file) throws Exception;", "@SuppressWarnings(\"unchecked\")\n public static void load() {\n\n System.out.print(\"Loading team data from file...\");\n\n try {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n\n FileInputStream fil = new FileInputStream(team_fil);\n ObjectInputStream in = new ObjectInputStream(fil);\n\n team_list = (ConcurrentHashMap<Integer, Team>) in.readObject();\n cleanTeams();\n\n fil.close();\n in.close();\n\n //Gå gjennom alle lagene og registrer medlemmene i team_members.\n Iterator<Team> lag = team_list.values().iterator();\n\n while (lag.hasNext()) {\n\n Team laget = lag.next();\n\n Iterator<TeamMember> medlemmer = laget.getTeamMembers();\n while (medlemmer.hasNext()) {\n registerMember(medlemmer.next().getCharacterID(), laget.getTeamID());\n }\n\n }\n\n System.out.println(\"OK! \" + team_list.size() + \" teams loaded.\");\n\n } catch (Exception e) {\n System.out.println(\"Error loading team data from file.\");\n }\n\n }", "public void load(String filename) {\n\t\tsetup();\n\t\tparseOBJ(getBufferedReader(filename));\n\t}", "@Override\r\n public void load(String[] arr) {\r\n\tString name = arr[arr.length - 1];\r\n\tString fileName = arr[arr.length - 2];\r\n\ttry {\r\n\t byte[] temp = new byte[4096];\r\n\t InputStream in = new MyDecompressorInputStream(new FileInputStream(fileName));\r\n\t int numOfBytes = in.read(temp);\r\n\t in.close();\r\n\t byte[] b = new byte[numOfBytes];\r\n\t for (int i = 0; i < b.length; i++) {\r\n\t\tb[i] = temp[i];\r\n\t }\r\n\t Maze3d maze = new Maze3d(b);\r\n\t hMaze.put(name, maze);\r\n\t setChanged();\r\n\t notifyObservers((\"load:\" + name).split(\":\"));\r\n\t} catch (FileNotFoundException e) {\r\n\t setChanged();\r\n\t notifyObservers(\"Error - the file was not found\");\r\n\t} catch (IOException e) {\r\n\t setChanged();\r\n\t notifyObservers(\"Error - IOException\");\r\n\t}\r\n }", "@Override\r\n public void load()\r\n {\r\n\tLevel.openMap(\"maps/Level1.map\", _width, _height);\r\n\t_level = Level.getInstance();\r\n\tCamera.getInstance().setBounds(_level.getWorldBoundaries());\r\n\t_printText = new Text(TILESHEET_TEXTURE, \"0123456789xUPC\", 0, 244, 32, 37, 4, 24, 28);\r\n\t_coin = new Sprite(\"Coin\", 6, _height - 34, 24, 24, Tiles.get(COIN_ANIM), false);\r\n\t_1UP = new Sprite(\"1UP\", 200, _height - 42, 42, 42, Tiles.get(MUSHROOM_GREEN), false);\r\n\tSoundLibrary.getInstance().loop(MUSIC_LEVEL);\r\n\tMario.clearData();\r\n }", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public void loadVehicle(Vehicle vehicle) {\n storage.addVehicle(vehicle);\n }", "private static void load(){\n }", "public static void readLotteryFiles() {\n\t\tfor (int index = 0; index < NpcHandler.npcs.length; index++) {\n\t\t\tNpc npc = NpcHandler.npcs[index];\n\t\t\tif (npc == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (npc.npcType == 11057) {\n\t\t\t\tlotteryNpcIndex = npc.npcIndex;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\ttotalTicketsPurchased = Integer.parseInt(FileUtility.readFirstLine(TOTAL_TICKETS_FILE));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tArrayList<String> data = FileUtility.readFile(LOTTERY_ENTRIES_FILE);\n\t\tfor (int index = 0; index < data.size(); index++) {\n\t\t\tString parse[] = data.get(index).split(ServerConstants.TEXT_SEPERATOR);\n\t\t\tString name = parse[0];\n\t\t\tint ticketsPurchased = Integer.parseInt(parse[1]);\n\t\t\tLotteryDatabase.lotteryDatabase.add(new LotteryDatabase(name, ticketsPurchased));\n\t\t}\n\t}", "public QuizPlayer serialReadFile() {\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(); //If any error is caught the program will re ask the user for input.\r\n try {\r\n ObjectInputStream inputStream =\r\n new ObjectInputStream(new FileInputStream(fileObject));\r\n q = (QuizPlayer) inputStream.readObject();\r\n\r\n\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Cannot find file. Please Enter a different file Name\");\r\n\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problems with file input. Please Enter a different file name\");\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problems with file input. Please Enter a differet file name\");\r\n }\r\n\r\n\r\n return q;\r\n }", "private static void initCode() {\n\t\tString ver = getRelocationAddition();\n\t\t\n\t\tif(ver == null) {\n\t\t\tcode = new UNKNOWN_VollotileCode();\n\t\t\tSystem.out.println(\"Could not find a Vollotile for the Current MC Version. Using Fallback.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_13_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_13_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_12_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_12_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_11_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_11_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_10_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_10_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_9_R2\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_9_R2_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_9_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_9_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_8_R3\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_8_R3_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_8_R2\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_8_R2_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_8_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_8_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_7_R4\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_7_R4_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_7_R3\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_7_R3_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_7_R2\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_7_R2_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_7_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_7_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_6_R3\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_6_R3_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_6_R2\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_6_R2_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(\"v1_6_R1\".equalsIgnoreCase(ver)){\n\t\t\tcode = new MC_1_6_R1_VollotileCode();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(code == null) {\n\t\t\tcode = new UNKNOWN_VollotileCode();\n\t\t\tSystem.out.println(\"Could not find a Vollotile for the Current MC Version. Using Fallback.\");\n\t\t}\n\t}", "private BufferedImage loadPic(String name) {\n\t\tBufferedImage pic=null;\n\t\ttry {\n\t\t\tpic = ImageIO.read(new File(\"store/\"+name));\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\treturn pic;\n\t}", "public static Object load(String name, String version) {\r\n String origine;\r\n String nomFichier;\r\n FileInputStream f = null;\r\n ObjectInputStream in = null;\r\n Object resultat;\r\n \r\n // Construire le nom du fichier source de la\r\n // configuration\r\n //\r\n nomFichier = name + \"-\" + version + \".conf\";\r\n \r\n // Construire un fichier logique correspondant\r\n //\r\n try {\r\n f = new FileInputStream(nomFichier);\r\n }\r\n catch (Exception e) {\r\n return null;\r\n }\r\n \r\n // Construire un flux d'entree base sur le fichier\r\n // logique\r\n //\r\n try {\r\n in = new ObjectInputStream(f);\r\n }\r\n catch (Exception e) {\r\n return null;\r\n }\r\n \r\n // Acquerir et deserialiser le flux d'entree\r\n //\r\n try {\r\n resultat = in.readObject();\r\n }\r\n catch (Exception e) {\r\n return null;\r\n }\r\n \r\n // Controler la classe d'origine du resultat\r\n //\r\n origine = resultat.getClass().getName();\r\n if (origine != \"java.util.HashMap\" && origine != \"java.util.LinkedHashMap\") return null;\r\n \r\n System.out.println(\"Chargement du fichier \" + nomFichier + \" : OK\");\r\n return resultat;\r\n }", "public void load() {\n structure = SpigotUtils.structBetweenTwoLocations(pos1, pos2, material);\n }", "public GameLevel LoadGame() throws IOException {\n FileReader fr = null;\n BufferedReader reader = null;\n\n try {\n System.out.println(\"Reading \" + fileName + \" data/saves.txt\");\n\n fr = new FileReader(fileName);\n reader = new BufferedReader(fr);\n\n String line = reader.readLine();\n int levelNumber = Integer.parseInt(line);\n\n //--------------------------------------------------------------------------------------------\n\n if (levelNumber == 1){\n gameLevel = new Level1();\n } else if(levelNumber == 2){\n gameLevel = new Level2();\n JFrame debugView = new DebugViewer(gameLevel, 700, 700);\n } else {\n gameLevel = new Level3();\n }\n\n //------------------------------------------------------------------------------------------\n\n\n while ((line = reader.readLine()) != null){\n String[] tokens = line.split(\",\");\n String className = tokens[0];\n float x = Float.parseFloat(tokens[1]);\n float y = Float.parseFloat(tokens[2]);\n Vec2 pos = new Vec2(x, y);\n Body platform = null;\n\n if (className.equals(\"PlayableCharacter\")){\n PlayableCharacter playableCharacter = new PlayableCharacter(gameLevel, PlayableCharacter.getItemsCollected(),PlayableCharacter.isSpecialGravity(),game);\n playableCharacter.setPosition(pos);\n gameLevel.setPlayer(playableCharacter);\n\n }\n\n if (className.equals(\"LogPlatform\")){\n Body body = new LogPlatform(gameLevel, platform);\n body.setPosition(pos);\n }\n\n if (className.equals(\"Coin\")){\n Body body = new Coin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new Pickup(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"ReducedGravityCoin\")){\n Body body = new ReducedGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupRGC(gameLevel.getPlayer(), game)\n\n );\n }\n\n if (className.equals(\"AntiGravityCoin\")){\n Body body = new AntiGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupAGC(gameLevel.getPlayer(), game) );\n }\n\n if (className.equals(\"Rock\")){\n Body body = new Rock(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new FallCollisionListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Pellet\")){\n Body body = new Pellet(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new AddLifeCollisionListener(gameLevel.getPlayer(), game));\n }\n\n if (className.equals(\"Branch\")){\n Body body = new Branch(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new BranchListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Portal\")){\n Body portal = new Portal(gameLevel);\n portal.setPosition(pos);\n portal.addCollisionListener(new DoorListener(game));\n }\n\n if (className.equals(\"DeathPlatform\")){\n float w = Float.parseFloat(tokens[3]);\n float h = Float.parseFloat(tokens[4]);\n float deg = Float.parseFloat(tokens[5]);\n\n Body body = new DeathPlatform(gameLevel, w, h);\n body.setPosition(pos);\n body.addCollisionListener(new FallCollisionListener(gameLevel.getPlayer(), game));\n body.setFillColor(Color.black);\n body.setAngleDegrees(deg);\n\n }\n\n }\n\n return gameLevel;\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fr != null) {\n fr.close();\n }\n }\n }", "private static Trajectory readFile(String name) {\n\t\ttry {\n\t\t\tFile file = new File(cacheDirectory + name);\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tTrajectory t = (Trajectory) ois.readObject();\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t\treturn t;\n\t\t}\n\t\tcatch (Exception e) { return null; }\n\t}", "void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public BiomartAccess(String fname) \n {\n m_file = new File(fname);\n }", "public void readDriverFile(String path)\n {\n FileIO fileIO = new FileIO();\n fileIO.setFileName(path);\n String fileData = fileIO.readFile();\n String[] data = fileData.split(\"\\\\n\"); // split data by new line character\n for(int i = 0 ; i < data.length ; i++)\n {\n String[] values = data[i].split(\",\"); //split each row by ,\n getDrivers().addDriver(values[0], Integer.parseInt(values[1]), values[2], true); // add a new driver to the collection\n } \n }", "void loadOriginalGameState(String saveName, int level) throws IOException;", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "public void load(File source);", "private static void loadSoFromInternalStorage(String fileName) throws UnsatisfiedLinkError {\n String path = System.getProperties().get(\"java.io.tmpdir\").toString().replace(\"/cache\", \"/files/\" + fileName);\n File file = new File(path);\n SecurityManager security = System.getSecurityManager();\n if (security != null) {\n security.checkLink(file.getAbsolutePath());\n }\n System.load(file.getAbsolutePath());\n }", "public void loadFile(String fname) \n\t{\n\t\t// use Scanner used to read the file\n\t\ttry{\n\t\t\tScanner scan = new Scanner(new FileReader(fname));\n\t\t\t//read in number of row and column in the first line\n\t\t\treadRC(scan);\n\t\t\treadMaze(scan);\n\t\t\t//close the scanner\n\t\t\tscan.close();\t\t\t\t\t\t\t\t\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"FileNotFound\"+e.getMessage());\n\t\t}\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}" ]
[ "0.68276787", "0.6287996", "0.5411987", "0.53992623", "0.5228343", "0.51545465", "0.51544875", "0.514498", "0.51426524", "0.51045734", "0.509401", "0.50929093", "0.50665647", "0.50628555", "0.50617737", "0.4989126", "0.49533957", "0.49275434", "0.49261823", "0.49246347", "0.49106047", "0.49094316", "0.49085486", "0.49064025", "0.48934677", "0.4883338", "0.48783147", "0.48665103", "0.48571715", "0.48443115", "0.48104995", "0.4778921", "0.47650686", "0.47535905", "0.4726728", "0.4726288", "0.4720389", "0.47193545", "0.47162837", "0.47140595", "0.47111", "0.47017947", "0.46918842", "0.4689568", "0.46870306", "0.46757448", "0.46507", "0.46391672", "0.463109", "0.46246824", "0.4605977", "0.46039855", "0.4601755", "0.4601755", "0.45930797", "0.45908234", "0.45869038", "0.45828128", "0.45801887", "0.45778352", "0.45707494", "0.45705512", "0.45689896", "0.45661852", "0.45661014", "0.4561817", "0.45611575", "0.45587897", "0.45568392", "0.45496973", "0.45460933", "0.45369235", "0.45358536", "0.45235965", "0.4505779", "0.45047545", "0.4503598", "0.45005897", "0.45004547", "0.4495678", "0.4491485", "0.44883937", "0.44875503", "0.4473859", "0.44711423", "0.44700786", "0.44656965", "0.44611353", "0.4456687", "0.44559467", "0.44522163", "0.44497213", "0.44482633", "0.44458312", "0.4441585", "0.4440804", "0.44407323", "0.44364122", "0.44364122", "0.44364122" ]
0.5129278
9
Gets the primitive defs file path and name for the given partName.
public static String getPrimitiveDefsFileName(String partName) { return getPartFolderPath(partName) + primitiveDefFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static PrimitiveDefList loadPrimitiveDefs(String partName) {\n String path = getPrimitiveDefsFileName(partName);\n return (PrimitiveDefList) loadFromCompressedFile(path);\n }", "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n PartNameTools.removeSpeedGrade(partName) +\n deviceFileSuffix;\n }", "public static String getPartFolderPath(String partName) {\n return getRapidSmithPath() +\n File.separator +\n deviceFolderName +\n File.separator +\n PartNameTools.getFamilyNameFromPart(partName) +\n File.separator;\n }", "public static String getPrimitiveDefsFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + primitiveDefFileName;\n }", "public Object getPart(String partName);", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "public static String getExactFamilyNameFromPart(String partName) {\n return getExactFamilyTypeFromPart(partName).toString().toLowerCase();\n }", "public static String getFamilyNameFromPart(String partName) {\n return getFamilyTypeFromPart(partName).toString().toLowerCase();\n }", "Decl getPart();", "public static String getDeviceVersion(String partName) {\n String fileName = getDeviceFileName(partName);\n String version;\n try {\n Hessian2Input his = FileTools.getInputStream(fileName);\n version = his.readString();\n his.close();\n } catch (FileNotFoundException e) {\n return null;\n } catch (IOException e) {\n return null;\n }\n\n return version;\n }", "public String getSimpleName() { return FilePathUtils.getFileName(_name); }", "public Path resolve(String part) {\n return Paths.get(part);\n }", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "public static FamilyType getFamilyTypeFromPart(String partName) {\n return getBaseTypeFromFamilyType(getExactFamilyTypeFromPart(partName));\n }", "public Part lookupPart(String partName) {\n for(Part part : allParts) {\n if(part.getName().equals(partName)) {\n return part;\n }\n }\n \n return null;\n }", "String getPathName();", "String getPathName();", "public String getPathName();", "public static FamilyType getExactFamilyTypeFromPart(String partName) {\n partName = removeSpeedGrade(partName);\n partName = partName.toLowerCase();\n if (!partName.startsWith(\"x\")) {\n return null;\n }\n // Chop up partName into regular pieces for matching\n String[] tokens = splitPartName(partName);\n\n // Match part name with family\n if (tokens[0].equals(\"xcv\")) {\n if (tokens.length >= 3 && tokens[2].startsWith(\"e\")) {\n return FamilyType.VIRTEXE;\n } else {\n return FamilyType.VIRTEX;\n }\n } else if (tokens[0].equals(\"xc\")) {\n if (tokens[1].equals(\"2\")) {\n if (tokens[2].equals(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"e\")) {\n return FamilyType.SPARTAN2E;\n } else {\n return FamilyType.SPARTAN2;\n }\n } else if (tokens[2].startsWith(\"vp\")) {\n return FamilyType.VIRTEX2P;\n } else if (tokens[2].startsWith(\"v\")) {\n return FamilyType.VIRTEX2;\n }\n } else if (tokens[1].equals(\"3\")) {\n if (tokens[2].equals(\"sd\")) {\n return FamilyType.SPARTAN3ADSP;\n } else if (tokens[2].startsWith(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"e\")) {\n return FamilyType.SPARTAN3E;\n } else if (tokens.length >= 5 && tokens[4].startsWith(\"a\")) {\n return FamilyType.SPARTAN3A;\n } else {\n return FamilyType.SPARTAN3;\n }\n }\n } else if (tokens[1].equals(\"4\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.VIRTEX4;\n }\n } else if (tokens[1].equals(\"5\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.VIRTEX5;\n }\n } else if (tokens[1].equals(\"6\")) {\n if (tokens[2].startsWith(\"v\")) {\n if (tokens.length >= 5 && (tokens[4].startsWith(\"l\") || tokens[4].startsWith(\"tl\"))) {\n return FamilyType.VIRTEX6L;\n } else {\n return FamilyType.VIRTEX6;\n }\n } else if (tokens[2].startsWith(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"l\")) {\n return FamilyType.SPARTAN6L;\n } else {\n return FamilyType.SPARTAN6;\n }\n }\n } else if (tokens[1].equals(\"7\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.VIRTEX7;\n } else if (tokens[2].startsWith(\"a\")) {\n return FamilyType.ARTIX7;\n } else if (tokens[2].startsWith(\"k\")) {\n return FamilyType.KINTEX7;\n }\n }\n } else if (tokens[0].equals(\"xa\")) {\n if (tokens[1].equals(\"2\") && tokens.length >= 5 && tokens[4].startsWith(\"e\")) {\n return FamilyType.ASPARTAN2E;\n } else if (tokens[1].equals(\"3\")) {\n if (tokens[2].equals(\"sd\")) {\n return FamilyType.ASPARTAN3ADSP;\n } else if (tokens[2].startsWith(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"e\")) {\n return FamilyType.ASPARTAN3E;\n } else if (tokens.length >= 5 && tokens[4].startsWith(\"a\")) {\n return FamilyType.ASPARTAN3A;\n } else {\n return FamilyType.ASPARTAN3;\n }\n }\n } else if (tokens[1].equals(\"6\")) {\n return FamilyType.ASPARTAN6;\n }\n } else if (tokens[0].equals(\"xq\")) {\n if (tokens[1].equals(\"2\")) {\n if (tokens[2].equals(\"v\")) {\n return FamilyType.QVIRTEX2;\n } else if (tokens[2].equals(\"vp\")) {\n return FamilyType.QVIRTEX2P;\n }\n\n } else if (tokens[1].equals(\"4\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.QVIRTEX4;\n }\n } else if (tokens[1].equals(\"5\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.QVIRTEX5;\n }\n } else if (tokens[1].equals(\"6\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.QVIRTEX6;\n } else if (tokens[2].startsWith(\"s\")) {\n if (tokens.length >= 5 && tokens[4].startsWith(\"l\")) {\n return FamilyType.QSPARTAN6L;\n } else {\n return FamilyType.QSPARTAN6;\n }\n }\n } else if (tokens[1].equals(\"7\")) {\n if (tokens[2].startsWith(\"v\")) {\n return FamilyType.QVIRTEX7;\n } else if (tokens[2].startsWith(\"a\")) {\n return FamilyType.QARTIX7;\n } else if (tokens[2].startsWith(\"k\")) {\n return FamilyType.QKINTEX7;\n }\n }\n } else if (tokens[0].equals(\"xqv\")) {\n if (tokens.length >= 3 && tokens[2].startsWith(\"e\")) {\n return FamilyType.QVIRTEXE;\n } else {\n return FamilyType.QVIRTEX;\n }\n } else if (tokens[0].equals(\"xqvr\")) {\n return FamilyType.QRVIRTEX;\n } else if (tokens[0].equals(\"xqr\")) {\n if (tokens[1].equals(\"2\")) {\n return FamilyType.QRVIRTEX2;\n } else if (tokens[1].equals(\"4\")) {\n return FamilyType.QRVIRTEX4;\n } else if (tokens[1].equals(\"5\")) {\n return FamilyType.QRVIRTEX5;\n } else if (tokens[1].equals(\"6\")) {\n return FamilyType.QRVIRTEX6;\n } else if (tokens[1].equals(\"7\")) {\n return FamilyType.QRVIRTEX7;\n }\n }\n return null;\n }", "public String getFilePath(String s) {\n switch(s) {\n case \"fb\":\n return this.fb;\n case \"fbInitialRankingFile\":\n return this.fbInitialRankingFile;\n case \"fbExpansionQueryFile\":\n return this.fbExpansionQueryFile;\n default:\n throw new IllegalArgumentException\n (\"Illegal argument: IndriExpansion doesn't have argument \" + s);\n }\n }", "public org.apache.xmlbeans.XmlNCName xgetPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNCName target = null;\n target = (org.apache.xmlbeans.XmlNCName)get_store().find_element_user(PART$2, 0);\n return target;\n }\n }", "public String part1() {\n return \"Part1\";\n }", "String getPartWithPort();", "public static String getHDRCompFromLHSComp(String fsCompName)\n {\n String lsHDRComp=null;\n int liFirstIndex=-1;\n\n liFirstIndex=fsCompName.indexOf(UNDER_SCORE_CHAR);\n lsHDRComp=fsCompName.substring(0,liFirstIndex)+HDR_SUFFIX;\n return lsHDRComp;\n }", "static final String getTypeNamePartStringWithPart(int itemTemplateId, int partId) {\n/* 625 */ switch (itemTemplateId)\n/* */ \n/* */ { \n/* */ case 717:\n/* 629 */ switch (partId)\n/* */ \n/* */ { case 0:\n/* 632 */ toReturn = \"Pillar\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 864 */ return toReturn;case 1: toReturn = \"Foundation\"; return toReturn;case 2: toReturn = \"Ram\"; return toReturn;case 3: toReturn = \"Symbol\"; return toReturn;case 4: toReturn = \"Tower\"; return toReturn;case 5: toReturn = \"Post\"; return toReturn;case 6: toReturn = \"Column\"; return toReturn;case 7: toReturn = \"Backbone\"; return toReturn;case 8: toReturn = \"Menhir\"; return toReturn;case 9: toReturn = \"Last Stand\"; return toReturn; } toReturn = \"Pillar\"; return toReturn;case 714: switch (partId) { case 0: toReturn = \"Needle\"; return toReturn;case 1: toReturn = \"Fist\"; return toReturn;case 2: toReturn = \"Obelisk\"; return toReturn;case 3: toReturn = \"Charge\"; return toReturn;case 4: toReturn = \"Mantra\"; return toReturn;case 5: toReturn = \"Testimonial\"; return toReturn;case 6: toReturn = \"Trophy\"; return toReturn;case 7: toReturn = \"Stand\"; return toReturn;case 8: toReturn = \"Spear\"; return toReturn;case 9: toReturn = \"Challenge\"; return toReturn; } toReturn = \"Obelisk\"; return toReturn;case 713: switch (partId) { case 0: toReturn = \"Memento\"; return toReturn;case 1: toReturn = \"Monument\"; return toReturn;case 2: toReturn = \"Path\"; return toReturn;case 3: toReturn = \"Way\"; return toReturn;case 4: toReturn = \"Door\"; return toReturn;case 5: toReturn = \"Victorial\"; return toReturn;case 6: toReturn = \"Shield\"; return toReturn;case 7: toReturn = \"Passage\"; return toReturn;case 8: toReturn = \"Rest\"; return toReturn;case 9: toReturn = \"Gate\"; return toReturn; } toReturn = \"Pylon\"; return toReturn;case 712: switch (partId) { case 0: toReturn = \"Shrine\"; return toReturn;case 1: toReturn = \"Barrow\"; return toReturn;case 2: toReturn = \"Vault\"; return toReturn;case 3: toReturn = \"Long Home\"; return toReturn;case 4: toReturn = \"Mausoleum\"; return toReturn;case 5: toReturn = \"Chamber\"; return toReturn;case 6: toReturn = \"Reliquary\"; return toReturn;case 7: toReturn = \"Remembrance\"; return toReturn;case 8: toReturn = \"Sacrarium\"; return toReturn;case 9: toReturn = \"Sanctum\"; return toReturn; } toReturn = \"Shrine\"; return toReturn;case 715: switch (partId) { case 0: toReturn = \"Church\"; return toReturn;case 1: toReturn = \"Temple\"; return toReturn;case 2: toReturn = \"Hand\"; return toReturn;case 3: toReturn = \"House\"; return toReturn;case 4: toReturn = \"Sanctuary\"; return toReturn;case 5: toReturn = \"Chapel\"; return toReturn;case 6: toReturn = \"Abode\"; return toReturn;case 7: toReturn = \"Walls\"; return toReturn;case 8: toReturn = \"Sign\"; return toReturn;case 9: toReturn = \"Fist\"; return toReturn; } toReturn = \"Temple\"; return toReturn;case 716: switch (partId) { case 0: toReturn = \"Pathway\"; return toReturn;case 1: toReturn = \"Mirror\"; return toReturn;case 2: toReturn = \"Mystery\"; return toReturn;case 3: toReturn = \"Gate\"; return toReturn;case 4: toReturn = \"Shimmer\"; return toReturn;case 5: toReturn = \"Route\"; return toReturn;case 6: toReturn = \"Run\"; return toReturn;case 7: toReturn = \"Trail\"; return toReturn;case 8: toReturn = \"Wake\"; return toReturn;case 9: toReturn = \"Secret\"; return toReturn; } toReturn = \"Gate\"; return toReturn; } String toReturn = \"Monument\"; return toReturn;\n/* */ }", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\n }", "@Override\n public IndexPartStatistics getIndexPartStatistics(String part) {\n IndexPartStatistics stats = this.currentMemoryIndex.getIndexPartStatistics(part);\n for (DiskIndex di : this.geometricParts.getIndexes()) {\n stats.add(di.getIndexPartStatistics(part));\n }\n // fix the part name\n stats.partName = part;\n return stats;\n }", "public ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> namedParts = FXCollections.observableArrayList();\n for ( Part part : allParts ) {\n if(part.getName().toLowerCase().contains(partName.toLowerCase())) {\n namedParts.add(part);\n }\n }\n return namedParts;\n }", "public java.lang.String getPart()\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(PART$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }", "private String extractFileName(Part part) {\n\t String contentDisp = part.getHeader(\"content-disposition\");\r\n\t String[] items = contentDisp.split(\";\");\r\n\t for (String s : items) {\r\n\t if (s.trim().startsWith(\"filename\")) {\r\n\t // C:\\file1.zip\r\n\t // C:\\Note\\file2.zip\r\n\t String clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t clientFileName = clientFileName.replace(\"\\\\\", \"/\");\r\n\t int i = clientFileName.lastIndexOf('/');\r\n\t // file1.zip\r\n\t // file2.zip\r\n\t return clientFileName.substring(i + 1);\r\n\t }\r\n\t }\r\n\t return null;\r\n\t }", "public String getPartNumber(int partNumber){\n if(partNumbers.size() > partNumber) return partNumbers.get(partNumber);\n else return null;\n }", "public static String getGeometryType(EsriShapefile.EsriFeature feature,\r\n int numParts) {\r\n String tag = null;\r\n if (numParts == 0) {\r\n return tag;\r\n }\r\n if ((feature instanceof EsriShapefile.EsriPoint)\r\n || (feature instanceof EsriShapefile.EsriPointZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_POINT;\r\n } else {\r\n tag = Geometry.TYPE_MULTIPOINT;\r\n }\r\n } else if ((feature instanceof EsriShapefile.EsriPolyline)\r\n || (feature instanceof EsriShapefile.EsriPolylineZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_LINESTRING;\r\n } else {\r\n tag = Geometry.TYPE_MULTILINESTRING;\r\n }\r\n } else if ((feature instanceof EsriShapefile.EsriPolygon)\r\n || (feature instanceof EsriShapefile.EsriPolygonZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_POLYGON;\r\n } else {\r\n tag = Geometry.TYPE_MULTIPOLYGON;\r\n }\r\n }\r\n\r\n return tag;\r\n }", "public static String getDocComplexName(String docPath) {\n\t\tString path = cutMetaExt(docPath);\n\t\tint s0 = path.indexOf(FILE_SEP);\n\t\tif (s0 != -1) {\n\t\t\treturn path.substring(s0 + 1);\n\t\t}\n\t\treturn null;\n\t}", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static String getFileName(Part part) {\n final String partHeader = part.getHeader(\"content-disposition\");\n for (String content : part.getHeader(\"content-disposition\").split(\";\")) {\n if (content.trim().startsWith(\"filename\")) {\n return content.substring(content.indexOf('=') + 1).trim()\n .replace(\"\\\"\", \"\");\n }\n }\n return \"\";\n }", "private Descriptors.FieldDescriptor f(String name) {\n Descriptors.FieldDescriptor result;\n if (extensionRegistry == null) {\n result = baseDescriptor.findFieldByName(name);\n } else {\n result = file.findExtensionByName(name + \"_extension\");\n }\n Assert.assertNotNull(result);\n return result;\n }", "public String name(int pos) {\n if (0 <= pos && pos < parts.length) {\n return parts[pos];\n } else {\n return null;\n }\n }", "public String getFilePath(int fileidx) {\n return null;\r\n }", "public Part getPart(String name) throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form.getPart(name);\n }", "public String name() {\n return (parts.length > 0) ? parts[parts.length - 1] : null;\n }", "public String getPartString() { return \"Type\"; }", "java.lang.String getField1071();", "public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade(partName);\n Device device = Device.getInstance(canonicalName);\n String path = getDeviceFileName(canonicalName);\n\n // Don't reload the device if same part is already loaded\n if (device.getPartName() != null) {\n return device;\n }\n\n if (!device.readDeviceFromCompactFile(path)) {\n return null;\n } else {\n return device;\n }\n }", "public String getPartNo(){\n\t\treturn partNo;\n\t}", "private String extractFileName(final Part part) {\n\t\tfinal String contentDisp = part.getHeader(\"content-disposition\");\n\t\tfinal String[] items = contentDisp.split(\";\");\n\t\tfor (final String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length()-1);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public String get_fraction_part();", "public Part lookupPart(int partId) {\n for( Part part : allParts ) {\n if(part.getId() == partId) {\n return part;\n }\n }\n return null;\n }", "private String extractFileName(Part part) {\n String contentDisp = part.getHeader(\"content-disposition\");\n String[] items = contentDisp.split(\";\");\n for (String s : items) {\n if (s.trim().startsWith(\"filename\")) {\n return s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n }\n }\n return \"\";\n }", "private String extractFileName(Part part) {\n String contentDisp = part.getHeader(\"content-disposition\");\n String[] items = contentDisp.split(\";\");\n for (String s : items) {\n if (s.trim().startsWith(\"filename\")) {\n return s.substring(s.indexOf(\"=\") + 2, s.length()-1);\n }\n }\n return \"\";\n }", "public static ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> partsContainingSubstring = FXCollections.observableArrayList();\n\n // The for loop variable to the left of the colon is a temporary variable containing a single element from the collection on the right\n // With each iteration through the loop, Java pulls the next element from the collection and assigns it to the temp variable.\n for (Part currentPart : Inventory.getAllParts()) {\n if (currentPart.getName().toLowerCase().contains(partName.toLowerCase())) {\n partsContainingSubstring.add(currentPart);\n }\n }\n return partsContainingSubstring;\n }", "private String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length()-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public String getName() {\n int index = getSplitIndex();\n return path.substring(index + 1);\n }", "public abstract String getFileFormatName();", "public String getPieceName() {\n return pieceName;\n }", "public String getPathName() {\n\t\treturn pathName;\n\t}", "SMFTypeRef getSrcName();", "java.lang.String getFilePath();", "public Part lookupPart(int partId) {\n for(Part part : allParts) {\n if(part.getId() == partId) {\n return part;\n }\n }\n \n return null;\n }", "@Override\n\tpublic PartInfo getPartInfoBy(long partId) {\n\t\treturn this.simpleDao.getPartInfoBy(partId);\n\t}", "public String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public String getSchemeSpecificPart() {\n StringBuffer schemespec = new StringBuffer();\n \n if (m_host != null || m_regAuthority != null) {\n schemespec.append(\"//\");\n \n // Server based authority.\n if (m_host != null) {\n \n if (m_userinfo != null) {\n schemespec.append(m_userinfo);\n schemespec.append('@');\n }\n \n schemespec.append(m_host);\n \n if (m_port != -1) {\n schemespec.append(':');\n schemespec.append(m_port);\n }\n }\n // Registry based authority.\n else {\n schemespec.append(m_regAuthority);\n }\n }\n \n if (m_path != null) {\n schemespec.append((m_path));\n }\n \n if (m_queryString != null) {\n schemespec.append('?');\n schemespec.append(m_queryString);\n }\n \n if (m_fragment != null) {\n schemespec.append('#');\n schemespec.append(m_fragment);\n }\n \n return schemespec.toString();\n }", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public static String[] findText(int linebegin, int lineend, String partname) throws IOException\n\t{\n\t\tString line;\n\t\tString[] lines = new String[30];\n\t\tFile worksheet = new File(\"/Users/sturtevantauto/Pictures/Car_Pictures/XPS/6715329.acu\");\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(worksheet));\n\t\t\tint i = 0;\n\t\t\tint s = 0;\n\t\t\twhile((line = reader.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(i < linebegin)\n\t\t\t\ti++;\n\t\t\t\t\n\t\t\t\tif(i >= linebegin && i <= lineend)\n\t\t\t\t{\n\t\t\t\t\tif(line.contains(partname))\n\t\t\t\t\t\tline = line.substring(partname.length());\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tString[] splitline1 = line.split(\" 1 \");\n\t\t\t\t\tString[] splitlines = splitline1[0].split(\" 1 \");\n\t\t\t\t\tsplitlines[0] = splitlines[0].trim();\n\t\t\t\t\tif(!splitlines[0].contains(\"0 0 0 0 0 0\") && !splitlines[0].isEmpty() &&\n\t\t\t\t\t (StringUtils.countMatches(splitlines[0], \"/\") < 4) && !splitlines[0].contains(\"0 0 0 0\")\n\t\t\t\t\t && !(Character.isDigit(splitlines[0].charAt(0)) && splitlines[0].toCharArray().length == 1))\n\t\t\t\t\t{\n\t\t\t\t\tif(splitlines[0].charAt(0) == 'R' || splitlines[0].charAt(0) == 'L')\n\t\t\t\t\t\tsplitlines[0] = splitlines[0].replace(\".\", \"\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlines[s] = splitlines[0];\n\t\t\t\t\ts++;\n\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\treader.close();\n\t\treturn lines;\n\t}", "public static int findLine(String partname) throws IOException\n\t{\n\t\tString line;\n\t\tFile worksheet = new File(\"/Users/sturtevantauto/Pictures/Car_Pictures/XPS/6715329.acu\");\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(worksheet));\n\t\t\tint i = 1;\n\t\t\tint linenum = 0;\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(line.contains(partname))\n\t\t\t\t\tlinenum = i;\n\t\t\t\t\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treader.close();\n\t\t\treturn linenum;\n\t}", "@DISPID(1611006084) //= 0x60060084. The runtime will prefer the VTID if present\n @VTID(159)\n CatPartElementsNamingMode namingMode();", "private static String[] splitPartName(String partName) {\n if (partName == null) {\n partName = \"\";\n }\n\n int last_match = 0;\n LinkedList<String> splitted = new LinkedList<String>();\n Matcher m = partNamePattern.matcher(partName);\n while (m.find()) {\n if (!partName.substring(last_match, m.start()).trim().isEmpty()) {\n splitted.add(partName.substring(last_match, m.start()));\n }\n if (!m.group().trim().isEmpty()) {\n splitted.add(m.group());\n }\n last_match = m.end();\n }\n if (!partName.substring(last_match).trim().isEmpty()) {\n splitted.add(partName.substring(last_match));\n }\n return splitted.toArray(new String[splitted.size()]);\n }", "public static By getContactNameInLLInfo(String partNum){\n\t\t return By.xpath(\"//p[contains(.,'Insight Part #: \"+partNum+\"')]/following::div[@class='row expanded is-collapse-child'][1]//input[@name='licenseInformation.CONTACT_NAME']\");\n\t }", "protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}", "private Path makeFilePath(String name) {\n Path baseFilePath = Paths.get(portManager.getBfp());\n if (name.length() > 4 && name.substring(name.length() - 5).equals(\".json\")) {\n return baseFilePath.resolve(name);\n } else {\n return baseFilePath.resolve(name + \".json\");\n }\n }", "String getShapeName();", "public Part getPartPorUID(String text) throws RemoteException;", "private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}", "private String fileName(ModuleReference mref) {\n URI uri = mref.location().orElse(null);\n if (uri != null) {\n if (uri.getScheme().equalsIgnoreCase(\"file\")) {\n Path file = Path.of(uri);\n return file.getFileName().toString();\n } else {\n return uri.toString();\n }\n } else {\n return \"<unknown>\";\n }\n }", "private ProjectFilePart convertToProjectFilePart(String line) {\r\n String[] parts = line.split(\"~\");\r\n // reality check\r\n if (parts.length < 2) {\r\n throw new RuntimeException(\"Invalid serialized line \\\"\" + line + \"\\\"\");\r\n }\r\n // get the padding if it exists\r\n byte[] pad = new byte[0];\r\n if (parts.length > 2) {\r\n pad = Base16.decode(parts[2]);\r\n // construct the file part\r\n }\r\n ProjectFilePart pfp = new ProjectFilePart(new String(Base16.decode(parts[0])), BigHash.createHashFromString(parts[1]), pad);\r\n return pfp;\r\n }", "private String[] getNameParts() {\n return field.getName().split(\"_\");\n }", "private String get_FilePath(String put, int ind) {\n\n File file = new File(put);\n File[] files = file.listFiles();\n\n try {\n if (files[ind].isFile()) {\n return files[ind].getAbsolutePath();\n }\n } catch (Exception e) {\n Log.d(TAG, \"Exception error : \" + e.getMessage());\n }\n return null;\n }", "public int getPartID() { return partID; }", "public double getRealPart() {\r\n return real_part;\r\n }", "public static String filenamePart(String path) {\n char sep = System.getProperty(\"file.separator\", \"/\").charAt(0);\n int i = path.lastIndexOf(sep);\n return (i < 0)? path : path.substring(i+1);\n }", "public static Part lookupPart(int partId) {\n for (int index = 0; index < Inventory.getAllParts().size(); index++) {\n Part currentPart = Inventory.getAllParts().get(index);\n if (currentPart.getId() == partId) {\n return currentPart;\n }\n }\n return null;\n }", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "private String extractFileName(Part part) {\n\nString contentDisp = part.getHeader(\"content-disposition\");\n\nString[] items = contentDisp.split(\";\");\n\nfor (String s : items) {\n\nif (s.trim().startsWith(\"filename\")) {\n\nreturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\n}\n\n}\n\nreturn \"\";\n\n}", "@DISPID(77)\r\n\t// = 0x4d. The runtime will prefer the VTID if present\r\n\t@VTID(75)\r\n\tjava.lang.String fullPath();", "public String getSimpleName() {\r\n final int startFileName = fileName.lastIndexOf(File.separator) + 1;\r\n if (startFileName < 0) {\r\n return fileName;\r\n } else {\r\n return fileName.substring(startFileName, fileName.length());\r\n }\r\n }", "java.lang.String getField1671();", "String getFpDescription();", "SourceFilePath getFilePath();", "public String getFullPathName() {\r\n return fullPathName;\r\n }", "public String getPartNumber()\r\n {\r\n return partNumber; // should validate\r\n }", "public static final String getTypeNamePartString(int itemTemplateId) {\n/* 607 */ String toReturn = \"Focus\";\n/* 608 */ int rand = Server.rand.nextInt(10);\n/* 609 */ toReturn = getTypeNamePartStringWithPart(itemTemplateId, rand);\n/* 610 */ return toReturn;\n/* */ }", "public String getPropertyPart() {\n return this.PROPERTY_PART;\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.f.getPath();\n\t}", "java.lang.String getField1171();", "@DISPID(76)\r\n\t// = 0x4c. The runtime will prefer the VTID if present\r\n\t@VTID(74)\r\n\tjava.lang.String path();", "String getFilePath();", "private String getPath(PSItemDefSummary itemDefSummary) throws PSExtensionProcessingException\n {\n Map<IPSGuid, String> itemPaths = new HashMap<>();\n String path = \"\";\n IPSGuid guid = null;\n try\n {\n\n guid = itemDefSummary.getGUID();\n IPSUiDesignWs ui = PSUiWsLocator.getUiDesignWebservice();\n path = ui.objectIdToPath(guid);\n // strip off content type name and prefix\n if (path != null && path.startsWith(CONTENTTYPES_PATH_PREFIX))\n {\n int nodeNamePosition = path.lastIndexOf(\"/\");\n path = path.substring(CONTENTTYPES_PATH_PREFIX.length(), nodeNamePosition);\n }\n else if (path == null || !path.equals(\"Navigation\"))\n {\n path = \"\";\n }\n\n return path;\n\n }\n catch (PSErrorsException e)\n {\n throw new PSExtensionProcessingException(\"Failed to obtain node path for content items \", e);\n }\n\n }" ]
[ "0.6085435", "0.57054454", "0.57021487", "0.55579436", "0.5542031", "0.53877234", "0.5365647", "0.52937174", "0.5189506", "0.50776404", "0.49580577", "0.49058542", "0.4883252", "0.4862701", "0.48574033", "0.4784386", "0.4784386", "0.47276786", "0.472766", "0.46990108", "0.46765757", "0.4663211", "0.465616", "0.46508747", "0.46233645", "0.46047845", "0.45978132", "0.45966798", "0.45864606", "0.45717484", "0.4571184", "0.45570967", "0.45421204", "0.4535733", "0.45273256", "0.45273256", "0.45194158", "0.45093215", "0.4486147", "0.44787043", "0.4469064", "0.44462928", "0.4445791", "0.44396266", "0.44193405", "0.44111922", "0.4405664", "0.43995675", "0.43974984", "0.43947452", "0.43891174", "0.4382927", "0.4382758", "0.43773758", "0.43752742", "0.4364831", "0.43615544", "0.43588355", "0.435574", "0.4342875", "0.43409106", "0.43399328", "0.43375906", "0.43295267", "0.43211251", "0.43175387", "0.43032852", "0.4302845", "0.43024474", "0.42896265", "0.4287332", "0.42783332", "0.42746538", "0.42700544", "0.42669758", "0.42647335", "0.42646882", "0.42617056", "0.42558908", "0.425543", "0.42511153", "0.42491147", "0.42444146", "0.42300174", "0.42272076", "0.42114714", "0.4203426", "0.4200668", "0.41951", "0.41915643", "0.41912642", "0.4188284", "0.4188224", "0.41873398", "0.4185878", "0.41855645", "0.41836038", "0.41809487", "0.41807082", "0.4180076" ]
0.8162444
0
Gets the primitive defs file path and name for the given familyType.
public static String getPrimitiveDefsFileName(FamilyType familyType) { return getPartFolderPath(familyType) + primitiveDefFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static PrimitiveDefList loadPrimitiveDefs(FamilyType familyType) {\n String path = getPrimitiveDefsFileName(familyType);\n return (PrimitiveDefList) loadFromCompressedFile(path);\n }", "public static String getWireEnumeratorFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + wireEnumeratorFileName;\n }", "public static String getPartFolderPath(FamilyType familyType) {\n familyType = PartNameTools.getBaseTypeFromFamilyType(familyType);\n return getRapidSmithPath() +\n File.separator +\n deviceFolderName +\n File.separator +\n familyType.toString().toLowerCase() +\n File.separator;\n }", "String getFamily();", "String getFamily();", "public String getFamilyRoot(String familyId);", "ILitePackFamily getFamily();", "public String getImageFamily() {\n return this.imageFamily;\n }", "public String getFamily()\n {\n return _family;\n }", "public String getFamily() {\n return this.family;\n }", "Map<String, TypeInformation<?>> getFamilyInfo(String family) {\n\t\treturn familyMap.get(family);\n\t}", "public static String getFormalFamilyNameFromType(FamilyType type) {\n switch (type) {\n case ARTIX7:\n return \"Artix7\";\n case ARTIX7L:\n return \"Artix7 Lower Power\";\n case ASPARTAN2E:\n return \"Automotive Spartan2E\";\n case ASPARTAN3:\n return \"Automotive Spartan3\";\n case ASPARTAN3A:\n return \"Automotive Spartan3A\";\n case ASPARTAN3ADSP:\n return \"Automotive Spartan-3A DSP\";\n case ASPARTAN3E:\n return \"Automotive Spartan3E\";\n case ASPARTAN6:\n return \"Automotive Spartan6\";\n case KINTEX7:\n return \"Kintex7\";\n case KINTEX7L:\n return \"Kintex7 Lower Power\";\n case QSPARTAN6:\n return \"Defense-Grade Spartan-6Q\";\n case QSPARTAN6L:\n return \"Defense-Grade Spartan-6Q Lower Power\";\n case QVIRTEX4:\n return \"Defense-Grade Virtex-4Q\";\n case QVIRTEX5:\n return \"Defense-Grade Virtex-5Q\";\n case QVIRTEX6:\n return \"Defense-Grade Virtex-6Q\";\n case QVIRTEX:\n return \"QPro Virtex Hi-Rel\";\n case QRVIRTEX:\n return \"QPro Virtex Rad-Hard\";\n case QVIRTEX2:\n return \"QPro Virtex2 Military\";\n case QRVIRTEX2:\n return \"QPro Virtex2 Rad Tolerant\";\n case QVIRTEX2P:\n return \"QPro Virtex2P Hi-Rel\";\n case QVIRTEXE:\n return \"QPro VirtexE Military\";\n case QRVIRTEX4:\n return \"Space-Grade Virtex-4QV\";\n case SPARTAN2:\n return \"Spartan2\";\n case SPARTAN2E:\n return \"Spartan2E\";\n case SPARTAN3:\n return \"Spartan3\";\n case SPARTAN3A:\n return \"Spartan3A and Spartan3AN\";\n case SPARTAN3ADSP:\n return \"Spartan-3A DSP\";\n case SPARTAN3E:\n return \"Spartan3E\";\n case SPARTAN6:\n return \"Spartan6\";\n case SPARTAN6L:\n return \"Spartan6 Lower Power\";\n case VIRTEX:\n return \"Virtex\";\n case VIRTEX2:\n return \"Virtex2\";\n case VIRTEX2P:\n return \"Virtex2P\";\n case VIRTEX4:\n return \"Virtex4\";\n case VIRTEX5:\n return \"Virtex5\";\n case VIRTEX6:\n return \"Virtex6\";\n case VIRTEX6L:\n return \"Virtex6 Lower Power\";\n case VIRTEX7:\n return \"Virtex7\";\n case VIRTEX7L:\n return \"Virtex7 Lower Power\";\n case VIRTEXE:\n return \"VirtexE\";\n default:\n return null;\n }\n }", "public Family getFamily() {\r\n return pic_.getFamily();\r\n }", "String family();", "public static String getPrimitiveDefsFileName(String partName) {\n return getPartFolderPath(partName) + primitiveDefFileName;\n }", "public String family() {\n return this.family;\n }", "public final int getFamily() {\n return family;\n }", "public String getFileSystemType() {\n return this.fileSystemType;\n }", "public static String getFamily(String family){\n\t\tfor(String f : fontFamilies)\n\t\t\tif(f.equalsIgnoreCase(family))\n\t\t\t\treturn f;\n\t\treturn \"Dialog\";\n\t}", "public int getFileShapeType() {\n return fileShapeType;\n }", "public String getFamilyName() throws PDFNetException {\n/* 550 */ return GetFamilyName(this.a);\n/* */ }", "public String familyId() {\n return this.familyId;\n }", "public String getFamilyStructName() {\r\n\t\treturn familyStructName;\r\n\t}", "public String getFileTypeId() {\n return \"GradsBinaryGrid\";\n }", "public String getFamilyPerson(String familyId);", "public FSArray getFamilyRec() {\n if (GEDCOMType_Type.featOkTst && ((GEDCOMType_Type)jcasType).casFeat_familyRec == null)\n jcasType.jcas.throwFeatMissing(\"familyRec\", \"net.myerichsen.gedcom.GEDCOMType\");\n return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((GEDCOMType_Type)jcasType).casFeatCode_familyRec)));}", "public String getPathName();", "String getPathName();", "String getPathName();", "public String getFileType(){\n\t\treturn type;\n\t}", "public Integer getFamilyId() {\r\n return familyId;\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public abstract String getFileFormatName();", "public TrimString getFileSystemType() {\n\t\treturn(_type);\n\t}", "java.lang.String getFileLoc();", "public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }", "public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }", "public String getPROMISSORY_FX_TYPE() {\r\n return PROMISSORY_FX_TYPE;\r\n }", "public ResourceFileFeatureType resourceFileFeatureType() {\n _initialize();\n return resourceFileFeatureType;\n }", "private static Cursor getFamilyInfo(Context context, String id)\n\t{\n\t\tString whereName = ContactsContract.Data.MIMETYPE + \" = ? AND \" + ContactsContract.CommonDataKinds.StructuredName.LOOKUP_KEY + \" = ?\";\n\t\tString[] whereNameParams = new String[] { ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE, id };\n\t return context.getContentResolver().query(\n\t \t\tContactsContract.Data.CONTENT_URI,\n\t \t\tnew String[] {\tContactsContract.CommonDataKinds.StructuredName.LOOKUP_KEY,\n\t \t\t\t\t\t\tContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,\n\t \t\t\t\t\t\tContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME\n\t \t\t\t\t\t\t},\n\t\t\t whereName, \n\t \t\twhereNameParams, \n\t \t\tnull);\n\t \n\t}", "@Override\n\tpublic String getTypeName() throws RemoteException {\n\t\treturn \"HDFS TEXT FILE\";\n\t}", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "public java.lang.String getFiletype() {\n return filetype;\n }", "public String getDescriptor() {\n // FIXME: this is not completely accurate at this point (for\n // example, it knows nothing about the packages for compound\n // types)\n if (clazz != null) {\n return descriptor(clazz);\n }\n if (elementType != null) {\n if(elementType.getName()==null) {\n throw new RuntimeException(\"elementType.name is null: \"+getDumpString());\n }\n return \"[\" + descriptor(elementType.getName());\n }\n return descriptor(name);\n }", "public String getFamilyName() {\n return familyName;\n }", "public java.lang.String getFamilyName() {\n return FamilyName;\n }", "public String getFamilyName()\r\n {\r\n return familyName;\r\n }", "public Integer getFileType() {\n return fileType;\n }", "public CArrayFacade<Byte> getDefgrp_name() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t64\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 128, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 108, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "public String getFileTypeDescription() {\n return \"GrADS Binary Gridded Data\";\n }", "public String getType()\n {\n return VFS.FILE_TYPE;\n }", "public static FamilyType getBaseTypeFromFamilyType(FamilyType type) {\n switch (type) {\n case ARTIX7:\n return FamilyType.ARTIX7;\n case ARTIX7L:\n return FamilyType.ARTIX7;\n case ASPARTAN2E:\n return FamilyType.SPARTAN2E;\n case ASPARTAN3:\n return FamilyType.SPARTAN3;\n case ASPARTAN3A:\n return FamilyType.SPARTAN3A;\n case ASPARTAN3ADSP:\n return FamilyType.SPARTAN3ADSP;\n case ASPARTAN3E:\n return FamilyType.SPARTAN3E;\n case ASPARTAN6:\n return FamilyType.SPARTAN6;\n case KINTEX7:\n return FamilyType.KINTEX7;\n case KINTEX7L:\n return FamilyType.KINTEX7;\n case QARTIX7:\n return FamilyType.ARTIX7;\n case QKINTEX7:\n return FamilyType.KINTEX7;\n case QRVIRTEX:\n return FamilyType.VIRTEX;\n case QRVIRTEX2:\n return FamilyType.VIRTEX2;\n case QRVIRTEX4:\n return FamilyType.VIRTEX4;\n case QRVIRTEX5:\n return FamilyType.VIRTEX5;\n case QRVIRTEX6:\n return FamilyType.VIRTEX6;\n case QRVIRTEX7:\n return FamilyType.VIRTEX7;\n case QSPARTAN6:\n return FamilyType.SPARTAN6;\n case QSPARTAN6L:\n return FamilyType.SPARTAN6;\n case QVIRTEX:\n return FamilyType.VIRTEX;\n case QVIRTEX2:\n return FamilyType.VIRTEX2;\n case QVIRTEX2P:\n return FamilyType.VIRTEX2P;\n case QVIRTEX4:\n return FamilyType.VIRTEX4;\n case QVIRTEX5:\n return FamilyType.VIRTEX5;\n case QVIRTEX6:\n return FamilyType.VIRTEX6;\n case QVIRTEX7:\n return FamilyType.VIRTEX7;\n case QVIRTEXE:\n return FamilyType.VIRTEXE;\n case SPARTAN2:\n return FamilyType.SPARTAN2;\n case SPARTAN2E:\n return FamilyType.SPARTAN2E;\n case SPARTAN3:\n return FamilyType.SPARTAN3;\n case SPARTAN3A:\n return FamilyType.SPARTAN3A;\n case SPARTAN3ADSP:\n return FamilyType.SPARTAN3ADSP;\n case SPARTAN3E:\n return FamilyType.SPARTAN3E;\n case SPARTAN6:\n return FamilyType.SPARTAN6;\n case SPARTAN6L:\n return FamilyType.SPARTAN6;\n case VIRTEX:\n return FamilyType.VIRTEX;\n case VIRTEX2:\n return FamilyType.VIRTEX2;\n case VIRTEX2P:\n return FamilyType.VIRTEX2P;\n case VIRTEX4:\n return FamilyType.VIRTEX4;\n case VIRTEX5:\n return FamilyType.VIRTEX5;\n case VIRTEX6:\n return FamilyType.VIRTEX6;\n case VIRTEX6L:\n return FamilyType.VIRTEX6;\n case VIRTEX7:\n return FamilyType.VIRTEX7;\n case VIRTEX7L:\n return FamilyType.VIRTEX7;\n case VIRTEXE:\n return FamilyType.VIRTEXE;\n default:\n return null;\n }\n }", "public String getFamilyname() {\n\t\treturn this.family_name;\n\t}", "public String getFamilyName() {\n return familyName;\n }", "private int getFileType(SourceFile sourceFile)\n\t{\n\t\tString name = sourceFile.getName();\n\t\tString pkg = sourceFile.getPackageName();\n\n\t\tif (name.startsWith(\"<\") && name.endsWith(\">\") || name.equals(\"GeneratedLocale\")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\t\treturn SYNTHETIC_FILE;\n\n for (final String frameworkPkg : FRAMEWORK_FILE_PACKAGES )\n {\n // look for packages starting with pkgName\n if (pkg.startsWith(frameworkPkg + '\\\\') || //$NON-NLS-1$\n pkg.startsWith(frameworkPkg + '/') || //$NON-NLS-1$\n pkg.equals(frameworkPkg)) //$NON-NLS-1$\n {\n return FRAMEWORK_FILE;\n }\n }\n\n if (name.startsWith(\"Actions for\")) //$NON-NLS-1$\n return ACTIONS_FILE;\n\n return AUTHORED_FILE;\n}", "public Object[][] getFileFormats(Long filetypeNr)\r\n\t\t\tthrows ProcessingException;", "private static TYPE getFileType(final String path, final ServiceContext context) {\n return PROJECT_FILE;\n }", "public abstract String protoPath();", "public String getType() {\n\t\treturn gfType;\n\t}", "private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}", "public String getFID();", "public TFileType getFileType() {\n\n\t\treturn type;\n\t}", "public PDFileSpecification getFile() throws IOException {\n/* 398 */ COSBase f = this.stream.getDictionaryObject(COSName.F);\n/* 399 */ return PDFileSpecification.createFS(f);\n/* */ }", "public static String getGeometryType(int featureType) {\r\n String tag = null;\r\n switch (featureType) {\r\n\r\n case EsriShapefile.POINT : // 1\r\n case EsriShapefile.POINTZ : // 11\r\n tag = Geometry.TYPE_POINT;\r\n\r\n break;\r\n\r\n case EsriShapefile.POLYLINE : // 3\r\n case EsriShapefile.POLYLINEZ : // 13\r\n tag = Geometry.TYPE_LINESTRING;\r\n\r\n break;\r\n\r\n case EsriShapefile.POLYGON : // 5\r\n case EsriShapefile.POLYGONZ : // 15\r\n tag = Geometry.TYPE_POLYGON;\r\n\r\n break;\r\n\r\n default :\r\n tag = null;\r\n\r\n break;\r\n }\r\n\r\n return tag;\r\n }", "public String getFileType() {\n return fileType;\n }", "public FileType getFileType() {\n return fileType;\n }", "private String getReferentialFilename(final String requestTypeLabel) \n throws CvqException {\n \n if (requestTypeLabel.equals(\"All\")) {\n return commonReferentialFilename;\n } else {\n Iterator servicesIt = parsedRequestServices.iterator();\n IRequestService associatedService = null;\n while (servicesIt.hasNext()) {\n IRequestService service = (IRequestService) servicesIt.next();\n if (service.getLabel().equals(requestTypeLabel))\n associatedService = service;\n }\n \n if (associatedService == null)\n throw new CvqException(\"No service found for \" + requestTypeLabel);\n \n return associatedService.getLocalReferentialFilename();\n }\n }", "FeatureType getType();", "SMFTypeRef getSrcName();", "public Family getFamily() {\n return family;\n }", "private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}", "ImmutableList<SchemaOrgType> getFileFormatList();", "public static final TypeDescriptor<?> pathType() {\n return TypeRegistry.DEFAULT.getType(Path.class);\n }", "public String getFiletype() {\n return filetype;\n }", "public Object fileName() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().fileName();\n }", "public String getLBR_MDFeDocType();", "Path getAddressBookFilePath();", "@Override\n protected void onTypeRef(SourceTypeBinding referencedType,\n CompilationUnitDeclaration unitOfReferrer) {\n result.add(String.valueOf(referencedType.getFileName()));\n }", "private static String getOsFamily()\n {\n Set families = getValidFamilies();\n\n Iterator iter = families.iterator();\n while ( iter.hasNext() )\n {\n String fam = (String) iter.next();\n if ( Os.isFamily( fam ) )\n {\n return fam;\n }\n }\n return null;\n }", "public java.lang.String getFileLoc() {\n java.lang.Object ref = fileLoc_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileLoc_ = s;\n }\n return s;\n }\n }", "public String getSourceFileName() {\n\t\tStringIdMsType stringIdType =\n\t\t\tpdb.getTypeRecord(getSourceFileNameStringIdRecordNumber(), StringIdMsType.class);\n\t\tif (stringIdType == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn stringIdType.getString();\n\t}", "public String getFamilyName() {\n\t\treturn familyName;\n\t}", "String getSchemaFile();", "public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}", "public String getFamilyPrefix() {\n return familyPrefix;\n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "public Vertex getFamily() {\n\t\treturn family;\n\t}", "String getFullName() {\r\n StringBuffer buf = new StringBuffer(type.getName());\r\n Summary current = type.getParent();\r\n\r\n while (current != null) {\r\n if (current instanceof TypeSummary) {\r\n buf.insert(0, \".\");\r\n buf.insert(0, ((TypeSummary)current).getName());\r\n } else if (current instanceof PackageSummary) {\r\n String temp = ((PackageSummary)current).getName();\r\n\r\n if ((temp != null) && (temp.length() > 0)) {\r\n buf.insert(0, \".\");\r\n buf.insert(0, temp);\r\n }\r\n }\r\n current = current.getParent();\r\n }\r\n\r\n return buf.toString();\r\n }", "public native int getStorageClass() throws MagickException;", "org.tensorflow.proto.framework.FullTypeId getTypeId();", "protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}", "public static String getImagePath(String predefinedType, String filename) {\n\n StringBuilder pathBuilder = new StringBuilder();\n\n final String extension = FilenameUtils.getExtension(filename);\n String filenameWithoutExtension = FilenameUtils.removeExtension(filename);\n filenameWithoutExtension = filenameWithoutExtension.replace(\"/\",\"_\");\n\n pathBuilder.append(\"/\").append(predefinedType).append(\"/\");\n\n if (filenameWithoutExtension.length() >= 4) {\n pathBuilder.append(filenameWithoutExtension, 0, 4).append(\"/\");\n }\n\n if (filenameWithoutExtension.length() >= 8) {\n pathBuilder.append(filenameWithoutExtension, 4, 8).append(\"/\");\n }\n\n pathBuilder.append(filenameWithoutExtension);\n\n return pathBuilder.append(\".\").append(extension).toString();\n }", "java.lang.String getFilePath();", "FileFormat getFormat();", "public SemanticType[] family() {\n return values();\n }", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily getSocketFamily() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily.valueOf(socketFamily_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily.INET : result;\n }", "public LinkedList<String> getFileSystemTypes() {\r\n return fileSystemTypes;\r\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily getSocketFamily() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily.valueOf(socketFamily_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily.INET : result;\n }", "public File getShapesLocation() {\n\t\treturn shapesLocation;\n\t}" ]
[ "0.6084121", "0.57490087", "0.5538324", "0.54633826", "0.54633826", "0.5440191", "0.51744765", "0.51244366", "0.50930166", "0.50416714", "0.49624225", "0.4928529", "0.49203768", "0.48771316", "0.48690113", "0.4850142", "0.48275736", "0.48177838", "0.4802585", "0.47800115", "0.47779378", "0.47595748", "0.47440714", "0.47322255", "0.46782956", "0.46762574", "0.4653642", "0.4646398", "0.4646398", "0.4589536", "0.45779547", "0.45778498", "0.4570695", "0.4542244", "0.45409703", "0.45341066", "0.45333445", "0.45255277", "0.45238754", "0.4507495", "0.45069942", "0.45069668", "0.45051953", "0.44874775", "0.44813642", "0.44716486", "0.44670153", "0.44660762", "0.44648486", "0.44615045", "0.44608325", "0.44546807", "0.44447958", "0.4444042", "0.44283372", "0.44245312", "0.44222376", "0.44109172", "0.4399378", "0.43913665", "0.43895918", "0.43881184", "0.43861052", "0.43774283", "0.43754032", "0.43736437", "0.43641338", "0.4361509", "0.4361201", "0.43510404", "0.43379387", "0.43375033", "0.43371087", "0.4336964", "0.43363762", "0.43323946", "0.43229625", "0.43157685", "0.43134516", "0.43091235", "0.43040216", "0.42947522", "0.42927304", "0.428357", "0.42773488", "0.4269912", "0.42575762", "0.42523077", "0.42489874", "0.42356607", "0.423023", "0.42281368", "0.42247015", "0.4222532", "0.4208309", "0.4207665", "0.42075545", "0.4206302", "0.4205626", "0.42021915" ]
0.8127182
0
Loads the primitiveDefs file for the appropriate family based on partName.
public static PrimitiveDefList loadPrimitiveDefs(String partName) { String path = getPrimitiveDefsFileName(partName); return (PrimitiveDefList) loadFromCompressedFile(path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static PrimitiveDefList loadPrimitiveDefs(FamilyType familyType) {\n String path = getPrimitiveDefsFileName(familyType);\n return (PrimitiveDefList) loadFromCompressedFile(path);\n }", "public static String getPrimitiveDefsFileName(String partName) {\n return getPartFolderPath(partName) + primitiveDefFileName;\n }", "public static String getPrimitiveDefsFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + primitiveDefFileName;\n }", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void initFromClasspath() throws IOException {\n \t\tcontactNames = loadFromClassPath(\"contactNames\");\n \t\tgroupNames = loadFromClassPath(\"groupNames\");\n \t\tmessageWords = loadFromClassPath(\"messageWords\");\n \t}", "private void loadEnvironment(String filename){\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n String line;\n while ((line = reader.readLine()) != null) {\n String[] info = line.split(\",\");\n String type = info[TYPE_INDEX];\n type = type.replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n Point coordinate = new\n Point(Double.parseDouble(info[POS_X_INDEX]), Double.parseDouble(info[POS_Y_INDEX]));\n\n switch (type) {\n case \"Player\" -> this.player = new Player(coordinate, Integer.parseInt(info[ENERGY_INDEX]));\n case \"Zombie\" -> {\n entityList.add(new Zombie(coordinate, type));\n zombieCounter++;\n }\n case \"Sandwich\" -> {\n entityList.add(new Sandwich(coordinate, type));\n sandwichCounter++;\n }\n case \"Treasure\" -> this.treasure = new Treasure(coordinate, type);\n default -> throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }", "public /*override*/ void LoadRecordData(BinaryReader bamlBinaryReader) \r\n {\r\n TypeId = bamlBinaryReader.ReadInt16(); \r\n RuntimeName = bamlBinaryReader.ReadString(); \r\n }", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tCorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);\n\t\tEcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);\n\t\tObjectsPackage theObjectsPackage = (ObjectsPackage)EPackage.Registry.INSTANCE.getEPackage(ObjectsPackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\treadCsvFileEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tprintEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\twriteCsvFileEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\texcludeColumnsEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tselectColumnsEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tassertTablesMatchEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\twriteLinesEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\treadLinesEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tselectRowsEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\texcludeRowsEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tasTableDataEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\treadPropertiesEClass.getESuperTypes().add(theCorePackage.getCommand());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(readCsvFileEClass, ReadCsvFile.class, \"ReadCsvFile\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getReadCsvFile_Uri(), ecorePackage.getEString(), \"uri\", null, 0, 1, ReadCsvFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(printEClass, Print.class, \"Print\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPrint_Input(), theEcorePackage.getEObject(), null, \"input\", null, 0, -1, Print.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(writeCsvFileEClass, WriteCsvFile.class, \"WriteCsvFile\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getWriteCsvFile_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, WriteCsvFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getWriteCsvFile_Uri(), theEcorePackage.getEString(), \"uri\", null, 0, 1, WriteCsvFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(excludeColumnsEClass, ExcludeColumns.class, \"ExcludeColumns\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getExcludeColumns_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, ExcludeColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExcludeColumns_Columns(), theEcorePackage.getEString(), \"columns\", null, 0, -1, ExcludeColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(selectColumnsEClass, SelectColumns.class, \"SelectColumns\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSelectColumns_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, SelectColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSelectColumns_Columns(), theEcorePackage.getEString(), \"columns\", null, 0, -1, SelectColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(assertTablesMatchEClass, AssertTablesMatch.class, \"AssertTablesMatch\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAssertTablesMatch_Left(), theObjectsPackage.getTable(), null, \"left\", null, 0, 1, AssertTablesMatch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getAssertTablesMatch_Right(), theObjectsPackage.getTable(), null, \"right\", null, 0, 1, AssertTablesMatch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getAssertTablesMatch_IgnoreColumnOrder(), theEcorePackage.getEBoolean(), \"ignoreColumnOrder\", \"false\", 0, 1, AssertTablesMatch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getAssertTablesMatch_IgnoreMissingColumns(), this.getIgnoreColumnsMode(), \"ignoreMissingColumns\", \"NONE\", 0, 1, AssertTablesMatch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(writeLinesEClass, WriteLines.class, \"WriteLines\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getWriteLines_Uri(), theEcorePackage.getEString(), \"uri\", null, 0, 1, WriteLines.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getWriteLines_Append(), theEcorePackage.getEBoolean(), \"append\", \"false\", 0, 1, WriteLines.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(readLinesEClass, ReadLines.class, \"ReadLines\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getReadLines_Uri(), theEcorePackage.getEString(), \"uri\", null, 1, 1, ReadLines.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(selectRowsEClass, SelectRows.class, \"SelectRows\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSelectRows_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, SelectRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSelectRows_Column(), theEcorePackage.getEString(), \"column\", null, 0, 1, SelectRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSelectRows_Value(), theEcorePackage.getEString(), \"value\", null, 0, 1, SelectRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSelectRows_Match(), this.getRowMatchMode(), \"match\", null, 0, 1, SelectRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(excludeRowsEClass, ExcludeRows.class, \"ExcludeRows\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getExcludeRows_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, ExcludeRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExcludeRows_Column(), theEcorePackage.getEString(), \"column\", null, 0, 1, ExcludeRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExcludeRows_Value(), theEcorePackage.getEString(), \"value\", null, 0, 1, ExcludeRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExcludeRows_Match(), this.getRowMatchMode(), \"match\", null, 0, 1, ExcludeRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(asTableDataEClass, AsTableData.class, \"AsTableData\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAsTableData_Input(), theEcorePackage.getEObject(), null, \"input\", null, 0, -1, AsTableData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(readPropertiesEClass, ReadProperties.class, \"ReadProperties\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getReadProperties_Uri(), ecorePackage.getEString(), \"uri\", null, 0, 1, ReadProperties.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(ignoreColumnsModeEEnum, IgnoreColumnsMode.class, \"IgnoreColumnsMode\");\n\t\taddEEnumLiteral(ignoreColumnsModeEEnum, IgnoreColumnsMode.NONE);\n\t\taddEEnumLiteral(ignoreColumnsModeEEnum, IgnoreColumnsMode.LEFT);\n\t\taddEEnumLiteral(ignoreColumnsModeEEnum, IgnoreColumnsMode.RIGHT);\n\t\taddEEnumLiteral(ignoreColumnsModeEEnum, IgnoreColumnsMode.BOTH);\n\n\t\tinitEEnum(rowMatchModeEEnum, RowMatchMode.class, \"RowMatchMode\");\n\t\taddEEnumLiteral(rowMatchModeEEnum, RowMatchMode.EXACT);\n\t\taddEEnumLiteral(rowMatchModeEEnum, RowMatchMode.GLOB);\n\t\taddEEnumLiteral(rowMatchModeEEnum, RowMatchMode.REGEXP);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// http://www.eclipse.org/ecl/docs\n\t\tcreateDocsAnnotations();\n\t\t// http://www.eclipse.org/ecl/internal\n\t\tcreateInternalAnnotations();\n\t\t// http://www.eclipse.org/ecl/input\n\t\tcreateInputAnnotations();\n\t}", "Feature loadFeature(Integer id);", "public void loadDataType() throws IOException, NumberFormatException {\r\n InputStream flux;\r\n flux = new FileInputStream(\"././ressources/datatype.txt\");\r\n BufferedReader buff;\r\n InputStreamReader inputStreamReader = new InputStreamReader(flux);\r\n buff = new BufferedReader(inputStreamReader);\r\n String line;\r\n line = buff.readLine();\r\n int type = Integer.parseInt(line);\r\n leftShoe.getSerialReader().setDataType(type);\r\n rightShoe.getSerialReader().setDataType(type);\r\n buff.close();\r\n inputStreamReader.close();\r\n flux.close();\r\n }", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void load(String vs, String fs){\n\t\tsuper.load(vs, fs);\n\t\t\n\t\t// inherited Load doesn't keep program enabled for 'safety', so we\n\t // re-enable here so we can reference ourselves...\n\t m_program.enable();\n\n\t m_borderIndex = m_program.getAttribLocation(\"border\", false);\n\n\t GLES20.glUniform1i(m_program.getUniformLocation(\"sampler\"), 0); // texunit index zero.\n\n\t m_thicknessIndex = m_program.getUniformLocation(\"thickness\");\n\t m_texBorderIndex = m_program.getUniformLocation(\"texBorder\");\n\n\t m_program.disable();\n\t}", "public static void load() {\n }", "public HashMap<String,HashSet<String>> loadTypes(String commonTypeInstanceFile) throws Exception;", "@Override\n\t\tprotected void loadSpecification(SpecificationContext context) {\n\t\t}", "public PlateSpecifications loadSpecs(String nickname);", "public void loadMapsModule(){\n Element rootElement = FileOperator.fileReader(MAPS_FILE_PATH);\n if(rootElement!=null){\n Iterator i = rootElement.elementIterator();\n while (i.hasNext()) {\n Element element = (Element) i.next();\n GridMap map =new GridMap();\n map.decode(element);\n mapsList.add(map);\n }\n }\n }", "@Override\n\t\t\t\t\tpublic void beginLoad(int type) {\n\n\t\t\t\t\t}", "public AbstractFileBasedDiscovery(BundleContext bundleContext, Class<D> klass) {\n this.bundleContext = bundleContext;\n this.klass = klass;\n declarationsFiles = new HashMap<String, D>();\n declarationRegistrationManager = new DeclarationRegistrationManager<D>(bundleContext, klass);\n }", "private static void load(){\n }", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tEefnrPackage theEefnrPackage = (EefnrPackage)EPackage.Registry.INSTANCE.getEPackage(EefnrPackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tdeferedFlatReferenceTableEditorSampleEClass.getESuperTypes().add(theEefnrPackage.getAbstractSample());\n\t\tdeferedReferenceTableEditorSampleEClass.getESuperTypes().add(theEefnrPackage.getAbstractSample());\n\t\townerEClass.getESuperTypes().add(theEefnrPackage.getAbstractSample());\n\t\tsubtypeEClass.getESuperTypes().add(this.getOwner());\n\t\tanotherSubTypeEClass.getESuperTypes().add(this.getSubtype());\n\t\telementEClass.getESuperTypes().add(theEefnrPackage.getNamedElement());\n\t\tattributeNavigationSampleEClass.getESuperTypes().add(theEefnrPackage.getAbstractSample());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(deferedFlatReferenceTableEditorSampleEClass, DeferedFlatReferenceTableEditorSample.class, \"DeferedFlatReferenceTableEditorSample\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDeferedFlatReferenceTableEditorSample_References(), this.getDeferedReference(), null, \"references\", null, 0, -1, DeferedFlatReferenceTableEditorSample.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(deferedReferenceEClass, DeferedReference.class, \"DeferedReference\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDeferedReference_FlatreferenceEditor(), theEefnrPackage.getTotalSample(), null, \"flatreferenceEditor\", null, 1, 1, DeferedReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(deferedReferenceTableEditorSampleEClass, DeferedReferenceTableEditorSample.class, \"DeferedReferenceTableEditorSample\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDeferedReferenceTableEditorSample_References(), this.getDeferedReference(), null, \"references\", null, 0, -1, DeferedReferenceTableEditorSample.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(ownerEClass, Owner.class, \"Owner\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getOwner_MultipleReferencers(), this.getMultipleReferencer(), null, \"multipleReferencers\", null, 0, -1, Owner.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getOwner_SingleReferencers(), this.getSingleReferencer(), null, \"singleReferencers\", null, 0, 1, Owner.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(multipleReferencerEClass, MultipleReferencer.class, \"MultipleReferencer\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleForTableComposition(), this.getOwner(), null, \"multipleSampleForTableComposition\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleForAdvancedTableComposition(), this.getOwner(), null, \"multipleSampleForAdvancedTableComposition\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleForReferencesTable(), this.getOwner(), null, \"multipleSampleForReferencesTable\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleAdvancedReferencesTable(), this.getOwner(), null, \"multipleSampleAdvancedReferencesTable\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleForFlatReferencesTable(), this.getOwner(), null, \"multipleSampleForFlatReferencesTable\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(subtypeEClass, Subtype.class, \"Subtype\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getSubtype_SpecialisedElement(), ecorePackage.getEBoolean(), \"specialisedElement\", null, 0, 1, Subtype.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(singleReferencerEClass, SingleReferencer.class, \"SingleReferencer\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSingleReferencer_SingleSampleForTableComposition(), this.getOwner(), null, \"singleSampleForTableComposition\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleSampleForAdvancedTableComposition(), this.getOwner(), null, \"singleSampleForAdvancedTableComposition\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleSampleForReferencesTable(), this.getOwner(), null, \"singleSampleForReferencesTable\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleSampleAdvancedReferencesTable(), this.getOwner(), null, \"singleSampleAdvancedReferencesTable\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleSampleForFlatReferencesTable(), this.getOwner(), null, \"singleSampleForFlatReferencesTable\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleContainmentForEObjectFlatComboViewer(), this.getOwner(), null, \"singleContainmentForEObjectFlatComboViewer\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleReferenceForEObjectFlatComboViewer(), this.getOwner(), null, \"singleReferenceForEObjectFlatComboViewer\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleContainmentForAdvancedEObjectFlatComboViewer(), this.getOwner(), null, \"singleContainmentForAdvancedEObjectFlatComboViewer\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleReferenceForAdvancedEObjectFlatComboViewer(), this.getOwner(), null, \"singleReferenceForAdvancedEObjectFlatComboViewer\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSingleReferencer_BooleanAttribute(), ecorePackage.getEBoolean(), \"booleanAttribute\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSingleReferencer_EenumAttribute(), ecorePackage.getEEnumerator(), \"eenumAttribute\", null, 0, 1, SingleReferencer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSingleReferencer_StringAttribute(), ecorePackage.getEString(), \"stringAttribute\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tEGenericType g1 = createEGenericType(ecorePackage.getEEList());\n\t\tEGenericType g2 = createEGenericType();\n\t\tg1.getETypeArguments().add(g2);\n\t\tinitEAttribute(getSingleReferencer_ListAttribute(), g1, \"listAttribute\", null, 0, 1, SingleReferencer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(anotherSubTypeEClass, AnotherSubType.class, \"AnotherSubType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getAnotherSubType_AnotherSpecialisation(), ecorePackage.getEBoolean(), \"anotherSpecialisation\", null, 0, 1, AnotherSubType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(elementEClass, Element.class, \"Element\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getElement_Visible(), ecorePackage.getEBoolean(), \"visible\", null, 0, 1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(attributeNavigationSampleEClass, AttributeNavigationSample.class, \"AttributeNavigationSample\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAttributeNavigationSample_SingleValuedAttributeDelegate(), this.getAttributeDelegate(), null, \"singleValuedAttributeDelegate\", null, 0, 1, AttributeNavigationSample.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getAttributeNavigationSample_MultiValuedAttributeDelegate(), this.getAttributeDelegate(), null, \"multiValuedAttributeDelegate\", null, 0, -1, AttributeNavigationSample.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(attributeDelegateEClass, AttributeDelegate.class, \"AttributeDelegate\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getAttributeDelegate_Delegate1(), ecorePackage.getEString(), \"delegate1\", null, 1, 1, AttributeDelegate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getAttributeDelegate_Delegate2(), ecorePackage.getEInt(), \"delegate2\", null, 0, 1, AttributeDelegate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t}", "private void loadPartition(Path p, Context context) throws IOException {\n\t\treader = new BufferedReader(new FileReader(p.toString()));\n\t\tString inputline = reader.readLine();\n\t\tString[] input;\n\t\twhile (inputline != null) {\n\t\t\tinput = inputline.split(\"\\t\");\n\t\t\tlong key=Long.parseLong(input[0].replace(\"\\\"\", \"\"));\n\t\t\tString[] corners=input[1].split(\",\");\n\t\t\tpartition.put(key, new partition.Rectangle(corners[0].replace(\"\\\"\", \"\"),corners[1]\n\t\t\t\t\t.replace(\"\\\"\", \"\"),\n\t\t\t\t\tcorners[2].replace(\"\\\"\", \"\")\n\t\t\t\t\t,corners[3].replace(\"\\\"\", \"\")));\n\t\t\tinputline = reader.readLine();\n\t\t}\n\t\t\n\t\t\n\t}", "public static void load() {\n\t\t// manager.load(camp_fire);\r\n\t\t// manager.load(camp_fire_burntout);\r\n\t\t//\r\n\t\t// manager.load(fire_stick);\r\n\t\t// manager.load(fire_stick_burntout);\r\n\t\t//\r\n\t\t// manager.load(stockpile);\r\n\t\t// manager.load(worker);\r\n\t\t//\r\n\t\t// manager.load(icon_wood);\r\n\t\t//\r\n\t\tmanager.load(worker_ant);\r\n\t\tmanager.setLoader(FreeTypeFontGenerator.class,\r\n\t\t\t\tnew FreeTypeFontGeneratorLoader(new InternalFileHandleResolver()));\r\n\t\tmanager.load(dialog);\r\n\t}", "private void initSchema() throws Exception {\n File workingDirectory = service.getInstanceLayout().getPartitionsDirectory();\n\n // Extract the schema on disk (a brand new one) and load the registries\n File schemaRepository = new File(workingDirectory, \"schema\");\n SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor(workingDirectory);\n\n try {\n extractor.extractOrCopy();\n } catch (IOException ioe) {\n // The schema has already been extracted, bypass\n }\n\n SchemaLoader loader = new LdifSchemaLoader(schemaRepository);\n SchemaManager schemaManager = new DefaultSchemaManager(loader);\n\n // We have to load the schema now, otherwise we won't be able\n // to initialize the Partitions, as we won't be able to parse\n // and normalize their suffix Dn\n schemaManager.loadAllEnabled();\n\n // Tell all the normalizer comparators that they should not normalize anything\n ComparatorRegistry comparatorRegistry = schemaManager.getComparatorRegistry();\n\n for (LdapComparator<?> comparator : comparatorRegistry) {\n if (comparator instanceof NormalizingComparator) {\n ((NormalizingComparator) comparator).setOnServer();\n }\n }\n\n service.setSchemaManager(schemaManager);\n\n // Init the LdifPartition\n LdifPartition ldifPartition = new LdifPartition(schemaManager, service.getDnFactory());\n ldifPartition.setPartitionPath(new File(workingDirectory, \"schema\").toURI());\n SchemaPartition schemaPartition = new SchemaPartition(schemaManager);\n schemaPartition.setWrappedPartition(ldifPartition);\n service.setSchemaPartition(schemaPartition);\n\n List<Throwable> errors = schemaManager.getErrors();\n\n if (errors.size() != 0) {\n throw new Exception(I18n.err(I18n.ERR_317, Exceptions.printErrors(errors)));\n }\n }", "public void load() {\n\t}", "private void readDescriptors(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t\tint numHiers = _dataModel.getCategories().size();\r\n\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\".Loading \" + numHiers + \" hierarchies...\",SB_Logger.INIT);\r\n\r\n\t\tfor (Category category : _dataModel.getCategories())\r\n\t\t{\r\n\t\t\tSB_TypeHierarchy hier = new SB_TypeHierarchy();\r\n\t\t\thier.load(category,book);\r\n\r\n\t\t\tbook.getBehaviorRegistry().addHierarchy(hier);\r\n\r\n\t\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t\t \tbook.getLogger().log(hier.toString(),SB_Logger.INIT);\r\n\t\t}\r\n\t}", "private void loadDescriptor(File descriptorFile) throws IOException, InvalidXMLException,\n ResourceInitializationException {\n XMLInputSource in = new XMLInputSource(descriptorFile);\n ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);\n ResourceManager manager = UIMAFramework.newDefaultResourceManager();\n\n this.ae = UIMAFramework.produceAnalysisEngine(specifier, manager, null);\n this.cas = this.ae.newCAS();\n\n }", "private void loadRegistratedResources() {\n \t\tFile kbPluginLocation = KbPlugin.getDefault().getLocation();\r\n \t\tif(kbPluginLocation!=null) {\r\n \t IExtensionRegistry registry = Platform.getExtensionRegistry();\r\n \t\t\tIExtensionPoint extensionPoint = registry.getExtensionPoint(\"org.jboss.tools.common.kb.tldResource\");\r\n \t\t\tIExtension[] extensions = extensionPoint.getExtensions();\r\n \t\t\tfor (int i=0; i<extensions.length; i++) {\r\n \t\t\t\tIExtension extension = extensions[i];\r\n \t\t\t\tIConfigurationElement[] elements = extension.getConfigurationElements();\r\n \t\t\t\tfor(int j=0; j<elements.length; j++) {\r\n \t\t\t\t\tString uri = elements[j].getAttribute(\"uri\");\r\n \t\t\t\t\tString location = elements[j].getAttribute(\"schema-location\");\r\n \t\t\t\t\tString version = elements[j].getAttribute(\"version\");\r\n \t\t\t\t\tString jsf = elements[j].getAttribute(\"jsf\");\r\n \t\t\t\t\tif(uri==null || uri.length()==0 || location==null || location.length()==0) {\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tFile shemaLocation = new File(kbPluginLocation, location);\r\n \t\t\t\t\tif(shemaLocation.isFile()) {\r\n \t\t\t\t\t\tKbTldResource resource = new KbTldResource(uri, null, null, null);\r\n \t\t\t\t\t\tresource.setSchemaLocation(shemaLocation);\r\n \t\t\t\t\t\tif(version!=null && version.length()>0) {\r\n \t\t\t\t\t\t\tresource.setVersion(version);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tresource.setCustomTld(false);\r\n \t\t\t\t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\t\t\t\tregistratedResources.put(resource, resource);\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tString message = \"Can't load KB schema: \" + shemaLocation;\r\n \t\t\t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, KbPlugin.PLUGIN_ID, IStatus.WARNING, message, null));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Get custom schemas.\r\n \t\tFile schemaFolder = new File(schemaLocation); \r\n \t\tif(!schemaFolder.exists()) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tFile[] schemas = schemaFolder.listFiles(new FileFilter(){\r\n \t\t\tpublic boolean accept(File file) {\r\n \t\t\t\tif(file.isFile()) {\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \t\t\t\treturn false;\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tfor(int i=0; i<schemas.length; i++) {\r\n \t\t\tDocument document = null;\r\n \t\t\ttry {\r\n \t\t\t\tdocument = KbDocumentBuilderFactory.createDocumentBuilder(false).parse(schemas[i]);\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, \"Can't parse Schema (location: \" + schemas[i] + \")\", e));\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n //\t\t\tString tldLocation = schemas[i].getAbsolutePath();\r\n \t\t\tString tldLocation = document.getDocumentElement().getAttribute(SchemaNodeFactory.LOCATION_ATTRIBUTE);\r\n \t\t\tString tldUri = document.getDocumentElement().getAttribute(SchemaNodeFactory.URI_ATTRIBUTE);\r\n \t\t\tString tldVersion = document.getDocumentElement().getAttribute(SchemaNodeFactory.VERSION_ATTRIBUTE);\r\n \t\t\tString jsf = document.getDocumentElement().getAttribute(SchemaNodeFactory.JSF_ATTRIBUTE);\r\n \t\t\tString tldContent = null; \r\n \t\t\tNodeList children = document.getDocumentElement().getChildNodes();\r\n \t\t\tfor(int j=0; j<children.getLength(); j++) {\r\n \t\t\t\tNode node = children.item(j);\r\n \t\t\t\tif(node.getNodeName().equals(SchemaNodeFactory.TLD_CONTENT_NODE)) {\r\n \t\t\t\t\tNode child = node.getFirstChild();\r\n \t\t\t\t\tif(child instanceof CDATASection) {\r\n \t\t\t\t\t\ttldContent = ((CDATASection)child).getData();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tKbTldResource resource = new KbTldResource(tldUri, tldLocation, null, tldVersion);\r\n \t\t\tresource.setTldContent(tldContent);\r\n \t\t\tresource.setSchemaLocation(schemas[i]);\r\n \t\t\tresource.setCustomTld(true);\r\n \t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\tregistratedResources.put(resource, resource);\r\n \t\t}\r\n \t}", "public static void load(String filename, Supervisor k) throws FileNotFoundException{\n String source = \"\";\n try {\n Scanner in = new Scanner(new FileReader(filename));\n while(in.hasNext()){\n source = source + in.next();\n }\n } catch (FileNotFoundException ex) {\n //throw ex;\n System.out.println(\"Could not read config file: \" + ex);\n System.out.println(\"trying to create a new one...\");\n String stsa = \"Done!\\n\";\n try (\n Writer writer = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(filename), \"utf-8\"))) {\n writer.write(\"\");\n writer.close();\n }\n \n catch (IOException ex1) {\n stsa = \"\";\n System.out.println(\"FAILED, SKIPPING CONFIG READ BECOUSE:\");\n Logger.getGlobal().warning(ex1.toString());\n System.out.println(\"Console version: \" + ex1.toString());\n }\n System.out.print(stsa);\n }\n LinkedList<String[]> raw = fetch(source);\n \n if(k.Logic == null){\n Logger.getGlobal().warning(\"ENGINE NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n if(k.Logic.Vrenderer == null){\n Logger.getGlobal().warning(\"ENGINE RENDERER NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n \n for(String[] x: raw){\n String value = x[1];\n if(!k.features_overrideAllStandard)\n switch(x[0]){\n case \"nausea\":\n int numValue = 0;\n try{\n numValue = Integer.parseInt(value);\n }\n catch(Exception e){\n quickTools.alert(\"configReader\", \"invalid nausea value\");\n break;\n }\n if(numValue > 0){\n k.Logic.Vrenderer.dispEffectsEnabled = true;\n }\n //k.Logic.Vrenderer.di\n break;\n default:\n\n break;\n }\n customFeatures(x[0], x[1], k);\n }\n }", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "public abstract void load();", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic void load() {\n\t}", "public void load() {\n }", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "public void initVariables() {\n\tif (CL_Initializer.headerTemplateFile == null) {\n\n\t if (ImageHeader.imageExists(CL_Initializer.inputFile)) {\n\t\tCL_Initializer.headerTemplateFile = CL_Initializer.inputFile;\n\t }\n\t else if (imageType == imageType.BEDPOSTX || imageType == imageType.BEDPOSTX_DYAD) {\n\n\t\tString bedpostxRoot = BedpostxTractographyImage.getBedpostxInputRoot(bedpostxDir);\n\t\tString ext = BedpostxTractographyImage.getBedpostxImageExtension(bedpostxRoot);\n\t\t\n\t\tCL_Initializer.headerTemplateFile = bedpostxRoot + \"dyads1\" + ext;\n\t \n\t }\n\t \n\t}\n\n\t\n if (CL_Initializer.headerTemplateFile != null) { \n logger.info(\"Defining input physical space from \" + CL_Initializer.headerTemplateFile);\n CL_Initializer.initInputSpaceAndHeaderOptions();\n }\n else if (CL_Initializer.voxelDims[0] > 0.0) { \n CL_Initializer.initInputSpaceAndHeaderOptions();\n }\n else if (seedFile != null) {\n logger.info(\"Defining input physical space from seed file\");\n CL_Initializer.headerTemplateFile = seedFile;\n CL_Initializer.initInputSpaceAndHeaderOptions();\n }\n \n\n\n xDataDim = CL_Initializer.dataDims[0];\n yDataDim = CL_Initializer.dataDims[1];\n zDataDim = CL_Initializer.dataDims[2];\n \n xVoxelDim = CL_Initializer.voxelDims[0];\n yVoxelDim = CL_Initializer.voxelDims[1];\n zVoxelDim = CL_Initializer.voxelDims[2];\n\n if (xVoxelDim == 0.0) {\n // failed to get a definition of input space from anywhere\n throw new LoggedException(\"Definition of input space required, use -header\");\n }\n\n\n voxelToPhysicalTrans = CL_Initializer.headerTemplate.getVoxelToPhysicalTransform();\n\n\n\tif (anisThresh > 0.0) {\n\t switch(imageType) {\n\t\t\n\t case DT : case MULTITENSOR : case BEDPOSTX : case BEDPOSTX_DYAD :\n\t\t// No problem since these input formats have anisotropy information built in\n\t\tbreak;\n\t\t\n\t default: \n\t\t\n\t\tif (anisMapFile == null) {\n\t\t throw new LoggedException(\"Input data does not contain anisotropy, anisotropy map (-anisfile) must be \" +\n\t\t\t\t\t \"supplied when -anisthresh is used\");\n\t\t}\n\t }\n\t}\n\n\n // no interpolation with FACT, by definition\n if (trackingAlgorithm == TrackingAlgorithm.FACT) {\n\n if (dataInterpolation != DataInterpolation.NEAREST_NEIGHBOUR) { \n logger.warning(\"Interpolation is not compatible with FACT tracking, using Euler tracker with step size \" + stepSize + \" mm\");\n }\n\n trackingAlgorithm = TrackingAlgorithm.EULER;\n }\n\n \n ran = new MTRandom(seed);\n \n \n // get seeds\n if (seedFile != null) {\n \n VoxelROI imageROIs = new VoxelROI(seedFile, CL_Initializer.headerTemplate);\n\n allROIs = imageROIs.getAllRegions();\n \n }\n else if (seedList != null) {\n allROIs = new RegionOfInterest[] {PointListROI.readPoints(seedList, CL_Initializer.headerTemplate)};\n }\n\telse {\n\t throw new LoggedException(\"No seed points specified\");\n\t}\n \n \n }", "public void initFromResource() {\n String[] hwStrings = Resources.getSystem().getStringArray(17236074);\n if (hwStrings != null) {\n for (String hwString : hwStrings) {\n HardwareConfig hw = new MtkHardwareConfig(hwString);\n if (hw.type == 0) {\n updateOrInsert(hw, mModems);\n } else if (hw.type == 1) {\n updateOrInsert(hw, mSims);\n }\n }\n }\n }", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\torg.abchip.mimo.entity.EntityPackage theEntityPackage_1 = (org.abchip.mimo.entity.EntityPackage)EPackage.Registry.INSTANCE.getEPackage(org.abchip.mimo.entity.EntityPackage.eNS_URI);\n\t\tPartyPackage thePartyPackage_1 = (PartyPackage)EPackage.Registry.INSTANCE.getEPackage(PartyPackage.eNS_URI);\n\t\tStatusPackage theStatusPackage = (StatusPackage)EPackage.Registry.INSTANCE.getEPackage(StatusPackage.eNS_URI);\n\t\tContentPackage theContentPackage = (ContentPackage)EPackage.Registry.INSTANCE.getEPackage(ContentPackage.eNS_URI);\n\t\tPositionPackage thePositionPackage = (PositionPackage)EPackage.Registry.INSTANCE.getEPackage(PositionPackage.eNS_URI);\n\t\tPaymentPackage thePaymentPackage = (PaymentPackage)EPackage.Registry.INSTANCE.getEPackage(PaymentPackage.eNS_URI);\n\t\tTrainingsPackage theTrainingsPackage = (TrainingsPackage)EPackage.Registry.INSTANCE.getEPackage(TrainingsPackage.eNS_URI);\n\t\tWorkeffortPackage theWorkeffortPackage = (WorkeffortPackage)EPackage.Registry.INSTANCE.getEPackage(WorkeffortPackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tEGenericType g1 = createEGenericType(theEntityPackage_1.getEntityTyped());\n\t\tEGenericType g2 = createEGenericType(this.getPartyQualType());\n\t\tg1.getETypeArguments().add(g2);\n\t\tpartyQualEClass.getEGenericSuperTypes().add(g1);\n\t\tg1 = createEGenericType(theEntityPackage_1.getEntityInfo());\n\t\tpartyQualEClass.getEGenericSuperTypes().add(g1);\n\t\tg1 = createEGenericType(theEntityPackage_1.getEntityType());\n\t\tg2 = createEGenericType(this.getPartyQual());\n\t\tg1.getETypeArguments().add(g2);\n\t\tpartyQualTypeEClass.getEGenericSuperTypes().add(g1);\n\t\tg1 = createEGenericType(theEntityPackage_1.getEntityInfo());\n\t\tpartyQualTypeEClass.getEGenericSuperTypes().add(g1);\n\t\tpartyResumeEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\tpartyResumeEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\t\tpartySkillEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\tpartySkillEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\t\tperfRatingTypeEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\tperfRatingTypeEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\t\tperfReviewEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\tperfReviewEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\t\tg1 = createEGenericType(theEntityPackage_1.getEntityTyped());\n\t\tg2 = createEGenericType(this.getPerfReviewItemType());\n\t\tg1.getETypeArguments().add(g2);\n\t\tperfReviewItemEClass.getEGenericSuperTypes().add(g1);\n\t\tg1 = createEGenericType(theEntityPackage_1.getEntityInfo());\n\t\tperfReviewItemEClass.getEGenericSuperTypes().add(g1);\n\t\tg1 = createEGenericType(theEntityPackage_1.getEntityType());\n\t\tg2 = createEGenericType(this.getPerfReviewItem());\n\t\tg1.getETypeArguments().add(g2);\n\t\tperfReviewItemTypeEClass.getEGenericSuperTypes().add(g1);\n\t\tg1 = createEGenericType(theEntityPackage_1.getEntityInfo());\n\t\tperfReviewItemTypeEClass.getEGenericSuperTypes().add(g1);\n\t\tperformanceNoteEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\tperformanceNoteEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\t\tpersonTrainingEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\tpersonTrainingEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\t\tresponsibilityTypeEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\tresponsibilityTypeEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\t\tskillTypeEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\tskillTypeEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\t\ttrainingClassTypeEClass.getESuperTypes().add(theEntityPackage_1.getEntityIdentifiable());\n\t\ttrainingClassTypeEClass.getESuperTypes().add(theEntityPackage_1.getEntityInfo());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(partyQualEClass, PartyQual.class, \"PartyQual\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPartyQual_Party(), thePartyPackage_1.getParty(), null, \"party\", null, 1, 1, PartyQual.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPartyQual_PartyQualType(), this.getPartyQualType(), null, \"partyQualType\", null, 1, 1, PartyQual.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartyQual_FromDate(), ecorePackage.getEDate(), \"fromDate\", null, 1, 1, PartyQual.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartyQual_QualificationDesc(), ecorePackage.getEString(), \"qualificationDesc\", null, 0, 1, PartyQual.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPartyQual_Status(), theStatusPackage.getStatusItem(), null, \"status\", null, 0, 1, PartyQual.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartyQual_ThruDate(), ecorePackage.getEDate(), \"thruDate\", null, 0, 1, PartyQual.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartyQual_Title(), ecorePackage.getEString(), \"title\", null, 0, 1, PartyQual.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPartyQual_VerifStatus(), theStatusPackage.getStatusItem(), null, \"verifStatus\", null, 0, 1, PartyQual.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(partyQualTypeEClass, PartyQualType.class, \"PartyQualType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getPartyQualType_PartyQualTypeId(), ecorePackage.getEString(), \"partyQualTypeId\", null, 1, 1, PartyQualType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartyQualType_Description(), ecorePackage.getEString(), \"description\", null, 0, 1, PartyQualType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartyQualType_HasTable(), ecorePackage.getEBooleanObject(), \"hasTable\", null, 0, 1, PartyQualType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPartyQualType_ParentType(), this.getPartyQualType(), null, \"parentType\", null, 0, 1, PartyQualType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(partyResumeEClass, PartyResume.class, \"PartyResume\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getPartyResume_ResumeId(), ecorePackage.getEString(), \"resumeId\", null, 1, 1, PartyResume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPartyResume_Content(), theContentPackage.getContent(), null, \"content\", null, 0, 1, PartyResume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPartyResume_Party(), thePartyPackage_1.getParty(), null, \"party\", null, 0, 1, PartyResume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartyResume_ResumeDate(), ecorePackage.getEDate(), \"resumeDate\", null, 0, 1, PartyResume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartyResume_ResumeText(), ecorePackage.getEString(), \"resumeText\", null, 0, 1, PartyResume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(partySkillEClass, PartySkill.class, \"PartySkill\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPartySkill_Party(), thePartyPackage_1.getParty(), null, \"party\", null, 1, 1, PartySkill.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPartySkill_SkillType(), this.getSkillType(), null, \"skillType\", null, 1, 1, PartySkill.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartySkill_Rating(), ecorePackage.getELong(), \"rating\", null, 0, 1, PartySkill.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartySkill_SkillLevel(), ecorePackage.getELong(), \"skillLevel\", null, 0, 1, PartySkill.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartySkill_StartedUsingDate(), ecorePackage.getEDate(), \"startedUsingDate\", null, 0, 1, PartySkill.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPartySkill_YearsExperience(), ecorePackage.getELong(), \"yearsExperience\", null, 0, 1, PartySkill.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(perfRatingTypeEClass, PerfRatingType.class, \"PerfRatingType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getPerfRatingType_PerfRatingTypeId(), ecorePackage.getEString(), \"perfRatingTypeId\", null, 1, 1, PerfRatingType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfRatingType_Description(), ecorePackage.getEString(), \"description\", null, 0, 1, PerfRatingType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfRatingType_HasTable(), ecorePackage.getEBooleanObject(), \"hasTable\", null, 0, 1, PerfRatingType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPerfRatingType_ParentType(), this.getPerfRatingType(), null, \"parentType\", null, 0, 1, PerfRatingType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(perfReviewEClass, PerfReview.class, \"PerfReview\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPerfReview_EmployeeParty(), thePartyPackage_1.getParty(), null, \"employeeParty\", null, 1, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReview_EmployeeRoleTypeId(), ecorePackage.getEString(), \"employeeRoleTypeId\", null, 1, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReview_PerfReviewId(), ecorePackage.getEString(), \"perfReviewId\", null, 1, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReview_Comments(), ecorePackage.getEString(), \"comments\", null, 0, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPerfReview_EmplPosition(), thePositionPackage.getEmplPosition(), null, \"emplPosition\", null, 0, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReview_FromDate(), ecorePackage.getEDate(), \"fromDate\", null, 0, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPerfReview_ManagerParty(), thePartyPackage_1.getParty(), null, \"managerParty\", null, 0, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReview_ManagerRoleTypeId(), ecorePackage.getEString(), \"managerRoleTypeId\", null, 0, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPerfReview_Payment(), thePaymentPackage.getPayment(), null, \"payment\", null, 0, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReview_ThruDate(), ecorePackage.getEDate(), \"thruDate\", null, 0, 1, PerfReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(perfReviewItemEClass, PerfReviewItem.class, \"PerfReviewItem\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPerfReviewItem_EmployeeParty(), thePartyPackage_1.getParty(), null, \"employeeParty\", null, 1, 1, PerfReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReviewItem_EmployeeRoleTypeId(), ecorePackage.getEString(), \"employeeRoleTypeId\", null, 1, 1, PerfReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReviewItem_PerfReviewId(), ecorePackage.getEString(), \"perfReviewId\", null, 1, 1, PerfReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReviewItem_PerfReviewItemSeqId(), ecorePackage.getEString(), \"perfReviewItemSeqId\", null, 1, 1, PerfReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReviewItem_Comments(), ecorePackage.getEString(), \"comments\", null, 0, 1, PerfReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPerfReviewItem_PerfRatingType(), this.getPerfRatingType(), null, \"perfRatingType\", null, 0, 1, PerfReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPerfReviewItem_PerfReviewItemType(), this.getPerfReviewItemType(), null, \"perfReviewItemType\", null, 0, 1, PerfReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(perfReviewItemTypeEClass, PerfReviewItemType.class, \"PerfReviewItemType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getPerfReviewItemType_PerfReviewItemTypeId(), ecorePackage.getEString(), \"perfReviewItemTypeId\", null, 1, 1, PerfReviewItemType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReviewItemType_Description(), ecorePackage.getEString(), \"description\", null, 0, 1, PerfReviewItemType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerfReviewItemType_HasTable(), ecorePackage.getEBooleanObject(), \"hasTable\", null, 0, 1, PerfReviewItemType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPerfReviewItemType_ParentType(), this.getPerfReviewItemType(), null, \"parentType\", null, 0, 1, PerfReviewItemType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(performanceNoteEClass, PerformanceNote.class, \"PerformanceNote\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPerformanceNote_Party(), thePartyPackage_1.getParty(), null, \"party\", null, 1, 1, PerformanceNote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerformanceNote_FromDate(), ecorePackage.getEDate(), \"fromDate\", null, 1, 1, PerformanceNote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerformanceNote_RoleTypeId(), ecorePackage.getEString(), \"roleTypeId\", null, 1, 1, PerformanceNote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerformanceNote_Comments(), ecorePackage.getEString(), \"comments\", null, 0, 1, PerformanceNote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerformanceNote_CommunicationDate(), ecorePackage.getEDate(), \"communicationDate\", null, 0, 1, PerformanceNote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPerformanceNote_ThruDate(), ecorePackage.getEDate(), \"thruDate\", null, 0, 1, PerformanceNote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(personTrainingEClass, PersonTraining.class, \"PersonTraining\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPersonTraining_Party(), thePartyPackage_1.getPerson(), null, \"party\", null, 1, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPersonTraining_TrainingClassType(), this.getTrainingClassType(), null, \"trainingClassType\", null, 1, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPersonTraining_FromDate(), ecorePackage.getEDate(), \"fromDate\", null, 1, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPersonTraining_ApprovalStatus(), ecorePackage.getEString(), \"approvalStatus\", null, 0, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPersonTraining_Approver(), thePartyPackage_1.getPerson(), null, \"approver\", null, 0, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPersonTraining_Reason(), ecorePackage.getEString(), \"reason\", null, 0, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPersonTraining_ThruDate(), ecorePackage.getEDate(), \"thruDate\", null, 0, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPersonTraining_TrainingRequest(), theTrainingsPackage.getTrainingRequest(), null, \"trainingRequest\", null, 0, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPersonTraining_WorkEffort(), theWorkeffortPackage.getWorkEffort(), null, \"workEffort\", null, 0, 1, PersonTraining.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(responsibilityTypeEClass, ResponsibilityType.class, \"ResponsibilityType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getResponsibilityType_ResponsibilityTypeId(), ecorePackage.getEString(), \"responsibilityTypeId\", null, 1, 1, ResponsibilityType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getResponsibilityType_Description(), ecorePackage.getEString(), \"description\", null, 0, 1, ResponsibilityType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getResponsibilityType_HasTable(), ecorePackage.getEBooleanObject(), \"hasTable\", null, 0, 1, ResponsibilityType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getResponsibilityType_ParentType(), this.getResponsibilityType(), null, \"parentType\", null, 0, 1, ResponsibilityType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(skillTypeEClass, SkillType.class, \"SkillType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getSkillType_SkillTypeId(), ecorePackage.getEString(), \"skillTypeId\", null, 1, 1, SkillType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSkillType_Description(), ecorePackage.getEString(), \"description\", null, 0, 1, SkillType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSkillType_HasTable(), ecorePackage.getEBooleanObject(), \"hasTable\", null, 0, 1, SkillType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSkillType_ParentType(), this.getSkillType(), null, \"parentType\", null, 0, 1, SkillType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(trainingClassTypeEClass, TrainingClassType.class, \"TrainingClassType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getTrainingClassType_TrainingClassTypeId(), ecorePackage.getEString(), \"trainingClassTypeId\", null, 1, 1, TrainingClassType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTrainingClassType_Description(), ecorePackage.getEString(), \"description\", null, 0, 1, TrainingClassType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTrainingClassType_HasTable(), ecorePackage.getEBooleanObject(), \"hasTable\", null, 0, 1, TrainingClassType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getTrainingClassType_ParentType(), this.getTrainingClassType(), null, \"parentType\", null, 0, 1, TrainingClassType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// mimo-ent-frame\n\t\tcreateMimoentframeAnnotations();\n\t\t// mimo-ent-slot\n\t\tcreateMimoentslotAnnotations();\n\t\t// mimo-ent-format\n\t\tcreateMimoentformatAnnotations();\n\t}", "private native static int load_object(String componentFileName);", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tEnginePackage theEnginePackage = (EnginePackage)EPackage.Registry.INSTANCE.getEPackage(EnginePackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tbluetoothPortEClass.getESuperTypes().add(theEnginePackage.getPort());\n\t\tl2CAPInJobEClass.getESuperTypes().add(theEnginePackage.getInputJob());\n\t\tl2CAPoutJobEClass.getESuperTypes().add(theEnginePackage.getOutputJob());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(bluetoothPortEClass, BluetoothPort.class, \"BluetoothPort\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(l2CAPInJobEClass, L2CAPInJob.class, \"L2CAPInJob\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(l2CAPoutJobEClass, L2CAPoutJob.class, \"L2CAPoutJob\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void loadInitializationAttributes() {\n \t\tURL url = BootLoader.getInstallURL();\n \n \t\t// load any initialization attributes. These are the default settings for\n \t\t// key attributes (eg. default primary feature) supplied by the packaging team.\n \t\t// They are always reloaded on startup to pick up any changes due to\n \t\t// \"native\" updates.\n \t\tProperties initProps = new Properties();\n \t\tInputStream is = null;\n \t\ttry {\n \t\t\tURL initURL = new URL(url, CONFIG_FILE_INIT);\n \t\t\tis = initURL.openStream();\n \t\t\tinitProps.load(is);\n \t\t\tif (DEBUG)\n \t\t\t\tdebug(\"Defaults from \" + initURL.toExternalForm()); //$NON-NLS-1$\n \t\t} catch (IOException e) {\n \t\t\treturn; // could not load default settings\n \t\t} finally {\n \t\t\tif (is != null) {\n \t\t\t\ttry {\n \t\t\t\t\tis.close();\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\t// ignore ...\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// use default settings if supplied\n \t\tString initId = loadAttribute(initProps, INIT_DEFAULT_FEATURE_ID, null);\n \t\tif (initId != null) {\n \t\t\tString application = loadAttribute(initProps, INIT_DEFAULT_FEATURE_APPLICATION, null);\n \t\t\tString initPluginId = loadAttribute(initProps, INIT_DEFAULT_PLUGIN_ID, null);\n \t\t\tif (initPluginId==null)\n \t\t\t\tinitPluginId = initId;\n \t\t\tIFeatureEntry fe = findConfiguredFeatureEntry(initId);\n \n \t\t\tif (fe == null) {\n \t\t\t\t// bug 26896 : setup optimistic reconciliation if the primary feature has changed or is new\n \t\t\t\tcmdFirstUse = true;\n \t\t\t\t// create entry if not exists\n \t\t\t\tfe = createFeatureEntry(initId, null, initPluginId, null, true, application, null);\n \t\t\t} else\n \t\t\t\t// update existing entry with new info\n \t\t\t\tfe = createFeatureEntry(initId, fe.getFeatureVersion(), fe.getFeaturePluginIdentifier(), fe.getFeaturePluginVersion(), fe.canBePrimary(), application, fe.getFeatureRootURLs());\n \t\t\tconfigureFeatureEntry(fe);\n \t\t\tdefaultFeature = initId;\n \t\t\tif (DEBUG) {\n \t\t\t\tdebug(\" Default primary feature: \" + defaultFeature); //$NON-NLS-1$\n \t\t\t\tif (application != null)\n \t\t\t\t\tdebug(\" Default application : \" + application); //$NON-NLS-1$\n \t\t\t}\n \t\t}\n \t}", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\teActorEClass.getESuperTypes().add(this.getEDomainSpecificEntity());\n\t\teItemEClass.getESuperTypes().add(this.getEDomainSpecificEntity());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(eDomainSchemaEClass, EDomainSchema.class, \"EDomainSchema\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEDomainSchema_Cs(), this.getEControlSchema(), null, \"cs\", null, 0, 1, EDomainSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDomainSchema_Ds(), this.getEDataSchema(), null, \"ds\", null, 0, 1, EDomainSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eControlSchemaEClass, EControlSchema.class, \"EControlSchema\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEControlSchema_Actor(), this.getEActor(), null, \"actor\", null, 1, -1, EControlSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDataSchemaEClass, EDataSchema.class, \"EDataSchema\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEDataSchema_Cs(), this.getEControlSchema(), null, \"cs\", null, 1, 1, EDataSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDataSchema_Item(), this.getEItem(), null, \"item\", null, 1, -1, EDataSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificEntityEClass, EDomainSpecificEntity.class, \"EDomainSpecificEntity\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificEntity_CommandPriority(), ecorePackage.getEInt(), \"commandPriority\", null, 0, 1, EDomainSpecificEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDomainSpecificEntity_Cmd(), this.getEDomainSpecificCommand(), null, \"cmd\", null, 0, -1, EDomainSpecificEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificCommandEClass, EDomainSpecificCommand.class, \"EDomainSpecificCommand\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificCommand_CmdId(), ecorePackage.getEInt(), \"cmdId\", null, 0, 1, EDomainSpecificCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eActorEClass, EActor.class, \"EActor\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEActor_KindInteraction(), this.getECoordinationBehavior(), \"kindInteraction\", null, 0, 1, EActor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEActor_TypesControlled(), this.getEDomainSpecificType(), null, \"typesControlled\", null, 0, -1, EActor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eItemEClass, EItem.class, \"EItem\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEItem_ArisingBehavior(), this.getEArising(), \"arisingBehavior\", null, 0, 1, EItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEItem_Type(), this.getEDomainSpecificType(), null, \"type\", null, 1, 1, EItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificTypeEClass, EDomainSpecificType.class, \"EDomainSpecificType\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificType_InteractionBehavior(), this.getEInteractionBehavior(), \"interactionBehavior\", null, 0, 1, EDomainSpecificType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getEDomainSpecificType_Cardinality(), this.getECardinality(), \"cardinality\", null, 0, 1, EDomainSpecificType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(eArisingEEnum, EArising.class, \"EArising\");\n\t\taddEEnumLiteral(eArisingEEnum, EArising.STATIC);\n\t\taddEEnumLiteral(eArisingEEnum, EArising.DYNAMIC);\n\n\t\tinitEEnum(eCardinalityEEnum, ECardinality.class, \"ECardinality\");\n\t\taddEEnumLiteral(eCardinalityEEnum, ECardinality.ONE);\n\t\taddEEnumLiteral(eCardinalityEEnum, ECardinality.MANY);\n\n\t\tinitEEnum(eInteractionBehaviorEEnum, EInteractionBehavior.class, \"EInteractionBehavior\");\n\t\taddEEnumLiteral(eInteractionBehaviorEEnum, EInteractionBehavior.SYNC);\n\t\taddEEnumLiteral(eInteractionBehaviorEEnum, EInteractionBehavior.ASYNC);\n\n\t\tinitEEnum(eCoordinationBehaviorEEnum, ECoordinationBehavior.class, \"ECoordinationBehavior\");\n\t\taddEEnumLiteral(eCoordinationBehaviorEEnum, ECoordinationBehavior.LOCAL);\n\t\taddEEnumLiteral(eCoordinationBehaviorEEnum, ECoordinationBehavior.DISTRIBUTED);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "public static void init() throws IOException {\n\t\tGenericFeatVect.init();\n\t}", "void loadFaidx() {\n\t\tString file = phastConsDir + \"/genome.fai\";\n\t\tif (!Gpr.exists(file)) { throw new RuntimeException(\"Cannot find fasta index file '\" + file + \"'\\n\\tYou can create one by running 'samtools faidx' command and copying the resulting index file to \" + file + \"\\n\\n\"); }\n\n\t\t// Read and parse file\n\t\tchromoSize = new HashMap<>();\n\t\tString txt = Gpr.readFile(file);\n\t\tfor (String line : txt.split(\"\\n\")) {\n\t\t\tString fields[] = line.split(\"\\\\s+\");\n\t\t\tString chrName = Chromosome.simpleName(fields[0]);\n\t\t\tint len = Gpr.parseIntSafe(fields[1]);\n\n\t\t\tchromoSize.put(chrName, len);\n\t\t}\n\t}", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tInfrastructurePackage theInfrastructurePackage = (InfrastructurePackage)EPackage.Registry.INSTANCE.getEPackage(InfrastructurePackage.eNS_URI);\n\t\tOCCIPackage theOCCIPackage = (OCCIPackage)EPackage.Registry.INSTANCE.getEPackage(OCCIPackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tcontainerEClass.getESuperTypes().add(theInfrastructurePackage.getCompute());\n\t\tlinkEClass.getESuperTypes().add(theOCCIPackage.getLink());\n\t\tnetworklinkEClass.getESuperTypes().add(this.getLink());\n\t\tvolumesfromEClass.getESuperTypes().add(theOCCIPackage.getLink());\n\t\tcontainsEClass.getESuperTypes().add(theOCCIPackage.getLink());\n\t\tmachineEClass.getESuperTypes().add(theInfrastructurePackage.getCompute());\n\t\tvolumeEClass.getESuperTypes().add(theInfrastructurePackage.getStorage());\n\t\tnetworkEClass.getESuperTypes().add(theInfrastructurePackage.getNetwork());\n\t\tmachinegenericEClass.getESuperTypes().add(this.getMachine());\n\t\tmachineamazonec2EClass.getESuperTypes().add(this.getMachine());\n\t\tmachinedigitaloceanEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinegooglecomputeengineEClass.getESuperTypes().add(this.getMachine());\n\t\tmachineibmsoftlayerEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinemicrosoftazureEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinemicrosofthypervEClass.getESuperTypes().add(this.getMachine());\n\t\tmachineopenstackEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinerackspaceEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinevirtualboxEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinevmwarefusionEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinevmwarevcloudairEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinevmwarevsphereEClass.getESuperTypes().add(this.getMachine());\n\t\tmachineexoscaleEClass.getESuperTypes().add(this.getMachine());\n\t\tmachinegrid5000EClass.getESuperTypes().add(this.getMachine());\n\t\tclusterEClass.getESuperTypes().add(theInfrastructurePackage.getCompute());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(arrayOfStringEClass, ArrayOfString.class, \"ArrayOfString\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getArrayOfString_Values(), ecorePackage.getEString(), \"values\", null, 0, -1, ArrayOfString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(containerEClass, org.eclipse.cmf.occi.docker.Container.class, \"Container\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getContainer_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Containerid(), ecorePackage.getEString(), \"containerid\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Image(), ecorePackage.getEString(), \"image\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Build(), ecorePackage.getEString(), \"build\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Command(), ecorePackage.getEString(), \"command\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Ports(), ecorePackage.getEString(), \"ports\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Expose(), ecorePackage.getEString(), \"expose\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Volumes(), ecorePackage.getEString(), \"volumes\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Environment(), ecorePackage.getEString(), \"environment\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_EnvFile(), ecorePackage.getEString(), \"envFile\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Net(), ecorePackage.getEString(), \"net\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Dns(), ecorePackage.getEString(), \"dns\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_DnsSearch(), ecorePackage.getEString(), \"dnsSearch\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CapAdd(), ecorePackage.getEString(), \"capAdd\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CapDrop(), ecorePackage.getEString(), \"capDrop\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_WorkingDir(), ecorePackage.getEString(), \"workingDir\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Entrypoint(), ecorePackage.getEString(), \"entrypoint\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_User(), ecorePackage.getEString(), \"user\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_DomainName(), ecorePackage.getEString(), \"domainName\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_MemLimit(), ecorePackage.getEBigInteger(), \"memLimit\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_MemorySwap(), ecorePackage.getEBigInteger(), \"memorySwap\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Privileged(), ecorePackage.getEBoolean(), \"privileged\", \"false\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Restart(), ecorePackage.getEString(), \"restart\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_StdinOpen(), ecorePackage.getEBoolean(), \"stdinOpen\", \"false\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Interactive(), ecorePackage.getEBoolean(), \"interactive\", \"false\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CpuShares(), ecorePackage.getEBigInteger(), \"cpuShares\", \"0\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Pid(), ecorePackage.getEString(), \"pid\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Ipc(), ecorePackage.getEString(), \"ipc\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_AddHost(), ecorePackage.getEString(), \"addHost\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_MacAddress(), theInfrastructurePackage.getMac(), \"macAddress\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Rm(), ecorePackage.getEBoolean(), \"rm\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_SecurityOpt(), ecorePackage.getEString(), \"securityOpt\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Device(), ecorePackage.getEString(), \"device\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_LxcConf(), ecorePackage.getEString(), \"lxcConf\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_PublishAll(), ecorePackage.getEBoolean(), \"publishAll\", \"false\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_ReadOnly(), ecorePackage.getEBoolean(), \"readOnly\", \"false\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Monitored(), ecorePackage.getEBoolean(), \"monitored\", \"false\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CpuUsed(), ecorePackage.getEBigInteger(), \"cpuUsed\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_MemoryUsed(), ecorePackage.getEBigInteger(), \"memoryUsed\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CpuPercent(), ecorePackage.getEString(), \"cpuPercent\", \"0\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_MemoryPercent(), ecorePackage.getEString(), \"memoryPercent\", \"0\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_DiskUsed(), ecorePackage.getEBigInteger(), \"diskUsed\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_DiskPercent(), ecorePackage.getEString(), \"diskPercent\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_BandwidthUsed(), ecorePackage.getEBigInteger(), \"bandwidthUsed\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_BandwidthPercent(), ecorePackage.getEString(), \"bandwidthPercent\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_MonitoringInterval(), ecorePackage.getEBigInteger(), \"monitoringInterval\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CpuMaxValue(), ecorePackage.getEBigInteger(), \"cpuMaxValue\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_MemoryMaxValue(), ecorePackage.getEBigInteger(), \"memoryMaxValue\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CoreMax(), ecorePackage.getEBigInteger(), \"coreMax\", \"1\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CpuSetCpus(), ecorePackage.getEString(), \"cpuSetCpus\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_CpuSetMems(), ecorePackage.getEString(), \"cpuSetMems\", null, 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getContainer_Tty(), ecorePackage.getEBoolean(), \"tty\", \"false\", 0, 1, org.eclipse.cmf.occi.docker.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getContainer__Create(), null, \"create\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getContainer__Stop(), null, \"stop\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getContainer__Run(), null, \"run\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getContainer__Pause(), null, \"pause\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getContainer__Unpause(), null, \"unpause\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tEOperation op = initEOperation(getContainer__Kill__String(), null, \"kill\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEString(), \"signal\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(linkEClass, Link.class, \"Link\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getLink_Alias(), ecorePackage.getEString(), \"alias\", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(networklinkEClass, Networklink.class, \"Networklink\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(volumesfromEClass, Volumesfrom.class, \"Volumesfrom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getVolumesfrom_Mode(), this.getMode(), \"mode\", \"readWrite\", 0, 1, Volumesfrom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(containsEClass, Contains.class, \"Contains\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(machineEClass, Machine.class, \"Machine\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachine_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_EngineInstallURL(), ecorePackage.getEString(), \"engineInstallURL\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_EngineOpt(), ecorePackage.getEString(), \"engineOpt\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_EngineInsecureRegistry(), ecorePackage.getEString(), \"engineInsecureRegistry\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_EngineRegistryMirror(), ecorePackage.getEString(), \"engineRegistryMirror\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_EngineLabel(), ecorePackage.getEString(), \"engineLabel\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_EngineStorageDriver(), ecorePackage.getEString(), \"engineStorageDriver\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_EngineEnv(), ecorePackage.getEString(), \"engineEnv\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_Swarm(), ecorePackage.getEBoolean(), \"swarm\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_SwarmImage(), ecorePackage.getEString(), \"swarmImage\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_SwarmMaster(), ecorePackage.getEBoolean(), \"swarmMaster\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_SwarmDiscovery(), ecorePackage.getEString(), \"swarmDiscovery\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_SwarmStrategy(), ecorePackage.getEString(), \"swarmStrategy\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_SwarmOpt(), ecorePackage.getEString(), \"swarmOpt\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_SwarmHost(), ecorePackage.getEString(), \"swarmHost\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_SwarmAddr(), ecorePackage.getEString(), \"swarmAddr\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_SwarmExperimental(), ecorePackage.getEString(), \"swarmExperimental\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachine_TlsSan(), ecorePackage.getEString(), \"tlsSan\", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getMachine__Startall(), null, \"startall\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(volumeEClass, Volume.class, \"Volume\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getVolume_Driver(), ecorePackage.getEString(), \"driver\", \"local\", 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVolume_Labels(), ecorePackage.getEString(), \"labels\", null, 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVolume_Options(), ecorePackage.getEString(), \"options\", null, 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVolume_Source(), ecorePackage.getEString(), \"source\", null, 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVolume_Destination(), ecorePackage.getEString(), \"destination\", null, 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVolume_Mode(), ecorePackage.getEString(), \"mode\", null, 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVolume_Rw(), ecorePackage.getEString(), \"rw\", null, 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVolume_Propagation(), ecorePackage.getEString(), \"propagation\", null, 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVolume_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, Volume.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(networkEClass, Network.class, \"Network\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getNetwork_NetworkId(), ecorePackage.getEString(), \"networkId\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_AuxAddress(), ecorePackage.getEString(), \"auxAddress\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_Driver(), ecorePackage.getEString(), \"driver\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_Gateway(), ecorePackage.getEString(), \"gateway\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_Internal(), ecorePackage.getEBoolean(), \"internal\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_IpRange(), ecorePackage.getEString(), \"ipRange\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_IpamDriver(), ecorePackage.getEString(), \"ipamDriver\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_IpamOpt(), ecorePackage.getEString(), \"ipamOpt\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_Ipv6(), ecorePackage.getEBoolean(), \"ipv6\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_Opt(), ecorePackage.getEString(), \"opt\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getNetwork_Subnet(), ecorePackage.getEString(), \"subnet\", null, 0, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinegenericEClass, Machinegeneric.class, \"Machinegeneric\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinegeneric_EnginePort(), ecorePackage.getEBigInteger(), \"enginePort\", null, 0, 1, Machinegeneric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegeneric_IpAddress(), ecorePackage.getEString(), \"ipAddress\", null, 0, 1, Machinegeneric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegeneric_SshKey(), ecorePackage.getEString(), \"sshKey\", null, 0, 1, Machinegeneric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegeneric_SshUser(), ecorePackage.getEString(), \"sshUser\", null, 0, 1, Machinegeneric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegeneric_SshPort(), ecorePackage.getEBigInteger(), \"sshPort\", \"22\", 0, 1, Machinegeneric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machineamazonec2EClass, Machineamazonec2.class, \"Machineamazonec2\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachineamazonec2_AccessKey(), ecorePackage.getEString(), \"accessKey\", null, 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_Ami(), ecorePackage.getEString(), \"ami\", \"ami-4ae27e22\", 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_InstanceType(), ecorePackage.getEString(), \"instanceType\", \"t2.micro\", 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_Region(), ecorePackage.getEString(), \"region\", \"us-east-1\", 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_RootSize(), ecorePackage.getEBigInteger(), \"rootSize\", \"16\", 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_SecretKey(), ecorePackage.getEString(), \"secretKey\", null, 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_SecurityGroup(), ecorePackage.getEString(), \"securityGroup\", \"docker-machine\", 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_SessionToken(), ecorePackage.getEString(), \"sessionToken\", null, 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_SubnetId(), ecorePackage.getEString(), \"subnetId\", null, 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_VpcId(), ecorePackage.getEString(), \"vpcId\", null, 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineamazonec2_Zone(), ecorePackage.getEString(), \"zone\", \"a\", 0, 1, Machineamazonec2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinedigitaloceanEClass, Machinedigitalocean.class, \"Machinedigitalocean\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinedigitalocean_AccessToken(), ecorePackage.getEString(), \"accessToken\", null, 0, 1, Machinedigitalocean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinedigitalocean_Image(), ecorePackage.getEString(), \"image\", \"docker\", 0, 1, Machinedigitalocean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinedigitalocean_Region(), ecorePackage.getEString(), \"region\", \"nyc3\", 0, 1, Machinedigitalocean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinedigitalocean_Size(), ecorePackage.getEString(), \"size\", \"512mb\", 0, 1, Machinedigitalocean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinegooglecomputeengineEClass, Machinegooglecomputeengine.class, \"Machinegooglecomputeengine\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinegooglecomputeengine_Zone(), ecorePackage.getEString(), \"zone\", \"us-central1-a\", 0, 1, Machinegooglecomputeengine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegooglecomputeengine_MachineType(), ecorePackage.getEString(), \"machineType\", \"f1-micro\", 0, 1, Machinegooglecomputeengine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegooglecomputeengine_Username(), ecorePackage.getEString(), \"username\", \"docker-user\", 0, 1, Machinegooglecomputeengine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegooglecomputeengine_InstanceName(), ecorePackage.getEString(), \"instanceName\", \"docker-machine\", 0, 1, Machinegooglecomputeengine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegooglecomputeengine_Project(), ecorePackage.getEString(), \"project\", null, 0, 1, Machinegooglecomputeengine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machineibmsoftlayerEClass, Machineibmsoftlayer.class, \"Machineibmsoftlayer\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachineibmsoftlayer_ApiEndpoint(), ecorePackage.getEString(), \"apiEndpoint\", \"api.softlayer.com/rest/v3\", 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_User(), ecorePackage.getEString(), \"user\", null, 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_ApiKey(), ecorePackage.getEString(), \"apiKey\", null, 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_Cpu(), ecorePackage.getEBigInteger(), \"cpu\", null, 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_DiskSize(), ecorePackage.getEBigInteger(), \"diskSize\", null, 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_Domain(), ecorePackage.getEString(), \"domain\", null, 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_HourlyBilling(), ecorePackage.getEBoolean(), \"hourlyBilling\", \"false\", 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_Image(), ecorePackage.getEString(), \"image\", \"UBUNTU_LATEST\", 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_LocalDisk(), ecorePackage.getEBoolean(), \"localDisk\", \"false\", 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_PrivateNetOnly(), ecorePackage.getEBoolean(), \"privateNetOnly\", null, 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_Region(), ecorePackage.getEString(), \"region\", null, 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_PublicVlanId(), ecorePackage.getEString(), \"publicVlanId\", \"0\", 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineibmsoftlayer_PrivateVlanId(), ecorePackage.getEString(), \"privateVlanId\", \"0\", 0, 1, Machineibmsoftlayer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinemicrosoftazureEClass, Machinemicrosoftazure.class, \"Machinemicrosoftazure\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinemicrosoftazure_SubscriptionId(), ecorePackage.getEString(), \"subscriptionId\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_SubscriptionCert(), ecorePackage.getEString(), \"subscriptionCert\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_Environment(), ecorePackage.getEString(), \"environment\", \"AzurePublicCloud\", 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_MachineLocation(), ecorePackage.getEString(), \"machineLocation\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_ResourceGroup(), ecorePackage.getEString(), \"resourceGroup\", \"docker-machine\", 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_Size(), ecorePackage.getEString(), \"size\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_SshUser(), ecorePackage.getEString(), \"sshUser\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_Vnet(), ecorePackage.getEString(), \"vnet\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_Subnet(), ecorePackage.getEString(), \"subnet\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_SubnetPrefix(), ecorePackage.getEString(), \"subnetPrefix\", \"192.168.0.0/16\", 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_AvailabilitySet(), ecorePackage.getEString(), \"availabilitySet\", \"docker-machine\", 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_OpenPort(), ecorePackage.getEBigInteger(), \"openPort\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_PrivateIpAddress(), ecorePackage.getEString(), \"privateIpAddress\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_NoPublicIp(), ecorePackage.getEString(), \"noPublicIp\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_StaticPublicIp(), ecorePackage.getEString(), \"staticPublicIp\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_DockerPort(), ecorePackage.getEString(), \"dockerPort\", \"2376\", 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_UsePrivateIp(), ecorePackage.getEString(), \"usePrivateIp\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosoftazure_Image(), ecorePackage.getEString(), \"image\", null, 0, 1, Machinemicrosoftazure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinemicrosofthypervEClass, Machinemicrosofthyperv.class, \"Machinemicrosofthyperv\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinemicrosofthyperv_VirtualSwitch(), ecorePackage.getEString(), \"virtualSwitch\", null, 0, 1, Machinemicrosofthyperv.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosofthyperv_Boot2dockerURL(), ecorePackage.getEString(), \"boot2dockerURL\", null, 0, 1, Machinemicrosofthyperv.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosofthyperv_DiskSize(), ecorePackage.getEBigInteger(), \"diskSize\", \"20000\", 0, 1, Machinemicrosofthyperv.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosofthyperv_StaticMacAddress(), theInfrastructurePackage.getMac(), \"staticMacAddress\", null, 0, 1, Machinemicrosofthyperv.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinemicrosofthyperv_VlanId(), ecorePackage.getEString(), \"vlanId\", null, 0, 1, Machinemicrosofthyperv.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machineopenstackEClass, Machineopenstack.class, \"Machineopenstack\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachineopenstack_FlavorId(), ecorePackage.getEString(), \"flavorId\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_FlavorName(), ecorePackage.getEString(), \"flavorName\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_ImageId(), ecorePackage.getEString(), \"imageId\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_ImageName(), ecorePackage.getEString(), \"imageName\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_AuthUrl(), ecorePackage.getEString(), \"authUrl\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_Username(), ecorePackage.getEString(), \"username\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_Password(), ecorePackage.getEString(), \"password\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_TenantName(), ecorePackage.getEString(), \"tenantName\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_TenantId(), ecorePackage.getEString(), \"tenantId\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_Region(), ecorePackage.getEString(), \"region\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_EndpointType(), ecorePackage.getEString(), \"endpointType\", \"publicURL\", 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_NetId(), ecorePackage.getEString(), \"netId\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_NetName(), ecorePackage.getEString(), \"netName\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_SecGroups(), ecorePackage.getEString(), \"secGroups\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_FloatingIpPool(), ecorePackage.getEString(), \"floatingIpPool\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_ActiveTimeOut(), ecorePackage.getEBigInteger(), \"activeTimeOut\", \"200\", 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_AvailabilityZone(), ecorePackage.getEString(), \"availabilityZone\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_DomainId(), ecorePackage.getEString(), \"domainId\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_DomainName(), ecorePackage.getEString(), \"domainName\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_Insecure(), ecorePackage.getEBoolean(), \"insecure\", \"false\", 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_IpVersion(), ecorePackage.getEBigInteger(), \"ipVersion\", \"4\", 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_KeypairName(), ecorePackage.getEString(), \"keypairName\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_PrivateKeyFile(), ecorePackage.getEString(), \"privateKeyFile\", null, 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_SshPort(), ecorePackage.getEBigInteger(), \"sshPort\", \"22\", 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineopenstack_SshUser(), ecorePackage.getEString(), \"sshUser\", \"root\", 0, 1, Machineopenstack.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinerackspaceEClass, Machinerackspace.class, \"Machinerackspace\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinerackspace_Username(), ecorePackage.getEString(), \"username\", null, 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinerackspace_ApiKey(), ecorePackage.getEString(), \"apiKey\", null, 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinerackspace_Region(), ecorePackage.getEString(), \"region\", null, 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinerackspace_EndPointType(), ecorePackage.getEString(), \"endPointType\", \"publicURL\", 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinerackspace_ImageId(), ecorePackage.getEString(), \"imageId\", \"59a3fadd-93e7-4674-886a-64883e17115f\", 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinerackspace_FlavorId(), ecorePackage.getEString(), \"flavorId\", \"general1-1\", 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinerackspace_SshUser(), ecorePackage.getEString(), \"sshUser\", \"root\", 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinerackspace_SshPort(), ecorePackage.getEBigInteger(), \"sshPort\", \"22\", 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinerackspace_DockerInstall(), ecorePackage.getEBoolean(), \"dockerInstall\", \"true\", 0, 1, Machinerackspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinevirtualboxEClass, Machinevirtualbox.class, \"Machinevirtualbox\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinevirtualbox_Boot2dockerURL(), ecorePackage.getEString(), \"boot2dockerURL\", null, 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_DiskSize(), ecorePackage.getEBigInteger(), \"diskSize\", \"20000\", 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_HostDNSResolver(), ecorePackage.getEBoolean(), \"hostDNSResolver\", \"false\", 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_ImportBoot2DockerVM(), ecorePackage.getEString(), \"importBoot2DockerVM\", null, 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_HostOnlyCIDR(), ecorePackage.getEString(), \"hostOnlyCIDR\", \"192.168.99.1/24\", 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_HostOnlyNICType(), ecorePackage.getEString(), \"hostOnlyNICType\", \"82540EM\", 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_HostOnlyNICPromisc(), ecorePackage.getEString(), \"hostOnlyNICPromisc\", \"deny\", 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_NoShare(), ecorePackage.getEBoolean(), \"noShare\", \"false\", 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_NoDNSProxy(), ecorePackage.getEBoolean(), \"noDNSProxy\", \"false\", 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_NoVTXCheck(), ecorePackage.getEBoolean(), \"noVTXCheck\", \"false\", 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevirtualbox_ShareFolder(), ecorePackage.getEString(), \"shareFolder\", null, 0, 1, Machinevirtualbox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinevmwarefusionEClass, Machinevmwarefusion.class, \"Machinevmwarefusion\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinevmwarefusion_Boot2dockerURL(), ecorePackage.getEString(), \"boot2dockerURL\", null, 0, 1, Machinevmwarefusion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarefusion_DiskSize(), ecorePackage.getEBigInteger(), \"diskSize\", \"20000\", 0, 1, Machinevmwarefusion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarefusion_MemorySize(), ecorePackage.getEBigInteger(), \"memorySize\", \"1024\", 0, 1, Machinevmwarefusion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarefusion_NoShare(), ecorePackage.getEBoolean(), \"noShare\", \"false\", 0, 1, Machinevmwarefusion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinevmwarevcloudairEClass, Machinevmwarevcloudair.class, \"Machinevmwarevcloudair\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinevmwarevcloudair_Username(), ecorePackage.getEString(), \"username\", null, 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_Password(), ecorePackage.getEString(), \"password\", null, 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_Catalog(), ecorePackage.getEString(), \"catalog\", \"Public Catalog\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_CatalogItem(), ecorePackage.getEString(), \"catalogItem\", \"Ubuntu Server 12.04 LTS (amd64 20140927)\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_ComputeId(), ecorePackage.getEString(), \"computeId\", null, 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_CpuCount(), ecorePackage.getEBigInteger(), \"cpuCount\", \"1\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_DockerPort(), ecorePackage.getEBigInteger(), \"dockerPort\", \"2376\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_Edgegateway(), ecorePackage.getEString(), \"edgegateway\", \"&lt;vdcid>\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_MemorySize(), ecorePackage.getEBigInteger(), \"memorySize\", \"2048\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_VappName(), ecorePackage.getEString(), \"vappName\", \"&lt;autogenerated>\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_Orgvdcnetwork(), ecorePackage.getEString(), \"orgvdcnetwork\", \"&lt;vdcid>-default-routed\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_Provision(), ecorePackage.getEBoolean(), \"provision\", \"true\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_PublicIp(), ecorePackage.getEString(), \"publicIp\", null, 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_SshPort(), ecorePackage.getEBigInteger(), \"sshPort\", \"22\", 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevcloudair_VdcId(), ecorePackage.getEString(), \"vdcId\", null, 0, 1, Machinevmwarevcloudair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinevmwarevsphereEClass, Machinevmwarevsphere.class, \"Machinevmwarevsphere\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinevmwarevsphere_Username(), ecorePackage.getEString(), \"username\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_Password(), ecorePackage.getEString(), \"password\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_Boot2dockerURL(), ecorePackage.getEString(), \"boot2dockerURL\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_ComputeIp(), ecorePackage.getEString(), \"computeIp\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_CpuCount(), ecorePackage.getEBigInteger(), \"cpuCount\", \"2\", 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_Datacenter(), ecorePackage.getEString(), \"datacenter\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_Datastore(), ecorePackage.getEString(), \"datastore\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_DiskSize(), ecorePackage.getEBigInteger(), \"diskSize\", \"20000\", 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_MemorySize(), ecorePackage.getEBigInteger(), \"memorySize\", \"2048\", 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_Network(), ecorePackage.getEString(), \"network\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_Pool(), ecorePackage.getEString(), \"pool\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinevmwarevsphere_Vcenter(), ecorePackage.getEString(), \"vcenter\", null, 0, 1, Machinevmwarevsphere.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machineexoscaleEClass, Machineexoscale.class, \"Machineexoscale\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachineexoscale_Url(), ecorePackage.getEString(), \"url\", \"https://api.exoscale.ch/compute\", 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_ApiKey(), ecorePackage.getEString(), \"apiKey\", null, 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_ApiSecretKey(), ecorePackage.getEString(), \"apiSecretKey\", null, 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_InstanceProfile(), ecorePackage.getEString(), \"instanceProfile\", \"small\", 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_Image(), ecorePackage.getEString(), \"image\", \"ubuntu-16.04\", 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_SecurityGroup(), ecorePackage.getEString(), \"securityGroup\", null, 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_AvailabilityZone(), ecorePackage.getEString(), \"availabilityZone\", null, 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_SshUser(), ecorePackage.getEString(), \"sshUser\", \"ubuntu\", 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_UserData(), ecorePackage.getEString(), \"userData\", null, 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachineexoscale_AffinityGroup(), ecorePackage.getEString(), \"affinityGroup\", \"docker-machine\", 0, 1, Machineexoscale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(machinegrid5000EClass, Machinegrid5000.class, \"Machinegrid5000\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMachinegrid5000_Username(), ecorePackage.getEString(), \"username\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_Password(), ecorePackage.getEString(), \"password\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_Site(), ecorePackage.getEString(), \"site\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_Walltime(), ecorePackage.getEString(), \"walltime\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_SshPrivateKey(), ecorePackage.getEString(), \"sshPrivateKey\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_SshPublicKey(), ecorePackage.getEString(), \"sshPublicKey\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_Image(), ecorePackage.getEString(), \"image\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_ResourceProperties(), ecorePackage.getEString(), \"resourceProperties\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_UseJobReservation(), ecorePackage.getEString(), \"useJobReservation\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getMachinegrid5000_HostToProvision(), ecorePackage.getEString(), \"hostToProvision\", null, 0, 1, Machinegrid5000.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(clusterEClass, Cluster.class, \"Cluster\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getCluster_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, Cluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(modeEEnum, Mode.class, \"Mode\");\n\t\taddEEnumLiteral(modeEEnum, Mode.READ_WRITE);\n\t\taddEEnumLiteral(modeEEnum, Mode.READ);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// http://www.eclipse.org/emf/2002/Ecore\n\t\tcreateEcoreAnnotations();\n\t}", "protected void loadAll() {\n\t\ttry {\n\t\t\tloadGroups(this.folder, this.cls, this.cachedOnes);\n\t\t\t/*\n\t\t\t * we have to initialize the components\n\t\t\t */\n\t\t\tfor (Object obj : this.cachedOnes.values()) {\n\t\t\t\t((Component) obj).getReady();\n\t\t\t}\n\t\t\tTracer.trace(this.cachedOnes.size() + \" \" + this + \" loaded.\");\n\t\t} catch (Exception e) {\n\t\t\tthis.cachedOnes.clear();\n\t\t\tTracer.trace(\n\t\t\t\t\te,\n\t\t\t\t\tthis\n\t\t\t\t\t\t\t+ \" pre-loading failed. No component of this type is available till we successfully pre-load them again.\");\n\t\t}\n\t}", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "public void readData() throws FileNotFoundException {\n this.plane = readPlaneDimensions();\n this.groupBookingsList = readBookingsList();\n }", "public void initClassLoader() {\n FileClassLoadingService classLoader = new FileClassLoadingService();\n\n // init from preferences...\n Domain classLoaderDomain = getPreferenceDomain().getSubdomain(\n FileClassLoadingService.class);\n\n Collection details = classLoaderDomain.getPreferences();\n if (details.size() > 0) {\n\n // transform preference to file...\n Transformer transformer = new Transformer() {\n\n public Object transform(Object object) {\n DomainPreference pref = (DomainPreference) object;\n return new File(pref.getKey());\n }\n };\n\n classLoader.setPathFiles(CollectionUtils.collect(details, transformer));\n }\n\n this.modelerClassLoader = classLoader;\n }", "private static byte[] loadDefaultFeatureGeneratorBytes() {\n\n final ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n try (InputStream in = DocumentClassifierFactory.class.getResourceAsStream(\n \"/documentClassifier/default-feature-descriptor.xml\")) {\n\n if (in == null) {\n throw new IllegalStateException(\n \"Classpath must contain default-feature-descriptor.xml file!\");\n }\n\n final byte buf[] = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n bytes.write(buf, 0, len);\n }\n } catch (final IOException e) {\n throw new IllegalStateException(\n \"Failed reading from default-feature-descriptor.xml file on classpath!\");\n }\n return bytes.toByteArray();\n }", "public void fontLoader(){\n try {\n //create the font to use. Specify the size!\n customFont = Font.createFont(Font.TRUETYPE_FONT, new File(\".\\\\resources\\\\DS-DIGI.ttf\")).deriveFont(40f);\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n ge.registerFont(customFont);\n } catch (IOException e) {\n e.printStackTrace();\n } catch(FontFormatException e) {\n e.printStackTrace();\n }\n }", "private void addLoadAPI(FunctionGenerator fg) throws EQException\n\t{\n\n\t\tAPIFieldSet apiFieldSet = FunctionToolbox.getLoadAPIFieldSet(session, \"LID\", \"MCD\", \"G01M\", \"GZG011\",\n\t\t\t\t\t\t\"Maintain Customer Details\", \"M\", true);\n\t\tfg.addLoadAPIFieldSet(\"REC1\", apiFieldSet);\n\n\t\t// PV\n\t\t// PVFieldSet pvFieldSet = FunctionToolbox.getPVFieldSet(session, \"GFR70R\", \"\", false, \"N\", MappingToolbox\n\t\t// .getFullLoadFieldSetPath(\"REC1\", \"LID\"));\n\t\t// fg.setLoadPVFieldSet(\"REC1\", pvFieldSet);\n\t}", "public void initializePackageContents()\n {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tclarityAddFilesEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityGetBatchResultEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityGetKeyEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityQueryBatchEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityReloadFileEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityRemoveFilesEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tstartBatchEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(clarityAbstractObjectEClass, ClarityAbstractObject.class, \"ClarityAbstractObject\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getClarityAbstractObject_ClarityConnection(), ecorePackage.getEString(), \"clarityConnection\", null, 0, 1, ClarityAbstractObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(clarityAddFilesEClass, ClarityAddFiles.class, \"ClarityAddFiles\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityGetBatchResultEClass, ClarityGetBatchResult.class, \"ClarityGetBatchResult\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityGetKeyEClass, ClarityGetKey.class, \"ClarityGetKey\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityQueryBatchEClass, ClarityQueryBatch.class, \"ClarityQueryBatch\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityReloadFileEClass, ClarityReloadFile.class, \"ClarityReloadFile\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityRemoveFilesEClass, ClarityRemoveFiles.class, \"ClarityRemoveFiles\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(startBatchEClass, StartBatch.class, \"StartBatch\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// cbgeneralcontrol\n\t\tcreateCbgeneralcontrolAnnotations();\n\t}", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tCapellacorePackage theCapellacorePackage = (CapellacorePackage)EPackage.Registry.INSTANCE.getEPackage(CapellacorePackage.eNS_URI);\n\t\tFaPackage theFaPackage = (FaPackage)EPackage.Registry.INSTANCE.getEPackage(FaPackage.eNS_URI);\n\t\tRequirementPackage theRequirementPackage = (RequirementPackage)EPackage.Registry.INSTANCE.getEPackage(RequirementPackage.eNS_URI);\n\t\tCapellacommonPackage theCapellacommonPackage = (CapellacommonPackage)EPackage.Registry.INSTANCE.getEPackage(CapellacommonPackage.eNS_URI);\n\t\tInformationPackage theInformationPackage = (InformationPackage)EPackage.Registry.INSTANCE.getEPackage(InformationPackage.eNS_URI);\n\t\tCommunicationPackage theCommunicationPackage = (CommunicationPackage)EPackage.Registry.INSTANCE.getEPackage(CommunicationPackage.eNS_URI);\n\t\tModellingcorePackage theModellingcorePackage = (ModellingcorePackage)EPackage.Registry.INSTANCE.getEPackage(ModellingcorePackage.eNS_URI);\n\t\tEpbsPackage theEpbsPackage = (EpbsPackage)EPackage.Registry.INSTANCE.getEPackage(EpbsPackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tblockArchitecturePkgEClass.getESuperTypes().add(theCapellacorePackage.getModellingArchitecturePkg());\n\t\tblockArchitectureEClass.getESuperTypes().add(theFaPackage.getAbstractFunctionalArchitecture());\n\t\tblockEClass.getESuperTypes().add(theCapellacorePackage.getModellingBlock());\n\t\tblockEClass.getESuperTypes().add(theFaPackage.getAbstractFunctionalBlock());\n\t\tcomponentArchitectureEClass.getESuperTypes().add(this.getBlockArchitecture());\n\t\tcomponentEClass.getESuperTypes().add(this.getBlock());\n\t\tcomponentEClass.getESuperTypes().add(theInformationPackage.getPartitionableElement());\n\t\tcomponentEClass.getESuperTypes().add(this.getInterfaceAllocator());\n\t\tcomponentEClass.getESuperTypes().add(theCommunicationPackage.getCommunicationLinkExchanger());\n\t\tabstractActorEClass.getESuperTypes().add(this.getComponent());\n\t\tabstractActorEClass.getESuperTypes().add(theCapellacommonPackage.getCapabilityRealizationInvolvedElement());\n\t\tpartEClass.getESuperTypes().add(theInformationPackage.getPartition());\n\t\tpartEClass.getESuperTypes().add(theModellingcorePackage.getInformationsExchanger());\n\t\tpartEClass.getESuperTypes().add(this.getDeployableElement());\n\t\tpartEClass.getESuperTypes().add(this.getDeploymentTarget());\n\t\tpartEClass.getESuperTypes().add(this.getAbstractPathInvolvedElement());\n\t\tarchitectureAllocationEClass.getESuperTypes().add(theCapellacorePackage.getAllocation());\n\t\tcomponentAllocationEClass.getESuperTypes().add(theCapellacorePackage.getAllocation());\n\t\tsystemComponentEClass.getESuperTypes().add(this.getComponent());\n\t\tsystemComponentEClass.getESuperTypes().add(theCapellacommonPackage.getCapabilityRealizationInvolvedElement());\n\t\tinterfacePkgEClass.getESuperTypes().add(theCommunicationPackage.getMessageReferencePkg());\n\t\tinterfacePkgEClass.getESuperTypes().add(theCapellacorePackage.getAbstractDependenciesPkg());\n\t\tinterfacePkgEClass.getESuperTypes().add(theCapellacorePackage.getAbstractExchangeItemPkg());\n\t\tinterfaceEClass.getESuperTypes().add(theCapellacorePackage.getGeneralClass());\n\t\tinterfaceEClass.getESuperTypes().add(this.getInterfaceAllocator());\n\t\tinterfaceImplementationEClass.getESuperTypes().add(theCapellacorePackage.getRelationship());\n\t\tinterfaceUseEClass.getESuperTypes().add(theCapellacorePackage.getRelationship());\n\t\tprovidedInterfaceLinkEClass.getESuperTypes().add(theCapellacorePackage.getRelationship());\n\t\trequiredInterfaceLinkEClass.getESuperTypes().add(theCapellacorePackage.getRelationship());\n\t\tinterfaceAllocationEClass.getESuperTypes().add(theCapellacorePackage.getAllocation());\n\t\tinterfaceAllocatorEClass.getESuperTypes().add(theCapellacorePackage.getCapellaElement());\n\t\tactorCapabilityRealizationInvolvementEClass.getESuperTypes().add(theCapellacommonPackage.getCapabilityRealizationInvolvement());\n\t\tsystemComponentCapabilityRealizationInvolvementEClass.getESuperTypes().add(theCapellacommonPackage.getCapabilityRealizationInvolvement());\n\t\tcomponentContextEClass.getESuperTypes().add(this.getComponent());\n\t\texchangeItemAllocationEClass.getESuperTypes().add(theCapellacorePackage.getRelationship());\n\t\texchangeItemAllocationEClass.getESuperTypes().add(theInformationPackage.getAbstractEventOperation());\n\t\texchangeItemAllocationEClass.getESuperTypes().add(theModellingcorePackage.getFinalizableElement());\n\t\tdeployableElementEClass.getESuperTypes().add(theCapellacorePackage.getNamedElement());\n\t\tdeploymentTargetEClass.getESuperTypes().add(theCapellacorePackage.getNamedElement());\n\t\tabstractDeploymentLinkEClass.getESuperTypes().add(theCapellacorePackage.getRelationship());\n\t\tabstractPathInvolvedElementEClass.getESuperTypes().add(theCapellacorePackage.getInvolvedElement());\n\t\tabstractPhysicalArtifactEClass.getESuperTypes().add(theCapellacorePackage.getCapellaElement());\n\t\tabstractPhysicalLinkEndEClass.getESuperTypes().add(theCapellacorePackage.getCapellaElement());\n\t\tabstractPhysicalPathLinkEClass.getESuperTypes().add(theFaPackage.getComponentExchangeAllocator());\n\t\tphysicalLinkEClass.getESuperTypes().add(this.getAbstractPhysicalPathLink());\n\t\tphysicalLinkEClass.getESuperTypes().add(this.getAbstractPhysicalArtifact());\n\t\tphysicalLinkEClass.getESuperTypes().add(this.getAbstractPathInvolvedElement());\n\t\tphysicalLinkCategoryEClass.getESuperTypes().add(theCapellacorePackage.getNamedElement());\n\t\tphysicalLinkEndEClass.getESuperTypes().add(this.getAbstractPhysicalLinkEnd());\n\t\tphysicalLinkRealizationEClass.getESuperTypes().add(theCapellacorePackage.getAllocation());\n\t\tphysicalPathEClass.getESuperTypes().add(theCapellacorePackage.getNamedElement());\n\t\tphysicalPathEClass.getESuperTypes().add(theFaPackage.getComponentExchangeAllocator());\n\t\tphysicalPathEClass.getESuperTypes().add(this.getAbstractPathInvolvedElement());\n\t\tphysicalPathEClass.getESuperTypes().add(theCapellacorePackage.getInvolverElement());\n\t\tphysicalPathInvolvementEClass.getESuperTypes().add(theCapellacorePackage.getInvolvement());\n\t\tphysicalPathReferenceEClass.getESuperTypes().add(this.getPhysicalPathInvolvement());\n\t\tphysicalPathRealizationEClass.getESuperTypes().add(theCapellacorePackage.getAllocation());\n\t\tphysicalPortEClass.getESuperTypes().add(theInformationPackage.getPartition());\n\t\tphysicalPortEClass.getESuperTypes().add(theInformationPackage.getPort());\n\t\tphysicalPortEClass.getESuperTypes().add(this.getAbstractPhysicalArtifact());\n\t\tphysicalPortEClass.getESuperTypes().add(theModellingcorePackage.getInformationsExchanger());\n\t\tphysicalPortEClass.getESuperTypes().add(this.getAbstractPhysicalLinkEnd());\n\t\tphysicalPortRealizationEClass.getESuperTypes().add(theCapellacorePackage.getAllocation());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(blockArchitecturePkgEClass, BlockArchitecturePkg.class, \"BlockArchitecturePkg\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(blockArchitectureEClass, BlockArchitecture.class, \"BlockArchitecture\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getBlockArchitecture_OwnedRequirementPkgs(), theRequirementPackage.getRequirementsPkg(), null, \"ownedRequirementPkgs\", null, 0, -1, BlockArchitecture.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlockArchitecture_OwnedAbstractCapabilityPkg(), theCapellacommonPackage.getAbstractCapabilityPkg(), null, \"ownedAbstractCapabilityPkg\", null, 0, 1, BlockArchitecture.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlockArchitecture_OwnedInterfacePkg(), this.getInterfacePkg(), null, \"ownedInterfacePkg\", null, 0, 1, BlockArchitecture.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlockArchitecture_OwnedDataPkg(), theInformationPackage.getDataPkg(), null, \"ownedDataPkg\", null, 0, 1, BlockArchitecture.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlockArchitecture_ProvisionedArchitectureAllocations(), this.getArchitectureAllocation(), this.getArchitectureAllocation_AllocatingArchitecture(), \"provisionedArchitectureAllocations\", null, 0, -1, BlockArchitecture.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlockArchitecture_ProvisioningArchitectureAllocations(), this.getArchitectureAllocation(), this.getArchitectureAllocation_AllocatedArchitecture(), \"provisioningArchitectureAllocations\", null, 0, -1, BlockArchitecture.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlockArchitecture_AllocatedArchitectures(), this.getBlockArchitecture(), null, \"allocatedArchitectures\", null, 0, -1, BlockArchitecture.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlockArchitecture_AllocatingArchitectures(), this.getBlockArchitecture(), null, \"allocatingArchitectures\", null, 0, -1, BlockArchitecture.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(blockEClass, Block.class, \"Block\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getBlock_OwnedAbstractCapabilityPkg(), theCapellacommonPackage.getAbstractCapabilityPkg(), null, \"ownedAbstractCapabilityPkg\", null, 0, 1, Block.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlock_OwnedInterfacePkg(), this.getInterfacePkg(), null, \"ownedInterfacePkg\", null, 0, 1, Block.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlock_OwnedDataPkg(), theInformationPackage.getDataPkg(), null, \"ownedDataPkg\", null, 0, 1, Block.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBlock_OwnedStateMachines(), theCapellacommonPackage.getStateMachine(), null, \"ownedStateMachines\", null, 0, -1, Block.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(componentArchitectureEClass, ComponentArchitecture.class, \"ComponentArchitecture\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(componentEClass, Component.class, \"Component\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getComponent_OwnedInterfaceUses(), this.getInterfaceUse(), null, \"ownedInterfaceUses\", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_UsedInterfaceLinks(), this.getInterfaceUse(), this.getInterfaceUse_InterfaceUser(), \"usedInterfaceLinks\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_UsedInterfaces(), this.getInterface(), this.getInterface_UserComponents(), \"usedInterfaces\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_OwnedInterfaceImplementations(), this.getInterfaceImplementation(), null, \"ownedInterfaceImplementations\", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_ImplementedInterfaceLinks(), this.getInterfaceImplementation(), this.getInterfaceImplementation_InterfaceImplementor(), \"implementedInterfaceLinks\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_ImplementedInterfaces(), this.getInterface(), this.getInterface_ImplementorComponents(), \"implementedInterfaces\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_ProvisionedComponentAllocations(), this.getComponentAllocation(), this.getComponentAllocation_AllocatingComponent(), \"provisionedComponentAllocations\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_ProvisioningComponentAllocations(), this.getComponentAllocation(), this.getComponentAllocation_AllocatedComponent(), \"provisioningComponentAllocations\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_AllocatedComponents(), this.getComponent(), null, \"allocatedComponents\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_AllocatingComponents(), this.getComponent(), null, \"allocatingComponents\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_ProvidedInterfaces(), this.getInterface(), null, \"providedInterfaces\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_RequiredInterfaces(), this.getInterface(), null, \"requiredInterfaces\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_ContainedComponentPorts(), theFaPackage.getComponentPort(), null, \"containedComponentPorts\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_ContainedParts(), this.getPart(), null, \"containedParts\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_ContainedPhysicalPorts(), this.getPhysicalPort(), null, \"containedPhysicalPorts\", null, 0, -1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_OwnedPhysicalPath(), this.getPhysicalPath(), null, \"ownedPhysicalPath\", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_OwnedPhysicalLinks(), this.getPhysicalLink(), null, \"ownedPhysicalLinks\", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponent_OwnedPhysicalLinkCategories(), this.getPhysicalLinkCategory(), null, \"ownedPhysicalLinkCategories\", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(abstractActorEClass, AbstractActor.class, \"AbstractActor\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(partEClass, Part.class, \"Part\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPart_ProvidedInterfaces(), this.getInterface(), null, \"providedInterfaces\", null, 0, -1, Part.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPart_RequiredInterfaces(), this.getInterface(), null, \"requiredInterfaces\", null, 0, -1, Part.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPart_OwnedDeploymentLinks(), this.getAbstractDeploymentLink(), null, \"ownedDeploymentLinks\", null, 0, -1, Part.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPart_DeployedParts(), this.getPart(), null, \"deployedParts\", null, 0, -1, Part.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPart_DeployingParts(), this.getPart(), null, \"deployingParts\", null, 0, -1, Part.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPart_OwnedAbstractType(), theModellingcorePackage.getAbstractType(), null, \"ownedAbstractType\", null, 0, 1, Part.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPart_Value(), ecorePackage.getEInt(), \"value\", null, 0, 1, Part.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPart_MaxValue(), ecorePackage.getEInt(), \"maxValue\", null, 0, 1, Part.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPart_MinValue(), ecorePackage.getEInt(), \"minValue\", null, 0, 1, Part.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPart_CurrentMass(), ecorePackage.getEInt(), \"currentMass\", null, 0, 1, Part.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\taddEOperation(partEClass, ecorePackage.getEBoolean(), \"isOverhead\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\taddEOperation(partEClass, ecorePackage.getEBoolean(), \"isSatured\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\taddEOperation(partEClass, ecorePackage.getEInt(), \"computeMass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\taddEOperation(partEClass, null, \"print\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(architectureAllocationEClass, ArchitectureAllocation.class, \"ArchitectureAllocation\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getArchitectureAllocation_AllocatedArchitecture(), this.getBlockArchitecture(), this.getBlockArchitecture_ProvisioningArchitectureAllocations(), \"allocatedArchitecture\", null, 1, 1, ArchitectureAllocation.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getArchitectureAllocation_AllocatingArchitecture(), this.getBlockArchitecture(), this.getBlockArchitecture_ProvisionedArchitectureAllocations(), \"allocatingArchitecture\", null, 1, 1, ArchitectureAllocation.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(componentAllocationEClass, ComponentAllocation.class, \"ComponentAllocation\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getComponentAllocation_AllocatedComponent(), this.getComponent(), this.getComponent_ProvisioningComponentAllocations(), \"allocatedComponent\", null, 0, 1, ComponentAllocation.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getComponentAllocation_AllocatingComponent(), this.getComponent(), this.getComponent_ProvisionedComponentAllocations(), \"allocatingComponent\", null, 0, 1, ComponentAllocation.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(systemComponentEClass, SystemComponent.class, \"SystemComponent\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getSystemComponent_DataComponent(), ecorePackage.getEBoolean(), \"dataComponent\", null, 0, 1, SystemComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSystemComponent_DataType(), theCapellacorePackage.getClassifier(), null, \"dataType\", null, 0, -1, SystemComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSystemComponent_ParticipationsInCapabilityRealizations(), this.getSystemComponentCapabilityRealizationInvolvement(), null, \"participationsInCapabilityRealizations\", null, 0, -1, SystemComponent.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(interfacePkgEClass, InterfacePkg.class, \"InterfacePkg\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getInterfacePkg_OwnedInterfaces(), this.getInterface(), null, \"ownedInterfaces\", null, 0, -1, InterfacePkg.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterfacePkg_OwnedInterfacePkgs(), this.getInterfacePkg(), null, \"ownedInterfacePkgs\", null, 0, -1, InterfacePkg.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(interfaceEClass, Interface.class, \"Interface\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getInterface_Mechanism(), ecorePackage.getEString(), \"mechanism\", null, 0, 1, Interface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getInterface_Structural(), ecorePackage.getEBoolean(), \"structural\", \"true\", 0, 1, Interface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_ImplementorComponents(), this.getComponent(), this.getComponent_ImplementedInterfaces(), \"implementorComponents\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_UserComponents(), this.getComponent(), this.getComponent_UsedInterfaces(), \"userComponents\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_InterfaceImplementations(), this.getInterfaceImplementation(), null, \"interfaceImplementations\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_InterfaceUses(), this.getInterfaceUse(), null, \"interfaceUses\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_ProvisioningInterfaceAllocations(), this.getInterfaceAllocation(), this.getInterfaceAllocation_AllocatedInterface(), \"provisioningInterfaceAllocations\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_AllocatingInterfaces(), this.getInterface(), null, \"allocatingInterfaces\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_AllocatingComponents(), this.getComponent(), null, \"allocatingComponents\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_ExchangeItems(), theInformationPackage.getExchangeItem(), null, \"exchangeItems\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_OwnedExchangeItemAllocations(), this.getExchangeItemAllocation(), null, \"ownedExchangeItemAllocations\", null, 0, -1, Interface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_RequiringComponents(), this.getComponent(), null, \"requiringComponents\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_RequiringComponentPorts(), theFaPackage.getComponentPort(), null, \"requiringComponentPorts\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_ProvidingComponents(), this.getComponent(), null, \"providingComponents\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_ProvidingComponentPorts(), theFaPackage.getComponentPort(), null, \"providingComponentPorts\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_RealizingLogicalInterfaces(), this.getInterface(), null, \"realizingLogicalInterfaces\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_RealizedContextInterfaces(), this.getInterface(), null, \"realizedContextInterfaces\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_RealizingPhysicalInterfaces(), this.getInterface(), null, \"realizingPhysicalInterfaces\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterface_RealizedLogicalInterfaces(), this.getInterface(), null, \"realizedLogicalInterfaces\", null, 0, -1, Interface.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(interfaceImplementationEClass, InterfaceImplementation.class, \"InterfaceImplementation\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getInterfaceImplementation_InterfaceImplementor(), this.getComponent(), this.getComponent_ImplementedInterfaceLinks(), \"interfaceImplementor\", null, 1, 1, InterfaceImplementation.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterfaceImplementation_ImplementedInterface(), this.getInterface(), null, \"implementedInterface\", null, 1, 1, InterfaceImplementation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(interfaceUseEClass, InterfaceUse.class, \"InterfaceUse\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getInterfaceUse_InterfaceUser(), this.getComponent(), this.getComponent_UsedInterfaceLinks(), \"interfaceUser\", null, 1, 1, InterfaceUse.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterfaceUse_UsedInterface(), this.getInterface(), null, \"usedInterface\", null, 1, 1, InterfaceUse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(providedInterfaceLinkEClass, ProvidedInterfaceLink.class, \"ProvidedInterfaceLink\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getProvidedInterfaceLink_Interface(), this.getInterface(), null, \"interface\", null, 1, 1, ProvidedInterfaceLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(requiredInterfaceLinkEClass, RequiredInterfaceLink.class, \"RequiredInterfaceLink\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getRequiredInterfaceLink_Interface(), this.getInterface(), null, \"interface\", null, 1, 1, RequiredInterfaceLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(interfaceAllocationEClass, InterfaceAllocation.class, \"InterfaceAllocation\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getInterfaceAllocation_AllocatedInterface(), this.getInterface(), this.getInterface_ProvisioningInterfaceAllocations(), \"allocatedInterface\", null, 1, 1, InterfaceAllocation.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterfaceAllocation_AllocatingInterfaceAllocator(), this.getInterfaceAllocator(), this.getInterfaceAllocator_ProvisionedInterfaceAllocations(), \"allocatingInterfaceAllocator\", null, 1, 1, InterfaceAllocation.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED);\n\n\t\tinitEClass(interfaceAllocatorEClass, InterfaceAllocator.class, \"InterfaceAllocator\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getInterfaceAllocator_OwnedInterfaceAllocations(), this.getInterfaceAllocation(), null, \"ownedInterfaceAllocations\", null, 0, -1, InterfaceAllocator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterfaceAllocator_ProvisionedInterfaceAllocations(), this.getInterfaceAllocation(), this.getInterfaceAllocation_AllocatingInterfaceAllocator(), \"provisionedInterfaceAllocations\", null, 0, -1, InterfaceAllocator.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInterfaceAllocator_AllocatedInterfaces(), this.getInterface(), null, \"allocatedInterfaces\", null, 0, -1, InterfaceAllocator.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(actorCapabilityRealizationInvolvementEClass, ActorCapabilityRealizationInvolvement.class, \"ActorCapabilityRealizationInvolvement\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(systemComponentCapabilityRealizationInvolvementEClass, SystemComponentCapabilityRealizationInvolvement.class, \"SystemComponentCapabilityRealizationInvolvement\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(componentContextEClass, ComponentContext.class, \"ComponentContext\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(exchangeItemAllocationEClass, ExchangeItemAllocation.class, \"ExchangeItemAllocation\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getExchangeItemAllocation_SendProtocol(), theCommunicationPackage.getCommunicationLinkProtocol(), \"sendProtocol\", null, 0, 1, ExchangeItemAllocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExchangeItemAllocation_ReceiveProtocol(), theCommunicationPackage.getCommunicationLinkProtocol(), \"receiveProtocol\", null, 0, 1, ExchangeItemAllocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getExchangeItemAllocation_AllocatedItem(), theInformationPackage.getExchangeItem(), null, \"allocatedItem\", null, 0, 1, ExchangeItemAllocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getExchangeItemAllocation_AllocatingInterface(), this.getInterface(), null, \"allocatingInterface\", null, 0, 1, ExchangeItemAllocation.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(deployableElementEClass, DeployableElement.class, \"DeployableElement\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDeployableElement_DeployingLinks(), this.getAbstractDeploymentLink(), null, \"deployingLinks\", null, 0, -1, DeployableElement.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(deploymentTargetEClass, DeploymentTarget.class, \"DeploymentTarget\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDeploymentTarget_DeploymentLinks(), this.getAbstractDeploymentLink(), null, \"deploymentLinks\", null, 0, -1, DeploymentTarget.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(abstractDeploymentLinkEClass, AbstractDeploymentLink.class, \"AbstractDeploymentLink\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAbstractDeploymentLink_DeployedElement(), this.getDeployableElement(), null, \"deployedElement\", null, 1, 1, AbstractDeploymentLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getAbstractDeploymentLink_Location(), this.getDeploymentTarget(), null, \"location\", null, 1, 1, AbstractDeploymentLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(abstractPathInvolvedElementEClass, AbstractPathInvolvedElement.class, \"AbstractPathInvolvedElement\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(abstractPhysicalArtifactEClass, AbstractPhysicalArtifact.class, \"AbstractPhysicalArtifact\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAbstractPhysicalArtifact_AllocatorConfigurationItems(), theEpbsPackage.getConfigurationItem(), theEpbsPackage.getConfigurationItem_AllocatedPhysicalArtifacts(), \"allocatorConfigurationItems\", null, 0, -1, AbstractPhysicalArtifact.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(abstractPhysicalLinkEndEClass, AbstractPhysicalLinkEnd.class, \"AbstractPhysicalLinkEnd\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAbstractPhysicalLinkEnd_InvolvedLinks(), this.getPhysicalLink(), null, \"involvedLinks\", null, 0, -1, AbstractPhysicalLinkEnd.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(abstractPhysicalPathLinkEClass, AbstractPhysicalPathLink.class, \"AbstractPhysicalPathLink\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(physicalLinkEClass, PhysicalLink.class, \"PhysicalLink\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPhysicalLink_LinkEnds(), this.getAbstractPhysicalLinkEnd(), null, \"linkEnds\", null, 2, 2, PhysicalLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLink_OwnedComponentExchangeFunctionalExchangeAllocations(), theFaPackage.getComponentExchangeFunctionalExchangeAllocation(), null, \"ownedComponentExchangeFunctionalExchangeAllocations\", null, 0, -1, PhysicalLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLink_OwnedPhysicalLinkEnds(), this.getPhysicalLinkEnd(), null, \"ownedPhysicalLinkEnds\", null, 0, -1, PhysicalLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLink_OwnedPhysicalLinkRealizations(), this.getPhysicalLinkRealization(), null, \"ownedPhysicalLinkRealizations\", null, 0, -1, PhysicalLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLink_Categories(), this.getPhysicalLinkCategory(), this.getPhysicalLinkCategory_Links(), \"categories\", null, 0, -1, PhysicalLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLink_SourcePhysicalPort(), this.getPhysicalPort(), null, \"sourcePhysicalPort\", null, 0, 1, PhysicalLink.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLink_TargetPhysicalPort(), this.getPhysicalPort(), null, \"targetPhysicalPort\", null, 0, 1, PhysicalLink.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLink_RealizedPhysicalLinks(), this.getPhysicalLink(), null, \"realizedPhysicalLinks\", null, 0, -1, PhysicalLink.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLink_RealizingPhysicalLinks(), this.getPhysicalLink(), null, \"realizingPhysicalLinks\", null, 0, -1, PhysicalLink.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(physicalLinkCategoryEClass, PhysicalLinkCategory.class, \"PhysicalLinkCategory\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPhysicalLinkCategory_Links(), this.getPhysicalLink(), this.getPhysicalLink_Categories(), \"links\", null, 0, -1, PhysicalLinkCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(physicalLinkEndEClass, PhysicalLinkEnd.class, \"PhysicalLinkEnd\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPhysicalLinkEnd_Port(), this.getPhysicalPort(), null, \"port\", null, 0, 1, PhysicalLinkEnd.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalLinkEnd_Part(), this.getPart(), null, \"part\", null, 0, 1, PhysicalLinkEnd.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(physicalLinkRealizationEClass, PhysicalLinkRealization.class, \"PhysicalLinkRealization\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(physicalPathEClass, PhysicalPath.class, \"PhysicalPath\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPhysicalPath_InvolvedLinks(), this.getAbstractPhysicalPathLink(), null, \"involvedLinks\", null, 0, -1, PhysicalPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPath_OwnedPhysicalPathInvolvements(), this.getPhysicalPathInvolvement(), null, \"ownedPhysicalPathInvolvements\", null, 0, -1, PhysicalPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPath_FirstPhysicalPathInvolvements(), this.getPhysicalPathInvolvement(), null, \"firstPhysicalPathInvolvements\", null, 0, -1, PhysicalPath.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPath_OwnedPhysicalPathRealizations(), this.getPhysicalPathRealization(), null, \"ownedPhysicalPathRealizations\", null, 0, -1, PhysicalPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPath_RealizedPhysicalPaths(), this.getPhysicalPath(), null, \"realizedPhysicalPaths\", null, 0, -1, PhysicalPath.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPath_RealizingPhysicalPaths(), this.getPhysicalPath(), null, \"realizingPhysicalPaths\", null, 0, -1, PhysicalPath.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(physicalPathInvolvementEClass, PhysicalPathInvolvement.class, \"PhysicalPathInvolvement\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPhysicalPathInvolvement_NextInvolvements(), this.getPhysicalPathInvolvement(), null, \"nextInvolvements\", null, 0, -1, PhysicalPathInvolvement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPathInvolvement_PreviousInvolvements(), this.getPhysicalPathInvolvement(), null, \"previousInvolvements\", null, 0, -1, PhysicalPathInvolvement.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPathInvolvement_InvolvedElement(), this.getAbstractPathInvolvedElement(), null, \"involvedElement\", null, 0, 1, PhysicalPathInvolvement.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPathInvolvement_InvolvedComponent(), this.getComponent(), null, \"involvedComponent\", null, 0, 1, PhysicalPathInvolvement.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(physicalPathReferenceEClass, PhysicalPathReference.class, \"PhysicalPathReference\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPhysicalPathReference_ReferencedPhysicalPath(), this.getPhysicalPath(), null, \"referencedPhysicalPath\", null, 0, 1, PhysicalPathReference.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(physicalPathRealizationEClass, PhysicalPathRealization.class, \"PhysicalPathRealization\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(physicalPortEClass, PhysicalPort.class, \"PhysicalPort\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPhysicalPort_OwnedComponentPortAllocations(), theFaPackage.getComponentPortAllocation(), null, \"ownedComponentPortAllocations\", null, 0, -1, PhysicalPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPort_OwnedPhysicalPortRealizations(), this.getPhysicalPortRealization(), null, \"ownedPhysicalPortRealizations\", null, 0, -1, PhysicalPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPort_AllocatedComponentPorts(), theFaPackage.getComponentPort(), theFaPackage.getComponentPort_AllocatingPhysicalPorts(), \"allocatedComponentPorts\", null, 0, -1, PhysicalPort.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPort_RealizedPhysicalPorts(), this.getPhysicalPort(), null, \"realizedPhysicalPorts\", null, 0, -1, PhysicalPort.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPhysicalPort_RealizingPhysicalPorts(), this.getPhysicalPort(), null, \"realizingPhysicalPorts\", null, 0, -1, PhysicalPort.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(physicalPortRealizationEClass, PhysicalPortRealization.class, \"PhysicalPortRealization\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// http://www.polarsys.org/kitalpha/dsl/2007/dslfactory\n\t\tcreateDslfactoryAnnotations();\n\t\t// http://www.polarsys.org/kitalpha/ecore/documentation\n\t\tcreateDocumentationAnnotations();\n\t\t// http://www.polarsys.org/capella/semantic\n\t\tcreateSemanticAnnotations();\n\t\t// http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping\n\t\tcreateMappingAnnotations();\n\t\t// http://www.polarsys.org/capella/2007/BusinessInformation\n\t\tcreateBusinessInformationAnnotations();\n\t\t// http://www.polarsys.org/capella/2007/UML2Mapping\n\t\tcreateUML2MappingAnnotations();\n\t\t// http://www.polarsys.org/capella/2007/ImpactAnalysis/Segment\n\t\tcreateSegmentAnnotations();\n\t\t// http://www.polarsys.org/capella/derived\n\t\tcreateDerivedAnnotations();\n\t\t// aspect\n\t\tcreateAspectAnnotations();\n\t\t// http://www.polarsys.org/capella/2007/ImpactAnalysis/Ignore\n\t\tcreateIgnoreAnnotations();\n\t}", "@Override\n public void load() {\n }", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public static void preLoad() {\n\t\tserviceClasses.clear();\n\t\tloadGroups(CLASS_FOLDER, null, serviceClasses);\n\t\tTracer.trace(serviceClasses.size()\n\t\t\t\t+ \" java class names loaded as services.\");\n\t\t/*\n\t\t * clean and pre-load if required\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.cachedOnes != null) {\n\t\t\t\taType.cachedOnes.clear();\n\t\t\t}\n\t\t\tif (aType.preLoaded) {\n\t\t\t\taType.loadAll();\n\t\t\t}\n\t\t}\n\t}", "private void genLoadVectorCode(String name, String classSimpleName, boolean primitive, int dimensions, String cppType) {\n int tabLevel = 1;\n String tabs = tabs(tabLevel);\n String prevVVarName = \"\";\n char prevLoopVarName = ' ';\n\n for (int i = 1; i <= dimensions; i++) {\n int level = dimensions + 1 - i;\n String vVarName = \"v\" + i + \"_\" + name;\n String vectorType = vectorCppTypeName(level, cppType);\n String lenVarName = vVarName + \"_length\";\n char loopVarName = (char) ('i' + (i - 1));\n\n if (i == 1) {\n load.println(\"\\t// \" + vectorType + \" this->\" + name);\n genDebug(load, \"\\tstd::cout << \\\"load \" + vectorType + \" \" + name + \"\\\" << std::endl;\");\n }\n\n load.println(tabs + \"int \" + lenVarName + \";\");\n\n load.println();\n load.println(tabs + INSTREAM_VAR_NAME + \".readInt( \" + lenVarName + \" );\");\n\n genDebugDumpValue(load, lenVarName, tabs);\n\n if (i > 1) {\n // inside a for loop, inner vector variable initialized by\n // dereferencing iterator\n load.println(tabs + vectorType + \"& \" + vVarName + \" = \" + prevVVarName + \".at( \" + prevLoopVarName + \" );\");\n } else {\n // outside for loop, inner vector variable initialized to member\n // variable\n load.println(tabs + vectorType + \"& \" + vVarName + \" = this->\" + name + \";\");\n }\n\n if (i <= dimensions - 1) {\n // initialize & pre-allocate the vector at this level\n load.println(tabs + vVarName + \" = \" + vectorType + \"( \" + lenVarName + \" );\");\n } else {\n // initialize & pre-allocate the vector at this level\n load.println(tabs + vVarName + \".reserve( \" + lenVarName + \" );\");\n }\n\n load.println();\n load.println(tabs + \"for( int \" + loopVarName + \" = 0; \" + loopVarName + \" < \" + lenVarName + \"; \" + loopVarName\n + \"++ ){\");\n\n tabLevel++;\n tabs = tabs(tabLevel);\n\n if (i == dimensions) {\n if (primitive || classSimpleName.equals(\"String\")) {\n load.println(tabs + cppType + \" v\" + i + \";\");\n load.println(tabs + genReadCode(\"v\" + i, cppType(classSimpleName)));\n load.println(tabs + vVarName + \".push_back( v\" + i + \" );\");\n } else {\n load.println(tabs + cppType + \" v\" + i + \";\");\n load.println(tabs + \"v\" + i + \".load( \" + INSTREAM_VAR_NAME + \" );\");\n load.println(tabs + vVarName + \".push_back( v\" + i + \" );\");\n }\n }\n prevVVarName = vVarName;\n prevLoopVarName = loopVarName;\n }\n for (int i = 0; i < dimensions; i++) {\n tabLevel--;\n tabs = tabs(tabLevel);\n load.println(tabs + \"}\");\n }\n }", "private <T> void loadFlatFile(Class<T> clazz, String flatFileName)\n\t\t\tthrows ApplicationException {\n\n\t\tlog.info(String.format(\"Loading file %s to object type %s\",\n\t\t\t\tflatFileName, clazz.toString()));\n\t\t\n\t\tDbInserter dbi = getDbInserter();\n\t\t\n\t\tFixedFormatManager manager = new FixedFormatManagerImpl();\n\t\tBufferedReader br = null;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tInputStream ins = this.getClass().getClassLoader()\n\t\t\t\t\t.getResourceAsStream(flatFileName);\n\t\t\tbr = new BufferedReader(new InputStreamReader(ins));\n\t\t\tString record;\n\n\t\t\tlog.info(\"Reading, inserting records.\");\n\t\t\twhile (null != (record = br.readLine())) {\n\t\t\t\tDomain obj = (Domain) manager.load(clazz, record);\n\t\t\t\t//log.info(String.format(\"Record %s\", obj));\n\t\t\t\t//log.info(String.format(\"%s: key %d\", obj.getRecType(), obj.getDomainId()));\n\t\t\t\t\n\t\t\t\tdbi.insert(obj);\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tlog.info(String.format(\"Read %d records from object.\", count,\n\t\t\t\t\tclazz.toString()));\n\t\t\t\n\t\t\tdbi.flushToIndex();\n\n\t\t} catch (FixedFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (null != br) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void load() {\n structure = SpigotUtils.structBetweenTwoLocations(pos1, pos2, material);\n }", "public static void loadResources(DataBase _d, AbstractAtomicIntegerCoreAdd _perCentLoading, SexListInt _sexList) {\n\n _d.initializeMembers();\n\t\tfor (EntryCust<String,String> c: Cst.cs().entryList()) {\n short cle_ = (short) NumberUtil.parseInt(c.getKey());\n _d.getHm().addEntry(cle_, c.getValue());\n }\n for (EntryCust<String,String> c: Cst.ct().entryList()) {\n StringList infos_ = StringUtil.splitChars(c.getValue(), TAB_CHAR);\n short cle_ = (short) NumberUtil.parseInt(c.getKey());\n _d.getTm().addEntry(cle_, infos_.first().trim());\n LgInt price_ = new LgInt(infos_.last().trim());\n _d.getTmPrice().addEntry(cle_, price_);\n }\n _d.setFrontHeros(new ImageHeroKeys());\n StringMap<String> heFr_ = HeFront.im();\n for (EntryCust<String,String> e:heFr_.entryList()){\n StringList keyStrings_ = StringUtil.splitStrings(e.getKey(),\n SEPARATOR_KEY_HEROS);\n EnvironmentType env_ = getEnvByName(keyStrings_.first());\n Sex sex_ = getSexByName(keyStrings_.last(),_sexList);\n _d.getFrontHeros().addEntry(new ImageHeroKey(env_, sex_),\n BaseSixtyFourUtil.getImageByString(e.getValue()));\n }\n _d.setBackHeros(new ImageHeroKeys());\n StringMap<String> heBk_ = HeBack.im();\n for (EntryCust<String,String> e:heBk_.entryList()) {\n StringList keyStrings_ = StringUtil.splitStrings(e.getKey(),\n SEPARATOR_KEY_HEROS);\n EnvironmentType env_ = getEnvByName(keyStrings_\n .first());\n Sex sex_ = getSexByName(keyStrings_.last(),_sexList);\n _d.getBackHeros().addEntry(new ImageHeroKey(env_, sex_),\n BaseSixtyFourUtil.getImageByString(e.getValue()));\n }\n _d.setOverWorldHeros(new ImageHeroKeys());\n StringMap<String> heMi_ = HeMini.im();\n for (EntryCust<String,String> e:heMi_.entryList()) {\n StringList keyStrings_ = StringUtil.splitStrings(e.getKey(),\n SEPARATOR_KEY_HEROS);\n EnvironmentType env_ = getEnvByName(keyStrings_\n .first());\n Direction dir_ = Direction.getDirectionByName(keyStrings_\n .get(IndexConstants.SECOND_INDEX));\n Sex sex_ = getSexByName(keyStrings_.last(),_sexList);\n _d.getOverWorldHeros().addEntry(new ImageHeroKey(env_, dir_, sex_),\n BaseSixtyFourUtil.getImageByString(e.getValue()));\n }\n _d.setImageTmHm(BaseSixtyFourUtil.getImageByString(ImHmTm.im()));\n _d.setStorage(BaseSixtyFourUtil.getImageByString(ImStorage.im()));\n _d.setCombos(CoInit.co());\n _d.completeMembersCombos();\n _d.setMap(Dm.map());\n// _perCentLoading.addPercent(delta_);\n _d.setConstNum(new StringMap<Rate>());\n// StringList lines_;\n //= StringUtil.splitChars(cts_.getVal(CONST_NUM),\n // RETURN_LINE_CHAR);\n _d.getConstNum().addAllEntries(Cst.cn());\n// for (EntryCust<String, Rate> l : Cst.cn().entryList()) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// _d.getConstNum().addEntry(infos_.first(), new Rate(infos_.last()));\n// }\n\n// lines_ = StringUtil.splitChars(cts_.getVal(CONST_NOT_NUM),\n// RETURN_LINE_CHAR);\n for (EntryCust<String, String> l : Cst.cnn().entryList()) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n String key_ = l.getKey();\n String value_ = l.getValue();\n _d.initValue(key_, value_);\n\n }\n _d.setTableTypes(new TypesDuos());\n// StringList linesTableTypes_ = StringUtil.splitChars(cts_.getVal(TABLE_TYPES),\n// RETURN_LINE_CHAR);\n// String head_ = linesTableTypes_.first();\n// StringList typesOff_ = StringUtil.splitChars(head_, TAB_CHAR);\n// typesOff_.removeString(DataBase.EMPTY_STRING);\n// StringList typesDef_ = new StringList();\n// for (String l : linesTableTypes_.leftMinusOne(linesTableTypes_.size())) {\n// typesDef_.add(StringUtil.getFirstToken(l, TAB_CHAR));\n// }\n// typesDef_.removeString(DataBase.EMPTY_STRING);\n _d.getTableTypes().getList().addAllElts(Cst.eff().getList());\n// for (String pkType_ : typesDef_) {\n//\n// String l_ = getElements(linesTableTypes_, pkType_).first();\n// StringList infos_ = StringUtil.splitChars(l_, TAB_CHAR);\n// infos_.removeString(pkType_);\n// int i_ = 0;\n// for (String damageType_ : typesOff_) {\n// TypesDuo t_ = new TypesDuo(damageType_, pkType_);\n// Rate r_;\n// if (Rate.isValid(infos_.get(i_))) {\n// r_ = new Rate(infos_.get(i_));\n// } else {\n// r_ = DataBase.defRateProduct();\n// }\n// _d.getTableTypes().addEntry(t_, r_);\n//\n// i_++;\n// }\n// }\n// _d.initTypesByTable();\n _d.setTypes(Cst.tp());\n _d.setLawsDamageRate(new IdMap<DifficultyModelLaw, LawNumber>());\n// StringMap<String> cts_ = Cst.tr();\n// StringList laws_ = StringUtil.splitChars(cts_.getVal(LOIS_RANDOM),\n// RETURN_LINE_CHAR);\n// for (String l : laws_) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// MonteCarloNumber law_ = new MonteCarloNumber();\n//\n// for (String evt_ : StringUtil.splitStrings(infos_.get(1),\n// DataBase.SEPARATOR_RAND)) {\n// StringList infosLoc_ = StringUtil.splitStrings(evt_,\n// DataBase.SEPARATOR_RAND_EVENTS);\n// boolean defaultLaw_ = false;\n// if (!Rate.isValid(infosLoc_.first())) {\n// defaultLaw_ = true;\n// } else if (!LgInt.isValid(infosLoc_.get(1))) {\n// defaultLaw_ = true;\n// }\n// if (defaultLaw_) {\n// law_ = new MonteCarloNumber();\n//\n// law_.addQuickEvent(new Rate(1), DataBase.defElementaryEvent());\n// break;\n// }\n//\n// law_.addQuickEvent(new Rate(infosLoc_.first()),\n// new LgInt(infosLoc_.get(1)));\n//\n// }\n//\n//// if (!law_.checkEvents()) {\n//// _d.setError(true);\n//// return;\n//// }\n// _d.getLawsDamageRate().addEntry(\n// getModelByName(infos_.first()),\n// new LawNumber(law_, (short) NumberUtil.parseInt(infos_.last())));\n// }\n _d.getLawsDamageRate().addAllEntries(Cst.lg());\n _d.setExpGrowth(new IdMap<ExpType, String>());\n// StringList courbes_ = StringUtil.splitChars(cts_.getVal(COURBE_PTS_EXP),\n// RETURN_LINE_CHAR);\n// for (String l : courbes_) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// _d.getExpGrowth().addEntry(getExpTypeByName(infos_.first()),\n// infos_.get(1));\n// }\n _d.getExpGrowth().addAllEntries(Cst.ex());\n _d.setRates(new IdMap<DifficultyWinPointsFight, String>());\n// StringList rates_ = StringUtil.splitChars(cts_.getVal(RATE_WON_POINTS),\n// RETURN_LINE_CHAR);\n// for (String l : rates_) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// _d.getRates().addEntry(getDiffWonPtsByName(infos_\n// .first()), infos_.get(1));\n// }\n _d.getRates().addAllEntries(Cst.di());\n _d.setTypesColors(new StringMap<String>());\n// StringList rates_ = StringUtil.splitChars(cts_.getVal(DataBase.TYPES_COLOR_CODE + DataBase.IMG_FILES_RES_EXT_TXT), RETURN_LINE_CHAR);\n// for (String l : rates_) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// String colorStr_ = infos_.get(1);\n// _d.getTypesColors().addEntry(infos_.first(), colorStr_);\n// }\n _d.getTypesColors().addAllEntries(Cst.tc());\n _d.setEndGameImage(BaseSixtyFourUtil.getImageByString(ImEndGame.im()));\n _d.initTranslations();\n StringMap<String> trs_ = Trs.tr();\n for (String l : _d.getLanguages()) {\n IdMap<Gender, String> genders_ = trGenders(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_GENDERS));\n _d.getTranslatedGenders().addEntry(l, genders_);\n IdMap<SelectedBoolean, String> booleans_ = trBooleans(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_BOOLEANS));\n _d.getTranslatedBooleans().addEntry(l, booleans_);\n IdMap<DifficultyWinPointsFight, String> diffWinPts_ = trDiffWinPts(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_DIFF_WIN_PTS));\n _d.getTranslatedDiffWinPts().addEntry(l, diffWinPts_);\n IdMap<DifficultyModelLaw, String> diffLaw_ = trDiffLaw(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_DIFF_MODEL_LAW));\n _d.getTranslatedDiffModelLaw().addEntry(l, diffLaw_);\n IdMap<EnvironmentType, String> environments_ = trEnv(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_ENVIRONMENTS));\n _d.getTranslatedEnvironment().addEntry(l, environments_);\n IdMap<Statistic, String> statistics_ = trStat(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_STATISTICS));\n _d.getTranslatedStatistics().addEntry(l, statistics_);\n IdMap<TargetChoice, String> targets_ = trTargets(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_TARGETS));\n _d.getTranslatedTargets().addEntry(l, targets_);\n StringMap<String> categories_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_CATEGORIES));\n _d.getTranslatedCategories().addEntry(l, categories_);\n StringMap<String> types_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_TYPES));\n _d.getTranslatedTypes().addEntry(l, types_);\n StringMap<String> pokemon_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_POKEMON));\n _d.getTranslatedPokemon().addEntry(l, pokemon_);\n StringMap<String> moves_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_MOVES));\n _d.getTranslatedMoves().addEntry(l, moves_);\n StringMap<String> items_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_ITEMS));\n _d.getTranslatedItems().addEntry(l, items_);\n StringMap<String> abilities_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_ABILITIES));\n _d.getTranslatedAbilities().addEntry(l, abilities_);\n StringMap<String> status_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_STATUS));\n _d.getTranslatedStatus().addEntry(l, status_);\n StringMap<String> fctsMath_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_MATH));\n _d.getTranslatedFctMath().addEntry(l, fctsMath_);\n StringMap<String> descrClasses_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_CLASSES));\n _d.getTranslatedClassesDescriptions().addEntry(l, descrClasses_);\n StringMap<String> litteral_ = trLitt(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_LITTERAL));\n _d.getLitterals().addEntry(l, litteral_);\n }\n// _perCentLoading.addPercent(delta_);\n feedImgs(AnStatis.im(), _d.getAnimStatis());\n feedImgs(AnStatus.im(), _d.getAnimStatus());\n _d.setAnimAbsorb(BaseSixtyFourUtil.getImageByString(AnAbs.im().firstValue()));\n for (EntryCust<String,PokemonData> e: PkInit.pk().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n _d.calculateAvgPound();\n for (EntryCust<String,MoveData> e: MvInit.mv().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n patch(_d);\n for (EntryCust<String,Item> e: ItInit.it().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n for (EntryCust<String,AbilityData> e: AbInit.ab().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n for (EntryCust<String,Status> e: StInit.st().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n _d.completeVariables();\n _d.sortEndRound();\n// _perCentLoading.addPercent(delta_);\n _d.completeMoveTutors();\n// for (PokemonData pk_ : _d.getPokedex().values()) {\n// for (short hm_ : pk_.getHiddenMoves()) {\n// String move_ = _d.getHm().getVal(hm_);\n// pk_.getMoveTutors().add(move_);\n// }\n// for (short hm_ : pk_.getTechnicalMoves()) {\n// String move_ = _d.getTm().getVal(hm_);\n// pk_.getMoveTutors().add(move_);\n// }\n// for (LevelMove l : pk_.getLevMoves()) {\n// pk_.getMoveTutors().add(l.getMove());\n// }\n// pk_.getMoveTutors().removeDuplicates();\n// }\n _d.setMaxiPkBack(new StringMap<int[][]>());\n feedImgs(Bk.im(), _d.getMaxiPkBack());\n _d.setMaxiPkFront(new StringMap<int[][]>());\n feedImgs(Ft.im(), _d.getMaxiPkFront());\n _d.setMiniPk(new StringMap<int[][]>());\n feedImgs(Mn.im(), _d.getMiniPk());\n _d.setMiniItems(new StringMap<int[][]>());\n feedImgs(ItIm.im(), _d.getMiniItems());\n _d.setTypesImages(new StringMap<int[][]>());\n feedImgs(TypeImg.im(), _d.getTypesImages());\n// _perCentLoading.addPercent(delta_);\n _d.getMap().initializeLinks();\n _d.getMap().initInteractiveElements();\n _d.getMap().initializeTree();\n _d.getMap().initializeAccessibility();\n _d.setTrainers(new StringMap<int[][]>());\n _d.setPeople(new StringMap<int[][]>());\n _d.setImages(new StringMap<int[][]>());\n _d.setImagesTiles(new StringMap<ScreenCoordssInt>());\n _d.setLinks(new StringMap<int[][]>());\n _d.setMiniMap(new StringMap<int[][]>());\n feedImgs(TrainerImg.im(), _d.getTrainers());\n feedImgs(PeopleImg.im(), _d.getPeople());\n feedImgs(ImgMap.im(), _d.getImages());\n feedImgs(LinkImg.im(), _d.getLinks());\n feedImgs(MiniMapImg.im(), _d.getLinks());\n StringMap<String> imMiMap_ = MiniMapImg.im();\n for (TileMiniMap t : _d.getMap().getMiniMap().values()) {\n String f_ = t.getFile();\n _d.getMiniMap().addEntry(f_, BaseSixtyFourUtil.getImageByString(imMiMap_.getVal(f_)));\n }\n _d.getMiniMap().addEntry(_d.getMap().getUnlockedCity(), BaseSixtyFourUtil\n .getImageByString(imMiMap_.getVal(_d.getMap().getUnlockedCity())));\n// _perCentLoading.addPercent(delta_);\n _d.initializeWildPokemon();\n// _perCentLoading.addPercent(delta_);\n\n _d.getFamilies().addAllEntries(PkInit.fs());\n// _d.initFamilies();\n _d.boundsPk();\n// for (int[][] i : _d.getMaxiPkBack().values()) {\n// if (i.length == 0) {\n// _d.setError(true);\n// return;\n// }\n// if (i[0].length > _d.getMaxWidthPk()) {\n// _d.setMaxWidthPk(i[0].length);\n// }\n// if (i.length > _d.getMaxHeightPk()) {\n// _d.setMaxHeightPk(i.length);\n// }\n//\n// }\n// for (int[][] i : _d.getMaxiPkFront().values()) {\n// if (i.length == 0) {\n// _d.setError(true);\n// return;\n// }\n// if (i[0].length > _d.getMaxWidthPk()) {\n// _d.setMaxWidthPk(i[0].length);\n// }\n// if (i.length > _d.getMaxHeightPk()) {\n// _d.setMaxHeightPk(i.length);\n// }\n//\n// }\n _d.setupPseudoImages();\n _d.getConstNum().addEntry(DataBase.DEF_BASE_MOVE,new Rate(\"1\"));\n _perCentLoading.set(100);\n }", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tannotationEClass.getESuperTypes().add(this.getNamedElement());\n\t\ttargetLanguageEClass.getESuperTypes().add(this.getNamedElement());\n\t\ttechnologyEClass.getESuperTypes().add(this.getNamedElement());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(annotationEClass, Annotation.class, \"Annotation\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAnnotation_Implementations(), this.getImplementation(), null, \"implementations\", null, 0, -1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(implementationEClass, Implementation.class, \"Implementation\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getImplementation_Code(), ecorePackage.getEString(), \"code\", null, 1, 1, Implementation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getImplementation_Technology(), this.getTechnology(), null, \"technology\", null, 1, 1, Implementation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getImplementation_Language(), this.getTargetLanguage(), null, \"language\", null, 1, 1, Implementation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(semanticsEClass, Semantics.class, \"Semantics\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSemantics_Annotations(), this.getAnnotation(), null, \"annotations\", null, 0, -1, Semantics.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSemantics_Languages(), this.getTargetLanguage(), null, \"languages\", null, 0, -1, Semantics.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSemantics_Technologies(), this.getTechnology(), null, \"technologies\", null, 0, -1, Semantics.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(targetLanguageEClass, TargetLanguage.class, \"TargetLanguage\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(technologyEClass, Technology.class, \"Technology\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(namedElementEClass, NamedElement.class, \"NamedElement\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getNamedElement_Name(), ecorePackage.getEString(), \"name\", null, 1, 1, NamedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "public void initializePackageContents() {\r\n\t\tif (isInitialized)\r\n\t\t\treturn;\r\n\t\tisInitialized = true;\r\n\r\n\t\t// Initialize package\r\n\t\tsetName(eNAME);\r\n\t\tsetNsPrefix(eNS_PREFIX);\r\n\t\tsetNsURI(eNS_URI);\r\n\r\n\t\t// Obtain other dependent packages\r\n\t\tEcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);\r\n\r\n\t\t// Create type parameters\r\n\r\n\t\t// Set bounds for type parameters\r\n\r\n\t\t// Add supertypes to classes\r\n\t\tgetMappingEClass.getESuperTypes().add(this.getRestMapping());\r\n\t\tpostMappingEClass.getESuperTypes().add(this.getRestMapping());\r\n\t\toneToManyEClass.getESuperTypes().add(this.getMappingType());\r\n\t\tmanyToOneEClass.getESuperTypes().add(this.getMappingType());\r\n\t\tmanyToManyEClass.getESuperTypes().add(this.getMappingType());\r\n\t\toneToOneEClass.getESuperTypes().add(this.getMappingType());\r\n\r\n\t\t// Initialize classes, features, and operations; add parameters\r\n\t\tinitEClass(springProjectEClass, SpringProject.class, \"SpringProject\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEAttribute(getSpringProject_BasePackage(), theEcorePackage.getEString(), \"basePackage\", null, 0, 1,\r\n\t\t\t\tSpringProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getSpringProject_Name(), theEcorePackage.getEString(), \"name\", null, 0, 1, SpringProject.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEReference(getSpringProject_DbSource(), this.getDBSource(), null, \"dbSource\", null, 0, 1,\r\n\t\t\t\tSpringProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,\r\n\t\t\t\t!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\t\tinitEReference(getSpringProject_Entities(), this.getEntity(), null, \"entities\", null, 0, -1,\r\n\t\t\t\tSpringProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,\r\n\t\t\t\t!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\t\tinitEReference(getSpringProject_Controllers(), this.getRestController(), null, \"controllers\", null, 0, -1,\r\n\t\t\t\tSpringProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,\r\n\t\t\t\t!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\r\n\t\tinitEClass(restControllerEClass, RestController.class, \"RestController\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEAttribute(getRestController_Name(), theEcorePackage.getEString(), \"name\", null, 0, 1, RestController.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEAttribute(getRestController_Path(), theEcorePackage.getEString(), \"path\", null, 0, 1, RestController.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEReference(getRestController_UsedEntities(), this.getEntity(), null, \"usedEntities\", null, 0, -1,\r\n\t\t\t\tRestController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,\r\n\t\t\t\t!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\t\tinitEReference(getRestController_Mappings(), this.getRestMapping(), null, \"mappings\", null, 0, -1,\r\n\t\t\t\tRestController.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,\r\n\t\t\t\t!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\r\n\t\tinitEClass(restMappingEClass, RestMapping.class, \"RestMapping\", IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEAttribute(getRestMapping_Path(), theEcorePackage.getEString(), \"path\", null, 0, 1, RestMapping.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEAttribute(getRestMapping_Name(), theEcorePackage.getEString(), \"name\", null, 0, 1, RestMapping.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEReference(getRestMapping_UsedEntity(), this.getEntity(), null, \"usedEntity\", null, 0, 1, RestMapping.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,\r\n\t\t\t\tIS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getRestMapping_Body(), theEcorePackage.getEString(), \"body\", null, 0, 1, RestMapping.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\r\n\t\tinitEClass(getMappingEClass, GetMapping.class, \"GetMapping\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\r\n\t\tinitEClass(postMappingEClass, PostMapping.class, \"PostMapping\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEReference(getPostMapping_Parameters(), this.getField(), null, \"parameters\", null, 0, -1, PostMapping.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,\r\n\t\t\t\tIS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\r\n\t\tinitEClass(entityEClass, Entity.class, \"Entity\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEReference(getEntity_SuperClass(), this.getEntity(), null, \"superClass\", null, 0, 1, Entity.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,\r\n\t\t\t\tIS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getEntity_Name(), theEcorePackage.getEString(), \"name\", null, 0, 1, Entity.class, !IS_TRANSIENT,\r\n\t\t\t\t!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getEntity_GenerateRepository(), theEcorePackage.getEBoolean(), \"generateRepository\", \"true\", 0,\r\n\t\t\t\t1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\t\tinitEReference(getEntity_Fields(), this.getField(), null, \"fields\", null, 0, -1, Entity.class, !IS_TRANSIENT,\r\n\t\t\t\t!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEReference(getEntity_Mapping(), this.getMapping(), null, \"mapping\", null, 0, -1, Entity.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,\r\n\t\t\t\tIS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\r\n\t\tinitEClass(mappingEClass, Mapping.class, \"Mapping\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEAttribute(getMapping_Name(), theEcorePackage.getEString(), \"name\", null, 0, 1, Mapping.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEReference(getMapping_Entity(), this.getEntity(), null, \"entity\", null, 0, 1, Mapping.class, !IS_TRANSIENT,\r\n\t\t\t\t!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEAttribute(getMapping_IsList(), theEcorePackage.getEBoolean(), \"isList\", \"true\", 0, 1, Mapping.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEReference(getMapping_MappingType(), this.getMappingType(), null, \"mappingType\", null, 0, 1, Mapping.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,\r\n\t\t\t\tIS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\r\n\t\tinitEClass(mappingTypeEClass, MappingType.class, \"MappingType\", IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEAttribute(getMappingType_Cascade(), this.getCascade(), \"cascade\", \"ALL\", 0, 1, MappingType.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEReference(getMappingType_MappedBy(), this.getEntity(), null, \"mappedBy\", null, 0, 1, MappingType.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,\r\n\t\t\t\tIS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\r\n\t\tinitEClass(oneToManyEClass, OneToMany.class, \"OneToMany\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\r\n\t\tinitEClass(manyToOneEClass, ManyToOne.class, \"ManyToOne\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\r\n\t\tinitEClass(manyToManyEClass, ManyToMany.class, \"ManyToMany\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEAttribute(getManyToMany_JoinTableName(), theEcorePackage.getEString(), \"joinTableName\", null, 0, 1,\r\n\t\t\t\tManyToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getManyToMany_JoinColumns(), theEcorePackage.getEString(), \"joinColumns\", null, 0, 1,\r\n\t\t\t\tManyToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getManyToMany_InverseJoinColumns(), theEcorePackage.getEString(), \"inverseJoinColumns\", null, 0,\r\n\t\t\t\t1, ManyToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\r\n\t\tinitEClass(oneToOneEClass, OneToOne.class, \"OneToOne\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\r\n\t\tinitEClass(fieldEClass, Field.class, \"Field\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEAttribute(getField_IsId(), theEcorePackage.getEBoolean(), \"isId\", \"false\", 0, 1, Field.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEAttribute(getField_Name(), theEcorePackage.getEString(), \"name\", null, 0, 1, Field.class, !IS_TRANSIENT,\r\n\t\t\t\t!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getField_Datatype(), theEcorePackage.getEString(), \"datatype\", \"String\", 0, 1, Field.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\r\n\t\tinitEClass(dbSourceEClass, DBSource.class, \"DBSource\", !IS_ABSTRACT, !IS_INTERFACE,\r\n\t\t\t\tIS_GENERATED_INSTANCE_CLASS);\r\n\t\tinitEAttribute(getDBSource_EnableConsole(), theEcorePackage.getEBoolean(), \"enableConsole\", \"true\", 0, 1,\r\n\t\t\t\tDBSource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getDBSource_WebAllowOothers(), theEcorePackage.getEBoolean(), \"webAllowOothers\", \"true\", 0, 1,\r\n\t\t\t\tDBSource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getDBSource_ConsolePath(), theEcorePackage.getEString(), \"consolePath\", \"/h2-console\", 0, 1,\r\n\t\t\t\tDBSource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getDBSource_Url(), theEcorePackage.getEString(), \"url\",\r\n\t\t\t\t\"jdbc:h2:file:./data/Repository;DB_CLOSE_ON_EXIT=true;\", 0, 1, DBSource.class, !IS_TRANSIENT,\r\n\t\t\t\t!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getDBSource_User(), theEcorePackage.getEString(), \"user\", \"SA\", 0, 1, DBSource.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEAttribute(getDBSource_Password(), theEcorePackage.getEString(), \"password\", \"SA\", 0, 1, DBSource.class,\r\n\t\t\t\t!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED,\r\n\t\t\t\tIS_ORDERED);\r\n\t\tinitEAttribute(getDBSource_DriveClassName(), theEcorePackage.getEString(), \"driveClassName\", \"org.h2.Driver\", 0,\r\n\t\t\t\t1, DBSource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\t\tinitEAttribute(getDBSource_ServerPort(), theEcorePackage.getEString(), \"serverPort\", \"2001\", 0, 1,\r\n\t\t\t\tDBSource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,\r\n\t\t\t\t!IS_DERIVED, IS_ORDERED);\r\n\r\n\t\t// Initialize enums and add enum literals\r\n\t\tinitEEnum(cascadeEEnum, Cascade.class, \"Cascade\");\r\n\t\taddEEnumLiteral(cascadeEEnum, Cascade.ALL);\r\n\r\n\t\t// Create resource\r\n\t\tcreateResource(eNS_URI);\r\n\t}", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tOCCIPackage theOCCIPackage = (OCCIPackage)EPackage.Registry.INSTANCE.getEPackage(OCCIPackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tldprojectEClass.getESuperTypes().add(theOCCIPackage.getResource());\n\t\tlddatabaselinkEClass.getESuperTypes().add(theOCCIPackage.getLink());\n\t\tldprojectlinkEClass.getESuperTypes().add(theOCCIPackage.getLink());\n\t\tldnodeEClass.getESuperTypes().add(theOCCIPackage.getResource());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(ldprojectEClass, Ldproject.class, \"Ldproject\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getLdproject_Name(), theOCCIPackage.getString(), \"name\", null, 1, 1, Ldproject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getLdproject_Lifecycle(), this.getLifecycle(), \"lifecycle\", null, 0, 1, Ldproject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getLdproject_Robustness(), this.getRobustness(), \"robustness\", null, 0, 1, Ldproject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getLdproject__Publish(), null, \"publish\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getLdproject__Unpublish(), null, \"unpublish\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getLdproject__Update(), null, \"update\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(lddatabaselinkEClass, Lddatabaselink.class, \"Lddatabaselink\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getLddatabaselink_Database(), theOCCIPackage.getString(), \"database\", \"datacore\", 1, 1, Lddatabaselink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getLddatabaselink_Port(), theOCCIPackage.getNumber(), \"port\", \"27017\", 0, 1, Lddatabaselink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(ldprojectlinkEClass, Ldprojectlink.class, \"Ldprojectlink\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(ldnodeEClass, Ldnode.class, \"Ldnode\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getLdnode_Name(), theOCCIPackage.getString(), \"name\", null, 1, 1, Ldnode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getLdnode_MongoHosts(), theOCCIPackage.getString(), \"mongoHosts\", null, 1, 1, Ldnode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getLdnode_MainProject(), theOCCIPackage.getString(), \"mainProject\", null, 1, 1, Ldnode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getLdnode_AnalyticsReadPreference(), theOCCIPackage.getString(), \"analyticsReadPreference\", null, 1, 1, Ldnode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(lifecycleEEnum, Lifecycle.class, \"Lifecycle\");\n\t\taddEEnumLiteral(lifecycleEEnum, Lifecycle.DRAFT);\n\t\taddEEnumLiteral(lifecycleEEnum, Lifecycle.PUBLISHED);\n\n\t\tinitEEnum(robustnessEEnum, Robustness.class, \"Robustness\");\n\t\taddEEnumLiteral(robustnessEEnum, Robustness.CLUSTER);\n\t\taddEEnumLiteral(robustnessEEnum, Robustness.NODE);\n\t\taddEEnumLiteral(robustnessEEnum, Robustness.NONE);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// OCCIE2Ecore\n\t\tcreateOCCIE2EcoreAnnotations();\n\t}", "@Override\n\t@SystemSetup(extension = FrameitcoreConstants.EXTENSIONNAME, process = Process.ALL, type = Type.ESSENTIAL)\n\tpublic void createEssentialData() {\n\t\t// Import essential data\n\t\tLOG.info(\"Importing essential data...\");\n\n\t\tsuper.importData(\"/essentialData/countries.impex\");\n\n\t\tLOG.info(\"Essential data import complete.\");\n\t}", "@Override\r\n\tpublic void load() {\n\r\n\t}", "public abstract Source load(ModuleName name);", "void massiveModeLoading( File dataPath );", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tEcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);\n\t\torg.openecomp.ncomp.core.CorePackage theCorePackage_1 = (org.openecomp.ncomp.core.CorePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.core.CorePackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\topenstackRequestDeleteEClass.getESuperTypes().add(this.getOpenStackRequest());\n\t\topenstackRequestPollEClass.getESuperTypes().add(this.getOpenStackRequest());\n\t\tvirtualMachineTypeEClass.getESuperTypes().add(theCorePackage_1.getNamedEntity());\n\t\tsecurityRuleEClass.getESuperTypes().add(theCorePackage_1.getNamedEntity());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(openStackRequestEClass, OpenStackRequest.class, \"OpenStackRequest\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getOpenStackRequest_ProjectName(), theEcorePackage.getEString(), \"projectName\", null, 0, 1, OpenStackRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(openstackRequestDeleteEClass, OpenstackRequestDelete.class, \"OpenstackRequestDelete\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getOpenstackRequestDelete_ObjectType(), theEcorePackage.getEString(), \"objectType\", null, 0, 1, OpenstackRequestDelete.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getOpenstackRequestDelete_ObjectName(), theEcorePackage.getEString(), \"objectName\", null, 0, 1, OpenstackRequestDelete.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(openstackRequestPollEClass, OpenstackRequestPoll.class, \"OpenstackRequestPoll\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(virtualMachineTypeEClass, VirtualMachineType.class, \"VirtualMachineType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getVirtualMachineType_Description(), theEcorePackage.getEString(), \"description\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_NumberOfCores(), theEcorePackage.getEInt(), \"numberOfCores\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_MemorySizeMB(), theEcorePackage.getEInt(), \"memorySizeMB\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_RootDiskSizeGB(), theEcorePackage.getEInt(), \"rootDiskSizeGB\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_DiskSizeGB(), theEcorePackage.getEInt(), \"diskSizeGB\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_VolumeSizeGB(), theEcorePackage.getEInt(), \"volumeSizeGB\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_ImageName(), theEcorePackage.getEString(), \"imageName\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_FlavorName(), theEcorePackage.getEString(), \"flavorName\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_NeedPublicIp(), theEcorePackage.getEBoolean(), \"needPublicIp\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_DeploymentStatus(), theCorePackage_1.getDeploymentStatus(), \"deploymentStatus\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getVirtualMachineType_IncomingSecurityRules(), this.getSecurityRule(), null, \"incomingSecurityRules\", null, 0, -1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getVirtualMachineType_OutboundSecurityRules(), this.getSecurityRule(), null, \"outboundSecurityRules\", null, 0, -1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(securityRuleEClass, SecurityRule.class, \"SecurityRule\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getSecurityRule_PortRangeStart(), theEcorePackage.getEIntegerObject(), \"portRangeStart\", null, 0, 1, SecurityRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSecurityRule_PortRangeEnd(), theEcorePackage.getEIntegerObject(), \"portRangeEnd\", null, 0, 1, SecurityRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSecurityRule_Prefix(), theEcorePackage.getEString(), \"prefix\", null, 0, 1, SecurityRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSecurityRule_IpProtocol(), this.getSecurityRuleProtocol(), \"ipProtocol\", null, 0, 1, SecurityRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(securityRuleProtocolEEnum, SecurityRuleProtocol.class, \"SecurityRuleProtocol\");\n\t\taddEEnumLiteral(securityRuleProtocolEEnum, SecurityRuleProtocol.NONE);\n\t\taddEEnumLiteral(securityRuleProtocolEEnum, SecurityRuleProtocol.TCP);\n\t\taddEEnumLiteral(securityRuleProtocolEEnum, SecurityRuleProtocol.UDP);\n\t\taddEEnumLiteral(securityRuleProtocolEEnum, SecurityRuleProtocol.IMCP);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tEcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tannotationEClass.getESuperTypes().add(this.getElement());\n\t\tidentifiedElementEClass.getESuperTypes().add(this.getElement());\n\t\timportEClass.getESuperTypes().add(this.getElement());\n\t\tinstanceEClass.getESuperTypes().add(this.getElement());\n\t\taxiomEClass.getESuperTypes().add(this.getElement());\n\t\tassertionEClass.getESuperTypes().add(this.getElement());\n\t\tpredicateEClass.getESuperTypes().add(this.getElement());\n\t\targumentEClass.getESuperTypes().add(this.getElement());\n\t\tliteralEClass.getESuperTypes().add(this.getElement());\n\t\tontologyEClass.getESuperTypes().add(this.getIdentifiedElement());\n\t\tmemberEClass.getESuperTypes().add(this.getIdentifiedElement());\n\t\tvocabularyBoxEClass.getESuperTypes().add(this.getOntology());\n\t\tdescriptionBoxEClass.getESuperTypes().add(this.getOntology());\n\t\tvocabularyEClass.getESuperTypes().add(this.getVocabularyBox());\n\t\tvocabularyBundleEClass.getESuperTypes().add(this.getVocabularyBox());\n\t\tdescriptionEClass.getESuperTypes().add(this.getDescriptionBox());\n\t\tdescriptionBundleEClass.getESuperTypes().add(this.getDescriptionBox());\n\t\tstatementEClass.getESuperTypes().add(this.getMember());\n\t\tvocabularyMemberEClass.getESuperTypes().add(this.getMember());\n\t\tdescriptionMemberEClass.getESuperTypes().add(this.getMember());\n\t\tvocabularyStatementEClass.getESuperTypes().add(this.getStatement());\n\t\tvocabularyStatementEClass.getESuperTypes().add(this.getVocabularyMember());\n\t\tdescriptionStatementEClass.getESuperTypes().add(this.getStatement());\n\t\tdescriptionStatementEClass.getESuperTypes().add(this.getDescriptionMember());\n\t\ttermEClass.getESuperTypes().add(this.getVocabularyMember());\n\t\truleEClass.getESuperTypes().add(this.getVocabularyStatement());\n\t\tbuiltInEClass.getESuperTypes().add(this.getVocabularyStatement());\n\t\tspecializableTermEClass.getESuperTypes().add(this.getTerm());\n\t\tspecializableTermEClass.getESuperTypes().add(this.getVocabularyStatement());\n\t\tpropertyEClass.getESuperTypes().add(this.getTerm());\n\t\ttypeEClass.getESuperTypes().add(this.getSpecializableTerm());\n\t\trelationBaseEClass.getESuperTypes().add(this.getSpecializableTerm());\n\t\tspecializablePropertyEClass.getESuperTypes().add(this.getSpecializableTerm());\n\t\tspecializablePropertyEClass.getESuperTypes().add(this.getProperty());\n\t\tclassifierEClass.getESuperTypes().add(this.getType());\n\t\tscalarEClass.getESuperTypes().add(this.getType());\n\t\tentityEClass.getESuperTypes().add(this.getClassifier());\n\t\tstructureEClass.getESuperTypes().add(this.getClassifier());\n\t\taspectEClass.getESuperTypes().add(this.getEntity());\n\t\tconceptEClass.getESuperTypes().add(this.getEntity());\n\t\trelationEntityEClass.getESuperTypes().add(this.getEntity());\n\t\trelationEntityEClass.getESuperTypes().add(this.getRelationBase());\n\t\tannotationPropertyEClass.getESuperTypes().add(this.getSpecializableProperty());\n\t\tsemanticPropertyEClass.getESuperTypes().add(this.getProperty());\n\t\tscalarPropertyEClass.getESuperTypes().add(this.getSemanticProperty());\n\t\tscalarPropertyEClass.getESuperTypes().add(this.getSpecializableProperty());\n\t\tstructuredPropertyEClass.getESuperTypes().add(this.getSemanticProperty());\n\t\tstructuredPropertyEClass.getESuperTypes().add(this.getSpecializableProperty());\n\t\trelationEClass.getESuperTypes().add(this.getSemanticProperty());\n\t\tforwardRelationEClass.getESuperTypes().add(this.getRelation());\n\t\treverseRelationEClass.getESuperTypes().add(this.getRelation());\n\t\tunreifiedRelationEClass.getESuperTypes().add(this.getRelation());\n\t\tunreifiedRelationEClass.getESuperTypes().add(this.getRelationBase());\n\t\tunreifiedRelationEClass.getESuperTypes().add(this.getSpecializableProperty());\n\t\tnamedInstanceEClass.getESuperTypes().add(this.getDescriptionStatement());\n\t\tnamedInstanceEClass.getESuperTypes().add(this.getInstance());\n\t\tconceptInstanceEClass.getESuperTypes().add(this.getNamedInstance());\n\t\trelationInstanceEClass.getESuperTypes().add(this.getNamedInstance());\n\t\tstructureInstanceEClass.getESuperTypes().add(this.getInstance());\n\t\tkeyAxiomEClass.getESuperTypes().add(this.getAxiom());\n\t\tspecializationAxiomEClass.getESuperTypes().add(this.getAxiom());\n\t\tinstanceEnumerationAxiomEClass.getESuperTypes().add(this.getAxiom());\n\t\tpropertyRestrictionAxiomEClass.getESuperTypes().add(this.getAxiom());\n\t\tliteralEnumerationAxiomEClass.getESuperTypes().add(this.getAxiom());\n\t\tclassifierEquivalenceAxiomEClass.getESuperTypes().add(this.getAxiom());\n\t\tscalarEquivalenceAxiomEClass.getESuperTypes().add(this.getAxiom());\n\t\tpropertyEquivalenceAxiomEClass.getESuperTypes().add(this.getAxiom());\n\t\tpropertyRangeRestrictionAxiomEClass.getESuperTypes().add(this.getPropertyRestrictionAxiom());\n\t\tpropertyCardinalityRestrictionAxiomEClass.getESuperTypes().add(this.getPropertyRestrictionAxiom());\n\t\tpropertyValueRestrictionAxiomEClass.getESuperTypes().add(this.getPropertyRestrictionAxiom());\n\t\tpropertySelfRestrictionAxiomEClass.getESuperTypes().add(this.getPropertyRestrictionAxiom());\n\t\ttypeAssertionEClass.getESuperTypes().add(this.getAssertion());\n\t\tpropertyValueAssertionEClass.getESuperTypes().add(this.getAssertion());\n\t\tunaryPredicateEClass.getESuperTypes().add(this.getPredicate());\n\t\tbinaryPredicateEClass.getESuperTypes().add(this.getPredicate());\n\t\tbuiltInPredicateEClass.getESuperTypes().add(this.getPredicate());\n\t\ttypePredicateEClass.getESuperTypes().add(this.getUnaryPredicate());\n\t\trelationEntityPredicateEClass.getESuperTypes().add(this.getUnaryPredicate());\n\t\trelationEntityPredicateEClass.getESuperTypes().add(this.getBinaryPredicate());\n\t\tpropertyPredicateEClass.getESuperTypes().add(this.getBinaryPredicate());\n\t\tsameAsPredicateEClass.getESuperTypes().add(this.getBinaryPredicate());\n\t\tdifferentFromPredicateEClass.getESuperTypes().add(this.getBinaryPredicate());\n\t\tquotedLiteralEClass.getESuperTypes().add(this.getLiteral());\n\t\tintegerLiteralEClass.getESuperTypes().add(this.getLiteral());\n\t\tdecimalLiteralEClass.getESuperTypes().add(this.getLiteral());\n\t\tdoubleLiteralEClass.getESuperTypes().add(this.getLiteral());\n\t\tbooleanLiteralEClass.getESuperTypes().add(this.getLiteral());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(elementEClass, Element.class, \"Element\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEOperation(getElement__GetOntology(), this.getOntology(), \"getOntology\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tEOperation op = initEOperation(getElement__ExtraValidate__DiagnosticChain_Map(), theEcorePackage.getEBoolean(), \"extraValidate\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, theEcorePackage.getEDiagnosticChain(), \"diagnostics\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\t\tEGenericType g1 = createEGenericType(theEcorePackage.getEMap());\n\t\tEGenericType g2 = createEGenericType(theEcorePackage.getEJavaObject());\n\t\tg1.getETypeArguments().add(g2);\n\t\tg2 = createEGenericType(theEcorePackage.getEJavaObject());\n\t\tg1.getETypeArguments().add(g2);\n\t\taddEParameter(op, g1, \"context\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(annotationEClass, Annotation.class, \"Annotation\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAnnotation_Property(), this.getAnnotationProperty(), null, \"property\", null, 1, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getAnnotation_LiteralValue(), this.getLiteral(), null, \"literalValue\", null, 0, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getAnnotation_ReferenceValue(), this.getMember(), null, \"referenceValue\", null, 0, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getAnnotation_OwningElement(), this.getIdentifiedElement(), this.getIdentifiedElement_OwnedAnnotations(), \"owningElement\", null, 0, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getAnnotation__GetValue(), this.getElement(), \"getValue\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getAnnotation__GetAnnotatedElement(), this.getIdentifiedElement(), \"getAnnotatedElement\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(identifiedElementEClass, IdentifiedElement.class, \"IdentifiedElement\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getIdentifiedElement_OwnedAnnotations(), this.getAnnotation(), this.getAnnotation_OwningElement(), \"ownedAnnotations\", null, 0, -1, IdentifiedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getIdentifiedElement__GetIri(), theEcorePackage.getEString(), \"getIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(importEClass, Import.class, \"Import\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getImport_Kind(), this.getImportKind(), \"kind\", null, 1, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getImport_Namespace(), this.getNamespace(), \"namespace\", null, 1, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getImport_Prefix(), this.getID(), \"prefix\", null, 0, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getImport_OwningOntology(), this.getOntology(), this.getOntology_OwnedImports(), \"owningOntology\", null, 1, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getImport__GetIri(), theEcorePackage.getEString(), \"getIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getImport__GetSeparator(), this.getSeparatorKind(), \"getSeparator\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(instanceEClass, Instance.class, \"Instance\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getInstance_OwnedPropertyValues(), this.getPropertyValueAssertion(), this.getPropertyValueAssertion_OwningInstance(), \"ownedPropertyValues\", null, 0, -1, Instance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(axiomEClass, Axiom.class, \"Axiom\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEOperation(getAxiom__GetCharacterizedTerm(), this.getTerm(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(assertionEClass, Assertion.class, \"Assertion\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEOperation(getAssertion__GetSubject(), this.getInstance(), \"getSubject\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getAssertion__GetObject(), this.getElement(), \"getObject\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(predicateEClass, Predicate.class, \"Predicate\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPredicate_AntecedentRule(), this.getRule(), this.getRule_Antecedent(), \"antecedentRule\", null, 0, 1, Predicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPredicate_ConsequentRule(), this.getRule(), this.getRule_Consequent(), \"consequentRule\", null, 0, 1, Predicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(argumentEClass, Argument.class, \"Argument\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getArgument_Variable(), this.getID(), \"variable\", null, 0, 1, Argument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getArgument_Literal(), this.getLiteral(), null, \"literal\", null, 0, 1, Argument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getArgument_Instance(), this.getNamedInstance(), null, \"instance\", null, 0, 1, Argument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(literalEClass, Literal.class, \"Literal\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEOperation(getLiteral__GetValue(), theEcorePackage.getEJavaObject(), \"getValue\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getLiteral__GetStringValue(), theEcorePackage.getEString(), \"getStringValue\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getLiteral__GetLexicalValue(), theEcorePackage.getEString(), \"getLexicalValue\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getLiteral__GetTypeIri(), theEcorePackage.getEString(), \"getTypeIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(ontologyEClass, Ontology.class, \"Ontology\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getOntology_Namespace(), this.getNamespace(), \"namespace\", null, 1, 1, Ontology.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getOntology_Prefix(), this.getID(), \"prefix\", null, 1, 1, Ontology.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getOntology_OwnedImports(), this.getImport(), this.getImport_OwningOntology(), \"ownedImports\", null, 0, -1, Ontology.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getOntology__GetIri(), theEcorePackage.getEString(), \"getIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getOntology__GetSeparator(), this.getSeparatorKind(), \"getSeparator\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(memberEClass, Member.class, \"Member\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getMember_Name(), this.getID(), \"name\", null, 0, 1, Member.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getMember__GetRef(), this.getMember(), \"getRef\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getMember__IsRef(), theEcorePackage.getEBoolean(), \"isRef\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getMember__Resolve(), this.getMember(), \"resolve\", 1, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getMember__GetIri(), theEcorePackage.getEString(), \"getIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getMember__GetAbbreviatedIri(), theEcorePackage.getEString(), \"getAbbreviatedIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(vocabularyBoxEClass, VocabularyBox.class, \"VocabularyBox\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(descriptionBoxEClass, DescriptionBox.class, \"DescriptionBox\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(vocabularyEClass, Vocabulary.class, \"Vocabulary\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getVocabulary_OwnedStatements(), this.getVocabularyStatement(), this.getVocabularyStatement_OwningVocabulary(), \"ownedStatements\", null, 0, -1, Vocabulary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(vocabularyBundleEClass, VocabularyBundle.class, \"VocabularyBundle\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(descriptionEClass, Description.class, \"Description\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDescription_OwnedStatements(), this.getDescriptionStatement(), this.getDescriptionStatement_OwningDescription(), \"ownedStatements\", null, 0, -1, Description.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(descriptionBundleEClass, DescriptionBundle.class, \"DescriptionBundle\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(statementEClass, Statement.class, \"Statement\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(vocabularyMemberEClass, VocabularyMember.class, \"VocabularyMember\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(descriptionMemberEClass, DescriptionMember.class, \"DescriptionMember\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(vocabularyStatementEClass, VocabularyStatement.class, \"VocabularyStatement\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getVocabularyStatement_OwningVocabulary(), this.getVocabulary(), this.getVocabulary_OwnedStatements(), \"owningVocabulary\", null, 1, 1, VocabularyStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(descriptionStatementEClass, DescriptionStatement.class, \"DescriptionStatement\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDescriptionStatement_OwningDescription(), this.getDescription(), this.getDescription_OwnedStatements(), \"owningDescription\", null, 1, 1, DescriptionStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(termEClass, Term.class, \"Term\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(ruleEClass, Rule.class, \"Rule\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getRule_Ref(), this.getRule(), null, \"ref\", null, 0, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getRule_Antecedent(), this.getPredicate(), this.getPredicate_AntecedentRule(), \"antecedent\", null, 0, -1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getRule_Consequent(), this.getPredicate(), this.getPredicate_ConsequentRule(), \"consequent\", null, 0, -1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(builtInEClass, BuiltIn.class, \"BuiltIn\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getBuiltIn_Ref(), this.getBuiltIn(), null, \"ref\", null, 0, 1, BuiltIn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(specializableTermEClass, SpecializableTerm.class, \"SpecializableTerm\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSpecializableTerm_OwnedSpecializations(), this.getSpecializationAxiom(), this.getSpecializationAxiom_OwningTerm(), \"ownedSpecializations\", null, 0, -1, SpecializableTerm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(propertyEClass, Property.class, \"Property\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(typeEClass, Type.class, \"Type\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(relationBaseEClass, RelationBase.class, \"RelationBase\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getRelationBase_Sources(), this.getEntity(), null, \"sources\", null, 0, -1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getRelationBase_Targets(), this.getEntity(), null, \"targets\", null, 0, -1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getRelationBase_ReverseRelation(), this.getReverseRelation(), this.getReverseRelation_RelationBase(), \"reverseRelation\", null, 0, 1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getRelationBase_Functional(), theEcorePackage.getEBoolean(), \"functional\", null, 0, 1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getRelationBase_InverseFunctional(), theEcorePackage.getEBoolean(), \"inverseFunctional\", null, 0, 1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getRelationBase_Symmetric(), theEcorePackage.getEBoolean(), \"symmetric\", null, 0, 1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getRelationBase_Asymmetric(), theEcorePackage.getEBoolean(), \"asymmetric\", null, 0, 1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getRelationBase_Reflexive(), theEcorePackage.getEBoolean(), \"reflexive\", null, 0, 1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getRelationBase_Irreflexive(), theEcorePackage.getEBoolean(), \"irreflexive\", null, 0, 1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getRelationBase_Transitive(), theEcorePackage.getEBoolean(), \"transitive\", null, 0, 1, RelationBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(specializablePropertyEClass, SpecializableProperty.class, \"SpecializableProperty\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSpecializableProperty_OwnedEquivalences(), this.getPropertyEquivalenceAxiom(), this.getPropertyEquivalenceAxiom_OwningProperty(), \"ownedEquivalences\", null, 0, -1, SpecializableProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(classifierEClass, Classifier.class, \"Classifier\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getClassifier_OwnedEquivalences(), this.getClassifierEquivalenceAxiom(), this.getClassifierEquivalenceAxiom_OwningClassifier(), \"ownedEquivalences\", null, 0, -1, Classifier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getClassifier_OwnedPropertyRestrictions(), this.getPropertyRestrictionAxiom(), this.getPropertyRestrictionAxiom_OwningClassifier(), \"ownedPropertyRestrictions\", null, 0, -1, Classifier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(scalarEClass, Scalar.class, \"Scalar\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getScalar_Ref(), this.getScalar(), null, \"ref\", null, 0, 1, Scalar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalar_OwnedEnumeration(), this.getLiteralEnumerationAxiom(), this.getLiteralEnumerationAxiom_OwningScalar(), \"ownedEnumeration\", null, 0, 1, Scalar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalar_OwnedEquivalences(), this.getScalarEquivalenceAxiom(), this.getScalarEquivalenceAxiom_OwningScalar(), \"ownedEquivalences\", null, 0, -1, Scalar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(entityEClass, Entity.class, \"Entity\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEntity_OwnedKeys(), this.getKeyAxiom(), this.getKeyAxiom_OwningEntity(), \"ownedKeys\", null, 0, -1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(structureEClass, Structure.class, \"Structure\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getStructure_Ref(), this.getStructure(), null, \"ref\", null, 0, 1, Structure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(aspectEClass, Aspect.class, \"Aspect\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAspect_Ref(), this.getAspect(), null, \"ref\", null, 0, 1, Aspect.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(conceptEClass, Concept.class, \"Concept\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getConcept_Ref(), this.getConcept(), null, \"ref\", null, 0, 1, Concept.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getConcept_OwnedEnumeration(), this.getInstanceEnumerationAxiom(), this.getInstanceEnumerationAxiom_OwningConcept(), \"ownedEnumeration\", null, 0, 1, Concept.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(relationEntityEClass, RelationEntity.class, \"RelationEntity\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getRelationEntity_Ref(), this.getRelationEntity(), null, \"ref\", null, 0, 1, RelationEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getRelationEntity_ForwardRelation(), this.getForwardRelation(), this.getForwardRelation_RelationEntity(), \"forwardRelation\", null, 0, 1, RelationEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(annotationPropertyEClass, AnnotationProperty.class, \"AnnotationProperty\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAnnotationProperty_Ref(), this.getAnnotationProperty(), null, \"ref\", null, 0, 1, AnnotationProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(semanticPropertyEClass, SemanticProperty.class, \"SemanticProperty\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEOperation(getSemanticProperty__IsFunctional(), theEcorePackage.getEBoolean(), \"isFunctional\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getSemanticProperty__GetDomainList(), this.getClassifier(), \"getDomainList\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getSemanticProperty__GetRangeList(), this.getType(), \"getRangeList\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(scalarPropertyEClass, ScalarProperty.class, \"ScalarProperty\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getScalarProperty_Ref(), this.getScalarProperty(), null, \"ref\", null, 0, 1, ScalarProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getScalarProperty_Functional(), theEcorePackage.getEBoolean(), \"functional\", null, 0, 1, ScalarProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalarProperty_Domains(), this.getClassifier(), null, \"domains\", null, 0, -1, ScalarProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalarProperty_Ranges(), this.getScalar(), null, \"ranges\", null, 0, -1, ScalarProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getScalarProperty__GetDomainList(), this.getClassifier(), \"getDomainList\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getScalarProperty__GetRangeList(), this.getType(), \"getRangeList\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(structuredPropertyEClass, StructuredProperty.class, \"StructuredProperty\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getStructuredProperty_Ref(), this.getStructuredProperty(), null, \"ref\", null, 0, 1, StructuredProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getStructuredProperty_Functional(), theEcorePackage.getEBoolean(), \"functional\", null, 0, 1, StructuredProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getStructuredProperty_Domains(), this.getClassifier(), null, \"domains\", null, 0, -1, StructuredProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getStructuredProperty_Ranges(), this.getStructure(), null, \"ranges\", null, 0, -1, StructuredProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getStructuredProperty__GetDomainList(), this.getClassifier(), \"getDomainList\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getStructuredProperty__GetRangeList(), this.getType(), \"getRangeList\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(relationEClass, Relation.class, \"Relation\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEOperation(getRelation__IsInverseFunctional(), theEcorePackage.getEBoolean(), \"isInverseFunctional\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__IsSymmetric(), theEcorePackage.getEBoolean(), \"isSymmetric\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__IsAsymmetric(), theEcorePackage.getEBoolean(), \"isAsymmetric\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__IsReflexive(), theEcorePackage.getEBoolean(), \"isReflexive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__IsIrreflexive(), theEcorePackage.getEBoolean(), \"isIrreflexive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__IsTransitive(), theEcorePackage.getEBoolean(), \"isTransitive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__GetDomains(), this.getEntity(), \"getDomains\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__GetRanges(), this.getEntity(), \"getRanges\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__GetInverse(), this.getRelation(), \"getInverse\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__GetDomainList(), this.getClassifier(), \"getDomainList\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getRelation__GetRangeList(), this.getType(), \"getRangeList\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(forwardRelationEClass, ForwardRelation.class, \"ForwardRelation\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getForwardRelation_RelationEntity(), this.getRelationEntity(), this.getRelationEntity_ForwardRelation(), \"relationEntity\", null, 1, 1, ForwardRelation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__GetRef(), this.getMember(), \"getRef\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__IsFunctional(), theEcorePackage.getEBoolean(), \"isFunctional\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__IsInverseFunctional(), theEcorePackage.getEBoolean(), \"isInverseFunctional\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__IsSymmetric(), theEcorePackage.getEBoolean(), \"isSymmetric\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__IsAsymmetric(), theEcorePackage.getEBoolean(), \"isAsymmetric\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__IsReflexive(), theEcorePackage.getEBoolean(), \"isReflexive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__IsIrreflexive(), theEcorePackage.getEBoolean(), \"isIrreflexive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__IsTransitive(), theEcorePackage.getEBoolean(), \"isTransitive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__GetDomains(), this.getEntity(), \"getDomains\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__GetRanges(), this.getEntity(), \"getRanges\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getForwardRelation__GetInverse(), this.getRelation(), \"getInverse\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(reverseRelationEClass, ReverseRelation.class, \"ReverseRelation\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getReverseRelation_RelationBase(), this.getRelationBase(), this.getRelationBase_ReverseRelation(), \"relationBase\", null, 1, 1, ReverseRelation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__GetRef(), this.getMember(), \"getRef\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__IsFunctional(), theEcorePackage.getEBoolean(), \"isFunctional\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__IsInverseFunctional(), theEcorePackage.getEBoolean(), \"isInverseFunctional\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__IsSymmetric(), theEcorePackage.getEBoolean(), \"isSymmetric\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__IsAsymmetric(), theEcorePackage.getEBoolean(), \"isAsymmetric\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__IsReflexive(), theEcorePackage.getEBoolean(), \"isReflexive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__IsIrreflexive(), theEcorePackage.getEBoolean(), \"isIrreflexive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__IsTransitive(), theEcorePackage.getEBoolean(), \"isTransitive\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__GetDomains(), this.getEntity(), \"getDomains\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__GetRanges(), this.getEntity(), \"getRanges\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getReverseRelation__GetInverse(), this.getRelation(), \"getInverse\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(unreifiedRelationEClass, UnreifiedRelation.class, \"UnreifiedRelation\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getUnreifiedRelation_Ref(), this.getRelation(), null, \"ref\", null, 0, 1, UnreifiedRelation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getUnreifiedRelation__GetDomains(), this.getEntity(), \"getDomains\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getUnreifiedRelation__GetRanges(), this.getEntity(), \"getRanges\", 0, -1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getUnreifiedRelation__GetInverse(), this.getRelation(), \"getInverse\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(namedInstanceEClass, NamedInstance.class, \"NamedInstance\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getNamedInstance_OwnedTypes(), this.getTypeAssertion(), this.getTypeAssertion_OwningInstance(), \"ownedTypes\", null, 0, -1, NamedInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(conceptInstanceEClass, ConceptInstance.class, \"ConceptInstance\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getConceptInstance_Ref(), this.getConceptInstance(), null, \"ref\", null, 0, 1, ConceptInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(relationInstanceEClass, RelationInstance.class, \"RelationInstance\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getRelationInstance_Ref(), this.getRelationInstance(), null, \"ref\", null, 0, 1, RelationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getRelationInstance_Sources(), this.getNamedInstance(), null, \"sources\", null, 0, -1, RelationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getRelationInstance_Targets(), this.getNamedInstance(), null, \"targets\", null, 0, -1, RelationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(structureInstanceEClass, StructureInstance.class, \"StructureInstance\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getStructureInstance_Type(), this.getStructure(), null, \"type\", null, 1, 1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getStructureInstance_OwningAxiom(), this.getPropertyValueRestrictionAxiom(), this.getPropertyValueRestrictionAxiom_StructureInstanceValue(), \"owningAxiom\", null, 0, 1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getStructureInstance_OwningAssertion(), this.getPropertyValueAssertion(), this.getPropertyValueAssertion_StructureInstanceValue(), \"owningAssertion\", null, 0, 1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(keyAxiomEClass, KeyAxiom.class, \"KeyAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getKeyAxiom_Properties(), this.getProperty(), null, \"properties\", null, 1, -1, KeyAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getKeyAxiom_OwningEntity(), this.getEntity(), this.getEntity_OwnedKeys(), \"owningEntity\", null, 0, 1, KeyAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getKeyAxiom__GetKeyedEntity(), this.getEntity(), \"getKeyedEntity\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getKeyAxiom__GetCharacterizedTerm(), this.getEntity(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(specializationAxiomEClass, SpecializationAxiom.class, \"SpecializationAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSpecializationAxiom_SuperTerm(), this.getTerm(), null, \"superTerm\", null, 1, 1, SpecializationAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSpecializationAxiom_OwningTerm(), this.getSpecializableTerm(), this.getSpecializableTerm_OwnedSpecializations(), \"owningTerm\", null, 0, 1, SpecializationAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getSpecializationAxiom__GetSubTerm(), this.getTerm(), \"getSubTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getSpecializationAxiom__GetCharacterizedTerm(), this.getTerm(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(instanceEnumerationAxiomEClass, InstanceEnumerationAxiom.class, \"InstanceEnumerationAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getInstanceEnumerationAxiom_Instances(), this.getConceptInstance(), null, \"instances\", null, 1, -1, InstanceEnumerationAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInstanceEnumerationAxiom_OwningConcept(), this.getConcept(), this.getConcept_OwnedEnumeration(), \"owningConcept\", null, 0, 1, InstanceEnumerationAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getInstanceEnumerationAxiom__GetEnumeratedConcept(), this.getConcept(), \"getEnumeratedConcept\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getInstanceEnumerationAxiom__GetCharacterizedTerm(), this.getConcept(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(propertyRestrictionAxiomEClass, PropertyRestrictionAxiom.class, \"PropertyRestrictionAxiom\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPropertyRestrictionAxiom_Property(), this.getSemanticProperty(), null, \"property\", null, 1, 1, PropertyRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyRestrictionAxiom_OwningClassifier(), this.getClassifier(), this.getClassifier_OwnedPropertyRestrictions(), \"owningClassifier\", null, 0, 1, PropertyRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyRestrictionAxiom_OwningAxiom(), this.getClassifierEquivalenceAxiom(), this.getClassifierEquivalenceAxiom_OwnedPropertyRestrictions(), \"owningAxiom\", null, 0, 1, PropertyRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getPropertyRestrictionAxiom__GetRestrictingDomain(), this.getClassifier(), \"getRestrictingDomain\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getPropertyRestrictionAxiom__GetCharacterizedTerm(), this.getClassifier(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(literalEnumerationAxiomEClass, LiteralEnumerationAxiom.class, \"LiteralEnumerationAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getLiteralEnumerationAxiom_Literals(), this.getLiteral(), null, \"literals\", null, 1, -1, LiteralEnumerationAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getLiteralEnumerationAxiom_OwningScalar(), this.getScalar(), this.getScalar_OwnedEnumeration(), \"owningScalar\", null, 0, 1, LiteralEnumerationAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getLiteralEnumerationAxiom__GetEnumeratedScalar(), this.getScalar(), \"getEnumeratedScalar\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getLiteralEnumerationAxiom__GetCharacterizedTerm(), this.getScalar(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(classifierEquivalenceAxiomEClass, ClassifierEquivalenceAxiom.class, \"ClassifierEquivalenceAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getClassifierEquivalenceAxiom_SuperClassifiers(), this.getClassifier(), null, \"superClassifiers\", null, 0, -1, ClassifierEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getClassifierEquivalenceAxiom_OwnedPropertyRestrictions(), this.getPropertyRestrictionAxiom(), this.getPropertyRestrictionAxiom_OwningAxiom(), \"ownedPropertyRestrictions\", null, 0, -1, ClassifierEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getClassifierEquivalenceAxiom_OwningClassifier(), this.getClassifier(), this.getClassifier_OwnedEquivalences(), \"owningClassifier\", null, 0, 1, ClassifierEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getClassifierEquivalenceAxiom__GetSubClassifier(), this.getClassifier(), \"getSubClassifier\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getClassifierEquivalenceAxiom__GetCharacterizedTerm(), this.getClassifier(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(scalarEquivalenceAxiomEClass, ScalarEquivalenceAxiom.class, \"ScalarEquivalenceAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getScalarEquivalenceAxiom_SuperScalar(), this.getScalar(), null, \"superScalar\", null, 1, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalarEquivalenceAxiom_OwningScalar(), this.getScalar(), this.getScalar_OwnedEquivalences(), \"owningScalar\", null, 1, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getScalarEquivalenceAxiom_Length(), this.getUnsignedInteger(), \"length\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getScalarEquivalenceAxiom_MinLength(), this.getUnsignedInteger(), \"minLength\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getScalarEquivalenceAxiom_MaxLength(), this.getUnsignedInteger(), \"maxLength\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getScalarEquivalenceAxiom_Pattern(), theEcorePackage.getEString(), \"pattern\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getScalarEquivalenceAxiom_Language(), theEcorePackage.getEString(), \"language\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalarEquivalenceAxiom_MinInclusive(), this.getLiteral(), null, \"minInclusive\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalarEquivalenceAxiom_MinExclusive(), this.getLiteral(), null, \"minExclusive\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalarEquivalenceAxiom_MaxInclusive(), this.getLiteral(), null, \"maxInclusive\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getScalarEquivalenceAxiom_MaxExclusive(), this.getLiteral(), null, \"maxExclusive\", null, 0, 1, ScalarEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getScalarEquivalenceAxiom__GetSubScalar(), this.getScalar(), \"getSubScalar\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getScalarEquivalenceAxiom__GetCharacterizedTerm(), this.getScalar(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(propertyEquivalenceAxiomEClass, PropertyEquivalenceAxiom.class, \"PropertyEquivalenceAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPropertyEquivalenceAxiom_SuperProperty(), this.getProperty(), null, \"superProperty\", null, 1, 1, PropertyEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyEquivalenceAxiom_OwningProperty(), this.getSpecializableProperty(), this.getSpecializableProperty_OwnedEquivalences(), \"owningProperty\", null, 0, 1, PropertyEquivalenceAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getPropertyEquivalenceAxiom__GetSubProperty(), this.getProperty(), \"getSubProperty\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getPropertyEquivalenceAxiom__GetCharacterizedTerm(), this.getProperty(), \"getCharacterizedTerm\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(propertyRangeRestrictionAxiomEClass, PropertyRangeRestrictionAxiom.class, \"PropertyRangeRestrictionAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getPropertyRangeRestrictionAxiom_Kind(), this.getRangeRestrictionKind(), \"kind\", \"all\", 1, 1, PropertyRangeRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyRangeRestrictionAxiom_Range(), this.getType(), null, \"range\", null, 1, 1, PropertyRangeRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(propertyCardinalityRestrictionAxiomEClass, PropertyCardinalityRestrictionAxiom.class, \"PropertyCardinalityRestrictionAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getPropertyCardinalityRestrictionAxiom_Kind(), this.getCardinalityRestrictionKind(), \"kind\", \"exactly\", 1, 1, PropertyCardinalityRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getPropertyCardinalityRestrictionAxiom_Cardinality(), this.getUnsignedInt(), \"cardinality\", \"1\", 1, 1, PropertyCardinalityRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyCardinalityRestrictionAxiom_Range(), this.getType(), null, \"range\", null, 0, 1, PropertyCardinalityRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(propertyValueRestrictionAxiomEClass, PropertyValueRestrictionAxiom.class, \"PropertyValueRestrictionAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPropertyValueRestrictionAxiom_LiteralValue(), this.getLiteral(), null, \"literalValue\", null, 0, 1, PropertyValueRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyValueRestrictionAxiom_StructureInstanceValue(), this.getStructureInstance(), this.getStructureInstance_OwningAxiom(), \"structureInstanceValue\", null, 0, 1, PropertyValueRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyValueRestrictionAxiom_NamedInstanceValue(), this.getNamedInstance(), null, \"namedInstanceValue\", null, 0, 1, PropertyValueRestrictionAxiom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getPropertyValueRestrictionAxiom__GetValue(), this.getElement(), \"getValue\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(propertySelfRestrictionAxiomEClass, PropertySelfRestrictionAxiom.class, \"PropertySelfRestrictionAxiom\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(typeAssertionEClass, TypeAssertion.class, \"TypeAssertion\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getTypeAssertion_Type(), this.getEntity(), null, \"type\", null, 1, 1, TypeAssertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getTypeAssertion_OwningInstance(), this.getNamedInstance(), this.getNamedInstance_OwnedTypes(), \"owningInstance\", null, 0, 1, TypeAssertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getTypeAssertion__GetSubject(), this.getNamedInstance(), \"getSubject\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getTypeAssertion__GetObject(), this.getElement(), \"getObject\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(propertyValueAssertionEClass, PropertyValueAssertion.class, \"PropertyValueAssertion\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPropertyValueAssertion_Property(), this.getSemanticProperty(), null, \"property\", null, 1, 1, PropertyValueAssertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyValueAssertion_LiteralValue(), this.getLiteral(), null, \"literalValue\", null, 0, 1, PropertyValueAssertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyValueAssertion_StructureInstanceValue(), this.getStructureInstance(), this.getStructureInstance_OwningAssertion(), \"structureInstanceValue\", null, 0, 1, PropertyValueAssertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyValueAssertion_NamedInstanceValue(), this.getNamedInstance(), null, \"namedInstanceValue\", null, 0, 1, PropertyValueAssertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getPropertyValueAssertion_OwningInstance(), this.getInstance(), this.getInstance_OwnedPropertyValues(), \"owningInstance\", null, 0, 1, PropertyValueAssertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getPropertyValueAssertion__GetValue(), this.getElement(), \"getValue\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getPropertyValueAssertion__GetSubject(), this.getInstance(), \"getSubject\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getPropertyValueAssertion__GetObject(), this.getElement(), \"getObject\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(unaryPredicateEClass, UnaryPredicate.class, \"UnaryPredicate\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getUnaryPredicate_Argument(), this.getArgument(), null, \"argument\", null, 1, 1, UnaryPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(binaryPredicateEClass, BinaryPredicate.class, \"BinaryPredicate\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getBinaryPredicate_Argument1(), this.getArgument(), null, \"argument1\", null, 1, 1, BinaryPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBinaryPredicate_Argument2(), this.getArgument(), null, \"argument2\", null, 1, 1, BinaryPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(builtInPredicateEClass, BuiltInPredicate.class, \"BuiltInPredicate\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getBuiltInPredicate_BuiltIn(), this.getBuiltIn(), null, \"builtIn\", null, 1, 1, BuiltInPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getBuiltInPredicate_Arguments(), this.getArgument(), null, \"arguments\", null, 1, -1, BuiltInPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(typePredicateEClass, TypePredicate.class, \"TypePredicate\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getTypePredicate_Type(), this.getType(), null, \"type\", null, 1, 1, TypePredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(relationEntityPredicateEClass, RelationEntityPredicate.class, \"RelationEntityPredicate\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getRelationEntityPredicate_Type(), this.getRelationEntity(), null, \"type\", null, 1, 1, RelationEntityPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(propertyPredicateEClass, PropertyPredicate.class, \"PropertyPredicate\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPropertyPredicate_Property(), this.getProperty(), null, \"property\", null, 1, 1, PropertyPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(sameAsPredicateEClass, SameAsPredicate.class, \"SameAsPredicate\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(differentFromPredicateEClass, DifferentFromPredicate.class, \"DifferentFromPredicate\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(quotedLiteralEClass, QuotedLiteral.class, \"QuotedLiteral\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getQuotedLiteral_Value(), theEcorePackage.getEString(), \"value\", null, 1, 1, QuotedLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getQuotedLiteral_LangTag(), theEcorePackage.getEString(), \"langTag\", null, 0, 1, QuotedLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getQuotedLiteral_Type(), this.getScalar(), null, \"type\", null, 0, 1, QuotedLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getQuotedLiteral__GetLexicalValue(), theEcorePackage.getEString(), \"getLexicalValue\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getQuotedLiteral__GetTypeIri(), theEcorePackage.getEString(), \"getTypeIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(integerLiteralEClass, IntegerLiteral.class, \"IntegerLiteral\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getIntegerLiteral_Value(), theEcorePackage.getEIntegerObject(), \"value\", \"0\", 0, 1, IntegerLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getIntegerLiteral__GetTypeIri(), theEcorePackage.getEString(), \"getTypeIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(decimalLiteralEClass, DecimalLiteral.class, \"DecimalLiteral\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getDecimalLiteral_Value(), this.getDecimal(), \"value\", \"0.0\", 1, 1, DecimalLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getDecimalLiteral__GetTypeIri(), theEcorePackage.getEString(), \"getTypeIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(doubleLiteralEClass, DoubleLiteral.class, \"DoubleLiteral\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getDoubleLiteral_Value(), theEcorePackage.getEDoubleObject(), \"value\", \"0.0\", 0, 1, DoubleLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getDoubleLiteral__GetTypeIri(), theEcorePackage.getEString(), \"getTypeIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(booleanLiteralEClass, BooleanLiteral.class, \"BooleanLiteral\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getBooleanLiteral_Value(), theEcorePackage.getEBooleanObject(), \"value\", \"false\", 0, 1, BooleanLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getBooleanLiteral__IsValue(), theEcorePackage.getEBoolean(), \"isValue\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getBooleanLiteral__GetTypeIri(), theEcorePackage.getEString(), \"getTypeIri\", 0, 1, !IS_UNIQUE, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(separatorKindEEnum, SeparatorKind.class, \"SeparatorKind\");\n\t\taddEEnumLiteral(separatorKindEEnum, SeparatorKind.HASH);\n\t\taddEEnumLiteral(separatorKindEEnum, SeparatorKind.SLASH);\n\n\t\tinitEEnum(rangeRestrictionKindEEnum, RangeRestrictionKind.class, \"RangeRestrictionKind\");\n\t\taddEEnumLiteral(rangeRestrictionKindEEnum, RangeRestrictionKind.ALL);\n\t\taddEEnumLiteral(rangeRestrictionKindEEnum, RangeRestrictionKind.SOME);\n\n\t\tinitEEnum(cardinalityRestrictionKindEEnum, CardinalityRestrictionKind.class, \"CardinalityRestrictionKind\");\n\t\taddEEnumLiteral(cardinalityRestrictionKindEEnum, CardinalityRestrictionKind.EXACTLY);\n\t\taddEEnumLiteral(cardinalityRestrictionKindEEnum, CardinalityRestrictionKind.MIN);\n\t\taddEEnumLiteral(cardinalityRestrictionKindEEnum, CardinalityRestrictionKind.MAX);\n\n\t\tinitEEnum(importKindEEnum, ImportKind.class, \"ImportKind\");\n\t\taddEEnumLiteral(importKindEEnum, ImportKind.EXTENSION);\n\t\taddEEnumLiteral(importKindEEnum, ImportKind.USAGE);\n\t\taddEEnumLiteral(importKindEEnum, ImportKind.INCLUSION);\n\n\t\t// Initialize data types\n\t\tinitEDataType(unsignedIntEDataType, long.class, \"UnsignedInt\", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEDataType(unsignedIntegerEDataType, Long.class, \"UnsignedInteger\", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEDataType(decimalEDataType, BigDecimal.class, \"Decimal\", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEDataType(idEDataType, String.class, \"ID\", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEDataType(namespaceEDataType, String.class, \"Namespace\", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// https://tabatkins.github.io/bikeshed/headings\n\t\tcreateHeadingsAnnotations();\n\t\t// https://tabatkins.github.io/bikeshed\n\t\tcreateBikeshedAnnotations();\n\t\t// http://www.eclipse.org/emf/2011/Xcore\n\t\tcreateXcoreAnnotations();\n\t\t// http:///org/eclipse/emf/ecore/util/ExtendedMetaData\n\t\tcreateExtendedMetaDataAnnotations();\n\t}", "public void loadConstNames() {\r\n \tloadHerculesNames();\r\n \tloadUrsaMinorNames();\r\n \tloadUrsaMajorNames();\r\n \tloadLibraNames();\r\n \tloadAndromedaNames();\r\n \tloadAquariusNames();\r\n \tloadAquilaNames();\r\n \tloadAriesNames();\r\n \tloadAurigaNames();\r\n \tloadBootesNames();\r\n \tloadCancerNames();\r\n \tloadCanisMajorNames();\r\n \tloadCanisMinorNames();\r\n \tloadCapricornusNames();\r\n \tloadCassiopeiaNames();\r\n \tloadCentaurusNames();\r\n \tloadCepheusNames();\r\n \tloadCruxNames();\r\n \tloadCygnusNames();\r\n \tloadDracoNames();\r\n \tloadGeminiNames();\r\n \tloadHydraNames();\r\n \tloadLeoNames();\r\n \tloadLyraNames();\r\n \tloadOrionNames();\r\n \tloadPegasusNames();\r\n \tloadPerseusNames();\r\n \tloadPiscesNames();\r\n \tloadSagittariusNames();\r\n \tloadScorpioNames();\r\n \tloadTaurusNames();\r\n }", "@Override\n public void onDiscovery(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {\n }", "protected void loadProcessor() {\n this.setContentAssistProcessor(createProcessor(),\n IDocument.DEFAULT_CONTENT_TYPE);\n }", "public void beginLoad(int libraryCount);", "public void init() {\n\n /**\n * FontFile1 = A stream containing a Type 1 font program\n * FontFile2 = A stream containing a TrueType font program\n * FontFile3 = A stream containing a font program other than Type 1 or\n * TrueType. The format of the font program is specified by the Subtype entry\n * in the stream dictionary\n */\n try {\n\n // get an instance of our font factory\n FontFactory fontFactory = FontFactory.getInstance();\n\n if (entries.containsKey(FONT_FILE)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n }\n\n if (entries.containsKey(FONT_FILE_2)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_2);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TRUE_TYPE);\n }\n }\n\n if (entries.containsKey(FONT_FILE_3)) {\n\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_3);\n String subType = fontStream.getObject(\"Subtype\").toString();\n if (subType != null &&\n (subType.equals(FONT_FILE_3_TYPE_1C) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0C))\n ) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n if (subType != null && subType.equals(FONT_FILE_3_OPEN_TYPE)) {\n// font = new NFontOpenType(fontStreamBytes);\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_OPEN_TYPE);\n }\n }\n }\n // catch everything, we can fall back to font substitution if a failure\n // occurs. \n catch (Throwable e) {\n logger.log(Level.FINE, \"Error Reading Embedded Font \", e);\n }\n\n }", "public void loadEntities (File entitiesFile){\n BufferedReader br = null;\n int lineNum = 0;\n try {\n String term;\n br = new BufferedReader(new FileReader(entitiesFile));\n String line = \"\";\n while ((line = (br.readLine())) != null) {\n lineNum++;\n if (!line.contains(\"--noEntities--\")) {\n String docId = line.substring(0, line.indexOf(\":\"));\n String [] entitiesStr = line.split(\"; \");\n if (entitiesStr.length > 0){\n entitiesStr[0] = entitiesStr[0].substring(line.indexOf(\":\") + 2);\n }\n HashMap <String, Integer> entitiesInfo = new HashMap<>();\n for (int i = 0; i < entitiesStr.length ; i++){\n String [] entitiesRankStr = entitiesStr[i].split(\" - \");\n if (entitiesRankStr.length < 2){\n System.out.println(lineNum + \" \" + entitiesRankStr[0]);\n }\n entitiesInfo.put(entitiesRankStr[0], Integer.parseInt(entitiesRankStr[1]));\n }\n entities.put(docId, entitiesInfo);\n }\n }\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testLoadArrayDesign() throws PlatformLoadingException, AffymetrixCdfReadException {\n checkLoadArrayDesign(TestArrayDesignFiles.HG_U133_PLUS_2_CDF_FILE,\n TestArrayDesignFiles.HG_U133_PLUS_2_ANNOTATION_FILE);\n }", "public void load() ;", "public interface FmprimitivesPackage extends EPackage\n{\n /**\n * The package name.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNAME = \"fmprimitives\";\n\n /**\n * The package namespace URI.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNS_URI = \"http://lero.ie/spl/fmprimitives.ecore\";\n\n /**\n * The package namespace name.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNS_PREFIX = \"fmprimitives\";\n\n /**\n * The singleton instance of the package.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n FmprimitivesPackage eINSTANCE = fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl.init();\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelImpl <em>Feature Model</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureModel()\n * @generated\n */\n int FEATURE_MODEL = 0;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL__ID = 0;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL__NAME = 1;\n\n /**\n * The feature id for the '<em><b>Features</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL__FEATURES = 2;\n\n /**\n * The feature id for the '<em><b>Primitives</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL__PRIMITIVES = 3;\n\n /**\n * The number of structural features of the '<em>Feature Model</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_FEATURE_COUNT = 4;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelPrimitiveImpl <em>Feature Model Primitive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelPrimitiveImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureModelPrimitive()\n * @generated\n */\n int FEATURE_MODEL_PRIMITIVE = 1;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE__ID = 0;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE__NAME = 1;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE = 2;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE__EXPLANATIONS = 3;\n\n /**\n * The number of structural features of the '<em>Feature Model Primitive</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT = 4;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasSubfeatureImpl <em>Feature Has Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasSubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasSubfeature()\n * @generated\n */\n int FEATURE_HAS_SUBFEATURE = 2;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Subfeature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__SUBFEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Feature Has Subfeature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.UndirectedRelationshipImpl <em>Undirected Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.UndirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getUndirectedRelationship()\n * @generated\n */\n int UNDIRECTED_RELATIONSHIP = 3;\n\n /**\n * The number of structural features of the '<em>Undirected Relationship</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int UNDIRECTED_RELATIONSHIP_FEATURE_COUNT = 0;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.DirectedRelationshipImpl <em>Directed Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.DirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getDirectedRelationship()\n * @generated\n */\n int DIRECTED_RELATIONSHIP = 4;\n\n /**\n * The number of structural features of the '<em>Directed Relationship</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int DIRECTED_RELATIONSHIP_FEATURE_COUNT = 0;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureGroupImpl <em>Feature Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureGroup()\n * @generated\n */\n int FEATURE_GROUP = 5;\n\n /**\n * The number of structural features of the '<em>Feature Group</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_GROUP_FEATURE_COUNT = 0;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureImpl <em>Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeature()\n * @generated\n */\n int FEATURE = 6;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__ID = 0;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__NAME = 1;\n\n /**\n * The feature id for the '<em><b>Group Has Parent</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__GROUP_HAS_PARENT = 2;\n\n /**\n * The feature id for the '<em><b>Group Has Child</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__GROUP_HAS_CHILD = 3;\n\n /**\n * The feature id for the '<em><b>Feature Has Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__FEATURE_HAS_PARENT = 4;\n\n /**\n * The feature id for the '<em><b>Feature Has Subfeature</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__FEATURE_HAS_SUBFEATURE = 5;\n\n /**\n * The feature id for the '<em><b>Selected Feature</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__SELECTED_FEATURE = 6;\n\n /**\n * The feature id for the '<em><b>Eliminated Feature</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__ELIMINATED_FEATURE = 7;\n\n /**\n * The feature id for the '<em><b>Undirected Relationships</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__UNDIRECTED_RELATIONSHIPS = 8;\n\n /**\n * The feature id for the '<em><b>Incoming Directed Relationships</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__INCOMING_DIRECTED_RELATIONSHIPS = 9;\n\n /**\n * The feature id for the '<em><b>Outgoing Directed Relationships</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__OUTGOING_DIRECTED_RELATIONSHIPS = 10;\n\n /**\n * The feature id for the '<em><b>Feature Is Root</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__FEATURE_IS_ROOT = 11;\n\n /**\n * The number of structural features of the '<em>Feature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_FEATURE_COUNT = 12;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasParentImpl <em>Group Has Parent</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasParentImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasParent()\n * @generated\n */\n int GROUP_HAS_PARENT = 7;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__GROUP = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Group Has Parent</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasChildImpl <em>Group Has Child</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasChildImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasChild()\n * @generated\n */\n int GROUP_HAS_CHILD = 8;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Child</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__CHILD = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__GROUP = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Group Has Child</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.SelectedFeatureImpl <em>Selected Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.SelectedFeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getSelectedFeature()\n * @generated\n */\n int SELECTED_FEATURE = 9;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Feature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__FEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Selected Feature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.EliminatedFeatureImpl <em>Eliminated Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.EliminatedFeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getEliminatedFeature()\n * @generated\n */\n int ELIMINATED_FEATURE = 10;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Feature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__FEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Eliminated Feature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureIsRootImpl <em>Feature Is Root</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureIsRootImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureIsRoot()\n * @generated\n */\n int FEATURE_IS_ROOT = 11;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Feature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__FEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Feature Is Root</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.ExplanationImpl <em>Explanation</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.ExplanationImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getExplanation()\n * @generated\n */\n int EXPLANATION = 12;\n\n /**\n * The feature id for the '<em><b>Primitives</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EXPLANATION__PRIMITIVES = 0;\n\n /**\n * The number of structural features of the '<em>Explanation</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EXPLANATION_FEATURE_COUNT = 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMaxImpl <em>Group Has Max</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMaxImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasMax()\n * @generated\n */\n int GROUP_HAS_MAX = 13;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Max</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__MAX = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__GROUP = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Group Has Max</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMinImpl <em>Group Has Min</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMinImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasMin()\n * @generated\n */\n int GROUP_HAS_MIN = 14;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Min</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__MIN = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__GROUP = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Group Has Min</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.AlternativeGroupImpl <em>Alternative Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.AlternativeGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getAlternativeGroup()\n * @generated\n */\n int ALTERNATIVE_GROUP = 15;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Group Has Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__GROUP_HAS_PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group Has Child</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__GROUP_HAS_CHILD = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The feature id for the '<em><b>Group Has Max</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__GROUP_HAS_MAX = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The feature id for the '<em><b>Group Has Min</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__GROUP_HAS_MIN = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 3;\n\n /**\n * The number of structural features of the '<em>Alternative Group</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 4;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.OrGroupImpl <em>Or Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.OrGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getOrGroup()\n * @generated\n */\n int OR_GROUP = 16;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Group Has Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__GROUP_HAS_PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group Has Child</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__GROUP_HAS_CHILD = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The feature id for the '<em><b>Group Has Max</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__GROUP_HAS_MAX = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The feature id for the '<em><b>Group Has Min</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__GROUP_HAS_MIN = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 3;\n\n /**\n * The number of structural features of the '<em>Or Group</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 4;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasOptionalSubfeatureImpl <em>Feature Has Optional Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasOptionalSubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasOptionalSubfeature()\n * @generated\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE = 17;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Subfeature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__SUBFEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Feature Has Optional Subfeature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasMandatorySubfeatureImpl <em>Feature Has Mandatory Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasMandatorySubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasMandatorySubfeature()\n * @generated\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE = 18;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Subfeature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__SUBFEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Feature Has Mandatory Subfeature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.MutualExclusiveImpl <em>Mutual Exclusive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.MutualExclusiveImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getMutualExclusive()\n * @generated\n */\n int MUTUAL_EXCLUSIVE = 19;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Related Features</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__RELATED_FEATURES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Mutual Exclusive</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.CustomUndirectedRelationshipImpl <em>Custom Undirected Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.CustomUndirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getCustomUndirectedRelationship()\n * @generated\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP = 20;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Stereotype</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__STEREOTYPE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Related Features</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__RELATED_FEATURES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Custom Undirected Relationship</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.RequiresImpl <em>Requires</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.RequiresImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getRequires()\n * @generated\n */\n int REQUIRES = 21;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Sources</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__SOURCES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Targets</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__TARGETS = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Requires</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.TemporalOrderingSequentialImpl <em>Temporal Ordering Sequential</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.TemporalOrderingSequentialImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getTemporalOrderingSequential()\n * @generated\n */\n int TEMPORAL_ORDERING_SEQUENTIAL = 22;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Sources</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__SOURCES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Targets</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__TARGETS = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Temporal Ordering Sequential</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.CustomDirectedRelationshipImpl <em>Custom Directed Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.CustomDirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getCustomDirectedRelationship()\n * @generated\n */\n int CUSTOM_DIRECTED_RELATIONSHIP = 23;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Stereotype</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__STEREOTYPE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Sources</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__SOURCES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The feature id for the '<em><b>Targets</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__TARGETS = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The number of structural features of the '<em>Custom Directed Relationship</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 3;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.AutoCompleteImpl <em>Auto Complete</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.AutoCompleteImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getAutoComplete()\n * @generated\n */\n int AUTO_COMPLETE = 24;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The number of structural features of the '<em>Auto Complete</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource <em>Configuration Source</em>}' enum.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getConfigurationSource()\n * @generated\n */\n int CONFIGURATION_SOURCE = 25;\n\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel <em>Feature Model</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Model</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel\n * @generated\n */\n EClass getFeatureModel();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getId <em>Id</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Id</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getId()\n * @see #getFeatureModel()\n * @generated\n */\n EAttribute getFeatureModel_Id();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getName <em>Name</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Name</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getName()\n * @see #getFeatureModel()\n * @generated\n */\n EAttribute getFeatureModel_Name();\n\n /**\n * Returns the meta object for the containment reference list '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getFeatures <em>Features</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the containment reference list '<em>Features</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getFeatures()\n * @see #getFeatureModel()\n * @generated\n */\n EReference getFeatureModel_Features();\n\n /**\n * Returns the meta object for the containment reference list '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getPrimitives <em>Primitives</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the containment reference list '<em>Primitives</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getPrimitives()\n * @see #getFeatureModel()\n * @generated\n */\n EReference getFeatureModel_Primitives();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive <em>Feature Model Primitive</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Model Primitive</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive\n * @generated\n */\n EClass getFeatureModelPrimitive();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getId <em>Id</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Id</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getId()\n * @see #getFeatureModelPrimitive()\n * @generated\n */\n EAttribute getFeatureModelPrimitive_Id();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getName <em>Name</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Name</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getName()\n * @see #getFeatureModelPrimitive()\n * @generated\n */\n EAttribute getFeatureModelPrimitive_Name();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getConfigurationSource <em>Configuration Source</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Configuration Source</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getConfigurationSource()\n * @see #getFeatureModelPrimitive()\n * @generated\n */\n EAttribute getFeatureModelPrimitive_ConfigurationSource();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getExplanations <em>Explanations</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Explanations</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getExplanations()\n * @see #getFeatureModelPrimitive()\n * @generated\n */\n EReference getFeatureModelPrimitive_Explanations();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature <em>Feature Has Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Has Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature\n * @generated\n */\n EClass getFeatureHasSubfeature();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature#getParent <em>Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature#getParent()\n * @see #getFeatureHasSubfeature()\n * @generated\n */\n EReference getFeatureHasSubfeature_Parent();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature#getSubfeature <em>Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature#getSubfeature()\n * @see #getFeatureHasSubfeature()\n * @generated\n */\n EReference getFeatureHasSubfeature_Subfeature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.UndirectedRelationship <em>Undirected Relationship</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Undirected Relationship</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.UndirectedRelationship\n * @generated\n */\n EClass getUndirectedRelationship();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.DirectedRelationship <em>Directed Relationship</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Directed Relationship</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.DirectedRelationship\n * @generated\n */\n EClass getDirectedRelationship();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureGroup <em>Feature Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureGroup\n * @generated\n */\n EClass getFeatureGroup();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.Feature <em>Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature\n * @generated\n */\n EClass getFeature();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getId <em>Id</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Id</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getId()\n * @see #getFeature()\n * @generated\n */\n EAttribute getFeature_Id();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getName <em>Name</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Name</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getName()\n * @see #getFeature()\n * @generated\n */\n EAttribute getFeature_Name();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getGroupHasParent <em>Group Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Group Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getGroupHasParent()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_GroupHasParent();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getGroupHasChild <em>Group Has Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Group Has Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getGroupHasChild()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_GroupHasChild();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureHasParent <em>Feature Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureHasParent()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_FeatureHasParent();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureHasSubfeature <em>Feature Has Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Feature Has Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureHasSubfeature()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_FeatureHasSubfeature();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getSelectedFeature <em>Selected Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Selected Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getSelectedFeature()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_SelectedFeature();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getEliminatedFeature <em>Eliminated Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Eliminated Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getEliminatedFeature()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_EliminatedFeature();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getUndirectedRelationships <em>Undirected Relationships</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Undirected Relationships</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getUndirectedRelationships()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_UndirectedRelationships();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getIncomingDirectedRelationships <em>Incoming Directed Relationships</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Incoming Directed Relationships</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getIncomingDirectedRelationships()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_IncomingDirectedRelationships();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getOutgoingDirectedRelationships <em>Outgoing Directed Relationships</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Outgoing Directed Relationships</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getOutgoingDirectedRelationships()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_OutgoingDirectedRelationships();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureIsRoot <em>Feature Is Root</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature Is Root</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureIsRoot()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_FeatureIsRoot();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasParent <em>Group Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Group Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasParent\n * @generated\n */\n EClass getGroupHasParent();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasParent#getParent <em>Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasParent#getParent()\n * @see #getGroupHasParent()\n * @generated\n */\n EReference getGroupHasParent_Parent();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasParent#getGroup <em>Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasParent#getGroup()\n * @see #getGroupHasParent()\n * @generated\n */\n EReference getGroupHasParent_Group();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasChild <em>Group Has Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Group Has Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasChild\n * @generated\n */\n EClass getGroupHasChild();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasChild#getChild <em>Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasChild#getChild()\n * @see #getGroupHasChild()\n * @generated\n */\n EReference getGroupHasChild_Child();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasChild#getGroup <em>Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasChild#getGroup()\n * @see #getGroupHasChild()\n * @generated\n */\n EReference getGroupHasChild_Group();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.SelectedFeature <em>Selected Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Selected Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.SelectedFeature\n * @generated\n */\n EClass getSelectedFeature();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.SelectedFeature#getFeature <em>Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.SelectedFeature#getFeature()\n * @see #getSelectedFeature()\n * @generated\n */\n EReference getSelectedFeature_Feature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.EliminatedFeature <em>Eliminated Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Eliminated Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.EliminatedFeature\n * @generated\n */\n EClass getEliminatedFeature();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.EliminatedFeature#getFeature <em>Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.EliminatedFeature#getFeature()\n * @see #getEliminatedFeature()\n * @generated\n */\n EReference getEliminatedFeature_Feature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureIsRoot <em>Feature Is Root</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Is Root</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureIsRoot\n * @generated\n */\n EClass getFeatureIsRoot();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureIsRoot#getFeature <em>Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureIsRoot#getFeature()\n * @see #getFeatureIsRoot()\n * @generated\n */\n EReference getFeatureIsRoot_Feature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.Explanation <em>Explanation</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Explanation</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Explanation\n * @generated\n */\n EClass getExplanation();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Explanation#getPrimitives <em>Primitives</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Primitives</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Explanation#getPrimitives()\n * @see #getExplanation()\n * @generated\n */\n EReference getExplanation_Primitives();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMax <em>Group Has Max</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Group Has Max</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMax\n * @generated\n */\n EClass getGroupHasMax();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMax#getMax <em>Max</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Max</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMax#getMax()\n * @see #getGroupHasMax()\n * @generated\n */\n EAttribute getGroupHasMax_Max();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMax#getGroup <em>Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMax#getGroup()\n * @see #getGroupHasMax()\n * @generated\n */\n EReference getGroupHasMax_Group();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMin <em>Group Has Min</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Group Has Min</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMin\n * @generated\n */\n EClass getGroupHasMin();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMin#getMin <em>Min</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Min</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMin#getMin()\n * @see #getGroupHasMin()\n * @generated\n */\n EAttribute getGroupHasMin_Min();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMin#getGroup <em>Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMin#getGroup()\n * @see #getGroupHasMin()\n * @generated\n */\n EReference getGroupHasMin_Group();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup <em>Alternative Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Alternative Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup\n * @generated\n */\n EClass getAlternativeGroup();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasParent <em>Group Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasParent()\n * @see #getAlternativeGroup()\n * @generated\n */\n EReference getAlternativeGroup_GroupHasParent();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasChild <em>Group Has Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Group Has Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasChild()\n * @see #getAlternativeGroup()\n * @generated\n */\n EReference getAlternativeGroup_GroupHasChild();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasMax <em>Group Has Max</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Max</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasMax()\n * @see #getAlternativeGroup()\n * @generated\n */\n EReference getAlternativeGroup_GroupHasMax();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasMin <em>Group Has Min</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Min</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasMin()\n * @see #getAlternativeGroup()\n * @generated\n */\n EReference getAlternativeGroup_GroupHasMin();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup <em>Or Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Or Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup\n * @generated\n */\n EClass getOrGroup();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasParent <em>Group Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasParent()\n * @see #getOrGroup()\n * @generated\n */\n EReference getOrGroup_GroupHasParent();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasChild <em>Group Has Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Group Has Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasChild()\n * @see #getOrGroup()\n * @generated\n */\n EReference getOrGroup_GroupHasChild();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasMax <em>Group Has Max</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Max</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasMax()\n * @see #getOrGroup()\n * @generated\n */\n EReference getOrGroup_GroupHasMax();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasMin <em>Group Has Min</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Min</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasMin()\n * @see #getOrGroup()\n * @generated\n */\n EReference getOrGroup_GroupHasMin();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasOptionalSubfeature <em>Feature Has Optional Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Has Optional Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasOptionalSubfeature\n * @generated\n */\n EClass getFeatureHasOptionalSubfeature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasMandatorySubfeature <em>Feature Has Mandatory Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Has Mandatory Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasMandatorySubfeature\n * @generated\n */\n EClass getFeatureHasMandatorySubfeature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.MutualExclusive <em>Mutual Exclusive</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Mutual Exclusive</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.MutualExclusive\n * @generated\n */\n EClass getMutualExclusive();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.MutualExclusive#getRelatedFeatures <em>Related Features</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Related Features</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.MutualExclusive#getRelatedFeatures()\n * @see #getMutualExclusive()\n * @generated\n */\n EReference getMutualExclusive_RelatedFeatures();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship <em>Custom Undirected Relationship</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Custom Undirected Relationship</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship\n * @generated\n */\n EClass getCustomUndirectedRelationship();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship#getStereotype <em>Stereotype</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Stereotype</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship#getStereotype()\n * @see #getCustomUndirectedRelationship()\n * @generated\n */\n EAttribute getCustomUndirectedRelationship_Stereotype();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship#getRelatedFeatures <em>Related Features</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Related Features</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship#getRelatedFeatures()\n * @see #getCustomUndirectedRelationship()\n * @generated\n */\n EReference getCustomUndirectedRelationship_RelatedFeatures();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.Requires <em>Requires</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Requires</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Requires\n * @generated\n */\n EClass getRequires();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Requires#getSources <em>Sources</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Sources</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Requires#getSources()\n * @see #getRequires()\n * @generated\n */\n EReference getRequires_Sources();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Requires#getTargets <em>Targets</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Targets</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Requires#getTargets()\n * @see #getRequires()\n * @generated\n */\n EReference getRequires_Targets();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential <em>Temporal Ordering Sequential</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Temporal Ordering Sequential</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential\n * @generated\n */\n EClass getTemporalOrderingSequential();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential#getSources <em>Sources</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Sources</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential#getSources()\n * @see #getTemporalOrderingSequential()\n * @generated\n */\n EReference getTemporalOrderingSequential_Sources();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential#getTargets <em>Targets</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Targets</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential#getTargets()\n * @see #getTemporalOrderingSequential()\n * @generated\n */\n EReference getTemporalOrderingSequential_Targets();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship <em>Custom Directed Relationship</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Custom Directed Relationship</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship\n * @generated\n */\n EClass getCustomDirectedRelationship();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getStereotype <em>Stereotype</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Stereotype</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getStereotype()\n * @see #getCustomDirectedRelationship()\n * @generated\n */\n EAttribute getCustomDirectedRelationship_Stereotype();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getSources <em>Sources</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Sources</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getSources()\n * @see #getCustomDirectedRelationship()\n * @generated\n */\n EReference getCustomDirectedRelationship_Sources();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getTargets <em>Targets</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Targets</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getTargets()\n * @see #getCustomDirectedRelationship()\n * @generated\n */\n EReference getCustomDirectedRelationship_Targets();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.AutoComplete <em>Auto Complete</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Auto Complete</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AutoComplete\n * @generated\n */\n EClass getAutoComplete();\n\n /**\n * Returns the meta object for enum '{@link fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource <em>Configuration Source</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for enum '<em>Configuration Source</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource\n * @generated\n */\n EEnum getConfigurationSource();\n\n /**\n * Returns the factory that creates the instances of the model.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the factory that creates the instances of the model.\n * @generated\n */\n FmprimitivesFactory getFmprimitivesFactory();\n\n /**\n * <!-- begin-user-doc -->\n * Defines literals for the meta objects that represent\n * <ul>\n * <li>each class,</li>\n * <li>each feature of each class,</li>\n * <li>each enum,</li>\n * <li>and each data type</li>\n * </ul>\n * <!-- end-user-doc -->\n * @generated\n */\n interface Literals\n {\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelImpl <em>Feature Model</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureModel()\n * @generated\n */\n EClass FEATURE_MODEL = eINSTANCE.getFeatureModel();\n\n /**\n * The meta object literal for the '<em><b>Id</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL__ID = eINSTANCE.getFeatureModel_Id();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL__NAME = eINSTANCE.getFeatureModel_Name();\n\n /**\n * The meta object literal for the '<em><b>Features</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_MODEL__FEATURES = eINSTANCE.getFeatureModel_Features();\n\n /**\n * The meta object literal for the '<em><b>Primitives</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_MODEL__PRIMITIVES = eINSTANCE.getFeatureModel_Primitives();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelPrimitiveImpl <em>Feature Model Primitive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelPrimitiveImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureModelPrimitive()\n * @generated\n */\n EClass FEATURE_MODEL_PRIMITIVE = eINSTANCE.getFeatureModelPrimitive();\n\n /**\n * The meta object literal for the '<em><b>Id</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL_PRIMITIVE__ID = eINSTANCE.getFeatureModelPrimitive_Id();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL_PRIMITIVE__NAME = eINSTANCE.getFeatureModelPrimitive_Name();\n\n /**\n * The meta object literal for the '<em><b>Configuration Source</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE = eINSTANCE.getFeatureModelPrimitive_ConfigurationSource();\n\n /**\n * The meta object literal for the '<em><b>Explanations</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_MODEL_PRIMITIVE__EXPLANATIONS = eINSTANCE.getFeatureModelPrimitive_Explanations();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasSubfeatureImpl <em>Feature Has Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasSubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasSubfeature()\n * @generated\n */\n EClass FEATURE_HAS_SUBFEATURE = eINSTANCE.getFeatureHasSubfeature();\n\n /**\n * The meta object literal for the '<em><b>Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_HAS_SUBFEATURE__PARENT = eINSTANCE.getFeatureHasSubfeature_Parent();\n\n /**\n * The meta object literal for the '<em><b>Subfeature</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_HAS_SUBFEATURE__SUBFEATURE = eINSTANCE.getFeatureHasSubfeature_Subfeature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.UndirectedRelationshipImpl <em>Undirected Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.UndirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getUndirectedRelationship()\n * @generated\n */\n EClass UNDIRECTED_RELATIONSHIP = eINSTANCE.getUndirectedRelationship();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.DirectedRelationshipImpl <em>Directed Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.DirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getDirectedRelationship()\n * @generated\n */\n EClass DIRECTED_RELATIONSHIP = eINSTANCE.getDirectedRelationship();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureGroupImpl <em>Feature Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureGroup()\n * @generated\n */\n EClass FEATURE_GROUP = eINSTANCE.getFeatureGroup();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureImpl <em>Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeature()\n * @generated\n */\n EClass FEATURE = eINSTANCE.getFeature();\n\n /**\n * The meta object literal for the '<em><b>Id</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE__ID = eINSTANCE.getFeature_Id();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE__NAME = eINSTANCE.getFeature_Name();\n\n /**\n * The meta object literal for the '<em><b>Group Has Parent</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__GROUP_HAS_PARENT = eINSTANCE.getFeature_GroupHasParent();\n\n /**\n * The meta object literal for the '<em><b>Group Has Child</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__GROUP_HAS_CHILD = eINSTANCE.getFeature_GroupHasChild();\n\n /**\n * The meta object literal for the '<em><b>Feature Has Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__FEATURE_HAS_PARENT = eINSTANCE.getFeature_FeatureHasParent();\n\n /**\n * The meta object literal for the '<em><b>Feature Has Subfeature</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__FEATURE_HAS_SUBFEATURE = eINSTANCE.getFeature_FeatureHasSubfeature();\n\n /**\n * The meta object literal for the '<em><b>Selected Feature</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__SELECTED_FEATURE = eINSTANCE.getFeature_SelectedFeature();\n\n /**\n * The meta object literal for the '<em><b>Eliminated Feature</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__ELIMINATED_FEATURE = eINSTANCE.getFeature_EliminatedFeature();\n\n /**\n * The meta object literal for the '<em><b>Undirected Relationships</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__UNDIRECTED_RELATIONSHIPS = eINSTANCE.getFeature_UndirectedRelationships();\n\n /**\n * The meta object literal for the '<em><b>Incoming Directed Relationships</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__INCOMING_DIRECTED_RELATIONSHIPS = eINSTANCE.getFeature_IncomingDirectedRelationships();\n\n /**\n * The meta object literal for the '<em><b>Outgoing Directed Relationships</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__OUTGOING_DIRECTED_RELATIONSHIPS = eINSTANCE.getFeature_OutgoingDirectedRelationships();\n\n /**\n * The meta object literal for the '<em><b>Feature Is Root</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__FEATURE_IS_ROOT = eINSTANCE.getFeature_FeatureIsRoot();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasParentImpl <em>Group Has Parent</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasParentImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasParent()\n * @generated\n */\n EClass GROUP_HAS_PARENT = eINSTANCE.getGroupHasParent();\n\n /**\n * The meta object literal for the '<em><b>Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_PARENT__PARENT = eINSTANCE.getGroupHasParent_Parent();\n\n /**\n * The meta object literal for the '<em><b>Group</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_PARENT__GROUP = eINSTANCE.getGroupHasParent_Group();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasChildImpl <em>Group Has Child</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasChildImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasChild()\n * @generated\n */\n EClass GROUP_HAS_CHILD = eINSTANCE.getGroupHasChild();\n\n /**\n * The meta object literal for the '<em><b>Child</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_CHILD__CHILD = eINSTANCE.getGroupHasChild_Child();\n\n /**\n * The meta object literal for the '<em><b>Group</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_CHILD__GROUP = eINSTANCE.getGroupHasChild_Group();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.SelectedFeatureImpl <em>Selected Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.SelectedFeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getSelectedFeature()\n * @generated\n */\n EClass SELECTED_FEATURE = eINSTANCE.getSelectedFeature();\n\n /**\n * The meta object literal for the '<em><b>Feature</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SELECTED_FEATURE__FEATURE = eINSTANCE.getSelectedFeature_Feature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.EliminatedFeatureImpl <em>Eliminated Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.EliminatedFeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getEliminatedFeature()\n * @generated\n */\n EClass ELIMINATED_FEATURE = eINSTANCE.getEliminatedFeature();\n\n /**\n * The meta object literal for the '<em><b>Feature</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ELIMINATED_FEATURE__FEATURE = eINSTANCE.getEliminatedFeature_Feature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureIsRootImpl <em>Feature Is Root</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureIsRootImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureIsRoot()\n * @generated\n */\n EClass FEATURE_IS_ROOT = eINSTANCE.getFeatureIsRoot();\n\n /**\n * The meta object literal for the '<em><b>Feature</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_IS_ROOT__FEATURE = eINSTANCE.getFeatureIsRoot_Feature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.ExplanationImpl <em>Explanation</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.ExplanationImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getExplanation()\n * @generated\n */\n EClass EXPLANATION = eINSTANCE.getExplanation();\n\n /**\n * The meta object literal for the '<em><b>Primitives</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference EXPLANATION__PRIMITIVES = eINSTANCE.getExplanation_Primitives();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMaxImpl <em>Group Has Max</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMaxImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasMax()\n * @generated\n */\n EClass GROUP_HAS_MAX = eINSTANCE.getGroupHasMax();\n\n /**\n * The meta object literal for the '<em><b>Max</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute GROUP_HAS_MAX__MAX = eINSTANCE.getGroupHasMax_Max();\n\n /**\n * The meta object literal for the '<em><b>Group</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_MAX__GROUP = eINSTANCE.getGroupHasMax_Group();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMinImpl <em>Group Has Min</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMinImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasMin()\n * @generated\n */\n EClass GROUP_HAS_MIN = eINSTANCE.getGroupHasMin();\n\n /**\n * The meta object literal for the '<em><b>Min</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute GROUP_HAS_MIN__MIN = eINSTANCE.getGroupHasMin_Min();\n\n /**\n * The meta object literal for the '<em><b>Group</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_MIN__GROUP = eINSTANCE.getGroupHasMin_Group();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.AlternativeGroupImpl <em>Alternative Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.AlternativeGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getAlternativeGroup()\n * @generated\n */\n EClass ALTERNATIVE_GROUP = eINSTANCE.getAlternativeGroup();\n\n /**\n * The meta object literal for the '<em><b>Group Has Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ALTERNATIVE_GROUP__GROUP_HAS_PARENT = eINSTANCE.getAlternativeGroup_GroupHasParent();\n\n /**\n * The meta object literal for the '<em><b>Group Has Child</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ALTERNATIVE_GROUP__GROUP_HAS_CHILD = eINSTANCE.getAlternativeGroup_GroupHasChild();\n\n /**\n * The meta object literal for the '<em><b>Group Has Max</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ALTERNATIVE_GROUP__GROUP_HAS_MAX = eINSTANCE.getAlternativeGroup_GroupHasMax();\n\n /**\n * The meta object literal for the '<em><b>Group Has Min</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ALTERNATIVE_GROUP__GROUP_HAS_MIN = eINSTANCE.getAlternativeGroup_GroupHasMin();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.OrGroupImpl <em>Or Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.OrGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getOrGroup()\n * @generated\n */\n EClass OR_GROUP = eINSTANCE.getOrGroup();\n\n /**\n * The meta object literal for the '<em><b>Group Has Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OR_GROUP__GROUP_HAS_PARENT = eINSTANCE.getOrGroup_GroupHasParent();\n\n /**\n * The meta object literal for the '<em><b>Group Has Child</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OR_GROUP__GROUP_HAS_CHILD = eINSTANCE.getOrGroup_GroupHasChild();\n\n /**\n * The meta object literal for the '<em><b>Group Has Max</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OR_GROUP__GROUP_HAS_MAX = eINSTANCE.getOrGroup_GroupHasMax();\n\n /**\n * The meta object literal for the '<em><b>Group Has Min</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OR_GROUP__GROUP_HAS_MIN = eINSTANCE.getOrGroup_GroupHasMin();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasOptionalSubfeatureImpl <em>Feature Has Optional Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasOptionalSubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasOptionalSubfeature()\n * @generated\n */\n EClass FEATURE_HAS_OPTIONAL_SUBFEATURE = eINSTANCE.getFeatureHasOptionalSubfeature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasMandatorySubfeatureImpl <em>Feature Has Mandatory Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasMandatorySubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasMandatorySubfeature()\n * @generated\n */\n EClass FEATURE_HAS_MANDATORY_SUBFEATURE = eINSTANCE.getFeatureHasMandatorySubfeature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.MutualExclusiveImpl <em>Mutual Exclusive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.MutualExclusiveImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getMutualExclusive()\n * @generated\n */\n EClass MUTUAL_EXCLUSIVE = eINSTANCE.getMutualExclusive();\n\n /**\n * The meta object literal for the '<em><b>Related Features</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference MUTUAL_EXCLUSIVE__RELATED_FEATURES = eINSTANCE.getMutualExclusive_RelatedFeatures();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.CustomUndirectedRelationshipImpl <em>Custom Undirected Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.CustomUndirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getCustomUndirectedRelationship()\n * @generated\n */\n EClass CUSTOM_UNDIRECTED_RELATIONSHIP = eINSTANCE.getCustomUndirectedRelationship();\n\n /**\n * The meta object literal for the '<em><b>Stereotype</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CUSTOM_UNDIRECTED_RELATIONSHIP__STEREOTYPE = eINSTANCE.getCustomUndirectedRelationship_Stereotype();\n\n /**\n * The meta object literal for the '<em><b>Related Features</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference CUSTOM_UNDIRECTED_RELATIONSHIP__RELATED_FEATURES = eINSTANCE.getCustomUndirectedRelationship_RelatedFeatures();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.RequiresImpl <em>Requires</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.RequiresImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getRequires()\n * @generated\n */\n EClass REQUIRES = eINSTANCE.getRequires();\n\n /**\n * The meta object literal for the '<em><b>Sources</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference REQUIRES__SOURCES = eINSTANCE.getRequires_Sources();\n\n /**\n * The meta object literal for the '<em><b>Targets</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference REQUIRES__TARGETS = eINSTANCE.getRequires_Targets();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.TemporalOrderingSequentialImpl <em>Temporal Ordering Sequential</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.TemporalOrderingSequentialImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getTemporalOrderingSequential()\n * @generated\n */\n EClass TEMPORAL_ORDERING_SEQUENTIAL = eINSTANCE.getTemporalOrderingSequential();\n\n /**\n * The meta object literal for the '<em><b>Sources</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference TEMPORAL_ORDERING_SEQUENTIAL__SOURCES = eINSTANCE.getTemporalOrderingSequential_Sources();\n\n /**\n * The meta object literal for the '<em><b>Targets</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference TEMPORAL_ORDERING_SEQUENTIAL__TARGETS = eINSTANCE.getTemporalOrderingSequential_Targets();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.CustomDirectedRelationshipImpl <em>Custom Directed Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.CustomDirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getCustomDirectedRelationship()\n * @generated\n */\n EClass CUSTOM_DIRECTED_RELATIONSHIP = eINSTANCE.getCustomDirectedRelationship();\n\n /**\n * The meta object literal for the '<em><b>Stereotype</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CUSTOM_DIRECTED_RELATIONSHIP__STEREOTYPE = eINSTANCE.getCustomDirectedRelationship_Stereotype();\n\n /**\n * The meta object literal for the '<em><b>Sources</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference CUSTOM_DIRECTED_RELATIONSHIP__SOURCES = eINSTANCE.getCustomDirectedRelationship_Sources();\n\n /**\n * The meta object literal for the '<em><b>Targets</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference CUSTOM_DIRECTED_RELATIONSHIP__TARGETS = eINSTANCE.getCustomDirectedRelationship_Targets();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.AutoCompleteImpl <em>Auto Complete</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.AutoCompleteImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getAutoComplete()\n * @generated\n */\n EClass AUTO_COMPLETE = eINSTANCE.getAutoComplete();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource <em>Configuration Source</em>}' enum.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getConfigurationSource()\n * @generated\n */\n EEnum CONFIGURATION_SOURCE = eINSTANCE.getConfigurationSource();\n\n }\n\n}", "@PostConstruct\n public void loadSchema() throws IOException {\n\n loadDataIntoHSQL();\n\n //get the schema\n File schemaFile = resource.getFile();\n\n //parse the schema\n //Register the schema file\n TypeDefinitionRegistry typeDefinitionRegistry = new SchemaParser().parse(schemaFile);\n\n //build the wiring to connect\n RuntimeWiring wiring = buildRuntimeWiring();\n\n //Generate the schema using registered file and wiring which is nothing but reference.\n GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(typeDefinitionRegistry, wiring);\n\n //build the graphQL\n graphQL = GraphQL.newGraphQL(schema).build();\n\n List<Vehicle> list = vehicleService.findAll();\n\n for (Vehicle vehicle : list) {\n System.out.println(vehicle.getMake().toString());\n }\n\n }", "@Override\n public void populate(GDataConf conf, G g) throws SLIB_Exception {\n\n String concept_file = (String) conf.getParameter(ARG_CONCEPT_FILE);\n String relationship_file = (String) conf.getParameter(ARG_RELATIONSHIP_FILE);\n String prefix = (String) conf.getParameter(ARG_PREFIX);\n\n if (conf.existsParam(ARG_LOAD_INACTIVE_CONCEPTS)) {\n String load_inactive_concepts = conf.getParameter(ARG_LOAD_INACTIVE_CONCEPTS).toString();\n\n if (load_inactive_concepts.equalsIgnoreCase(\"true\")) {\n LOAD_ONLY_ACTIVE_CONCEPTS = false;\n }\n }\n\n if (conf.existsParam(ARG_LOAD_INACTIVE_RELATIONSHIPS)) {\n String load_inactive_relationships = conf.getParameter(ARG_LOAD_INACTIVE_RELATIONSHIPS).toString();\n\n if (load_inactive_relationships.equalsIgnoreCase(\"true\")) {\n LOAD_ONLY_ACTIVE_RELATIONSHIPS = false;\n }\n }\n\n logger.info(\"-------------------------------------\");\n logger.info(\"Loading SNOMED-CT [RF2] \");\n logger.info(\"-------------------------------------\");\n logger.info(\"Concept file: \" + concept_file);\n logger.info(\"Relationship file: \" + relationship_file);\n\n if (concept_file == null) {\n throw new SLIB_Ex_Critic(\"Please specify a file containing the concept specification, argument \" + ARG_CONCEPT_FILE);\n }\n if (relationship_file == null) {\n throw new SLIB_Ex_Critic(\"Please specify a file containing the relationship specification, argument \" + ARG_RELATIONSHIP_FILE);\n }\n\n if (prefix == null && g.getURI() != null) {\n prefix = g.getURI().getNamespace();\n }\n\n logger.info(\"Loading concepts\");\n\n DateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\n Map<String, ConceptSnomedCT> concepts = new HashMap<String, ConceptSnomedCT>();\n\n FileInputStream fstream;\n try {\n fstream = new FileInputStream(concept_file);\n\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n\n String line;\n String[] data;\n boolean header = true;\n\n while ((line = br.readLine()) != null) {\n\n if (header) {\n header = false;\n continue;\n }\n\n data = p_tab.split(line);\n\n Date date = formatter.parse(data[CONCEPT_DATE]);\n\n if (concepts.containsKey(data[CONCEPT_ID])) {\n ConceptSnomedCT cExists = concepts.get(data[CONCEPT_ID]);\n\n if (cExists.date.before(date)) { // the current specification is more recent than the other loaded, we alsways consider the last one\n ConceptSnomedCT newConcept = new ConceptSnomedCT(data[CONCEPT_ID], date, data[CONCEPT_ACTIVE].trim().equals(\"1\"));\n concepts.put(data[CONCEPT_ID], newConcept);\n }\n // else do nothing the current concept is obsolete compared to the one we already strore\n } else {\n ConceptSnomedCT concept = new ConceptSnomedCT(data[CONCEPT_ID], date, data[CONCEPT_ACTIVE].trim().equals(\"1\"));\n concepts.put(data[CONCEPT_ID], concept);\n }\n\n }\n in.close();\n\n long loaded = 0;\n\n for (ConceptSnomedCT concept : concepts.values()) {\n\n if (!LOAD_ONLY_ACTIVE_CONCEPTS || concept.active) {\n URI cURI = repo.getURI(prefix,concept.id);\n conceptMap.put(concept.id, cURI);\n loaded++;\n }\n }\n\n logger.info(\"Number of activeconcepts loaded \" + loaded + \" on \"+concepts.size()+\" concepts\"); \n logger.info(\"Relationship file: \" + relationship_file);\n\n in = new DataInputStream(new FileInputStream(relationship_file));\n br = new BufferedReader(new InputStreamReader(in));\n\n Map<String, RelationshipSnomedCT> relationships = new HashMap<String, RelationshipSnomedCT>();\n\n\n header = true;\n long c = 0;\n\n\n logger.info(\"Loading relationships information... please wait\");\n // Load the relationships information\n while ((line = br.readLine()) != null) {\n\n if (header) {\n header = false;\n continue;\n }\n c++;\n if (c % 100000 == 0) {\n logger.debug(\"Processed \" + c + \"\\t\" + relationships.size() + \" relationships information loaded\");\n }\n data = p_tab.split(line);\n\n Date date = formatter.parse(data[RELATIONSHIP_DATE]);\n\n if (relationships.containsKey(data[RELATIONSHIP_ID])) {\n RelationshipSnomedCT rExists = relationships.get(data[RELATIONSHIP_ID]);\n\n if (!rExists.date.after(date)) { // the current specification is more recent than the other loaded, we only consider the last one\n RelationshipSnomedCT newRelationship = new RelationshipSnomedCT(data[RELATIONSHIP_SOURCE_CONCEPT_ID], data[RELATIONSHIP_TARGET_CONCEPT_ID], data[RELATIONSHIP_TYPE_ID], date, data[RELATIONSHIP_ACTIVE].trim().equals(\"1\"));\n // we replace the older\n relationships.put(data[RELATIONSHIP_ID], newRelationship);\n }\n // else do nothing the current relationship is obsolete regarding th one we already strore\n } else {\n RelationshipSnomedCT newRelationship = new RelationshipSnomedCT(data[RELATIONSHIP_SOURCE_CONCEPT_ID], data[RELATIONSHIP_TARGET_CONCEPT_ID], data[RELATIONSHIP_TYPE_ID], date, data[RELATIONSHIP_ACTIVE].trim().equals(\"1\"));\n\n // we replace the older\n relationships.put(data[RELATIONSHIP_ID], newRelationship);\n }\n }\n\n // Load the relationships and corresponding concepts who are not defined as inactive\n double relationship_count = 0;\n logger.info(\"Adding relationships to the graph... please wait\");\n for (RelationshipSnomedCT r : relationships.values()) {\n\n if (!LOAD_ONLY_ACTIVE_RELATIONSHIPS || r.active) {\n if (conceptMap.containsKey(r.source) && conceptMap.containsKey(r.target)) {\n\n URI src = conceptMap.get(r.source);\n URI tar = conceptMap.get(r.target);\n URI pred;\n\n if (idMapping.containsKey(r.relationshipID)) {\n pred = idMapping.get(r.relationshipID);\n } else {\n pred = repo.getURI(prefix,r.relationshipID);\n }\n E e = new Edge(src, pred, tar);\n\n g.addE(e);\n relationship_count++;\n }\n }\n }\n logger.info(\"Number of relationships loaded: \" + relationship_count);\n logger.info(\"-------------------------------------\");\n \n \n } catch (Exception ex) {\n ex.printStackTrace();\n throw new SLIB_Ex_Critic(ex.getMessage());\n }\n }", "@Override\n\tpublic void init(String file_name) { deserialize(file_name); }", "public static void load() {\n\n\t\ttry {\n\t\t\tnew Thread() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tObjectDef.loadConfig();\n\t\t\t\t\t\tObjectConstants.declare();\n\t\t\t\t\t\tMapLoading.load();\n\t\t\t\t\t\tRegion.sort();\n\t\t\t\t\t\tObjectManager.declare();\n\t\t\t\t\t\tGameDefinitionLoader.loadNpcSpawns();\n\t\t\t\t\t\tNpc.spawnBosses();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}.start();\n\n\t\t\tGlobalItemHandler.spawn();\n\t\t\tTriviaBot.start();\n\t\t\tAchievements.declare();\n\n\t\t\tGameDefinitionLoader.loadItemValues();\n\t\t\tGameDefinitionLoader.loadNpcDefinitions();\n\t\t\tGameDefinitionLoader.loadItemDefinitions();\n\t\t\tGameDefinitionLoader.loadEquipmentDefinitions();\n\t\t\tGameDefinitionLoader.loadShopDefinitions();\n\t\t\tGameDefinitionLoader.setRequirements();\n\t\t\tGameDefinitionLoader.loadWeaponDefinitions();\n\t\t\tGameDefinitionLoader.loadSpecialAttackDefinitions();\n\t\t\tGameDefinitionLoader.loadRangedStrengthDefinitions();\n\t\t\tGameDefinitionLoader.loadSpecialAttackDefinitions();\n\t\t\tGameDefinitionLoader.loadCombatSpellDefinitions();\n\t\t\tGameDefinitionLoader.loadRangedWeaponDefinitions();\n\t\t\tGameDefinitionLoader.loadNpcCombatDefinitions();\n\t\t\tGameDefinitionLoader.loadItemBonusDefinitions();\n\n\t\t\tNPCDrops.parseDrops().load();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Classpath\n @Incremental\n public abstract ConfigurableFileCollection getFeatureJavaResourceFiles();", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tfticBaseEClass.getESuperTypes().add(ecorePackage.getEObject());\n\t\titemEClass.getESuperTypes().add(this.getFTICBase());\n\t\thypertextEClass.getESuperTypes().add(this.getFTICBase());\n\t\ttextElementEClass.getESuperTypes().add(this.getFTICBase());\n\t\tlinkEClass.getESuperTypes().add(this.getTextElement());\n\t\ttermEClass.getESuperTypes().add(this.getTextElement());\n\t\tfactorTableEClass.getESuperTypes().add(this.getFTICBase());\n\t\tftEntryEClass.getESuperTypes().add(this.getItem());\n\t\tfactorCategoryEClass.getESuperTypes().add(this.getFTEntry());\n\t\tfactorEClass.getESuperTypes().add(this.getFTEntry());\n\t\tissueCardEClass.getESuperTypes().add(this.getItem());\n\t\tstrategyEClass.getESuperTypes().add(this.getItem());\n\t\tinfluencingFactorEClass.getESuperTypes().add(this.getFTICBase());\n\t\trelatedIssueEClass.getESuperTypes().add(this.getFTICBase());\n\t\tfticPackageEClass.getESuperTypes().add(this.getFTICBase());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(fticBaseEClass, FTICBase.class, \"FTICBase\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(itemEClass, Item.class, \"Item\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(hypertextEClass, Hypertext.class, \"Hypertext\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getHypertext_Content(), this.getTextElement(), null, \"content\", null, 0, -1, Hypertext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(textElementEClass, TextElement.class, \"TextElement\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getTextElement_VisibleContent(), ecorePackage.getEString(), \"visibleContent\", null, 0, 1, TextElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(linkEClass, Link.class, \"Link\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getLink_Target(), ecorePackage.getEObject(), null, \"target\", null, 1, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(termEClass, Term.class, \"Term\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(factorTableEClass, FactorTable.class, \"FactorTable\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getFactorTable_Type(), this.getCategoryType(), \"type\", null, 0, 1, FactorTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getFactorTable_Entries(), this.getFTEntry(), null, \"entries\", null, 0, -1, FactorTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(ftEntryEClass, FTEntry.class, \"FTEntry\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getFTEntry_Numbering(), ecorePackage.getEString(), \"numbering\", null, 1, 1, FTEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getFTEntry_Name(), ecorePackage.getEString(), \"name\", null, 1, 1, FTEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getFTEntry_Children(), this.getFTEntry(), null, \"children\", null, 0, -1, FTEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(factorCategoryEClass, FactorCategory.class, \"FactorCategory\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(factorEClass, Factor.class, \"Factor\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getFactor_Description(), this.getHypertext(), null, \"description\", null, 1, 1, Factor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getFactor_Flexibility(), this.getHypertext(), null, \"flexibility\", null, 1, 1, Factor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getFactor_Changeability(), this.getHypertext(), null, \"changeability\", null, 1, 1, Factor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getFactor_Influence(), this.getHypertext(), null, \"influence\", null, 1, 1, Factor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getFactor_Priority(), ecorePackage.getEString(), \"priority\", null, 1, 1, Factor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(issueCardEClass, IssueCard.class, \"IssueCard\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getIssueCard_Name(), ecorePackage.getEString(), \"name\", null, 1, 1, IssueCard.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getIssueCard_Description(), this.getHypertext(), null, \"description\", null, 1, 1, IssueCard.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getIssueCard_Solution(), this.getHypertext(), null, \"solution\", null, 1, 1, IssueCard.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getIssueCard_Strategies(), this.getStrategy(), null, \"strategies\", null, 1, -1, IssueCard.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getIssueCard_InfluencingFactors(), this.getInfluencingFactor(), null, \"influencingFactors\", null, 1, -1, IssueCard.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getIssueCard_RelatedIssues(), this.getRelatedIssue(), null, \"relatedIssues\", null, 0, -1, IssueCard.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(strategyEClass, Strategy.class, \"Strategy\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getStrategy_Name(), ecorePackage.getEString(), \"name\", null, 1, 1, Strategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getStrategy_Description(), this.getHypertext(), null, \"description\", null, 1, 1, Strategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(influencingFactorEClass, InfluencingFactor.class, \"InfluencingFactor\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getInfluencingFactor_Description(), this.getHypertext(), null, \"description\", null, 1, 1, InfluencingFactor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getInfluencingFactor_Factor(), this.getFactor(), null, \"factor\", null, 1, 1, InfluencingFactor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(relatedIssueEClass, RelatedIssue.class, \"RelatedIssue\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getRelatedIssue_Issue(), this.getItem(), null, \"Issue\", null, 0, 1, RelatedIssue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getRelatedIssue_Description(), this.getHypertext(), null, \"description\", null, 0, 1, RelatedIssue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(fticPackageEClass, FTICPackage.class, \"FTICPackage\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getFTICPackage_Tables(), this.getFactorTable(), null, \"tables\", null, 0, -1, FTICPackage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getFTICPackage_IssueCards(), this.getIssueCard(), null, \"issueCards\", null, 0, -1, FTICPackage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getFTICPackage_Name(), ecorePackage.getEString(), \"Name\", null, 1, 1, FTICPackage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(categoryTypeEEnum, CategoryType.class, \"CategoryType\");\n\t\taddEEnumLiteral(categoryTypeEEnum, CategoryType.ORGANIZATIONAL);\n\t\taddEEnumLiteral(categoryTypeEEnum, CategoryType.TECHNOLOGICAL);\n\t\taddEEnumLiteral(categoryTypeEEnum, CategoryType.PRODUCT);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "public MappingType loadMappingType(String path) throws IOException {\t\t\n\t\tResource resource = resourceSet.createResource(URI.createFileURI(path));\n\t\tresource.load(Collections.EMPTY_MAP);\n\t\tDocumentRootImpl root = (DocumentRootImpl)resource.getContents().get(0);\n\t\tMappingType mapping = root.getMapping();\t\t\n\t\treturn mapping;\n\t}", "public Mesh loadGeometry(int resId) {\n return mController.loadGeometry(resId);\n }", "public static void load(FileIO fileIO) \r\n\t{\n\t\t\r\n\t}", "boolean loadFromCSProcessorCfg();", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(mealyMachineEClass, MealyMachine.class, \"MealyMachine\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getMealyMachine_InitialState(), this.getState(), null, \"initialState\", null, 1, 1, MealyMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMealyMachine_States(), this.getState(), null, \"states\", null, 1, -1, MealyMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMealyMachine_InputAlphabet(), this.getAlphabet(), null, \"inputAlphabet\", null, 1, 1, MealyMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMealyMachine_OutputAlphabet(), this.getAlphabet(), null, \"outputAlphabet\", null, 1, 1, MealyMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMealyMachine_Transitions(), this.getTransition(), null, \"transitions\", null, 1, -1, MealyMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(stateEClass, State.class, \"State\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getState_Name(), ecorePackage.getEString(), \"name\", null, 1, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(alphabetEClass, Alphabet.class, \"Alphabet\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getAlphabet_Characters(), ecorePackage.getEString(), \"characters\", null, 1, -1, Alphabet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(transitionEClass, Transition.class, \"Transition\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getTransition_SourceState(), this.getState(), null, \"sourceState\", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getTransition_TargetState(), this.getState(), null, \"targetState\", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTransition_Input(), ecorePackage.getEString(), \"input\", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTransition_Output(), ecorePackage.getEString(), \"output\", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "public void initializePackageContents()\n {\n if (isInitialized) return;\n isInitialized = true;\n\n // Initialize package\n setName(eNAME);\n setNsPrefix(eNS_PREFIX);\n setNsURI(eNS_URI);\n\n // Create type parameters\n\n // Set bounds for type parameters\n\n // Add supertypes to classes\n\n // Initialize classes and features; add operations and parameters\n initEClass(ledsCodeDSLEClass, LedsCodeDSL.class, \"LedsCodeDSL\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEReference(getLedsCodeDSL_Project(), this.getProject(), null, \"project\", null, 0, -1, LedsCodeDSL.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(projectEClass, Project.class, \"Project\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getProject_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getProject_InfrastructureBlock(), this.getInfrastructureBlock(), null, \"infrastructureBlock\", null, 0, 1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getProject_InterfaceBlock(), this.getInterfaceBlock(), null, \"interfaceBlock\", null, 0, 1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getProject_ApplicationBlock(), this.getApplicationBlock(), null, \"applicationBlock\", null, 0, -1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getProject_DomainBlock(), this.getDomainBlock(), null, \"domainBlock\", null, 0, -1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(interfaceBlockEClass, InterfaceBlock.class, \"InterfaceBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getInterfaceBlock_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, InterfaceBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getInterfaceBlock_InterfaceApplication(), this.getInterfaceApplication(), null, \"interfaceApplication\", null, 0, -1, InterfaceBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(interfaceApplicationEClass, InterfaceApplication.class, \"InterfaceApplication\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getInterfaceApplication_Type(), ecorePackage.getEString(), \"type\", null, 0, 1, InterfaceApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getInterfaceApplication_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, InterfaceApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getInterfaceApplication_NameApp(), ecorePackage.getEString(), \"nameApp\", null, 0, 1, InterfaceApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(infrastructureBlockEClass, InfrastructureBlock.class, \"InfrastructureBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getInfrastructureBlock_BasePackage(), ecorePackage.getEString(), \"basePackage\", null, 0, 1, InfrastructureBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getInfrastructureBlock_ProjectVersion(), ecorePackage.getEString(), \"projectVersion\", null, 0, 1, InfrastructureBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getInfrastructureBlock_Language(), this.getNameVersion(), null, \"language\", null, 0, 1, InfrastructureBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getInfrastructureBlock_Framework(), this.getNameVersion(), null, \"framework\", null, 0, 1, InfrastructureBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getInfrastructureBlock_Orm(), this.getNameVersion(), null, \"orm\", null, 0, 1, InfrastructureBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getInfrastructureBlock_Database(), this.getDatabase(), null, \"database\", null, 0, 1, InfrastructureBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(databaseEClass, Database.class, \"Database\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getDatabase_VersionValue(), ecorePackage.getEString(), \"versionValue\", null, 0, 1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getDatabase_NameValue(), ecorePackage.getEString(), \"nameValue\", null, 0, 1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getDatabase_UserValue(), ecorePackage.getEString(), \"userValue\", null, 0, 1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getDatabase_PassValue(), ecorePackage.getEString(), \"passValue\", null, 0, 1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getDatabase_HostValue(), ecorePackage.getEString(), \"hostValue\", null, 0, 1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getDatabase_EnvValue(), ecorePackage.getEString(), \"envValue\", null, 0, 1, Database.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(nameVersionEClass, NameVersion.class, \"NameVersion\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getNameVersion_NameValue(), ecorePackage.getEString(), \"nameValue\", null, 0, 1, NameVersion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getNameVersion_VersionValue(), ecorePackage.getEString(), \"versionValue\", null, 0, 1, NameVersion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(applicationBlockEClass, ApplicationBlock.class, \"ApplicationBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getApplicationBlock_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, ApplicationBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getApplicationBlock_ApplicationDomain(), ecorePackage.getEString(), \"applicationDomain\", null, 0, -1, ApplicationBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(domainBlockEClass, DomainBlock.class, \"DomainBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getDomainBlock_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, DomainBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getDomainBlock_Module(), this.getModuleBlock(), null, \"module\", null, 0, -1, DomainBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(moduleBlockEClass, ModuleBlock.class, \"ModuleBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getModuleBlock_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, ModuleBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getModuleBlock_EnumBlock(), this.getEnumBlock(), null, \"enumBlock\", null, 0, -1, ModuleBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getModuleBlock_EntityBlock(), this.getEntityBlock(), null, \"entityBlock\", null, 0, -1, ModuleBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getModuleBlock_ServiceBlock(), this.getServiceBlock(), null, \"serviceBlock\", null, 0, -1, ModuleBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(serviceBlockEClass, ServiceBlock.class, \"ServiceBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getServiceBlock_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, ServiceBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getServiceBlock_ServiceFields(), this.getServiceMethod(), null, \"serviceFields\", null, 0, -1, ServiceBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(serviceMethodEClass, ServiceMethod.class, \"ServiceMethod\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getServiceMethod_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, ServiceMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getServiceMethod_MethodAcess(), this.getRepositoryFields(), null, \"methodAcess\", null, 0, 1, ServiceMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(entityBlockEClass, EntityBlock.class, \"EntityBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getEntityBlock_AcessModifier(), ecorePackage.getEString(), \"acessModifier\", null, 0, 1, EntityBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getEntityBlock_IsAbstract(), ecorePackage.getEBoolean(), \"isAbstract\", null, 0, 1, EntityBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getEntityBlock_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, EntityBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getEntityBlock_ClassExtends(), this.getExtendBlock(), null, \"classExtends\", null, 0, 1, EntityBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getEntityBlock_Attributes(), this.getAttribute(), null, \"attributes\", null, 0, -1, EntityBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getEntityBlock_Repository(), this.getRepository(), null, \"repository\", null, 0, 1, EntityBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(attributeEClass, Attribute.class, \"Attribute\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getAttribute_AcessModifier(), ecorePackage.getEString(), \"acessModifier\", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getAttribute_Type(), ecorePackage.getEString(), \"type\", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getAttribute_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getAttribute_Pk(), ecorePackage.getEBoolean(), \"pk\", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getAttribute_Unique(), ecorePackage.getEString(), \"unique\", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getAttribute_Nullable(), ecorePackage.getEString(), \"nullable\", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getAttribute_Min(), ecorePackage.getEIntegerObject(), \"min\", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getAttribute_Max(), ecorePackage.getEIntegerObject(), \"max\", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(repositoryEClass, Repository.class, \"Repository\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getRepository_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, Repository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getRepository_Methods(), this.getRepositoryFields(), null, \"methods\", null, 0, -1, Repository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(repositoryFieldsEClass, RepositoryFields.class, \"RepositoryFields\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getRepositoryFields_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, RepositoryFields.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEReference(getRepositoryFields_MethodsParameters(), this.getMethodParameter(), null, \"methodsParameters\", null, 0, 1, RepositoryFields.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getRepositoryFields_ReturnType(), ecorePackage.getEString(), \"returnType\", null, 0, 1, RepositoryFields.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(enumBlockEClass, EnumBlock.class, \"EnumBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getEnumBlock_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, EnumBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getEnumBlock_Values(), ecorePackage.getEString(), \"values\", null, 0, -1, EnumBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(methodParameterEClass, MethodParameter.class, \"MethodParameter\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEReference(getMethodParameter_TypeAndAttr(), this.getTypeAndAttribute(), null, \"typeAndAttr\", null, 0, -1, MethodParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(typeAndAttributeEClass, TypeAndAttribute.class, \"TypeAndAttribute\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEAttribute(getTypeAndAttribute_Type(), ecorePackage.getEString(), \"type\", null, 0, 1, TypeAndAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n initEAttribute(getTypeAndAttribute_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, TypeAndAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n initEClass(extendBlockEClass, ExtendBlock.class, \"ExtendBlock\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n initEReference(getExtendBlock_Values(), this.getEntityBlock(), null, \"values\", null, 0, -1, ExtendBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n // Create resource\n createResource(eNS_URI);\n }", "void loadProducts(String filename);" ]
[ "0.6246849", "0.6030278", "0.5298074", "0.49681896", "0.4963549", "0.4875221", "0.4812668", "0.48081353", "0.47704986", "0.475768", "0.47449282", "0.47359276", "0.47350472", "0.47333214", "0.47255546", "0.47195908", "0.47060266", "0.46863264", "0.46518156", "0.46476555", "0.4641158", "0.4634128", "0.46310893", "0.46292213", "0.46253893", "0.4622691", "0.4610189", "0.4606136", "0.46042883", "0.46036234", "0.46030456", "0.46029928", "0.46029928", "0.46012744", "0.45957208", "0.45957208", "0.45957208", "0.45950904", "0.45922595", "0.45862895", "0.4584785", "0.4584324", "0.4582383", "0.4578848", "0.45761642", "0.4574193", "0.45613304", "0.4546416", "0.45443487", "0.45404798", "0.45401958", "0.45378268", "0.4536133", "0.45305377", "0.451313", "0.45117986", "0.4509139", "0.45043218", "0.45016858", "0.44986293", "0.44957763", "0.44951764", "0.44797933", "0.44764698", "0.44734663", "0.44724524", "0.44722077", "0.4472152", "0.44633198", "0.44624242", "0.44601446", "0.44597962", "0.4454627", "0.44499782", "0.444876", "0.44468716", "0.44447294", "0.4444482", "0.4444385", "0.44360924", "0.44303617", "0.4425994", "0.44215852", "0.4417648", "0.44139642", "0.4411742", "0.44116074", "0.44082856", "0.44043028", "0.44018584", "0.44009525", "0.43944603", "0.43797347", "0.43648967", "0.4358164", "0.43569705", "0.43566087", "0.43468282", "0.43464786", "0.43419614" ]
0.7095659
0
Loads the primitiveDefs file for the appropriate family based on FamilyType.
public static PrimitiveDefList loadPrimitiveDefs(FamilyType familyType) { String path = getPrimitiveDefsFileName(familyType); return (PrimitiveDefList) loadFromCompressedFile(path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getPrimitiveDefsFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + primitiveDefFileName;\n }", "public static PrimitiveDefList loadPrimitiveDefs(String partName) {\n String path = getPrimitiveDefsFileName(partName);\n return (PrimitiveDefList) loadFromCompressedFile(path);\n }", "public HashMap<String,HashSet<String>> loadTypes(String commonTypeInstanceFile) throws Exception;", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "@Override\n\t\t\t\t\tpublic void beginLoad(int type) {\n\n\t\t\t\t\t}", "public void loadDataType() throws IOException, NumberFormatException {\r\n InputStream flux;\r\n flux = new FileInputStream(\"././ressources/datatype.txt\");\r\n BufferedReader buff;\r\n InputStreamReader inputStreamReader = new InputStreamReader(flux);\r\n buff = new BufferedReader(inputStreamReader);\r\n String line;\r\n line = buff.readLine();\r\n int type = Integer.parseInt(line);\r\n leftShoe.getSerialReader().setDataType(type);\r\n rightShoe.getSerialReader().setDataType(type);\r\n buff.close();\r\n inputStreamReader.close();\r\n flux.close();\r\n }", "private void getAgentTypesFromFile(){\n \t\tagentTypes= agentTypesProvider.GetAgentTypes();\n \t}", "private void loadEnvironment(String filename){\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n String line;\n while ((line = reader.readLine()) != null) {\n String[] info = line.split(\",\");\n String type = info[TYPE_INDEX];\n type = type.replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n Point coordinate = new\n Point(Double.parseDouble(info[POS_X_INDEX]), Double.parseDouble(info[POS_Y_INDEX]));\n\n switch (type) {\n case \"Player\" -> this.player = new Player(coordinate, Integer.parseInt(info[ENERGY_INDEX]));\n case \"Zombie\" -> {\n entityList.add(new Zombie(coordinate, type));\n zombieCounter++;\n }\n case \"Sandwich\" -> {\n entityList.add(new Sandwich(coordinate, type));\n sandwichCounter++;\n }\n case \"Treasure\" -> this.treasure = new Treasure(coordinate, type);\n default -> throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "public static void load() {\n }", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void initClassLoader() {\n FileClassLoadingService classLoader = new FileClassLoadingService();\n\n // init from preferences...\n Domain classLoaderDomain = getPreferenceDomain().getSubdomain(\n FileClassLoadingService.class);\n\n Collection details = classLoaderDomain.getPreferences();\n if (details.size() > 0) {\n\n // transform preference to file...\n Transformer transformer = new Transformer() {\n\n public Object transform(Object object) {\n DomainPreference pref = (DomainPreference) object;\n return new File(pref.getKey());\n }\n };\n\n classLoader.setPathFiles(CollectionUtils.collect(details, transformer));\n }\n\n this.modelerClassLoader = classLoader;\n }", "void loadFaidx() {\n\t\tString file = phastConsDir + \"/genome.fai\";\n\t\tif (!Gpr.exists(file)) { throw new RuntimeException(\"Cannot find fasta index file '\" + file + \"'\\n\\tYou can create one by running 'samtools faidx' command and copying the resulting index file to \" + file + \"\\n\\n\"); }\n\n\t\t// Read and parse file\n\t\tchromoSize = new HashMap<>();\n\t\tString txt = Gpr.readFile(file);\n\t\tfor (String line : txt.split(\"\\n\")) {\n\t\t\tString fields[] = line.split(\"\\\\s+\");\n\t\t\tString chrName = Chromosome.simpleName(fields[0]);\n\t\t\tint len = Gpr.parseIntSafe(fields[1]);\n\n\t\t\tchromoSize.put(chrName, len);\n\t\t}\n\t}", "private static byte[] loadDefaultFeatureGeneratorBytes() {\n\n final ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n try (InputStream in = DocumentClassifierFactory.class.getResourceAsStream(\n \"/documentClassifier/default-feature-descriptor.xml\")) {\n\n if (in == null) {\n throw new IllegalStateException(\n \"Classpath must contain default-feature-descriptor.xml file!\");\n }\n\n final byte buf[] = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n bytes.write(buf, 0, len);\n }\n } catch (final IOException e) {\n throw new IllegalStateException(\n \"Failed reading from default-feature-descriptor.xml file on classpath!\");\n }\n return bytes.toByteArray();\n }", "Feature loadFeature(Integer id);", "public static void init() throws IOException {\n\t\tGenericFeatVect.init();\n\t}", "public static void load() {\n\t\t// manager.load(camp_fire);\r\n\t\t// manager.load(camp_fire_burntout);\r\n\t\t//\r\n\t\t// manager.load(fire_stick);\r\n\t\t// manager.load(fire_stick_burntout);\r\n\t\t//\r\n\t\t// manager.load(stockpile);\r\n\t\t// manager.load(worker);\r\n\t\t//\r\n\t\t// manager.load(icon_wood);\r\n\t\t//\r\n\t\tmanager.load(worker_ant);\r\n\t\tmanager.setLoader(FreeTypeFontGenerator.class,\r\n\t\t\t\tnew FreeTypeFontGeneratorLoader(new InternalFileHandleResolver()));\r\n\t\tmanager.load(dialog);\r\n\t}", "protected void initializePredefinedTypes(OclLibrary oclLibrary) {\n\n\t\tthis.predefinedTypes.put(oclLibrary.getOclAny().getName(), oclLibrary\n\t\t\t\t.getOclAny());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclType().getName(), oclLibrary\n\t\t\t\t.getOclType());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclVoid().getName(), oclLibrary\n\t\t\t\t.getOclVoid());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclInvalid().getName(), oclLibrary\n\t\t\t\t.getOclInvalid());\n\n\t\tthis.predefinedTypes.put(oclLibrary.getOclBoolean().getName(), oclLibrary\n\t\t\t\t.getOclBoolean());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclInteger().getName(), oclLibrary\n\t\t\t\t.getOclInteger());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclReal().getName(), oclLibrary\n\t\t\t\t.getOclReal());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclString().getName(), oclLibrary\n\t\t\t\t.getOclString());\n\n\t\tthis.predefinedTypes.put(oclLibrary.getOclCollection().getName(),\n\t\t\t\toclLibrary.getOclCollection());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclSequence().getName(), oclLibrary\n\t\t\t\t.getOclSequence());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclBag().getName(), oclLibrary\n\t\t\t\t.getOclBag());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclSet().getName(), oclLibrary\n\t\t\t\t.getOclSet());\n\t\tthis.predefinedTypes.put(oclLibrary.getOclOrderedSet().getName(),\n\t\t\t\toclLibrary.getOclOrderedSet());\n\t}", "public void initFromClasspath() throws IOException {\n \t\tcontactNames = loadFromClassPath(\"contactNames\");\n \t\tgroupNames = loadFromClassPath(\"groupNames\");\n \t\tmessageWords = loadFromClassPath(\"messageWords\");\n \t}", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "public static void preLoad() {\n\t\tserviceClasses.clear();\n\t\tloadGroups(CLASS_FOLDER, null, serviceClasses);\n\t\tTracer.trace(serviceClasses.size()\n\t\t\t\t+ \" java class names loaded as services.\");\n\t\t/*\n\t\t * clean and pre-load if required\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.cachedOnes != null) {\n\t\t\t\taType.cachedOnes.clear();\n\t\t\t}\n\t\t\tif (aType.preLoaded) {\n\t\t\t\taType.loadAll();\n\t\t\t}\n\t\t}\n\t}", "public void loadFeatures(Class<?> classToRun) throws Exception {\n List<Features> annos = FeaturesRunner.getScanner().getAnnotations(classToRun, Features.class);\n for (Features anno : annos) {\n for (Class<? extends RunnerFeature> cl : anno.value()) {\n loadFeature(new HashSet<>(), cl);\n }\n }\n\n }", "Set<T> loadConventionsFromFile() throws Exception;", "private void readDescriptors(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t\tint numHiers = _dataModel.getCategories().size();\r\n\r\n\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t \tbook.getLogger().log(\".Loading \" + numHiers + \" hierarchies...\",SB_Logger.INIT);\r\n\r\n\t\tfor (Category category : _dataModel.getCategories())\r\n\t\t{\r\n\t\t\tSB_TypeHierarchy hier = new SB_TypeHierarchy();\r\n\t\t\thier.load(category,book);\r\n\r\n\t\t\tbook.getBehaviorRegistry().addHierarchy(hier);\r\n\r\n\t\t if (SIM_Constants.DEBUG_INFO_ON)\r\n\t\t \tbook.getLogger().log(hier.toString(),SB_Logger.INIT);\r\n\t\t}\r\n\t}", "private static void load(){\n }", "private void callTypeSystemInit() throws ResourceInitializationException {\n\n CAS cas = casPool.getCas();\n\n try {\n if (collectionReader instanceof CollectionReader) {\n ((CollectionReader) collectionReader).typeSystemInit(cas.getTypeSystem());\n\n CasInitializer casIni = ((CollectionReader) collectionReader).getCasInitializer();\n if (casIni != null) {\n casIni.typeSystemInit(cas.getTypeSystem());\n }\n }\n\n for (int i = 0; i < annotatorList.size(); i++) {\n ProcessingContainer container = (ProcessingContainer) annotatorList.get(i);\n if (container.getStatus() == Constants.CAS_PROCESSOR_DISABLED) {\n continue; // skip over disabled CasProcessors\n }\n CasProcessor processor = container.getCasProcessor();\n if (processor instanceof CasObjectProcessor) {\n ((CasObjectProcessor) processor).typeSystemInit(cas.getTypeSystem());\n }\n container.releaseCasProcessor(processor);\n }\n for (int i = 0; i < consumerList.size(); i++) {\n ProcessingContainer container = (ProcessingContainer) consumerList.get(i);\n if (container.getStatus() == Constants.CAS_PROCESSOR_DISABLED) {\n continue; // skip over disabled CasProcessors\n }\n CasProcessor processor = container.getCasProcessor();\n if (processor instanceof CasObjectProcessor) {\n ((CasObjectProcessor) processor).typeSystemInit(cas.getTypeSystem());\n }\n container.releaseCasProcessor(processor);\n }\n } catch (ResourceInitializationException e) {\n throw e;\n } catch (Exception e) {\n throw new ResourceInitializationException(e);\n } finally {\n casPool.releaseCas(cas);\n // synchronized (casPool) { // redundant, the above releaseCas call does this\n // casPool.notifyAll();\n // }\n }\n }", "@Override\r\n\tpublic void load() {\n\t}", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "public void load() {\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "public void fontLoader(){\n try {\n //create the font to use. Specify the size!\n customFont = Font.createFont(Font.TRUETYPE_FONT, new File(\".\\\\resources\\\\DS-DIGI.ttf\")).deriveFont(40f);\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n ge.registerFont(customFont);\n } catch (IOException e) {\n e.printStackTrace();\n } catch(FontFormatException e) {\n e.printStackTrace();\n }\n }", "@Classpath\n @Incremental\n public abstract ConfigurableFileCollection getFeatureJavaResourceFiles();", "public void load() {\n }", "List<ConversionTypesEntity> loadFiles(FileTreeRequest fileTreeRequest);", "private void initialize() {\n this.docTypeList = new ArrayList<>();\n this.problemTypeList = new ArrayList<>();\n\n // The add() function should be called in the order specified since together\n // they form a mapping mechanism,\n // for example 'ENCAPSULATED' before 'POSTSCRIPT' and 'RICH' before 'TEXT'.\n\n this.docTypeList.add(\"ENCAPSULATED\");\n this.problemTypeList.add(ProblemType.NON_ENCAPSULATED_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"EXCEL\");\n this.problemTypeList.add(ProblemType.NON_MSEXCEL_FILE);\n\n this.docTypeList.add(\"GIF\");\n this.problemTypeList.add(ProblemType.NON_GIF_FILE);\n\n this.docTypeList.add(\"HTML\");\n this.problemTypeList.add(ProblemType.NON_HTML_FILE);\n\n this.docTypeList.add(\"LATEX\");\n this.problemTypeList.add(ProblemType.NON_LATEX_FILE);\n\n this.docTypeList.add(\"MPEG\");\n this.problemTypeList.add(ProblemType.NON_MP4_FILE);\n\n this.docTypeList.add(\"POSTSCRIPT\");\n this.problemTypeList.add(ProblemType.NON_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"TIFF\");\n this.problemTypeList.add(ProblemType.NON_TIFF_FILE);\n\n this.docTypeList.add(\"WORD\");\n this.problemTypeList.add(ProblemType.NON_MSWORD_FILE);\n\n this.classInitialized = true;\n\n LOG.debug(\"initialize:this.docTypeList.size {}\", this.docTypeList.size());\n LOG.debug(\"initialize:this.problemTypeList.size {}\", this.problemTypeList.size());\n }", "private void loadFont() {\n\t\ttry {\n\t\t\tfont = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(\"assets/fonts/forced_square.ttf\"));\n\t\t} catch (Exception e) {\n\t\t\tfont = new Font(\"Helvetica\", Font.PLAIN, 22);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void initVariables() {\n\tif (CL_Initializer.headerTemplateFile == null) {\n\n\t if (ImageHeader.imageExists(CL_Initializer.inputFile)) {\n\t\tCL_Initializer.headerTemplateFile = CL_Initializer.inputFile;\n\t }\n\t else if (imageType == imageType.BEDPOSTX || imageType == imageType.BEDPOSTX_DYAD) {\n\n\t\tString bedpostxRoot = BedpostxTractographyImage.getBedpostxInputRoot(bedpostxDir);\n\t\tString ext = BedpostxTractographyImage.getBedpostxImageExtension(bedpostxRoot);\n\t\t\n\t\tCL_Initializer.headerTemplateFile = bedpostxRoot + \"dyads1\" + ext;\n\t \n\t }\n\t \n\t}\n\n\t\n if (CL_Initializer.headerTemplateFile != null) { \n logger.info(\"Defining input physical space from \" + CL_Initializer.headerTemplateFile);\n CL_Initializer.initInputSpaceAndHeaderOptions();\n }\n else if (CL_Initializer.voxelDims[0] > 0.0) { \n CL_Initializer.initInputSpaceAndHeaderOptions();\n }\n else if (seedFile != null) {\n logger.info(\"Defining input physical space from seed file\");\n CL_Initializer.headerTemplateFile = seedFile;\n CL_Initializer.initInputSpaceAndHeaderOptions();\n }\n \n\n\n xDataDim = CL_Initializer.dataDims[0];\n yDataDim = CL_Initializer.dataDims[1];\n zDataDim = CL_Initializer.dataDims[2];\n \n xVoxelDim = CL_Initializer.voxelDims[0];\n yVoxelDim = CL_Initializer.voxelDims[1];\n zVoxelDim = CL_Initializer.voxelDims[2];\n\n if (xVoxelDim == 0.0) {\n // failed to get a definition of input space from anywhere\n throw new LoggedException(\"Definition of input space required, use -header\");\n }\n\n\n voxelToPhysicalTrans = CL_Initializer.headerTemplate.getVoxelToPhysicalTransform();\n\n\n\tif (anisThresh > 0.0) {\n\t switch(imageType) {\n\t\t\n\t case DT : case MULTITENSOR : case BEDPOSTX : case BEDPOSTX_DYAD :\n\t\t// No problem since these input formats have anisotropy information built in\n\t\tbreak;\n\t\t\n\t default: \n\t\t\n\t\tif (anisMapFile == null) {\n\t\t throw new LoggedException(\"Input data does not contain anisotropy, anisotropy map (-anisfile) must be \" +\n\t\t\t\t\t \"supplied when -anisthresh is used\");\n\t\t}\n\t }\n\t}\n\n\n // no interpolation with FACT, by definition\n if (trackingAlgorithm == TrackingAlgorithm.FACT) {\n\n if (dataInterpolation != DataInterpolation.NEAREST_NEIGHBOUR) { \n logger.warning(\"Interpolation is not compatible with FACT tracking, using Euler tracker with step size \" + stepSize + \" mm\");\n }\n\n trackingAlgorithm = TrackingAlgorithm.EULER;\n }\n\n \n ran = new MTRandom(seed);\n \n \n // get seeds\n if (seedFile != null) {\n \n VoxelROI imageROIs = new VoxelROI(seedFile, CL_Initializer.headerTemplate);\n\n allROIs = imageROIs.getAllRegions();\n \n }\n else if (seedList != null) {\n allROIs = new RegionOfInterest[] {PointListROI.readPoints(seedList, CL_Initializer.headerTemplate)};\n }\n\telse {\n\t throw new LoggedException(\"No seed points specified\");\n\t}\n \n \n }", "private void loadInitializationAttributes() {\n \t\tURL url = BootLoader.getInstallURL();\n \n \t\t// load any initialization attributes. These are the default settings for\n \t\t// key attributes (eg. default primary feature) supplied by the packaging team.\n \t\t// They are always reloaded on startup to pick up any changes due to\n \t\t// \"native\" updates.\n \t\tProperties initProps = new Properties();\n \t\tInputStream is = null;\n \t\ttry {\n \t\t\tURL initURL = new URL(url, CONFIG_FILE_INIT);\n \t\t\tis = initURL.openStream();\n \t\t\tinitProps.load(is);\n \t\t\tif (DEBUG)\n \t\t\t\tdebug(\"Defaults from \" + initURL.toExternalForm()); //$NON-NLS-1$\n \t\t} catch (IOException e) {\n \t\t\treturn; // could not load default settings\n \t\t} finally {\n \t\t\tif (is != null) {\n \t\t\t\ttry {\n \t\t\t\t\tis.close();\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\t// ignore ...\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// use default settings if supplied\n \t\tString initId = loadAttribute(initProps, INIT_DEFAULT_FEATURE_ID, null);\n \t\tif (initId != null) {\n \t\t\tString application = loadAttribute(initProps, INIT_DEFAULT_FEATURE_APPLICATION, null);\n \t\t\tString initPluginId = loadAttribute(initProps, INIT_DEFAULT_PLUGIN_ID, null);\n \t\t\tif (initPluginId==null)\n \t\t\t\tinitPluginId = initId;\n \t\t\tIFeatureEntry fe = findConfiguredFeatureEntry(initId);\n \n \t\t\tif (fe == null) {\n \t\t\t\t// bug 26896 : setup optimistic reconciliation if the primary feature has changed or is new\n \t\t\t\tcmdFirstUse = true;\n \t\t\t\t// create entry if not exists\n \t\t\t\tfe = createFeatureEntry(initId, null, initPluginId, null, true, application, null);\n \t\t\t} else\n \t\t\t\t// update existing entry with new info\n \t\t\t\tfe = createFeatureEntry(initId, fe.getFeatureVersion(), fe.getFeaturePluginIdentifier(), fe.getFeaturePluginVersion(), fe.canBePrimary(), application, fe.getFeatureRootURLs());\n \t\t\tconfigureFeatureEntry(fe);\n \t\t\tdefaultFeature = initId;\n \t\t\tif (DEBUG) {\n \t\t\t\tdebug(\" Default primary feature: \" + defaultFeature); //$NON-NLS-1$\n \t\t\t\tif (application != null)\n \t\t\t\t\tdebug(\" Default application : \" + application); //$NON-NLS-1$\n \t\t\t}\n \t\t}\n \t}", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tCorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);\n\t\tEcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);\n\t\tObjectsPackage theObjectsPackage = (ObjectsPackage)EPackage.Registry.INSTANCE.getEPackage(ObjectsPackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\treadCsvFileEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tprintEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\twriteCsvFileEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\texcludeColumnsEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tselectColumnsEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tassertTablesMatchEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\twriteLinesEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\treadLinesEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tselectRowsEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\texcludeRowsEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\tasTableDataEClass.getESuperTypes().add(theCorePackage.getCommand());\n\t\treadPropertiesEClass.getESuperTypes().add(theCorePackage.getCommand());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(readCsvFileEClass, ReadCsvFile.class, \"ReadCsvFile\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getReadCsvFile_Uri(), ecorePackage.getEString(), \"uri\", null, 0, 1, ReadCsvFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(printEClass, Print.class, \"Print\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getPrint_Input(), theEcorePackage.getEObject(), null, \"input\", null, 0, -1, Print.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(writeCsvFileEClass, WriteCsvFile.class, \"WriteCsvFile\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getWriteCsvFile_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, WriteCsvFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getWriteCsvFile_Uri(), theEcorePackage.getEString(), \"uri\", null, 0, 1, WriteCsvFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(excludeColumnsEClass, ExcludeColumns.class, \"ExcludeColumns\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getExcludeColumns_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, ExcludeColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExcludeColumns_Columns(), theEcorePackage.getEString(), \"columns\", null, 0, -1, ExcludeColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(selectColumnsEClass, SelectColumns.class, \"SelectColumns\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSelectColumns_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, SelectColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSelectColumns_Columns(), theEcorePackage.getEString(), \"columns\", null, 0, -1, SelectColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(assertTablesMatchEClass, AssertTablesMatch.class, \"AssertTablesMatch\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAssertTablesMatch_Left(), theObjectsPackage.getTable(), null, \"left\", null, 0, 1, AssertTablesMatch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getAssertTablesMatch_Right(), theObjectsPackage.getTable(), null, \"right\", null, 0, 1, AssertTablesMatch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getAssertTablesMatch_IgnoreColumnOrder(), theEcorePackage.getEBoolean(), \"ignoreColumnOrder\", \"false\", 0, 1, AssertTablesMatch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getAssertTablesMatch_IgnoreMissingColumns(), this.getIgnoreColumnsMode(), \"ignoreMissingColumns\", \"NONE\", 0, 1, AssertTablesMatch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(writeLinesEClass, WriteLines.class, \"WriteLines\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getWriteLines_Uri(), theEcorePackage.getEString(), \"uri\", null, 0, 1, WriteLines.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getWriteLines_Append(), theEcorePackage.getEBoolean(), \"append\", \"false\", 0, 1, WriteLines.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(readLinesEClass, ReadLines.class, \"ReadLines\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getReadLines_Uri(), theEcorePackage.getEString(), \"uri\", null, 1, 1, ReadLines.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(selectRowsEClass, SelectRows.class, \"SelectRows\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSelectRows_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, SelectRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSelectRows_Column(), theEcorePackage.getEString(), \"column\", null, 0, 1, SelectRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSelectRows_Value(), theEcorePackage.getEString(), \"value\", null, 0, 1, SelectRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSelectRows_Match(), this.getRowMatchMode(), \"match\", null, 0, 1, SelectRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(excludeRowsEClass, ExcludeRows.class, \"ExcludeRows\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getExcludeRows_Table(), theObjectsPackage.getTable(), null, \"table\", null, 0, 1, ExcludeRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExcludeRows_Column(), theEcorePackage.getEString(), \"column\", null, 0, 1, ExcludeRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExcludeRows_Value(), theEcorePackage.getEString(), \"value\", null, 0, 1, ExcludeRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getExcludeRows_Match(), this.getRowMatchMode(), \"match\", null, 0, 1, ExcludeRows.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(asTableDataEClass, AsTableData.class, \"AsTableData\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAsTableData_Input(), theEcorePackage.getEObject(), null, \"input\", null, 0, -1, AsTableData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(readPropertiesEClass, ReadProperties.class, \"ReadProperties\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getReadProperties_Uri(), ecorePackage.getEString(), \"uri\", null, 0, 1, ReadProperties.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(ignoreColumnsModeEEnum, IgnoreColumnsMode.class, \"IgnoreColumnsMode\");\n\t\taddEEnumLiteral(ignoreColumnsModeEEnum, IgnoreColumnsMode.NONE);\n\t\taddEEnumLiteral(ignoreColumnsModeEEnum, IgnoreColumnsMode.LEFT);\n\t\taddEEnumLiteral(ignoreColumnsModeEEnum, IgnoreColumnsMode.RIGHT);\n\t\taddEEnumLiteral(ignoreColumnsModeEEnum, IgnoreColumnsMode.BOTH);\n\n\t\tinitEEnum(rowMatchModeEEnum, RowMatchMode.class, \"RowMatchMode\");\n\t\taddEEnumLiteral(rowMatchModeEEnum, RowMatchMode.EXACT);\n\t\taddEEnumLiteral(rowMatchModeEEnum, RowMatchMode.GLOB);\n\t\taddEEnumLiteral(rowMatchModeEEnum, RowMatchMode.REGEXP);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// http://www.eclipse.org/ecl/docs\n\t\tcreateDocsAnnotations();\n\t\t// http://www.eclipse.org/ecl/internal\n\t\tcreateInternalAnnotations();\n\t\t// http://www.eclipse.org/ecl/input\n\t\tcreateInputAnnotations();\n\t}", "public static void load(FileIO fileIO) \r\n\t{\n\t\t\r\n\t}", "private void loadDescriptor(File descriptorFile) throws IOException, InvalidXMLException,\n ResourceInitializationException {\n XMLInputSource in = new XMLInputSource(descriptorFile);\n ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);\n ResourceManager manager = UIMAFramework.newDefaultResourceManager();\n\n this.ae = UIMAFramework.produceAnalysisEngine(specifier, manager, null);\n this.cas = this.ae.newCAS();\n\n }", "public MappingType loadMappingType(String path) throws IOException {\t\t\n\t\tResource resource = resourceSet.createResource(URI.createFileURI(path));\n\t\tresource.load(Collections.EMPTY_MAP);\n\t\tDocumentRootImpl root = (DocumentRootImpl)resource.getContents().get(0);\n\t\tMappingType mapping = root.getMapping();\t\t\n\t\treturn mapping;\n\t}", "@Override\n public void load() {\n }", "public void loadEntities (File entitiesFile){\n BufferedReader br = null;\n int lineNum = 0;\n try {\n String term;\n br = new BufferedReader(new FileReader(entitiesFile));\n String line = \"\";\n while ((line = (br.readLine())) != null) {\n lineNum++;\n if (!line.contains(\"--noEntities--\")) {\n String docId = line.substring(0, line.indexOf(\":\"));\n String [] entitiesStr = line.split(\"; \");\n if (entitiesStr.length > 0){\n entitiesStr[0] = entitiesStr[0].substring(line.indexOf(\":\") + 2);\n }\n HashMap <String, Integer> entitiesInfo = new HashMap<>();\n for (int i = 0; i < entitiesStr.length ; i++){\n String [] entitiesRankStr = entitiesStr[i].split(\" - \");\n if (entitiesRankStr.length < 2){\n System.out.println(lineNum + \" \" + entitiesRankStr[0]);\n }\n entitiesInfo.put(entitiesRankStr[0], Integer.parseInt(entitiesRankStr[1]));\n }\n entities.put(docId, entitiesInfo);\n }\n }\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public /*override*/ void LoadRecordData(BinaryReader bamlBinaryReader) \r\n {\r\n TypeId = bamlBinaryReader.ReadInt16(); \r\n RuntimeName = bamlBinaryReader.ReadString(); \r\n }", "@Override\r\n\tpublic void load() {\n\r\n\t}", "private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }", "protected void loadProcessor() {\n this.setContentAssistProcessor(createProcessor(),\n IDocument.DEFAULT_CONTENT_TYPE);\n }", "public void loadMapsModule(){\n Element rootElement = FileOperator.fileReader(MAPS_FILE_PATH);\n if(rootElement!=null){\n Iterator i = rootElement.elementIterator();\n while (i.hasNext()) {\n Element element = (Element) i.next();\n GridMap map =new GridMap();\n map.decode(element);\n mapsList.add(map);\n }\n }\n }", "public void init() {\n\n /**\n * FontFile1 = A stream containing a Type 1 font program\n * FontFile2 = A stream containing a TrueType font program\n * FontFile3 = A stream containing a font program other than Type 1 or\n * TrueType. The format of the font program is specified by the Subtype entry\n * in the stream dictionary\n */\n try {\n\n // get an instance of our font factory\n FontFactory fontFactory = FontFactory.getInstance();\n\n if (entries.containsKey(FONT_FILE)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n }\n\n if (entries.containsKey(FONT_FILE_2)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_2);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TRUE_TYPE);\n }\n }\n\n if (entries.containsKey(FONT_FILE_3)) {\n\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_3);\n String subType = fontStream.getObject(\"Subtype\").toString();\n if (subType != null &&\n (subType.equals(FONT_FILE_3_TYPE_1C) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0C))\n ) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n if (subType != null && subType.equals(FONT_FILE_3_OPEN_TYPE)) {\n// font = new NFontOpenType(fontStreamBytes);\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_OPEN_TYPE);\n }\n }\n }\n // catch everything, we can fall back to font substitution if a failure\n // occurs. \n catch (Throwable e) {\n logger.log(Level.FINE, \"Error Reading Embedded Font \", e);\n }\n\n }", "public void loadAssociations() {\n\n\t\tinitListSettingNames();\n\n\t\taddDefaultAssociations();\n\t}", "private <T> void loadFlatFile(Class<T> clazz, String flatFileName)\n\t\t\tthrows ApplicationException {\n\n\t\tlog.info(String.format(\"Loading file %s to object type %s\",\n\t\t\t\tflatFileName, clazz.toString()));\n\t\t\n\t\tDbInserter dbi = getDbInserter();\n\t\t\n\t\tFixedFormatManager manager = new FixedFormatManagerImpl();\n\t\tBufferedReader br = null;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tInputStream ins = this.getClass().getClassLoader()\n\t\t\t\t\t.getResourceAsStream(flatFileName);\n\t\t\tbr = new BufferedReader(new InputStreamReader(ins));\n\t\t\tString record;\n\n\t\t\tlog.info(\"Reading, inserting records.\");\n\t\t\twhile (null != (record = br.readLine())) {\n\t\t\t\tDomain obj = (Domain) manager.load(clazz, record);\n\t\t\t\t//log.info(String.format(\"Record %s\", obj));\n\t\t\t\t//log.info(String.format(\"%s: key %d\", obj.getRecType(), obj.getDomainId()));\n\t\t\t\t\n\t\t\t\tdbi.insert(obj);\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tlog.info(String.format(\"Read %d records from object.\", count,\n\t\t\t\t\tclazz.toString()));\n\t\t\t\n\t\t\tdbi.flushToIndex();\n\n\t\t} catch (FixedFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (null != br) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@PostConstruct\n public void loadSchema() throws IOException {\n\n loadDataIntoHSQL();\n\n //get the schema\n File schemaFile = resource.getFile();\n\n //parse the schema\n //Register the schema file\n TypeDefinitionRegistry typeDefinitionRegistry = new SchemaParser().parse(schemaFile);\n\n //build the wiring to connect\n RuntimeWiring wiring = buildRuntimeWiring();\n\n //Generate the schema using registered file and wiring which is nothing but reference.\n GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(typeDefinitionRegistry, wiring);\n\n //build the graphQL\n graphQL = GraphQL.newGraphQL(schema).build();\n\n List<Vehicle> list = vehicleService.findAll();\n\n for (Vehicle vehicle : list) {\n System.out.println(vehicle.getMake().toString());\n }\n\n }", "private Map<String, String> loadEntityTypes(String btc_data, Map<String, String> entities) throws IOException {\n //extract the entity types for the different queries.\n Set<String> btc_files = new HashSet<>();\n FileUtils.getFilesList(btc_data, btc_files);\n int entities_found = 0;\n for (String btc_file : btc_files) {\n try {\n System.out.printf(\"Processing file: %s.\\n\", btc_file);\n\n BufferedReader reader = FileUtils.getCompressedFileReader(btc_file);\n while (reader.ready()) {\n if (entities_found >= entities.size()) {\n break;\n }\n\n Node[] triple = NxParser.parseNodes(reader.readLine());\n String entity = triple[0].toString().trim();\n String predicate = triple[1].toString().trim();\n String type = triple[2].toString().trim();\n if (!entities.containsKey(entity) || !predicate.equals(\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\")) {\n continue;\n }\n\n entities.put(entity, type);\n entities_found++;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return entities;\n }", "public interface ConventionsLoader<T extends ManageableConvention> {\n\n /**\n * Creates a set of conventions from a file.\n * \n * @return a set of conventions, empty if no conventions could be created\n * @throws Exception\n * an exception if there is a problem opening the file\n */\n Set<T> loadConventionsFromFile() throws Exception;\n}", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tEefnrPackage theEefnrPackage = (EefnrPackage)EPackage.Registry.INSTANCE.getEPackage(EefnrPackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tdeferedFlatReferenceTableEditorSampleEClass.getESuperTypes().add(theEefnrPackage.getAbstractSample());\n\t\tdeferedReferenceTableEditorSampleEClass.getESuperTypes().add(theEefnrPackage.getAbstractSample());\n\t\townerEClass.getESuperTypes().add(theEefnrPackage.getAbstractSample());\n\t\tsubtypeEClass.getESuperTypes().add(this.getOwner());\n\t\tanotherSubTypeEClass.getESuperTypes().add(this.getSubtype());\n\t\telementEClass.getESuperTypes().add(theEefnrPackage.getNamedElement());\n\t\tattributeNavigationSampleEClass.getESuperTypes().add(theEefnrPackage.getAbstractSample());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(deferedFlatReferenceTableEditorSampleEClass, DeferedFlatReferenceTableEditorSample.class, \"DeferedFlatReferenceTableEditorSample\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDeferedFlatReferenceTableEditorSample_References(), this.getDeferedReference(), null, \"references\", null, 0, -1, DeferedFlatReferenceTableEditorSample.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(deferedReferenceEClass, DeferedReference.class, \"DeferedReference\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDeferedReference_FlatreferenceEditor(), theEefnrPackage.getTotalSample(), null, \"flatreferenceEditor\", null, 1, 1, DeferedReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(deferedReferenceTableEditorSampleEClass, DeferedReferenceTableEditorSample.class, \"DeferedReferenceTableEditorSample\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getDeferedReferenceTableEditorSample_References(), this.getDeferedReference(), null, \"references\", null, 0, -1, DeferedReferenceTableEditorSample.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(ownerEClass, Owner.class, \"Owner\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getOwner_MultipleReferencers(), this.getMultipleReferencer(), null, \"multipleReferencers\", null, 0, -1, Owner.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getOwner_SingleReferencers(), this.getSingleReferencer(), null, \"singleReferencers\", null, 0, 1, Owner.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(multipleReferencerEClass, MultipleReferencer.class, \"MultipleReferencer\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleForTableComposition(), this.getOwner(), null, \"multipleSampleForTableComposition\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleForAdvancedTableComposition(), this.getOwner(), null, \"multipleSampleForAdvancedTableComposition\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleForReferencesTable(), this.getOwner(), null, \"multipleSampleForReferencesTable\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleAdvancedReferencesTable(), this.getOwner(), null, \"multipleSampleAdvancedReferencesTable\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getMultipleReferencer_MultipleSampleForFlatReferencesTable(), this.getOwner(), null, \"multipleSampleForFlatReferencesTable\", null, 0, 1, MultipleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(subtypeEClass, Subtype.class, \"Subtype\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getSubtype_SpecialisedElement(), ecorePackage.getEBoolean(), \"specialisedElement\", null, 0, 1, Subtype.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(singleReferencerEClass, SingleReferencer.class, \"SingleReferencer\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getSingleReferencer_SingleSampleForTableComposition(), this.getOwner(), null, \"singleSampleForTableComposition\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleSampleForAdvancedTableComposition(), this.getOwner(), null, \"singleSampleForAdvancedTableComposition\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleSampleForReferencesTable(), this.getOwner(), null, \"singleSampleForReferencesTable\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleSampleAdvancedReferencesTable(), this.getOwner(), null, \"singleSampleAdvancedReferencesTable\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleSampleForFlatReferencesTable(), this.getOwner(), null, \"singleSampleForFlatReferencesTable\", null, 0, -1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleContainmentForEObjectFlatComboViewer(), this.getOwner(), null, \"singleContainmentForEObjectFlatComboViewer\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleReferenceForEObjectFlatComboViewer(), this.getOwner(), null, \"singleReferenceForEObjectFlatComboViewer\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleContainmentForAdvancedEObjectFlatComboViewer(), this.getOwner(), null, \"singleContainmentForAdvancedEObjectFlatComboViewer\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getSingleReferencer_SingleReferenceForAdvancedEObjectFlatComboViewer(), this.getOwner(), null, \"singleReferenceForAdvancedEObjectFlatComboViewer\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSingleReferencer_BooleanAttribute(), ecorePackage.getEBoolean(), \"booleanAttribute\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSingleReferencer_EenumAttribute(), ecorePackage.getEEnumerator(), \"eenumAttribute\", null, 0, 1, SingleReferencer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSingleReferencer_StringAttribute(), ecorePackage.getEString(), \"stringAttribute\", null, 0, 1, SingleReferencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tEGenericType g1 = createEGenericType(ecorePackage.getEEList());\n\t\tEGenericType g2 = createEGenericType();\n\t\tg1.getETypeArguments().add(g2);\n\t\tinitEAttribute(getSingleReferencer_ListAttribute(), g1, \"listAttribute\", null, 0, 1, SingleReferencer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(anotherSubTypeEClass, AnotherSubType.class, \"AnotherSubType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getAnotherSubType_AnotherSpecialisation(), ecorePackage.getEBoolean(), \"anotherSpecialisation\", null, 0, 1, AnotherSubType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(elementEClass, Element.class, \"Element\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getElement_Visible(), ecorePackage.getEBoolean(), \"visible\", null, 0, 1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(attributeNavigationSampleEClass, AttributeNavigationSample.class, \"AttributeNavigationSample\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getAttributeNavigationSample_SingleValuedAttributeDelegate(), this.getAttributeDelegate(), null, \"singleValuedAttributeDelegate\", null, 0, 1, AttributeNavigationSample.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getAttributeNavigationSample_MultiValuedAttributeDelegate(), this.getAttributeDelegate(), null, \"multiValuedAttributeDelegate\", null, 0, -1, AttributeNavigationSample.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(attributeDelegateEClass, AttributeDelegate.class, \"AttributeDelegate\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getAttributeDelegate_Delegate1(), ecorePackage.getEString(), \"delegate1\", null, 1, 1, AttributeDelegate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getAttributeDelegate_Delegate2(), ecorePackage.getEInt(), \"delegate2\", null, 0, 1, AttributeDelegate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t}", "public static void load() {\n load(false);\n }", "@Override\n public void populate(GDataConf conf, G g) throws SLIB_Exception {\n\n String concept_file = (String) conf.getParameter(ARG_CONCEPT_FILE);\n String relationship_file = (String) conf.getParameter(ARG_RELATIONSHIP_FILE);\n String prefix = (String) conf.getParameter(ARG_PREFIX);\n\n if (conf.existsParam(ARG_LOAD_INACTIVE_CONCEPTS)) {\n String load_inactive_concepts = conf.getParameter(ARG_LOAD_INACTIVE_CONCEPTS).toString();\n\n if (load_inactive_concepts.equalsIgnoreCase(\"true\")) {\n LOAD_ONLY_ACTIVE_CONCEPTS = false;\n }\n }\n\n if (conf.existsParam(ARG_LOAD_INACTIVE_RELATIONSHIPS)) {\n String load_inactive_relationships = conf.getParameter(ARG_LOAD_INACTIVE_RELATIONSHIPS).toString();\n\n if (load_inactive_relationships.equalsIgnoreCase(\"true\")) {\n LOAD_ONLY_ACTIVE_RELATIONSHIPS = false;\n }\n }\n\n logger.info(\"-------------------------------------\");\n logger.info(\"Loading SNOMED-CT [RF2] \");\n logger.info(\"-------------------------------------\");\n logger.info(\"Concept file: \" + concept_file);\n logger.info(\"Relationship file: \" + relationship_file);\n\n if (concept_file == null) {\n throw new SLIB_Ex_Critic(\"Please specify a file containing the concept specification, argument \" + ARG_CONCEPT_FILE);\n }\n if (relationship_file == null) {\n throw new SLIB_Ex_Critic(\"Please specify a file containing the relationship specification, argument \" + ARG_RELATIONSHIP_FILE);\n }\n\n if (prefix == null && g.getURI() != null) {\n prefix = g.getURI().getNamespace();\n }\n\n logger.info(\"Loading concepts\");\n\n DateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\n Map<String, ConceptSnomedCT> concepts = new HashMap<String, ConceptSnomedCT>();\n\n FileInputStream fstream;\n try {\n fstream = new FileInputStream(concept_file);\n\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n\n String line;\n String[] data;\n boolean header = true;\n\n while ((line = br.readLine()) != null) {\n\n if (header) {\n header = false;\n continue;\n }\n\n data = p_tab.split(line);\n\n Date date = formatter.parse(data[CONCEPT_DATE]);\n\n if (concepts.containsKey(data[CONCEPT_ID])) {\n ConceptSnomedCT cExists = concepts.get(data[CONCEPT_ID]);\n\n if (cExists.date.before(date)) { // the current specification is more recent than the other loaded, we alsways consider the last one\n ConceptSnomedCT newConcept = new ConceptSnomedCT(data[CONCEPT_ID], date, data[CONCEPT_ACTIVE].trim().equals(\"1\"));\n concepts.put(data[CONCEPT_ID], newConcept);\n }\n // else do nothing the current concept is obsolete compared to the one we already strore\n } else {\n ConceptSnomedCT concept = new ConceptSnomedCT(data[CONCEPT_ID], date, data[CONCEPT_ACTIVE].trim().equals(\"1\"));\n concepts.put(data[CONCEPT_ID], concept);\n }\n\n }\n in.close();\n\n long loaded = 0;\n\n for (ConceptSnomedCT concept : concepts.values()) {\n\n if (!LOAD_ONLY_ACTIVE_CONCEPTS || concept.active) {\n URI cURI = repo.getURI(prefix,concept.id);\n conceptMap.put(concept.id, cURI);\n loaded++;\n }\n }\n\n logger.info(\"Number of activeconcepts loaded \" + loaded + \" on \"+concepts.size()+\" concepts\"); \n logger.info(\"Relationship file: \" + relationship_file);\n\n in = new DataInputStream(new FileInputStream(relationship_file));\n br = new BufferedReader(new InputStreamReader(in));\n\n Map<String, RelationshipSnomedCT> relationships = new HashMap<String, RelationshipSnomedCT>();\n\n\n header = true;\n long c = 0;\n\n\n logger.info(\"Loading relationships information... please wait\");\n // Load the relationships information\n while ((line = br.readLine()) != null) {\n\n if (header) {\n header = false;\n continue;\n }\n c++;\n if (c % 100000 == 0) {\n logger.debug(\"Processed \" + c + \"\\t\" + relationships.size() + \" relationships information loaded\");\n }\n data = p_tab.split(line);\n\n Date date = formatter.parse(data[RELATIONSHIP_DATE]);\n\n if (relationships.containsKey(data[RELATIONSHIP_ID])) {\n RelationshipSnomedCT rExists = relationships.get(data[RELATIONSHIP_ID]);\n\n if (!rExists.date.after(date)) { // the current specification is more recent than the other loaded, we only consider the last one\n RelationshipSnomedCT newRelationship = new RelationshipSnomedCT(data[RELATIONSHIP_SOURCE_CONCEPT_ID], data[RELATIONSHIP_TARGET_CONCEPT_ID], data[RELATIONSHIP_TYPE_ID], date, data[RELATIONSHIP_ACTIVE].trim().equals(\"1\"));\n // we replace the older\n relationships.put(data[RELATIONSHIP_ID], newRelationship);\n }\n // else do nothing the current relationship is obsolete regarding th one we already strore\n } else {\n RelationshipSnomedCT newRelationship = new RelationshipSnomedCT(data[RELATIONSHIP_SOURCE_CONCEPT_ID], data[RELATIONSHIP_TARGET_CONCEPT_ID], data[RELATIONSHIP_TYPE_ID], date, data[RELATIONSHIP_ACTIVE].trim().equals(\"1\"));\n\n // we replace the older\n relationships.put(data[RELATIONSHIP_ID], newRelationship);\n }\n }\n\n // Load the relationships and corresponding concepts who are not defined as inactive\n double relationship_count = 0;\n logger.info(\"Adding relationships to the graph... please wait\");\n for (RelationshipSnomedCT r : relationships.values()) {\n\n if (!LOAD_ONLY_ACTIVE_RELATIONSHIPS || r.active) {\n if (conceptMap.containsKey(r.source) && conceptMap.containsKey(r.target)) {\n\n URI src = conceptMap.get(r.source);\n URI tar = conceptMap.get(r.target);\n URI pred;\n\n if (idMapping.containsKey(r.relationshipID)) {\n pred = idMapping.get(r.relationshipID);\n } else {\n pred = repo.getURI(prefix,r.relationshipID);\n }\n E e = new Edge(src, pred, tar);\n\n g.addE(e);\n relationship_count++;\n }\n }\n }\n logger.info(\"Number of relationships loaded: \" + relationship_count);\n logger.info(\"-------------------------------------\");\n \n \n } catch (Exception ex) {\n ex.printStackTrace();\n throw new SLIB_Ex_Critic(ex.getMessage());\n }\n }", "public abstract void load();", "private void generateCoreTypes() {\n\t\tvoidDt = new VoidDataType(progDataTypes);\n\t\tArrayList<TypeMap> typeList = new ArrayList<>();\n\t\ttypeList.add(new TypeMap(DataType.DEFAULT, \"undefined\", \"unknown\", false, false));\n\n\t\tfor (DataType dt : Undefined.getUndefinedDataTypes()) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, dt, \"unknown\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractIntegerDataType.getSignedDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(\n\t\t\t\tnew TypeMap(displayLanguage, dt.clone(progDataTypes), \"int\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractIntegerDataType.getUnsignedDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(\n\t\t\t\tnew TypeMap(displayLanguage, dt.clone(progDataTypes), \"uint\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractFloatDataType.getFloatDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, dt, \"float\", false, false));\n\t\t}\n\n\t\ttypeList.add(new TypeMap(DataType.DEFAULT, \"code\", \"code\", false, false));\n\n\t\t// Set \"char\" datatype\n\t\tDataType charDataType = new CharDataType(progDataTypes);\n\n\t\tString charMetatype = null;\n\t\tboolean isChar = false;\n\t\tboolean isUtf = false;\n\t\tif (charDataType instanceof CharDataType && ((CharDataType) charDataType).isSigned()) {\n\t\t\tcharMetatype = \"int\";\n\t\t}\n\t\telse {\n\t\t\tcharMetatype = \"uint\";\n\t\t}\n\t\tif (charDataType.getLength() == 1) {\n\t\t\tisChar = true;\n\t\t}\n\t\telse {\n\t\t\tisUtf = true;\n\t\t}\n\t\ttypeList.add(new TypeMap(displayLanguage, charDataType, charMetatype, isChar, isUtf));\n\n\t\t// Set up the \"wchar_t\" datatype\n\t\tWideCharDataType wideDataType = new WideCharDataType(progDataTypes);\n\t\ttypeList.add(new TypeMap(displayLanguage, wideDataType, \"int\", false, true));\n\n\t\tif (wideDataType.getLength() != 2) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, new WideChar16DataType(progDataTypes), \"int\",\n\t\t\t\tfalse, true));\n\t\t}\n\t\tif (wideDataType.getLength() != 4) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, new WideChar32DataType(progDataTypes), \"int\",\n\t\t\t\tfalse, true));\n\t\t}\n\n\t\tDataType boolDataType = new BooleanDataType(progDataTypes);\n\t\ttypeList.add(new TypeMap(displayLanguage, boolDataType, \"bool\", false, false));\n\n\t\tcoreBuiltin = new TypeMap[typeList.size()];\n\t\ttypeList.toArray(coreBuiltin);\n\t}", "private void addLoadAPI(FunctionGenerator fg) throws EQException\n\t{\n\n\t\tAPIFieldSet apiFieldSet = FunctionToolbox.getLoadAPIFieldSet(session, \"LID\", \"MCD\", \"G01M\", \"GZG011\",\n\t\t\t\t\t\t\"Maintain Customer Details\", \"M\", true);\n\t\tfg.addLoadAPIFieldSet(\"REC1\", apiFieldSet);\n\n\t\t// PV\n\t\t// PVFieldSet pvFieldSet = FunctionToolbox.getPVFieldSet(session, \"GFR70R\", \"\", false, \"N\", MappingToolbox\n\t\t// .getFullLoadFieldSetPath(\"REC1\", \"LID\"));\n\t\t// fg.setLoadPVFieldSet(\"REC1\", pvFieldSet);\n\t}", "public static void loadResources(DataBase _d, AbstractAtomicIntegerCoreAdd _perCentLoading, SexListInt _sexList) {\n\n _d.initializeMembers();\n\t\tfor (EntryCust<String,String> c: Cst.cs().entryList()) {\n short cle_ = (short) NumberUtil.parseInt(c.getKey());\n _d.getHm().addEntry(cle_, c.getValue());\n }\n for (EntryCust<String,String> c: Cst.ct().entryList()) {\n StringList infos_ = StringUtil.splitChars(c.getValue(), TAB_CHAR);\n short cle_ = (short) NumberUtil.parseInt(c.getKey());\n _d.getTm().addEntry(cle_, infos_.first().trim());\n LgInt price_ = new LgInt(infos_.last().trim());\n _d.getTmPrice().addEntry(cle_, price_);\n }\n _d.setFrontHeros(new ImageHeroKeys());\n StringMap<String> heFr_ = HeFront.im();\n for (EntryCust<String,String> e:heFr_.entryList()){\n StringList keyStrings_ = StringUtil.splitStrings(e.getKey(),\n SEPARATOR_KEY_HEROS);\n EnvironmentType env_ = getEnvByName(keyStrings_.first());\n Sex sex_ = getSexByName(keyStrings_.last(),_sexList);\n _d.getFrontHeros().addEntry(new ImageHeroKey(env_, sex_),\n BaseSixtyFourUtil.getImageByString(e.getValue()));\n }\n _d.setBackHeros(new ImageHeroKeys());\n StringMap<String> heBk_ = HeBack.im();\n for (EntryCust<String,String> e:heBk_.entryList()) {\n StringList keyStrings_ = StringUtil.splitStrings(e.getKey(),\n SEPARATOR_KEY_HEROS);\n EnvironmentType env_ = getEnvByName(keyStrings_\n .first());\n Sex sex_ = getSexByName(keyStrings_.last(),_sexList);\n _d.getBackHeros().addEntry(new ImageHeroKey(env_, sex_),\n BaseSixtyFourUtil.getImageByString(e.getValue()));\n }\n _d.setOverWorldHeros(new ImageHeroKeys());\n StringMap<String> heMi_ = HeMini.im();\n for (EntryCust<String,String> e:heMi_.entryList()) {\n StringList keyStrings_ = StringUtil.splitStrings(e.getKey(),\n SEPARATOR_KEY_HEROS);\n EnvironmentType env_ = getEnvByName(keyStrings_\n .first());\n Direction dir_ = Direction.getDirectionByName(keyStrings_\n .get(IndexConstants.SECOND_INDEX));\n Sex sex_ = getSexByName(keyStrings_.last(),_sexList);\n _d.getOverWorldHeros().addEntry(new ImageHeroKey(env_, dir_, sex_),\n BaseSixtyFourUtil.getImageByString(e.getValue()));\n }\n _d.setImageTmHm(BaseSixtyFourUtil.getImageByString(ImHmTm.im()));\n _d.setStorage(BaseSixtyFourUtil.getImageByString(ImStorage.im()));\n _d.setCombos(CoInit.co());\n _d.completeMembersCombos();\n _d.setMap(Dm.map());\n// _perCentLoading.addPercent(delta_);\n _d.setConstNum(new StringMap<Rate>());\n// StringList lines_;\n //= StringUtil.splitChars(cts_.getVal(CONST_NUM),\n // RETURN_LINE_CHAR);\n _d.getConstNum().addAllEntries(Cst.cn());\n// for (EntryCust<String, Rate> l : Cst.cn().entryList()) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// _d.getConstNum().addEntry(infos_.first(), new Rate(infos_.last()));\n// }\n\n// lines_ = StringUtil.splitChars(cts_.getVal(CONST_NOT_NUM),\n// RETURN_LINE_CHAR);\n for (EntryCust<String, String> l : Cst.cnn().entryList()) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n String key_ = l.getKey();\n String value_ = l.getValue();\n _d.initValue(key_, value_);\n\n }\n _d.setTableTypes(new TypesDuos());\n// StringList linesTableTypes_ = StringUtil.splitChars(cts_.getVal(TABLE_TYPES),\n// RETURN_LINE_CHAR);\n// String head_ = linesTableTypes_.first();\n// StringList typesOff_ = StringUtil.splitChars(head_, TAB_CHAR);\n// typesOff_.removeString(DataBase.EMPTY_STRING);\n// StringList typesDef_ = new StringList();\n// for (String l : linesTableTypes_.leftMinusOne(linesTableTypes_.size())) {\n// typesDef_.add(StringUtil.getFirstToken(l, TAB_CHAR));\n// }\n// typesDef_.removeString(DataBase.EMPTY_STRING);\n _d.getTableTypes().getList().addAllElts(Cst.eff().getList());\n// for (String pkType_ : typesDef_) {\n//\n// String l_ = getElements(linesTableTypes_, pkType_).first();\n// StringList infos_ = StringUtil.splitChars(l_, TAB_CHAR);\n// infos_.removeString(pkType_);\n// int i_ = 0;\n// for (String damageType_ : typesOff_) {\n// TypesDuo t_ = new TypesDuo(damageType_, pkType_);\n// Rate r_;\n// if (Rate.isValid(infos_.get(i_))) {\n// r_ = new Rate(infos_.get(i_));\n// } else {\n// r_ = DataBase.defRateProduct();\n// }\n// _d.getTableTypes().addEntry(t_, r_);\n//\n// i_++;\n// }\n// }\n// _d.initTypesByTable();\n _d.setTypes(Cst.tp());\n _d.setLawsDamageRate(new IdMap<DifficultyModelLaw, LawNumber>());\n// StringMap<String> cts_ = Cst.tr();\n// StringList laws_ = StringUtil.splitChars(cts_.getVal(LOIS_RANDOM),\n// RETURN_LINE_CHAR);\n// for (String l : laws_) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// MonteCarloNumber law_ = new MonteCarloNumber();\n//\n// for (String evt_ : StringUtil.splitStrings(infos_.get(1),\n// DataBase.SEPARATOR_RAND)) {\n// StringList infosLoc_ = StringUtil.splitStrings(evt_,\n// DataBase.SEPARATOR_RAND_EVENTS);\n// boolean defaultLaw_ = false;\n// if (!Rate.isValid(infosLoc_.first())) {\n// defaultLaw_ = true;\n// } else if (!LgInt.isValid(infosLoc_.get(1))) {\n// defaultLaw_ = true;\n// }\n// if (defaultLaw_) {\n// law_ = new MonteCarloNumber();\n//\n// law_.addQuickEvent(new Rate(1), DataBase.defElementaryEvent());\n// break;\n// }\n//\n// law_.addQuickEvent(new Rate(infosLoc_.first()),\n// new LgInt(infosLoc_.get(1)));\n//\n// }\n//\n//// if (!law_.checkEvents()) {\n//// _d.setError(true);\n//// return;\n//// }\n// _d.getLawsDamageRate().addEntry(\n// getModelByName(infos_.first()),\n// new LawNumber(law_, (short) NumberUtil.parseInt(infos_.last())));\n// }\n _d.getLawsDamageRate().addAllEntries(Cst.lg());\n _d.setExpGrowth(new IdMap<ExpType, String>());\n// StringList courbes_ = StringUtil.splitChars(cts_.getVal(COURBE_PTS_EXP),\n// RETURN_LINE_CHAR);\n// for (String l : courbes_) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// _d.getExpGrowth().addEntry(getExpTypeByName(infos_.first()),\n// infos_.get(1));\n// }\n _d.getExpGrowth().addAllEntries(Cst.ex());\n _d.setRates(new IdMap<DifficultyWinPointsFight, String>());\n// StringList rates_ = StringUtil.splitChars(cts_.getVal(RATE_WON_POINTS),\n// RETURN_LINE_CHAR);\n// for (String l : rates_) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// _d.getRates().addEntry(getDiffWonPtsByName(infos_\n// .first()), infos_.get(1));\n// }\n _d.getRates().addAllEntries(Cst.di());\n _d.setTypesColors(new StringMap<String>());\n// StringList rates_ = StringUtil.splitChars(cts_.getVal(DataBase.TYPES_COLOR_CODE + DataBase.IMG_FILES_RES_EXT_TXT), RETURN_LINE_CHAR);\n// for (String l : rates_) {\n// if (l.isEmpty()) {\n// continue;\n// }\n// StringList infos_ = StringUtil.splitChars(l, TAB_CHAR);\n// String colorStr_ = infos_.get(1);\n// _d.getTypesColors().addEntry(infos_.first(), colorStr_);\n// }\n _d.getTypesColors().addAllEntries(Cst.tc());\n _d.setEndGameImage(BaseSixtyFourUtil.getImageByString(ImEndGame.im()));\n _d.initTranslations();\n StringMap<String> trs_ = Trs.tr();\n for (String l : _d.getLanguages()) {\n IdMap<Gender, String> genders_ = trGenders(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_GENDERS));\n _d.getTranslatedGenders().addEntry(l, genders_);\n IdMap<SelectedBoolean, String> booleans_ = trBooleans(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_BOOLEANS));\n _d.getTranslatedBooleans().addEntry(l, booleans_);\n IdMap<DifficultyWinPointsFight, String> diffWinPts_ = trDiffWinPts(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_DIFF_WIN_PTS));\n _d.getTranslatedDiffWinPts().addEntry(l, diffWinPts_);\n IdMap<DifficultyModelLaw, String> diffLaw_ = trDiffLaw(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_DIFF_MODEL_LAW));\n _d.getTranslatedDiffModelLaw().addEntry(l, diffLaw_);\n IdMap<EnvironmentType, String> environments_ = trEnv(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_ENVIRONMENTS));\n _d.getTranslatedEnvironment().addEntry(l, environments_);\n IdMap<Statistic, String> statistics_ = trStat(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_STATISTICS));\n _d.getTranslatedStatistics().addEntry(l, statistics_);\n IdMap<TargetChoice, String> targets_ = trTargets(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_TARGETS));\n _d.getTranslatedTargets().addEntry(l, targets_);\n StringMap<String> categories_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_CATEGORIES));\n _d.getTranslatedCategories().addEntry(l, categories_);\n StringMap<String> types_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_TYPES));\n _d.getTranslatedTypes().addEntry(l, types_);\n StringMap<String> pokemon_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_POKEMON));\n _d.getTranslatedPokemon().addEntry(l, pokemon_);\n StringMap<String> moves_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_MOVES));\n _d.getTranslatedMoves().addEntry(l, moves_);\n StringMap<String> items_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_ITEMS));\n _d.getTranslatedItems().addEntry(l, items_);\n StringMap<String> abilities_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_ABILITIES));\n _d.getTranslatedAbilities().addEntry(l, abilities_);\n StringMap<String> status_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_STATUS));\n _d.getTranslatedStatus().addEntry(l, status_);\n StringMap<String> fctsMath_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_MATH));\n _d.getTranslatedFctMath().addEntry(l, fctsMath_);\n StringMap<String> descrClasses_ = tr(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_CLASSES));\n _d.getTranslatedClassesDescriptions().addEntry(l, descrClasses_);\n StringMap<String> litteral_ = trLitt(trs_.getVal(l + DataBase.SEPARATOR_FILES + DataBase.TRANSLATION_LITTERAL));\n _d.getLitterals().addEntry(l, litteral_);\n }\n// _perCentLoading.addPercent(delta_);\n feedImgs(AnStatis.im(), _d.getAnimStatis());\n feedImgs(AnStatus.im(), _d.getAnimStatus());\n _d.setAnimAbsorb(BaseSixtyFourUtil.getImageByString(AnAbs.im().firstValue()));\n for (EntryCust<String,PokemonData> e: PkInit.pk().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n _d.calculateAvgPound();\n for (EntryCust<String,MoveData> e: MvInit.mv().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n patch(_d);\n for (EntryCust<String,Item> e: ItInit.it().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n for (EntryCust<String,AbilityData> e: AbInit.ab().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n for (EntryCust<String,Status> e: StInit.st().entryList()) {\n _d.completeQuickMembers(e.getKey(),e.getValue());\n }\n _d.completeVariables();\n _d.sortEndRound();\n// _perCentLoading.addPercent(delta_);\n _d.completeMoveTutors();\n// for (PokemonData pk_ : _d.getPokedex().values()) {\n// for (short hm_ : pk_.getHiddenMoves()) {\n// String move_ = _d.getHm().getVal(hm_);\n// pk_.getMoveTutors().add(move_);\n// }\n// for (short hm_ : pk_.getTechnicalMoves()) {\n// String move_ = _d.getTm().getVal(hm_);\n// pk_.getMoveTutors().add(move_);\n// }\n// for (LevelMove l : pk_.getLevMoves()) {\n// pk_.getMoveTutors().add(l.getMove());\n// }\n// pk_.getMoveTutors().removeDuplicates();\n// }\n _d.setMaxiPkBack(new StringMap<int[][]>());\n feedImgs(Bk.im(), _d.getMaxiPkBack());\n _d.setMaxiPkFront(new StringMap<int[][]>());\n feedImgs(Ft.im(), _d.getMaxiPkFront());\n _d.setMiniPk(new StringMap<int[][]>());\n feedImgs(Mn.im(), _d.getMiniPk());\n _d.setMiniItems(new StringMap<int[][]>());\n feedImgs(ItIm.im(), _d.getMiniItems());\n _d.setTypesImages(new StringMap<int[][]>());\n feedImgs(TypeImg.im(), _d.getTypesImages());\n// _perCentLoading.addPercent(delta_);\n _d.getMap().initializeLinks();\n _d.getMap().initInteractiveElements();\n _d.getMap().initializeTree();\n _d.getMap().initializeAccessibility();\n _d.setTrainers(new StringMap<int[][]>());\n _d.setPeople(new StringMap<int[][]>());\n _d.setImages(new StringMap<int[][]>());\n _d.setImagesTiles(new StringMap<ScreenCoordssInt>());\n _d.setLinks(new StringMap<int[][]>());\n _d.setMiniMap(new StringMap<int[][]>());\n feedImgs(TrainerImg.im(), _d.getTrainers());\n feedImgs(PeopleImg.im(), _d.getPeople());\n feedImgs(ImgMap.im(), _d.getImages());\n feedImgs(LinkImg.im(), _d.getLinks());\n feedImgs(MiniMapImg.im(), _d.getLinks());\n StringMap<String> imMiMap_ = MiniMapImg.im();\n for (TileMiniMap t : _d.getMap().getMiniMap().values()) {\n String f_ = t.getFile();\n _d.getMiniMap().addEntry(f_, BaseSixtyFourUtil.getImageByString(imMiMap_.getVal(f_)));\n }\n _d.getMiniMap().addEntry(_d.getMap().getUnlockedCity(), BaseSixtyFourUtil\n .getImageByString(imMiMap_.getVal(_d.getMap().getUnlockedCity())));\n// _perCentLoading.addPercent(delta_);\n _d.initializeWildPokemon();\n// _perCentLoading.addPercent(delta_);\n\n _d.getFamilies().addAllEntries(PkInit.fs());\n// _d.initFamilies();\n _d.boundsPk();\n// for (int[][] i : _d.getMaxiPkBack().values()) {\n// if (i.length == 0) {\n// _d.setError(true);\n// return;\n// }\n// if (i[0].length > _d.getMaxWidthPk()) {\n// _d.setMaxWidthPk(i[0].length);\n// }\n// if (i.length > _d.getMaxHeightPk()) {\n// _d.setMaxHeightPk(i.length);\n// }\n//\n// }\n// for (int[][] i : _d.getMaxiPkFront().values()) {\n// if (i.length == 0) {\n// _d.setError(true);\n// return;\n// }\n// if (i[0].length > _d.getMaxWidthPk()) {\n// _d.setMaxWidthPk(i[0].length);\n// }\n// if (i.length > _d.getMaxHeightPk()) {\n// _d.setMaxHeightPk(i.length);\n// }\n//\n// }\n _d.setupPseudoImages();\n _d.getConstNum().addEntry(DataBase.DEF_BASE_MOVE,new Rate(\"1\"));\n _perCentLoading.set(100);\n }", "public static void load() {\n\n\t\ttry {\n\t\t\tnew Thread() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tObjectDef.loadConfig();\n\t\t\t\t\t\tObjectConstants.declare();\n\t\t\t\t\t\tMapLoading.load();\n\t\t\t\t\t\tRegion.sort();\n\t\t\t\t\t\tObjectManager.declare();\n\t\t\t\t\t\tGameDefinitionLoader.loadNpcSpawns();\n\t\t\t\t\t\tNpc.spawnBosses();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}.start();\n\n\t\t\tGlobalItemHandler.spawn();\n\t\t\tTriviaBot.start();\n\t\t\tAchievements.declare();\n\n\t\t\tGameDefinitionLoader.loadItemValues();\n\t\t\tGameDefinitionLoader.loadNpcDefinitions();\n\t\t\tGameDefinitionLoader.loadItemDefinitions();\n\t\t\tGameDefinitionLoader.loadEquipmentDefinitions();\n\t\t\tGameDefinitionLoader.loadShopDefinitions();\n\t\t\tGameDefinitionLoader.setRequirements();\n\t\t\tGameDefinitionLoader.loadWeaponDefinitions();\n\t\t\tGameDefinitionLoader.loadSpecialAttackDefinitions();\n\t\t\tGameDefinitionLoader.loadRangedStrengthDefinitions();\n\t\t\tGameDefinitionLoader.loadSpecialAttackDefinitions();\n\t\t\tGameDefinitionLoader.loadCombatSpellDefinitions();\n\t\t\tGameDefinitionLoader.loadRangedWeaponDefinitions();\n\t\t\tGameDefinitionLoader.loadNpcCombatDefinitions();\n\t\t\tGameDefinitionLoader.loadItemBonusDefinitions();\n\n\t\t\tNPCDrops.parseDrops().load();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void initLoaderType() {\r\n boolean autoaddBoolean = GrouperLoaderConfig.retrieveConfig().propertyValueBoolean(\"loader.autoadd.typesAttributes\", true);\r\n\r\n if (!autoaddBoolean) {\r\n return;\r\n }\r\n\r\n GrouperSession grouperSession = null;\r\n\r\n try {\r\n\r\n grouperSession = GrouperSession.startRootSession(false);\r\n\r\n GrouperSession.callbackGrouperSession(grouperSession, new GrouperSessionHandler() {\r\n\r\n public Object callback(GrouperSession grouperSession)\r\n throws GrouperSessionException {\r\n try {\r\n \r\n GroupType loaderType = GroupType.createType(grouperSession, \"grouperLoader\", false);\r\n\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderType\", false);\r\n \r\n loaderType.addAttribute(grouperSession,\"grouperLoaderDbName\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderScheduleType\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderQuery\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderQuartzCron\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderIntervalSeconds\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderPriority\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderAndGroups\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderGroupTypes\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderGroupsLike\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderGroupQuery\", false);\r\n\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderDisplayNameSyncBaseFolderName\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderDisplayNameSyncLevels\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderDisplayNameSyncType\", false);\r\n\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderFailsafeUse\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMaxGroupPercentRemove\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMaxOverallPercentGroupsRemove\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMaxOverallPercentMembershipsRemove\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMinGroupSize\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMinManagedGroups\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderFailsafeSendEmail\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMinGroupNumberOfMembers\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMinOverallNumberOfMembers\", false);\r\n \r\n } catch (Exception e) {\r\n throw new RuntimeException(e.getMessage(), e);\r\n } finally {\r\n GrouperSession.stopQuietly(grouperSession);\r\n }\r\n return null;\r\n }\r\n\r\n });\r\n\r\n //register the hook if not already\r\n GroupTypeTupleIncludeExcludeHook.registerHookIfNecessary(true);\r\n \r\n } catch (Exception e) {\r\n throw new RuntimeException(\"Problem adding loader type/attributes\", e);\r\n }\r\n\r\n }", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void initSchema() throws Exception {\n File workingDirectory = service.getInstanceLayout().getPartitionsDirectory();\n\n // Extract the schema on disk (a brand new one) and load the registries\n File schemaRepository = new File(workingDirectory, \"schema\");\n SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor(workingDirectory);\n\n try {\n extractor.extractOrCopy();\n } catch (IOException ioe) {\n // The schema has already been extracted, bypass\n }\n\n SchemaLoader loader = new LdifSchemaLoader(schemaRepository);\n SchemaManager schemaManager = new DefaultSchemaManager(loader);\n\n // We have to load the schema now, otherwise we won't be able\n // to initialize the Partitions, as we won't be able to parse\n // and normalize their suffix Dn\n schemaManager.loadAllEnabled();\n\n // Tell all the normalizer comparators that they should not normalize anything\n ComparatorRegistry comparatorRegistry = schemaManager.getComparatorRegistry();\n\n for (LdapComparator<?> comparator : comparatorRegistry) {\n if (comparator instanceof NormalizingComparator) {\n ((NormalizingComparator) comparator).setOnServer();\n }\n }\n\n service.setSchemaManager(schemaManager);\n\n // Init the LdifPartition\n LdifPartition ldifPartition = new LdifPartition(schemaManager, service.getDnFactory());\n ldifPartition.setPartitionPath(new File(workingDirectory, \"schema\").toURI());\n SchemaPartition schemaPartition = new SchemaPartition(schemaManager);\n schemaPartition.setWrappedPartition(ldifPartition);\n service.setSchemaPartition(schemaPartition);\n\n List<Throwable> errors = schemaManager.getErrors();\n\n if (errors.size() != 0) {\n throw new Exception(I18n.err(I18n.ERR_317, Exceptions.printErrors(errors)));\n }\n }", "public void beginLoad(int libraryCount);", "protected void loadAll() {\n\t\ttry {\n\t\t\tloadGroups(this.folder, this.cls, this.cachedOnes);\n\t\t\t/*\n\t\t\t * we have to initialize the components\n\t\t\t */\n\t\t\tfor (Object obj : this.cachedOnes.values()) {\n\t\t\t\t((Component) obj).getReady();\n\t\t\t}\n\t\t\tTracer.trace(this.cachedOnes.size() + \" \" + this + \" loaded.\");\n\t\t} catch (Exception e) {\n\t\t\tthis.cachedOnes.clear();\n\t\t\tTracer.trace(\n\t\t\t\t\te,\n\t\t\t\t\tthis\n\t\t\t\t\t\t\t+ \" pre-loading failed. No component of this type is available till we successfully pre-load them again.\");\n\t\t}\n\t}", "PrimitiveTypesLibrary createPrimitiveTypesLibrary();", "private void loadStaticEntity(String path) {\r\n assert (entityManager != null);\r\n \r\n try {\r\n Scanner sc = new Scanner(new File(path));\r\n while (sc.hasNext()) {\r\n int id = sc.nextInt();\r\n float x = sc.nextFloat();\r\n float y = sc.nextFloat();\r\n int kwidth = sc.nextInt();\r\n int kheight = sc.nextInt();\r\n entityManager.addEntity(new StaticEntity(handler, id, Tile.TILEWIDTH * x, \r\n Tile.TILEHEIGHT * y, Tile.TILEWIDTH * kwidth, Tile.TILEHEIGHT * kheight));\r\n }\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "Collection<StructuralFeature> getTypedFeatures();", "@Override\n public void load() {\n }", "ILitePackFamily getFamily();", "protected void heapLoad(ProgramLocation obj, Register dest_r, Set base_s, jq_Field f) {\n Set result = NodeSet.FACTORY.makeSet();\n for (Iterator i=base_s.iterator(); i.hasNext(); ) {\n Node base = (Node)i.next();\n FieldNode fn = FieldNode.get(base, f, obj);\n heapLoad(result, base, f, fn);\n }\n setRegister(dest_r, result);\n }", "public void initializePackageContents()\n {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tclarityAddFilesEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityGetBatchResultEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityGetKeyEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityQueryBatchEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityReloadFileEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tclarityRemoveFilesEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\t\tstartBatchEClass.getESuperTypes().add(this.getClarityAbstractObject());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(clarityAbstractObjectEClass, ClarityAbstractObject.class, \"ClarityAbstractObject\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getClarityAbstractObject_ClarityConnection(), ecorePackage.getEString(), \"clarityConnection\", null, 0, 1, ClarityAbstractObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(clarityAddFilesEClass, ClarityAddFiles.class, \"ClarityAddFiles\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityGetBatchResultEClass, ClarityGetBatchResult.class, \"ClarityGetBatchResult\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityGetKeyEClass, ClarityGetKey.class, \"ClarityGetKey\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityQueryBatchEClass, ClarityQueryBatch.class, \"ClarityQueryBatch\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityReloadFileEClass, ClarityReloadFile.class, \"ClarityReloadFile\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(clarityRemoveFilesEClass, ClarityRemoveFiles.class, \"ClarityRemoveFiles\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(startBatchEClass, StartBatch.class, \"StartBatch\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\n\t\t// Create annotations\n\t\t// cbgeneralcontrol\n\t\tcreateCbgeneralcontrolAnnotations();\n\t}", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\teActorEClass.getESuperTypes().add(this.getEDomainSpecificEntity());\n\t\teItemEClass.getESuperTypes().add(this.getEDomainSpecificEntity());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(eDomainSchemaEClass, EDomainSchema.class, \"EDomainSchema\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEDomainSchema_Cs(), this.getEControlSchema(), null, \"cs\", null, 0, 1, EDomainSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDomainSchema_Ds(), this.getEDataSchema(), null, \"ds\", null, 0, 1, EDomainSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eControlSchemaEClass, EControlSchema.class, \"EControlSchema\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEControlSchema_Actor(), this.getEActor(), null, \"actor\", null, 1, -1, EControlSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDataSchemaEClass, EDataSchema.class, \"EDataSchema\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEDataSchema_Cs(), this.getEControlSchema(), null, \"cs\", null, 1, 1, EDataSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDataSchema_Item(), this.getEItem(), null, \"item\", null, 1, -1, EDataSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificEntityEClass, EDomainSpecificEntity.class, \"EDomainSpecificEntity\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificEntity_CommandPriority(), ecorePackage.getEInt(), \"commandPriority\", null, 0, 1, EDomainSpecificEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDomainSpecificEntity_Cmd(), this.getEDomainSpecificCommand(), null, \"cmd\", null, 0, -1, EDomainSpecificEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificCommandEClass, EDomainSpecificCommand.class, \"EDomainSpecificCommand\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificCommand_CmdId(), ecorePackage.getEInt(), \"cmdId\", null, 0, 1, EDomainSpecificCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eActorEClass, EActor.class, \"EActor\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEActor_KindInteraction(), this.getECoordinationBehavior(), \"kindInteraction\", null, 0, 1, EActor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEActor_TypesControlled(), this.getEDomainSpecificType(), null, \"typesControlled\", null, 0, -1, EActor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eItemEClass, EItem.class, \"EItem\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEItem_ArisingBehavior(), this.getEArising(), \"arisingBehavior\", null, 0, 1, EItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEItem_Type(), this.getEDomainSpecificType(), null, \"type\", null, 1, 1, EItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificTypeEClass, EDomainSpecificType.class, \"EDomainSpecificType\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificType_InteractionBehavior(), this.getEInteractionBehavior(), \"interactionBehavior\", null, 0, 1, EDomainSpecificType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getEDomainSpecificType_Cardinality(), this.getECardinality(), \"cardinality\", null, 0, 1, EDomainSpecificType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(eArisingEEnum, EArising.class, \"EArising\");\n\t\taddEEnumLiteral(eArisingEEnum, EArising.STATIC);\n\t\taddEEnumLiteral(eArisingEEnum, EArising.DYNAMIC);\n\n\t\tinitEEnum(eCardinalityEEnum, ECardinality.class, \"ECardinality\");\n\t\taddEEnumLiteral(eCardinalityEEnum, ECardinality.ONE);\n\t\taddEEnumLiteral(eCardinalityEEnum, ECardinality.MANY);\n\n\t\tinitEEnum(eInteractionBehaviorEEnum, EInteractionBehavior.class, \"EInteractionBehavior\");\n\t\taddEEnumLiteral(eInteractionBehaviorEEnum, EInteractionBehavior.SYNC);\n\t\taddEEnumLiteral(eInteractionBehaviorEEnum, EInteractionBehavior.ASYNC);\n\n\t\tinitEEnum(eCoordinationBehaviorEEnum, ECoordinationBehavior.class, \"ECoordinationBehavior\");\n\t\taddEEnumLiteral(eCoordinationBehaviorEEnum, ECoordinationBehavior.LOCAL);\n\t\taddEEnumLiteral(eCoordinationBehaviorEEnum, ECoordinationBehavior.DISTRIBUTED);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "@Override\n\t\tprotected void loadSpecification(SpecificationContext context) {\n\t\t}", "public static String getPrimitiveDefsFileName(String partName) {\n return getPartFolderPath(partName) + primitiveDefFileName;\n }", "private void loadRegistratedResources() {\n \t\tFile kbPluginLocation = KbPlugin.getDefault().getLocation();\r\n \t\tif(kbPluginLocation!=null) {\r\n \t IExtensionRegistry registry = Platform.getExtensionRegistry();\r\n \t\t\tIExtensionPoint extensionPoint = registry.getExtensionPoint(\"org.jboss.tools.common.kb.tldResource\");\r\n \t\t\tIExtension[] extensions = extensionPoint.getExtensions();\r\n \t\t\tfor (int i=0; i<extensions.length; i++) {\r\n \t\t\t\tIExtension extension = extensions[i];\r\n \t\t\t\tIConfigurationElement[] elements = extension.getConfigurationElements();\r\n \t\t\t\tfor(int j=0; j<elements.length; j++) {\r\n \t\t\t\t\tString uri = elements[j].getAttribute(\"uri\");\r\n \t\t\t\t\tString location = elements[j].getAttribute(\"schema-location\");\r\n \t\t\t\t\tString version = elements[j].getAttribute(\"version\");\r\n \t\t\t\t\tString jsf = elements[j].getAttribute(\"jsf\");\r\n \t\t\t\t\tif(uri==null || uri.length()==0 || location==null || location.length()==0) {\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tFile shemaLocation = new File(kbPluginLocation, location);\r\n \t\t\t\t\tif(shemaLocation.isFile()) {\r\n \t\t\t\t\t\tKbTldResource resource = new KbTldResource(uri, null, null, null);\r\n \t\t\t\t\t\tresource.setSchemaLocation(shemaLocation);\r\n \t\t\t\t\t\tif(version!=null && version.length()>0) {\r\n \t\t\t\t\t\t\tresource.setVersion(version);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tresource.setCustomTld(false);\r\n \t\t\t\t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\t\t\t\tregistratedResources.put(resource, resource);\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tString message = \"Can't load KB schema: \" + shemaLocation;\r\n \t\t\t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, KbPlugin.PLUGIN_ID, IStatus.WARNING, message, null));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Get custom schemas.\r\n \t\tFile schemaFolder = new File(schemaLocation); \r\n \t\tif(!schemaFolder.exists()) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tFile[] schemas = schemaFolder.listFiles(new FileFilter(){\r\n \t\t\tpublic boolean accept(File file) {\r\n \t\t\t\tif(file.isFile()) {\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \t\t\t\treturn false;\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tfor(int i=0; i<schemas.length; i++) {\r\n \t\t\tDocument document = null;\r\n \t\t\ttry {\r\n \t\t\t\tdocument = KbDocumentBuilderFactory.createDocumentBuilder(false).parse(schemas[i]);\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, \"Can't parse Schema (location: \" + schemas[i] + \")\", e));\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n //\t\t\tString tldLocation = schemas[i].getAbsolutePath();\r\n \t\t\tString tldLocation = document.getDocumentElement().getAttribute(SchemaNodeFactory.LOCATION_ATTRIBUTE);\r\n \t\t\tString tldUri = document.getDocumentElement().getAttribute(SchemaNodeFactory.URI_ATTRIBUTE);\r\n \t\t\tString tldVersion = document.getDocumentElement().getAttribute(SchemaNodeFactory.VERSION_ATTRIBUTE);\r\n \t\t\tString jsf = document.getDocumentElement().getAttribute(SchemaNodeFactory.JSF_ATTRIBUTE);\r\n \t\t\tString tldContent = null; \r\n \t\t\tNodeList children = document.getDocumentElement().getChildNodes();\r\n \t\t\tfor(int j=0; j<children.getLength(); j++) {\r\n \t\t\t\tNode node = children.item(j);\r\n \t\t\t\tif(node.getNodeName().equals(SchemaNodeFactory.TLD_CONTENT_NODE)) {\r\n \t\t\t\t\tNode child = node.getFirstChild();\r\n \t\t\t\t\tif(child instanceof CDATASection) {\r\n \t\t\t\t\t\ttldContent = ((CDATASection)child).getData();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tKbTldResource resource = new KbTldResource(tldUri, tldLocation, null, tldVersion);\r\n \t\t\tresource.setTldContent(tldContent);\r\n \t\t\tresource.setSchemaLocation(schemas[i]);\r\n \t\t\tresource.setCustomTld(true);\r\n \t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\tregistratedResources.put(resource, resource);\r\n \t\t}\r\n \t}", "private static void initDataTypeList()\n\t{\n\t\tfor(String numberType : DATA_TYPE_ARRAY)\n\t\t{\n\t\t\tdataTypeList.add(numberType);\n\t\t}\n\t\tlogger.info(\" --|*|-- All Data types are initialized! --|*|--\");\n\t}", "@Override\n public void load(File externalFile) throws IOException {\n if (externalFile.length() == 0) {\n return;\n }\n try (ManagedIngestExternalFileOptions ingestOptions =\n new ManagedIngestExternalFileOptions()) {\n ingestOptions.setIngestBehind(false);\n db.ingestExternalFile(family,\n Collections.singletonList(externalFile.getAbsolutePath()),\n ingestOptions);\n }\n }", "public int[] readFeature(String featureDefFile) {\n/* 686 */ if (featureDefFile.isEmpty())\n/* 687 */ return null; \n/* 688 */ return FeatureManager.readFeature(featureDefFile);\n/* */ }", "private void genLoadVectorCode(String name, String classSimpleName, boolean primitive, int dimensions, String cppType) {\n int tabLevel = 1;\n String tabs = tabs(tabLevel);\n String prevVVarName = \"\";\n char prevLoopVarName = ' ';\n\n for (int i = 1; i <= dimensions; i++) {\n int level = dimensions + 1 - i;\n String vVarName = \"v\" + i + \"_\" + name;\n String vectorType = vectorCppTypeName(level, cppType);\n String lenVarName = vVarName + \"_length\";\n char loopVarName = (char) ('i' + (i - 1));\n\n if (i == 1) {\n load.println(\"\\t// \" + vectorType + \" this->\" + name);\n genDebug(load, \"\\tstd::cout << \\\"load \" + vectorType + \" \" + name + \"\\\" << std::endl;\");\n }\n\n load.println(tabs + \"int \" + lenVarName + \";\");\n\n load.println();\n load.println(tabs + INSTREAM_VAR_NAME + \".readInt( \" + lenVarName + \" );\");\n\n genDebugDumpValue(load, lenVarName, tabs);\n\n if (i > 1) {\n // inside a for loop, inner vector variable initialized by\n // dereferencing iterator\n load.println(tabs + vectorType + \"& \" + vVarName + \" = \" + prevVVarName + \".at( \" + prevLoopVarName + \" );\");\n } else {\n // outside for loop, inner vector variable initialized to member\n // variable\n load.println(tabs + vectorType + \"& \" + vVarName + \" = this->\" + name + \";\");\n }\n\n if (i <= dimensions - 1) {\n // initialize & pre-allocate the vector at this level\n load.println(tabs + vVarName + \" = \" + vectorType + \"( \" + lenVarName + \" );\");\n } else {\n // initialize & pre-allocate the vector at this level\n load.println(tabs + vVarName + \".reserve( \" + lenVarName + \" );\");\n }\n\n load.println();\n load.println(tabs + \"for( int \" + loopVarName + \" = 0; \" + loopVarName + \" < \" + lenVarName + \"; \" + loopVarName\n + \"++ ){\");\n\n tabLevel++;\n tabs = tabs(tabLevel);\n\n if (i == dimensions) {\n if (primitive || classSimpleName.equals(\"String\")) {\n load.println(tabs + cppType + \" v\" + i + \";\");\n load.println(tabs + genReadCode(\"v\" + i, cppType(classSimpleName)));\n load.println(tabs + vVarName + \".push_back( v\" + i + \" );\");\n } else {\n load.println(tabs + cppType + \" v\" + i + \";\");\n load.println(tabs + \"v\" + i + \".load( \" + INSTREAM_VAR_NAME + \" );\");\n load.println(tabs + vVarName + \".push_back( v\" + i + \" );\");\n }\n }\n prevVVarName = vVarName;\n prevLoopVarName = loopVarName;\n }\n for (int i = 0; i < dimensions; i++) {\n tabLevel--;\n tabs = tabs(tabLevel);\n load.println(tabs + \"}\");\n }\n }", "public ResourceFileFeatureType resourceFileFeatureType() {\n _initialize();\n return resourceFileFeatureType;\n }", "public void load() throws Throwable\n {\n // addCompositeTypes();\n\n Db typeRecordTable = new Db(null, 0);\n typeRecordTable.set_error_stream(System.err);\n typeRecordTable.set_errpfx(\"Catalog Retrieval Error\");\n typeRecordTable.open(CatalogManager.getCurrentDirectory()+\n File.separator+\n CompositeTypeRecord.databaseFileName, \n null, Db.DB_BTREE, Db.DB_CREATE, 0644);\n \n Db typeFieldRecordTable = new Db(null, 0);\n typeFieldRecordTable.set_error_stream(System.err);\n typeFieldRecordTable.set_errpfx(\"Catalog Retrieval Error\");\n typeFieldRecordTable.open(CatalogManager.getCurrentDirectory()+\n File.separator+\n TypeFieldRecord.databaseFileName, \n null, Db.DB_BTREE, Db.DB_CREATE, 0644);\n \n // Acquire an iterator for the table.\n Dbc outerIterator;\n outerIterator = typeRecordTable.cursor(null, 0);\n \n Dbc innerIterator;\n innerIterator = typeFieldRecordTable.cursor(null, 0);\n \n IntegerDbt outerKey = new IntegerDbt();\n CompositeTypeRecord typeRecord = new CompositeTypeRecord();\n \n while (outerIterator.get(outerKey, typeRecord, Db.DB_NEXT) == 0) {\n typeRecord.parse();\n if (Constants.VERBOSE) System.out.println(typeRecord);\n\t // if(!typeRecord.getIsInferred()) {\n\t\tCompositeType t = new CompositeType(typeRecord.getTypeName(), \n\t\t\t\t\t\t typeRecord.getIsInferred());\n\t\t\n\t\tIntegerArrayDbt innerKey = new IntegerArrayDbt(new int[] {outerKey.getInteger(), 0});\n\t\tTypeFieldRecord typeFieldRecord = new TypeFieldRecord();\n\t\t\n\t\tif (innerIterator.get(innerKey, typeFieldRecord, Db.DB_SET_RANGE) == 0) {\n\t\t int[] indices = innerKey.getIntegerArray();\n\t\t if (indices[0] == outerKey.getInteger()) {\n\t\t\ttypeFieldRecord.parse();\n\t\t\tif (Constants.VERBOSE) System.out.println(typeFieldRecord);\n\t\t\tt.addAttribute(typeFieldRecord.getFieldName(), \n\t\t\t\t findPrimitiveType(typeFieldRecord.getFieldType()),\n\t\t\t\t typeFieldRecord.getSize());\n\t\t\t\n\t\t\twhile (innerIterator.get(innerKey, typeFieldRecord, Db.DB_NEXT) == 0) {\n\t\t\t indices = innerKey.getIntegerArray();\n\t\t\t if (indices[0] != outerKey.getInteger()) break;\n\t\t\t typeFieldRecord.parse();\n\t\t\t if (Constants.VERBOSE) System.out.println(typeFieldRecord);\n\t\t\t t.addAttribute(typeFieldRecord.getFieldName(), \n\t\t\t\t\t findPrimitiveType(typeFieldRecord.getFieldType()),\n\t\t\t\t\t typeFieldRecord.getSize());\n\t\t\t}\n\t\t }\n\t\t}\n\t\taddCompositeType(t);\n\t\t//}\n }\n\n innerIterator.close();\n outerIterator.close();\n typeRecordTable.close(0);\n typeFieldRecordTable.close(0);\n }", "public void load() ;", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tEcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);\n\t\torg.openecomp.ncomp.core.CorePackage theCorePackage_1 = (org.openecomp.ncomp.core.CorePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.core.CorePackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\topenstackRequestDeleteEClass.getESuperTypes().add(this.getOpenStackRequest());\n\t\topenstackRequestPollEClass.getESuperTypes().add(this.getOpenStackRequest());\n\t\tvirtualMachineTypeEClass.getESuperTypes().add(theCorePackage_1.getNamedEntity());\n\t\tsecurityRuleEClass.getESuperTypes().add(theCorePackage_1.getNamedEntity());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(openStackRequestEClass, OpenStackRequest.class, \"OpenStackRequest\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getOpenStackRequest_ProjectName(), theEcorePackage.getEString(), \"projectName\", null, 0, 1, OpenStackRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(openstackRequestDeleteEClass, OpenstackRequestDelete.class, \"OpenstackRequestDelete\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getOpenstackRequestDelete_ObjectType(), theEcorePackage.getEString(), \"objectType\", null, 0, 1, OpenstackRequestDelete.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getOpenstackRequestDelete_ObjectName(), theEcorePackage.getEString(), \"objectName\", null, 0, 1, OpenstackRequestDelete.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(openstackRequestPollEClass, OpenstackRequestPoll.class, \"OpenstackRequestPoll\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(virtualMachineTypeEClass, VirtualMachineType.class, \"VirtualMachineType\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getVirtualMachineType_Description(), theEcorePackage.getEString(), \"description\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_NumberOfCores(), theEcorePackage.getEInt(), \"numberOfCores\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_MemorySizeMB(), theEcorePackage.getEInt(), \"memorySizeMB\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_RootDiskSizeGB(), theEcorePackage.getEInt(), \"rootDiskSizeGB\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_DiskSizeGB(), theEcorePackage.getEInt(), \"diskSizeGB\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_VolumeSizeGB(), theEcorePackage.getEInt(), \"volumeSizeGB\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_ImageName(), theEcorePackage.getEString(), \"imageName\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_FlavorName(), theEcorePackage.getEString(), \"flavorName\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_NeedPublicIp(), theEcorePackage.getEBoolean(), \"needPublicIp\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getVirtualMachineType_DeploymentStatus(), theCorePackage_1.getDeploymentStatus(), \"deploymentStatus\", null, 0, 1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getVirtualMachineType_IncomingSecurityRules(), this.getSecurityRule(), null, \"incomingSecurityRules\", null, 0, -1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getVirtualMachineType_OutboundSecurityRules(), this.getSecurityRule(), null, \"outboundSecurityRules\", null, 0, -1, VirtualMachineType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(securityRuleEClass, SecurityRule.class, \"SecurityRule\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getSecurityRule_PortRangeStart(), theEcorePackage.getEIntegerObject(), \"portRangeStart\", null, 0, 1, SecurityRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSecurityRule_PortRangeEnd(), theEcorePackage.getEIntegerObject(), \"portRangeEnd\", null, 0, 1, SecurityRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSecurityRule_Prefix(), theEcorePackage.getEString(), \"prefix\", null, 0, 1, SecurityRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getSecurityRule_IpProtocol(), this.getSecurityRuleProtocol(), \"ipProtocol\", null, 0, 1, SecurityRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(securityRuleProtocolEEnum, SecurityRuleProtocol.class, \"SecurityRuleProtocol\");\n\t\taddEEnumLiteral(securityRuleProtocolEEnum, SecurityRuleProtocol.NONE);\n\t\taddEEnumLiteral(securityRuleProtocolEEnum, SecurityRuleProtocol.TCP);\n\t\taddEEnumLiteral(securityRuleProtocolEEnum, SecurityRuleProtocol.UDP);\n\t\taddEEnumLiteral(securityRuleProtocolEEnum, SecurityRuleProtocol.IMCP);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "public void load() {\n handleLoad(false, false);\n }", "private static XSModel loadSchema(Element schema, Definition def) {\n Map definitionNameSpaces = def.getNamespaces();\n Set nameSpaces = definitionNameSpaces.entrySet();\n Iterator nameSpacesIterator = nameSpaces.iterator();\n\n while (nameSpacesIterator.hasNext()) {\n Entry nameSpaceEntry = (Entry) nameSpacesIterator.next();\n if (!\"\".equals((String) nameSpaceEntry.getKey()) &&\n !schema.hasAttributeNS(\"http://www.w3.org/2000/xmlns/\",\n (String) nameSpaceEntry.getKey())) {\n Attr nameSpace =\n schema.getOwnerDocument().createAttributeNS(\n \"http://www.w3.org/2000/xmlns/\",\n \"xmlns:\" + nameSpaceEntry.getKey());\n nameSpace.setValue((String) nameSpaceEntry.getValue());\n schema.setAttributeNode(nameSpace);\n }\n }\n\n LSInput schemaInput = new DOMInputImpl();\n schemaInput.setStringData(\n \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\"\n + XmlUtils.getElementAsString(schema));\n log.info(\"Loading schema in types section of definition \" +\n def.getDocumentBaseURI());\n schemaInput.setSystemId(def.getDocumentBaseURI());\n XMLSchemaLoader schemaLoader = new XMLSchemaLoader();\n XSModel schemaModel = schemaLoader.load(schemaInput);\n log.info(\"Done loading\");\n return schemaModel;\n }", "public void load();", "public void load();", "private void loadCascade() {\n try {\n InputStream is = getResources().openRawResource(R.raw.haarcascade_frontalface_default);\n File cascadeDir = getDir(\"cascade\", Context.MODE_PRIVATE);\n File mCascadeFile = new File(cascadeDir, \"haarcascade_frontalface_default.xml\");\n FileOutputStream os = new FileOutputStream(mCascadeFile);\n\n byte[] buffer = new byte[4096];\n int bytesRead;\n while ((bytesRead = is.read(buffer)) != -1) {\n os.write(buffer, 0, bytesRead);\n }\n is.close();\n os.close();\n\n mClassifier = new CascadeClassifier(mCascadeFile.getAbsolutePath());\n // L'appel load est nécessaire à cause d'un bug d'OpenCV dans cette version\n mClassifier.load(mCascadeFile.getAbsolutePath());\n\n cvView.setClassifier(mClassifier);\n cvView.resume(mVideoView, null);\n Log.d(CLASS_NAME, \"Classifier has been loaded !\");\n if (mClassifier.empty()) {\n Log.e(CLASS_NAME, \"Error while loading classifier file.\");\n } else {\n Log.d(CLASS_NAME, \"Loaded cascade classifier from \" + mCascadeFile.getAbsolutePath());\n }\n } catch (IOException e) {\n Log.e(\"MyActivity\", \"Failed to load cascade.\", e);\n }\n }", "public interface FmprimitivesPackage extends EPackage\n{\n /**\n * The package name.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNAME = \"fmprimitives\";\n\n /**\n * The package namespace URI.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNS_URI = \"http://lero.ie/spl/fmprimitives.ecore\";\n\n /**\n * The package namespace name.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNS_PREFIX = \"fmprimitives\";\n\n /**\n * The singleton instance of the package.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n FmprimitivesPackage eINSTANCE = fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl.init();\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelImpl <em>Feature Model</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureModel()\n * @generated\n */\n int FEATURE_MODEL = 0;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL__ID = 0;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL__NAME = 1;\n\n /**\n * The feature id for the '<em><b>Features</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL__FEATURES = 2;\n\n /**\n * The feature id for the '<em><b>Primitives</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL__PRIMITIVES = 3;\n\n /**\n * The number of structural features of the '<em>Feature Model</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_FEATURE_COUNT = 4;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelPrimitiveImpl <em>Feature Model Primitive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelPrimitiveImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureModelPrimitive()\n * @generated\n */\n int FEATURE_MODEL_PRIMITIVE = 1;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE__ID = 0;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE__NAME = 1;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE = 2;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE__EXPLANATIONS = 3;\n\n /**\n * The number of structural features of the '<em>Feature Model Primitive</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT = 4;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasSubfeatureImpl <em>Feature Has Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasSubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasSubfeature()\n * @generated\n */\n int FEATURE_HAS_SUBFEATURE = 2;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Subfeature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE__SUBFEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Feature Has Subfeature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_SUBFEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.UndirectedRelationshipImpl <em>Undirected Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.UndirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getUndirectedRelationship()\n * @generated\n */\n int UNDIRECTED_RELATIONSHIP = 3;\n\n /**\n * The number of structural features of the '<em>Undirected Relationship</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int UNDIRECTED_RELATIONSHIP_FEATURE_COUNT = 0;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.DirectedRelationshipImpl <em>Directed Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.DirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getDirectedRelationship()\n * @generated\n */\n int DIRECTED_RELATIONSHIP = 4;\n\n /**\n * The number of structural features of the '<em>Directed Relationship</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int DIRECTED_RELATIONSHIP_FEATURE_COUNT = 0;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureGroupImpl <em>Feature Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureGroup()\n * @generated\n */\n int FEATURE_GROUP = 5;\n\n /**\n * The number of structural features of the '<em>Feature Group</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_GROUP_FEATURE_COUNT = 0;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureImpl <em>Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeature()\n * @generated\n */\n int FEATURE = 6;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__ID = 0;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__NAME = 1;\n\n /**\n * The feature id for the '<em><b>Group Has Parent</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__GROUP_HAS_PARENT = 2;\n\n /**\n * The feature id for the '<em><b>Group Has Child</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__GROUP_HAS_CHILD = 3;\n\n /**\n * The feature id for the '<em><b>Feature Has Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__FEATURE_HAS_PARENT = 4;\n\n /**\n * The feature id for the '<em><b>Feature Has Subfeature</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__FEATURE_HAS_SUBFEATURE = 5;\n\n /**\n * The feature id for the '<em><b>Selected Feature</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__SELECTED_FEATURE = 6;\n\n /**\n * The feature id for the '<em><b>Eliminated Feature</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__ELIMINATED_FEATURE = 7;\n\n /**\n * The feature id for the '<em><b>Undirected Relationships</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__UNDIRECTED_RELATIONSHIPS = 8;\n\n /**\n * The feature id for the '<em><b>Incoming Directed Relationships</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__INCOMING_DIRECTED_RELATIONSHIPS = 9;\n\n /**\n * The feature id for the '<em><b>Outgoing Directed Relationships</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__OUTGOING_DIRECTED_RELATIONSHIPS = 10;\n\n /**\n * The feature id for the '<em><b>Feature Is Root</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE__FEATURE_IS_ROOT = 11;\n\n /**\n * The number of structural features of the '<em>Feature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_FEATURE_COUNT = 12;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasParentImpl <em>Group Has Parent</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasParentImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasParent()\n * @generated\n */\n int GROUP_HAS_PARENT = 7;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT__GROUP = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Group Has Parent</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_PARENT_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasChildImpl <em>Group Has Child</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasChildImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasChild()\n * @generated\n */\n int GROUP_HAS_CHILD = 8;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Child</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__CHILD = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD__GROUP = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Group Has Child</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_CHILD_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.SelectedFeatureImpl <em>Selected Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.SelectedFeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getSelectedFeature()\n * @generated\n */\n int SELECTED_FEATURE = 9;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Feature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE__FEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Selected Feature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SELECTED_FEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.EliminatedFeatureImpl <em>Eliminated Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.EliminatedFeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getEliminatedFeature()\n * @generated\n */\n int ELIMINATED_FEATURE = 10;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Feature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE__FEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Eliminated Feature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ELIMINATED_FEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureIsRootImpl <em>Feature Is Root</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureIsRootImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureIsRoot()\n * @generated\n */\n int FEATURE_IS_ROOT = 11;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Feature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT__FEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Feature Is Root</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_IS_ROOT_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.ExplanationImpl <em>Explanation</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.ExplanationImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getExplanation()\n * @generated\n */\n int EXPLANATION = 12;\n\n /**\n * The feature id for the '<em><b>Primitives</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EXPLANATION__PRIMITIVES = 0;\n\n /**\n * The number of structural features of the '<em>Explanation</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EXPLANATION_FEATURE_COUNT = 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMaxImpl <em>Group Has Max</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMaxImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasMax()\n * @generated\n */\n int GROUP_HAS_MAX = 13;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Max</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__MAX = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX__GROUP = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Group Has Max</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MAX_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMinImpl <em>Group Has Min</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMinImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasMin()\n * @generated\n */\n int GROUP_HAS_MIN = 14;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Min</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__MIN = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN__GROUP = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Group Has Min</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int GROUP_HAS_MIN_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.AlternativeGroupImpl <em>Alternative Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.AlternativeGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getAlternativeGroup()\n * @generated\n */\n int ALTERNATIVE_GROUP = 15;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Group Has Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__GROUP_HAS_PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group Has Child</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__GROUP_HAS_CHILD = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The feature id for the '<em><b>Group Has Max</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__GROUP_HAS_MAX = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The feature id for the '<em><b>Group Has Min</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP__GROUP_HAS_MIN = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 3;\n\n /**\n * The number of structural features of the '<em>Alternative Group</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ALTERNATIVE_GROUP_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 4;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.OrGroupImpl <em>Or Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.OrGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getOrGroup()\n * @generated\n */\n int OR_GROUP = 16;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Group Has Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__GROUP_HAS_PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Group Has Child</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__GROUP_HAS_CHILD = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The feature id for the '<em><b>Group Has Max</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__GROUP_HAS_MAX = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The feature id for the '<em><b>Group Has Min</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP__GROUP_HAS_MIN = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 3;\n\n /**\n * The number of structural features of the '<em>Or Group</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int OR_GROUP_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 4;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasOptionalSubfeatureImpl <em>Feature Has Optional Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasOptionalSubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasOptionalSubfeature()\n * @generated\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE = 17;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Subfeature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE__SUBFEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Feature Has Optional Subfeature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_OPTIONAL_SUBFEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasMandatorySubfeatureImpl <em>Feature Has Mandatory Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasMandatorySubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasMandatorySubfeature()\n * @generated\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE = 18;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Parent</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__PARENT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Subfeature</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE__SUBFEATURE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Feature Has Mandatory Subfeature</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FEATURE_HAS_MANDATORY_SUBFEATURE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.MutualExclusiveImpl <em>Mutual Exclusive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.MutualExclusiveImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getMutualExclusive()\n * @generated\n */\n int MUTUAL_EXCLUSIVE = 19;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Related Features</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE__RELATED_FEATURES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Mutual Exclusive</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int MUTUAL_EXCLUSIVE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.CustomUndirectedRelationshipImpl <em>Custom Undirected Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.CustomUndirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getCustomUndirectedRelationship()\n * @generated\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP = 20;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Stereotype</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__STEREOTYPE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Related Features</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP__RELATED_FEATURES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Custom Undirected Relationship</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_UNDIRECTED_RELATIONSHIP_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.RequiresImpl <em>Requires</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.RequiresImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getRequires()\n * @generated\n */\n int REQUIRES = 21;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Sources</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__SOURCES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Targets</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES__TARGETS = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Requires</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int REQUIRES_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.TemporalOrderingSequentialImpl <em>Temporal Ordering Sequential</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.TemporalOrderingSequentialImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getTemporalOrderingSequential()\n * @generated\n */\n int TEMPORAL_ORDERING_SEQUENTIAL = 22;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Sources</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__SOURCES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Targets</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL__TARGETS = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Temporal Ordering Sequential</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TEMPORAL_ORDERING_SEQUENTIAL_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.CustomDirectedRelationshipImpl <em>Custom Directed Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.CustomDirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getCustomDirectedRelationship()\n * @generated\n */\n int CUSTOM_DIRECTED_RELATIONSHIP = 23;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The feature id for the '<em><b>Stereotype</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__STEREOTYPE = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Sources</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__SOURCES = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 1;\n\n /**\n * The feature id for the '<em><b>Targets</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP__TARGETS = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 2;\n\n /**\n * The number of structural features of the '<em>Custom Directed Relationship</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int CUSTOM_DIRECTED_RELATIONSHIP_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 3;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.AutoCompleteImpl <em>Auto Complete</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.AutoCompleteImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getAutoComplete()\n * @generated\n */\n int AUTO_COMPLETE = 24;\n\n /**\n * The feature id for the '<em><b>Id</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE__ID = FEATURE_MODEL_PRIMITIVE__ID;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE__NAME = FEATURE_MODEL_PRIMITIVE__NAME;\n\n /**\n * The feature id for the '<em><b>Configuration Source</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE__CONFIGURATION_SOURCE = FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE;\n\n /**\n * The feature id for the '<em><b>Explanations</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE__EXPLANATIONS = FEATURE_MODEL_PRIMITIVE__EXPLANATIONS;\n\n /**\n * The number of structural features of the '<em>Auto Complete</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int AUTO_COMPLETE_FEATURE_COUNT = FEATURE_MODEL_PRIMITIVE_FEATURE_COUNT + 0;\n\n /**\n * The meta object id for the '{@link fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource <em>Configuration Source</em>}' enum.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getConfigurationSource()\n * @generated\n */\n int CONFIGURATION_SOURCE = 25;\n\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel <em>Feature Model</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Model</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel\n * @generated\n */\n EClass getFeatureModel();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getId <em>Id</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Id</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getId()\n * @see #getFeatureModel()\n * @generated\n */\n EAttribute getFeatureModel_Id();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getName <em>Name</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Name</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getName()\n * @see #getFeatureModel()\n * @generated\n */\n EAttribute getFeatureModel_Name();\n\n /**\n * Returns the meta object for the containment reference list '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getFeatures <em>Features</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the containment reference list '<em>Features</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getFeatures()\n * @see #getFeatureModel()\n * @generated\n */\n EReference getFeatureModel_Features();\n\n /**\n * Returns the meta object for the containment reference list '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getPrimitives <em>Primitives</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the containment reference list '<em>Primitives</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModel#getPrimitives()\n * @see #getFeatureModel()\n * @generated\n */\n EReference getFeatureModel_Primitives();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive <em>Feature Model Primitive</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Model Primitive</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive\n * @generated\n */\n EClass getFeatureModelPrimitive();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getId <em>Id</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Id</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getId()\n * @see #getFeatureModelPrimitive()\n * @generated\n */\n EAttribute getFeatureModelPrimitive_Id();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getName <em>Name</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Name</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getName()\n * @see #getFeatureModelPrimitive()\n * @generated\n */\n EAttribute getFeatureModelPrimitive_Name();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getConfigurationSource <em>Configuration Source</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Configuration Source</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getConfigurationSource()\n * @see #getFeatureModelPrimitive()\n * @generated\n */\n EAttribute getFeatureModelPrimitive_ConfigurationSource();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getExplanations <em>Explanations</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Explanations</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureModelPrimitive#getExplanations()\n * @see #getFeatureModelPrimitive()\n * @generated\n */\n EReference getFeatureModelPrimitive_Explanations();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature <em>Feature Has Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Has Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature\n * @generated\n */\n EClass getFeatureHasSubfeature();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature#getParent <em>Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature#getParent()\n * @see #getFeatureHasSubfeature()\n * @generated\n */\n EReference getFeatureHasSubfeature_Parent();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature#getSubfeature <em>Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasSubfeature#getSubfeature()\n * @see #getFeatureHasSubfeature()\n * @generated\n */\n EReference getFeatureHasSubfeature_Subfeature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.UndirectedRelationship <em>Undirected Relationship</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Undirected Relationship</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.UndirectedRelationship\n * @generated\n */\n EClass getUndirectedRelationship();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.DirectedRelationship <em>Directed Relationship</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Directed Relationship</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.DirectedRelationship\n * @generated\n */\n EClass getDirectedRelationship();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureGroup <em>Feature Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureGroup\n * @generated\n */\n EClass getFeatureGroup();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.Feature <em>Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature\n * @generated\n */\n EClass getFeature();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getId <em>Id</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Id</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getId()\n * @see #getFeature()\n * @generated\n */\n EAttribute getFeature_Id();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getName <em>Name</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Name</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getName()\n * @see #getFeature()\n * @generated\n */\n EAttribute getFeature_Name();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getGroupHasParent <em>Group Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Group Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getGroupHasParent()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_GroupHasParent();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getGroupHasChild <em>Group Has Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Group Has Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getGroupHasChild()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_GroupHasChild();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureHasParent <em>Feature Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureHasParent()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_FeatureHasParent();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureHasSubfeature <em>Feature Has Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Feature Has Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureHasSubfeature()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_FeatureHasSubfeature();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getSelectedFeature <em>Selected Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Selected Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getSelectedFeature()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_SelectedFeature();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getEliminatedFeature <em>Eliminated Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Eliminated Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getEliminatedFeature()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_EliminatedFeature();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getUndirectedRelationships <em>Undirected Relationships</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Undirected Relationships</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getUndirectedRelationships()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_UndirectedRelationships();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getIncomingDirectedRelationships <em>Incoming Directed Relationships</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Incoming Directed Relationships</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getIncomingDirectedRelationships()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_IncomingDirectedRelationships();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getOutgoingDirectedRelationships <em>Outgoing Directed Relationships</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Outgoing Directed Relationships</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getOutgoingDirectedRelationships()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_OutgoingDirectedRelationships();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureIsRoot <em>Feature Is Root</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature Is Root</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Feature#getFeatureIsRoot()\n * @see #getFeature()\n * @generated\n */\n EReference getFeature_FeatureIsRoot();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasParent <em>Group Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Group Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasParent\n * @generated\n */\n EClass getGroupHasParent();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasParent#getParent <em>Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasParent#getParent()\n * @see #getGroupHasParent()\n * @generated\n */\n EReference getGroupHasParent_Parent();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasParent#getGroup <em>Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasParent#getGroup()\n * @see #getGroupHasParent()\n * @generated\n */\n EReference getGroupHasParent_Group();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasChild <em>Group Has Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Group Has Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasChild\n * @generated\n */\n EClass getGroupHasChild();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasChild#getChild <em>Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasChild#getChild()\n * @see #getGroupHasChild()\n * @generated\n */\n EReference getGroupHasChild_Child();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasChild#getGroup <em>Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasChild#getGroup()\n * @see #getGroupHasChild()\n * @generated\n */\n EReference getGroupHasChild_Group();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.SelectedFeature <em>Selected Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Selected Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.SelectedFeature\n * @generated\n */\n EClass getSelectedFeature();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.SelectedFeature#getFeature <em>Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.SelectedFeature#getFeature()\n * @see #getSelectedFeature()\n * @generated\n */\n EReference getSelectedFeature_Feature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.EliminatedFeature <em>Eliminated Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Eliminated Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.EliminatedFeature\n * @generated\n */\n EClass getEliminatedFeature();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.EliminatedFeature#getFeature <em>Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.EliminatedFeature#getFeature()\n * @see #getEliminatedFeature()\n * @generated\n */\n EReference getEliminatedFeature_Feature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureIsRoot <em>Feature Is Root</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Is Root</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureIsRoot\n * @generated\n */\n EClass getFeatureIsRoot();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureIsRoot#getFeature <em>Feature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Feature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureIsRoot#getFeature()\n * @see #getFeatureIsRoot()\n * @generated\n */\n EReference getFeatureIsRoot_Feature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.Explanation <em>Explanation</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Explanation</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Explanation\n * @generated\n */\n EClass getExplanation();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Explanation#getPrimitives <em>Primitives</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Primitives</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Explanation#getPrimitives()\n * @see #getExplanation()\n * @generated\n */\n EReference getExplanation_Primitives();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMax <em>Group Has Max</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Group Has Max</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMax\n * @generated\n */\n EClass getGroupHasMax();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMax#getMax <em>Max</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Max</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMax#getMax()\n * @see #getGroupHasMax()\n * @generated\n */\n EAttribute getGroupHasMax_Max();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMax#getGroup <em>Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMax#getGroup()\n * @see #getGroupHasMax()\n * @generated\n */\n EReference getGroupHasMax_Group();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMin <em>Group Has Min</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Group Has Min</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMin\n * @generated\n */\n EClass getGroupHasMin();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMin#getMin <em>Min</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Min</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMin#getMin()\n * @see #getGroupHasMin()\n * @generated\n */\n EAttribute getGroupHasMin_Min();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.GroupHasMin#getGroup <em>Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.GroupHasMin#getGroup()\n * @see #getGroupHasMin()\n * @generated\n */\n EReference getGroupHasMin_Group();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup <em>Alternative Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Alternative Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup\n * @generated\n */\n EClass getAlternativeGroup();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasParent <em>Group Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasParent()\n * @see #getAlternativeGroup()\n * @generated\n */\n EReference getAlternativeGroup_GroupHasParent();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasChild <em>Group Has Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Group Has Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasChild()\n * @see #getAlternativeGroup()\n * @generated\n */\n EReference getAlternativeGroup_GroupHasChild();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasMax <em>Group Has Max</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Max</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasMax()\n * @see #getAlternativeGroup()\n * @generated\n */\n EReference getAlternativeGroup_GroupHasMax();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasMin <em>Group Has Min</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Min</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AlternativeGroup#getGroupHasMin()\n * @see #getAlternativeGroup()\n * @generated\n */\n EReference getAlternativeGroup_GroupHasMin();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup <em>Or Group</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Or Group</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup\n * @generated\n */\n EClass getOrGroup();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasParent <em>Group Has Parent</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Parent</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasParent()\n * @see #getOrGroup()\n * @generated\n */\n EReference getOrGroup_GroupHasParent();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasChild <em>Group Has Child</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Group Has Child</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasChild()\n * @see #getOrGroup()\n * @generated\n */\n EReference getOrGroup_GroupHasChild();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasMax <em>Group Has Max</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Max</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasMax()\n * @see #getOrGroup()\n * @generated\n */\n EReference getOrGroup_GroupHasMax();\n\n /**\n * Returns the meta object for the reference '{@link fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasMin <em>Group Has Min</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Group Has Min</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.OrGroup#getGroupHasMin()\n * @see #getOrGroup()\n * @generated\n */\n EReference getOrGroup_GroupHasMin();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasOptionalSubfeature <em>Feature Has Optional Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Has Optional Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasOptionalSubfeature\n * @generated\n */\n EClass getFeatureHasOptionalSubfeature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.FeatureHasMandatorySubfeature <em>Feature Has Mandatory Subfeature</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Feature Has Mandatory Subfeature</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.FeatureHasMandatorySubfeature\n * @generated\n */\n EClass getFeatureHasMandatorySubfeature();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.MutualExclusive <em>Mutual Exclusive</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Mutual Exclusive</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.MutualExclusive\n * @generated\n */\n EClass getMutualExclusive();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.MutualExclusive#getRelatedFeatures <em>Related Features</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Related Features</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.MutualExclusive#getRelatedFeatures()\n * @see #getMutualExclusive()\n * @generated\n */\n EReference getMutualExclusive_RelatedFeatures();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship <em>Custom Undirected Relationship</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Custom Undirected Relationship</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship\n * @generated\n */\n EClass getCustomUndirectedRelationship();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship#getStereotype <em>Stereotype</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Stereotype</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship#getStereotype()\n * @see #getCustomUndirectedRelationship()\n * @generated\n */\n EAttribute getCustomUndirectedRelationship_Stereotype();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship#getRelatedFeatures <em>Related Features</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Related Features</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomUndirectedRelationship#getRelatedFeatures()\n * @see #getCustomUndirectedRelationship()\n * @generated\n */\n EReference getCustomUndirectedRelationship_RelatedFeatures();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.Requires <em>Requires</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Requires</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Requires\n * @generated\n */\n EClass getRequires();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Requires#getSources <em>Sources</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Sources</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Requires#getSources()\n * @see #getRequires()\n * @generated\n */\n EReference getRequires_Sources();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.Requires#getTargets <em>Targets</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Targets</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.Requires#getTargets()\n * @see #getRequires()\n * @generated\n */\n EReference getRequires_Targets();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential <em>Temporal Ordering Sequential</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Temporal Ordering Sequential</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential\n * @generated\n */\n EClass getTemporalOrderingSequential();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential#getSources <em>Sources</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Sources</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential#getSources()\n * @see #getTemporalOrderingSequential()\n * @generated\n */\n EReference getTemporalOrderingSequential_Sources();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential#getTargets <em>Targets</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Targets</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.TemporalOrderingSequential#getTargets()\n * @see #getTemporalOrderingSequential()\n * @generated\n */\n EReference getTemporalOrderingSequential_Targets();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship <em>Custom Directed Relationship</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Custom Directed Relationship</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship\n * @generated\n */\n EClass getCustomDirectedRelationship();\n\n /**\n * Returns the meta object for the attribute '{@link fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getStereotype <em>Stereotype</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Stereotype</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getStereotype()\n * @see #getCustomDirectedRelationship()\n * @generated\n */\n EAttribute getCustomDirectedRelationship_Stereotype();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getSources <em>Sources</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Sources</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getSources()\n * @see #getCustomDirectedRelationship()\n * @generated\n */\n EReference getCustomDirectedRelationship_Sources();\n\n /**\n * Returns the meta object for the reference list '{@link fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getTargets <em>Targets</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Targets</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.CustomDirectedRelationship#getTargets()\n * @see #getCustomDirectedRelationship()\n * @generated\n */\n EReference getCustomDirectedRelationship_Targets();\n\n /**\n * Returns the meta object for class '{@link fr.inria.familiar.fmlero.fmprimitives.AutoComplete <em>Auto Complete</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Auto Complete</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.AutoComplete\n * @generated\n */\n EClass getAutoComplete();\n\n /**\n * Returns the meta object for enum '{@link fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource <em>Configuration Source</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for enum '<em>Configuration Source</em>'.\n * @see fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource\n * @generated\n */\n EEnum getConfigurationSource();\n\n /**\n * Returns the factory that creates the instances of the model.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the factory that creates the instances of the model.\n * @generated\n */\n FmprimitivesFactory getFmprimitivesFactory();\n\n /**\n * <!-- begin-user-doc -->\n * Defines literals for the meta objects that represent\n * <ul>\n * <li>each class,</li>\n * <li>each feature of each class,</li>\n * <li>each enum,</li>\n * <li>and each data type</li>\n * </ul>\n * <!-- end-user-doc -->\n * @generated\n */\n interface Literals\n {\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelImpl <em>Feature Model</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureModel()\n * @generated\n */\n EClass FEATURE_MODEL = eINSTANCE.getFeatureModel();\n\n /**\n * The meta object literal for the '<em><b>Id</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL__ID = eINSTANCE.getFeatureModel_Id();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL__NAME = eINSTANCE.getFeatureModel_Name();\n\n /**\n * The meta object literal for the '<em><b>Features</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_MODEL__FEATURES = eINSTANCE.getFeatureModel_Features();\n\n /**\n * The meta object literal for the '<em><b>Primitives</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_MODEL__PRIMITIVES = eINSTANCE.getFeatureModel_Primitives();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelPrimitiveImpl <em>Feature Model Primitive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureModelPrimitiveImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureModelPrimitive()\n * @generated\n */\n EClass FEATURE_MODEL_PRIMITIVE = eINSTANCE.getFeatureModelPrimitive();\n\n /**\n * The meta object literal for the '<em><b>Id</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL_PRIMITIVE__ID = eINSTANCE.getFeatureModelPrimitive_Id();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL_PRIMITIVE__NAME = eINSTANCE.getFeatureModelPrimitive_Name();\n\n /**\n * The meta object literal for the '<em><b>Configuration Source</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE_MODEL_PRIMITIVE__CONFIGURATION_SOURCE = eINSTANCE.getFeatureModelPrimitive_ConfigurationSource();\n\n /**\n * The meta object literal for the '<em><b>Explanations</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_MODEL_PRIMITIVE__EXPLANATIONS = eINSTANCE.getFeatureModelPrimitive_Explanations();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasSubfeatureImpl <em>Feature Has Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasSubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasSubfeature()\n * @generated\n */\n EClass FEATURE_HAS_SUBFEATURE = eINSTANCE.getFeatureHasSubfeature();\n\n /**\n * The meta object literal for the '<em><b>Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_HAS_SUBFEATURE__PARENT = eINSTANCE.getFeatureHasSubfeature_Parent();\n\n /**\n * The meta object literal for the '<em><b>Subfeature</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_HAS_SUBFEATURE__SUBFEATURE = eINSTANCE.getFeatureHasSubfeature_Subfeature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.UndirectedRelationshipImpl <em>Undirected Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.UndirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getUndirectedRelationship()\n * @generated\n */\n EClass UNDIRECTED_RELATIONSHIP = eINSTANCE.getUndirectedRelationship();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.DirectedRelationshipImpl <em>Directed Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.DirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getDirectedRelationship()\n * @generated\n */\n EClass DIRECTED_RELATIONSHIP = eINSTANCE.getDirectedRelationship();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureGroupImpl <em>Feature Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureGroup()\n * @generated\n */\n EClass FEATURE_GROUP = eINSTANCE.getFeatureGroup();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureImpl <em>Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeature()\n * @generated\n */\n EClass FEATURE = eINSTANCE.getFeature();\n\n /**\n * The meta object literal for the '<em><b>Id</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE__ID = eINSTANCE.getFeature_Id();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FEATURE__NAME = eINSTANCE.getFeature_Name();\n\n /**\n * The meta object literal for the '<em><b>Group Has Parent</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__GROUP_HAS_PARENT = eINSTANCE.getFeature_GroupHasParent();\n\n /**\n * The meta object literal for the '<em><b>Group Has Child</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__GROUP_HAS_CHILD = eINSTANCE.getFeature_GroupHasChild();\n\n /**\n * The meta object literal for the '<em><b>Feature Has Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__FEATURE_HAS_PARENT = eINSTANCE.getFeature_FeatureHasParent();\n\n /**\n * The meta object literal for the '<em><b>Feature Has Subfeature</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__FEATURE_HAS_SUBFEATURE = eINSTANCE.getFeature_FeatureHasSubfeature();\n\n /**\n * The meta object literal for the '<em><b>Selected Feature</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__SELECTED_FEATURE = eINSTANCE.getFeature_SelectedFeature();\n\n /**\n * The meta object literal for the '<em><b>Eliminated Feature</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__ELIMINATED_FEATURE = eINSTANCE.getFeature_EliminatedFeature();\n\n /**\n * The meta object literal for the '<em><b>Undirected Relationships</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__UNDIRECTED_RELATIONSHIPS = eINSTANCE.getFeature_UndirectedRelationships();\n\n /**\n * The meta object literal for the '<em><b>Incoming Directed Relationships</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__INCOMING_DIRECTED_RELATIONSHIPS = eINSTANCE.getFeature_IncomingDirectedRelationships();\n\n /**\n * The meta object literal for the '<em><b>Outgoing Directed Relationships</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__OUTGOING_DIRECTED_RELATIONSHIPS = eINSTANCE.getFeature_OutgoingDirectedRelationships();\n\n /**\n * The meta object literal for the '<em><b>Feature Is Root</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE__FEATURE_IS_ROOT = eINSTANCE.getFeature_FeatureIsRoot();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasParentImpl <em>Group Has Parent</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasParentImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasParent()\n * @generated\n */\n EClass GROUP_HAS_PARENT = eINSTANCE.getGroupHasParent();\n\n /**\n * The meta object literal for the '<em><b>Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_PARENT__PARENT = eINSTANCE.getGroupHasParent_Parent();\n\n /**\n * The meta object literal for the '<em><b>Group</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_PARENT__GROUP = eINSTANCE.getGroupHasParent_Group();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasChildImpl <em>Group Has Child</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasChildImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasChild()\n * @generated\n */\n EClass GROUP_HAS_CHILD = eINSTANCE.getGroupHasChild();\n\n /**\n * The meta object literal for the '<em><b>Child</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_CHILD__CHILD = eINSTANCE.getGroupHasChild_Child();\n\n /**\n * The meta object literal for the '<em><b>Group</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_CHILD__GROUP = eINSTANCE.getGroupHasChild_Group();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.SelectedFeatureImpl <em>Selected Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.SelectedFeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getSelectedFeature()\n * @generated\n */\n EClass SELECTED_FEATURE = eINSTANCE.getSelectedFeature();\n\n /**\n * The meta object literal for the '<em><b>Feature</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SELECTED_FEATURE__FEATURE = eINSTANCE.getSelectedFeature_Feature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.EliminatedFeatureImpl <em>Eliminated Feature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.EliminatedFeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getEliminatedFeature()\n * @generated\n */\n EClass ELIMINATED_FEATURE = eINSTANCE.getEliminatedFeature();\n\n /**\n * The meta object literal for the '<em><b>Feature</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ELIMINATED_FEATURE__FEATURE = eINSTANCE.getEliminatedFeature_Feature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureIsRootImpl <em>Feature Is Root</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureIsRootImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureIsRoot()\n * @generated\n */\n EClass FEATURE_IS_ROOT = eINSTANCE.getFeatureIsRoot();\n\n /**\n * The meta object literal for the '<em><b>Feature</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FEATURE_IS_ROOT__FEATURE = eINSTANCE.getFeatureIsRoot_Feature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.ExplanationImpl <em>Explanation</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.ExplanationImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getExplanation()\n * @generated\n */\n EClass EXPLANATION = eINSTANCE.getExplanation();\n\n /**\n * The meta object literal for the '<em><b>Primitives</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference EXPLANATION__PRIMITIVES = eINSTANCE.getExplanation_Primitives();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMaxImpl <em>Group Has Max</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMaxImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasMax()\n * @generated\n */\n EClass GROUP_HAS_MAX = eINSTANCE.getGroupHasMax();\n\n /**\n * The meta object literal for the '<em><b>Max</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute GROUP_HAS_MAX__MAX = eINSTANCE.getGroupHasMax_Max();\n\n /**\n * The meta object literal for the '<em><b>Group</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_MAX__GROUP = eINSTANCE.getGroupHasMax_Group();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMinImpl <em>Group Has Min</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.GroupHasMinImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getGroupHasMin()\n * @generated\n */\n EClass GROUP_HAS_MIN = eINSTANCE.getGroupHasMin();\n\n /**\n * The meta object literal for the '<em><b>Min</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute GROUP_HAS_MIN__MIN = eINSTANCE.getGroupHasMin_Min();\n\n /**\n * The meta object literal for the '<em><b>Group</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GROUP_HAS_MIN__GROUP = eINSTANCE.getGroupHasMin_Group();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.AlternativeGroupImpl <em>Alternative Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.AlternativeGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getAlternativeGroup()\n * @generated\n */\n EClass ALTERNATIVE_GROUP = eINSTANCE.getAlternativeGroup();\n\n /**\n * The meta object literal for the '<em><b>Group Has Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ALTERNATIVE_GROUP__GROUP_HAS_PARENT = eINSTANCE.getAlternativeGroup_GroupHasParent();\n\n /**\n * The meta object literal for the '<em><b>Group Has Child</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ALTERNATIVE_GROUP__GROUP_HAS_CHILD = eINSTANCE.getAlternativeGroup_GroupHasChild();\n\n /**\n * The meta object literal for the '<em><b>Group Has Max</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ALTERNATIVE_GROUP__GROUP_HAS_MAX = eINSTANCE.getAlternativeGroup_GroupHasMax();\n\n /**\n * The meta object literal for the '<em><b>Group Has Min</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ALTERNATIVE_GROUP__GROUP_HAS_MIN = eINSTANCE.getAlternativeGroup_GroupHasMin();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.OrGroupImpl <em>Or Group</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.OrGroupImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getOrGroup()\n * @generated\n */\n EClass OR_GROUP = eINSTANCE.getOrGroup();\n\n /**\n * The meta object literal for the '<em><b>Group Has Parent</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OR_GROUP__GROUP_HAS_PARENT = eINSTANCE.getOrGroup_GroupHasParent();\n\n /**\n * The meta object literal for the '<em><b>Group Has Child</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OR_GROUP__GROUP_HAS_CHILD = eINSTANCE.getOrGroup_GroupHasChild();\n\n /**\n * The meta object literal for the '<em><b>Group Has Max</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OR_GROUP__GROUP_HAS_MAX = eINSTANCE.getOrGroup_GroupHasMax();\n\n /**\n * The meta object literal for the '<em><b>Group Has Min</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OR_GROUP__GROUP_HAS_MIN = eINSTANCE.getOrGroup_GroupHasMin();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasOptionalSubfeatureImpl <em>Feature Has Optional Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasOptionalSubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasOptionalSubfeature()\n * @generated\n */\n EClass FEATURE_HAS_OPTIONAL_SUBFEATURE = eINSTANCE.getFeatureHasOptionalSubfeature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasMandatorySubfeatureImpl <em>Feature Has Mandatory Subfeature</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FeatureHasMandatorySubfeatureImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getFeatureHasMandatorySubfeature()\n * @generated\n */\n EClass FEATURE_HAS_MANDATORY_SUBFEATURE = eINSTANCE.getFeatureHasMandatorySubfeature();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.MutualExclusiveImpl <em>Mutual Exclusive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.MutualExclusiveImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getMutualExclusive()\n * @generated\n */\n EClass MUTUAL_EXCLUSIVE = eINSTANCE.getMutualExclusive();\n\n /**\n * The meta object literal for the '<em><b>Related Features</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference MUTUAL_EXCLUSIVE__RELATED_FEATURES = eINSTANCE.getMutualExclusive_RelatedFeatures();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.CustomUndirectedRelationshipImpl <em>Custom Undirected Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.CustomUndirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getCustomUndirectedRelationship()\n * @generated\n */\n EClass CUSTOM_UNDIRECTED_RELATIONSHIP = eINSTANCE.getCustomUndirectedRelationship();\n\n /**\n * The meta object literal for the '<em><b>Stereotype</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CUSTOM_UNDIRECTED_RELATIONSHIP__STEREOTYPE = eINSTANCE.getCustomUndirectedRelationship_Stereotype();\n\n /**\n * The meta object literal for the '<em><b>Related Features</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference CUSTOM_UNDIRECTED_RELATIONSHIP__RELATED_FEATURES = eINSTANCE.getCustomUndirectedRelationship_RelatedFeatures();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.RequiresImpl <em>Requires</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.RequiresImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getRequires()\n * @generated\n */\n EClass REQUIRES = eINSTANCE.getRequires();\n\n /**\n * The meta object literal for the '<em><b>Sources</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference REQUIRES__SOURCES = eINSTANCE.getRequires_Sources();\n\n /**\n * The meta object literal for the '<em><b>Targets</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference REQUIRES__TARGETS = eINSTANCE.getRequires_Targets();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.TemporalOrderingSequentialImpl <em>Temporal Ordering Sequential</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.TemporalOrderingSequentialImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getTemporalOrderingSequential()\n * @generated\n */\n EClass TEMPORAL_ORDERING_SEQUENTIAL = eINSTANCE.getTemporalOrderingSequential();\n\n /**\n * The meta object literal for the '<em><b>Sources</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference TEMPORAL_ORDERING_SEQUENTIAL__SOURCES = eINSTANCE.getTemporalOrderingSequential_Sources();\n\n /**\n * The meta object literal for the '<em><b>Targets</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference TEMPORAL_ORDERING_SEQUENTIAL__TARGETS = eINSTANCE.getTemporalOrderingSequential_Targets();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.CustomDirectedRelationshipImpl <em>Custom Directed Relationship</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.CustomDirectedRelationshipImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getCustomDirectedRelationship()\n * @generated\n */\n EClass CUSTOM_DIRECTED_RELATIONSHIP = eINSTANCE.getCustomDirectedRelationship();\n\n /**\n * The meta object literal for the '<em><b>Stereotype</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CUSTOM_DIRECTED_RELATIONSHIP__STEREOTYPE = eINSTANCE.getCustomDirectedRelationship_Stereotype();\n\n /**\n * The meta object literal for the '<em><b>Sources</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference CUSTOM_DIRECTED_RELATIONSHIP__SOURCES = eINSTANCE.getCustomDirectedRelationship_Sources();\n\n /**\n * The meta object literal for the '<em><b>Targets</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference CUSTOM_DIRECTED_RELATIONSHIP__TARGETS = eINSTANCE.getCustomDirectedRelationship_Targets();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.impl.AutoCompleteImpl <em>Auto Complete</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.AutoCompleteImpl\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getAutoComplete()\n * @generated\n */\n EClass AUTO_COMPLETE = eINSTANCE.getAutoComplete();\n\n /**\n * The meta object literal for the '{@link fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource <em>Configuration Source</em>}' enum.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see fr.inria.familiar.fmlero.fmprimitives.ConfigurationSource\n * @see fr.inria.familiar.fmlero.fmprimitives.impl.FmprimitivesPackageImpl#getConfigurationSource()\n * @generated\n */\n EEnum CONFIGURATION_SOURCE = eINSTANCE.getConfigurationSource();\n\n }\n\n}" ]
[ "0.5973404", "0.5458087", "0.5264586", "0.5165199", "0.48974636", "0.48748818", "0.48507816", "0.4761601", "0.47573048", "0.47486424", "0.47483826", "0.4748127", "0.47310486", "0.47039953", "0.46953171", "0.46670195", "0.46636966", "0.46573243", "0.46323794", "0.46147212", "0.46118256", "0.45905215", "0.45836037", "0.45764735", "0.45595828", "0.45467076", "0.45418912", "0.4522406", "0.448498", "0.4484611", "0.4484611", "0.44777125", "0.4473152", "0.4473152", "0.4473152", "0.4471665", "0.44654542", "0.44503102", "0.4430616", "0.44201136", "0.44106346", "0.44103903", "0.4410289", "0.4409817", "0.44066036", "0.440612", "0.43979532", "0.43979082", "0.43961415", "0.43938085", "0.4393208", "0.43832913", "0.43790603", "0.43731025", "0.43710452", "0.43704465", "0.43677154", "0.4363789", "0.4360445", "0.43569252", "0.43427944", "0.4335547", "0.43281004", "0.43239406", "0.43202755", "0.43196476", "0.43122533", "0.43051904", "0.42968914", "0.42964536", "0.42896062", "0.42882517", "0.42771852", "0.42771184", "0.42691293", "0.42613712", "0.42570493", "0.42546096", "0.42540398", "0.42512757", "0.42480427", "0.42440724", "0.4242368", "0.4239663", "0.42314819", "0.4220533", "0.42116606", "0.42094985", "0.4207623", "0.4206229", "0.42062035", "0.41928464", "0.418944", "0.418845", "0.4187357", "0.41852373", "0.41850364", "0.41850364", "0.4184347", "0.4184184" ]
0.74075985
0
Checks for all device files present in the current RapidSmith path and returns a list of strings of those part names available to be used by the tool.
public static ArrayList<String> getAvailableParts() { ArrayList<String> allParts = new ArrayList<String>(); String pattern = "_db.dat"; File dir = new File(getRapidSmithPath() + File.separator + "devices"); if (!dir.exists()) { MessageGenerator.briefErrorAndExit("ERROR: No part files exist. Please run " + Installer.class.getCanonicalName() + " to create part files."); } for (String partFamily : dir.list()) { File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily); for (String part : partDir.list()) { if (part.endsWith(pattern)) { allParts.add(part.replace(pattern, "")); } } } return allParts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "public static ArrayList<File> findDevices() {\n return findDevices(\"/dev/\");\n }", "public static ArrayList<String> getAvailableParts(FamilyType type) {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\" + File.separator + type.toString().toLowerCase());\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String part : dir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n return allParts;\n }", "public List<String> checkFiles() {\n List<String> instances = new ArrayList<String>();\n if (StringUtils.isBlank(getPathOffset())) return instances;\n File[] directories = listFiles(new File(getPathOffset()), \"gcm_\");\n for (File dir : directories) {\n File[] files = listFiles(new File(dir.toString() + \"\\\\logs\"), \"GcmWebServices\");\n for (File file : files)\n instances.add(file.toString());\n }\n return instances;\n }", "@SuppressWarnings(\"unused\")\n\t@TargetApi(Build.VERSION_CODES.KITKAT)\n\tprotected String[] getExtSdCardPaths() {\n\t\tList<String> paths = new ArrayList<>();\n\t\tfor (File file : getExternalFilesDirs(\"external\")) {\n\t\t\tif (file != null && !file.equals(getExternalFilesDir(\"external\"))) {\n\t\t\t\tint index = file.getAbsolutePath().lastIndexOf(\"/Android/data\");\n\t\t\t\tif (index < 0) {\n\t\t\t\t\tLog.w(TAG, \"Unexpected external file dir: \" + file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString path = file.getAbsolutePath().substring(0, index);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpath = new File(path).getCanonicalPath();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (IOException e) {\n\t\t\t\t\t\t// Keep non-canonical path.\n\t\t\t\t\t}\n\t\t\t\t\tpaths.add(path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn paths.toArray(new String[paths.size()]);\n\t}", "private void findRecordings(){\n File[] files = new File(\"Concatenated/\").listFiles();\n _records.clear();\n _versionNum = 1;\n for (File file : files){\n if (file.isFile()){\n String nameOnFile = file.getName().substring(file.getName().lastIndexOf('_')+1,file.getName().lastIndexOf('.')).toUpperCase();\n if (nameOnFile.equals(_name.toUpperCase())){\n _records.add(file.getName());\n _versionNum++;\n }\n }\n }\n }", "private USBInfo[] getValidUsbDir() {\r\n String directoryList;\r\n StringTokenizer tokens;\r\n String pathEntry;\r\n USBInfo usbInfos[];\r\n USBInfo singleInfo;\r\n Vector entries;\r\n File f;\r\n int idxSeparator;\r\n\r\n entries = new Vector();\r\n directoryList = Config.getStringProperty(\"UsbDirectoryList\", PathConfigUtils.createUSBPath(0, false));\r\n tokens = new StringTokenizer(directoryList, \";\");\r\n while (tokens.hasMoreElements()) {\r\n pathEntry = tokens.nextToken();\r\n idxSeparator = pathEntry.indexOf(\"|\");\r\n singleInfo = new USBInfo();\r\n singleInfo.usbPath = pathEntry.substring(0, idxSeparator);\r\n singleInfo.displayName = pathEntry.substring(idxSeparator + 1);\r\n f = new File(singleInfo.usbPath);\r\n if (f.exists() && f.isDirectory()) {\r\n entries.addElement(singleInfo);\r\n }\r\n }\r\n usbInfos = new USBInfo[entries.size()];\r\n for (int i = 0; i < entries.size(); i++) {\r\n usbInfos[i] = (USBInfo) entries.elementAt(i);\r\n }\r\n return usbInfos;\r\n }", "public final List<File> mo14817d() {\n ArrayList arrayList = new ArrayList();\n try {\n if (mo14820g().exists()) {\n if (mo14820g().listFiles() != null) {\n for (File file : mo14820g().listFiles()) {\n if (!file.getCanonicalPath().equals(mo14819f().getCanonicalPath())) {\n arrayList.add(file);\n }\n }\n return arrayList;\n }\n }\n return arrayList;\n } catch (IOException e) {\n f6563c.mo14884b(6, \"Could not process directory while scanning installed packs. %s\", new Object[]{e});\n }\n }", "public String[] getSoundDevicesList();", "public Collection<String> listDevices();", "@Override\n\tpublic String[] query() {\n\t\t// Return an array of (decoded) filenames\n\t\tif (!serviceDir.exists()) {\n\t\t\treturn new String[0];\n\t\t}\n\t\tFile[] files = serviceDir.listFiles();\n\t\tString[] addrs = new String[files.length];\n\t\tfor (int i = 0; i < addrs.length; ++i) {\n\t\t\taddrs[i] = decode(files[i].getName());\n\t\t}\n\t\treturn addrs;\n\t}", "public static List<String> GetDriverOnWindows() {\n\t\tList<String> providerList = new ArrayList<String>();\n\t\tString folderDriver = System.getenv(\"WINDIR\") + \"\\\\system32\";\n\t\tFile folder = new File(folderDriver);\n\t\tFile[] files = folder.listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isFile()) {\n\t\t\t\tif (file.getPath().toString().contains(\".dll\")) {\n\t\t\t\t\tif (file.getName().toLowerCase().contains(\"microsoft\") \n\t\t\t\t\t\t\t|| file.getName().toLowerCase().contains(\"windows\")\n\t\t\t\t\t\t\t|| file.getName().toLowerCase().contains(\"terminator\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tproviderList.add(file.getPath().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn providerList;\n\t}", "public static String[] getSchemaList() {\n final File dataFile = new File(kMemoryPath);\n final File[] schemaFiles = dataFile.listFiles();\n String[] schemaNames = new String[schemaFiles.length];\n\n for (int i = 0; i < schemaNames.length; ++i) {\n schemaNames[i] = schemaFiles[i].getName();\n }\n\n return schemaNames;\n }", "private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}", "public String[] GetAllFileNames() {\n \tFile dir = new File(fileStorageLocation.toString());\n \tString[] matchingFiles = dir.list(new FilenameFilter() {\n \t public boolean accept(File dir, String name) {\n \t return name.startsWith(\"1_\");\n \t }\n \t});\n \t\n \tfor (int i=0; i < matchingFiles.length; i++)\n \t{\n \t\tmatchingFiles[i] = matchingFiles[i].replaceFirst(\"1_\", \"\");\n \t}\n \t\n return matchingFiles;\n }", "List<File> getSystemDescriptionFiles();", "public List<String> getAvailableDevices() {\n if (getEcologyDataSync().getData(\"devices\") != null) {\n return new ArrayList<>((Collection<? extends String>) ((Map<?, ?>) getEcologyDataSync().\n getData(\"devices\")).keySet());\n } else {\n return Collections.emptyList();\n }\n }", "@TargetApi(Build.VERSION_CODES.KITKAT)\n public static String[] getExtSdCardPaths(Context context) {\n List<String> paths = new ArrayList<>();\n for (File file : context.getExternalFilesDirs(\"external\")) {\n if (file != null && !file.equals(context.getExternalFilesDir(\"external\"))) {\n int index = file.getAbsolutePath().lastIndexOf(\"/Android/data\");\n if (index < 0) {\n Log.w(\"AmazeFileUtils\", \"Unexpected external file dir: \" + file.getAbsolutePath());\n } else {\n String path = file.getAbsolutePath().substring(0, index);\n try {\n path = new File(path).getCanonicalPath();\n } catch (IOException e) {\n // Keep non-canonical path.\n }\n paths.add(path);\n }\n }\n }\n if (paths.isEmpty()) paths.add(\"/storage/sdcard1\");\n return paths.toArray(new String[0]);\n }", "public List<String> execAdbDevices()\r\n\t{\r\n\t\tList<String> ret_device_id_list = new ArrayList<>();\r\n\t\t\r\n\t\tProcess proc = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tproc = new ProcessBuilder(this.adb_directory, \"devices\").start();\r\n\t\t\tproc.waitFor();\r\n\t\t} catch (IOException ioe)\r\n\t\t{\r\n\t\t\tioe.printStackTrace();\r\n\t\t} catch (InterruptedException ire)\r\n\t\t{\r\n\t\t\tire.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tString devices_result = this.collectResultFromProcess(proc);\r\n\t String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\r\n\r\n\t if (device_id_list.length <= 1)\r\n\t {\r\n\t \tSystem.out.println(\"No Devices Attached.\");\r\n\t \treturn ret_device_id_list;\r\n\t }\r\n\t \r\n\t /**\r\n\t * collect the online devices \r\n\t */\r\n\t String str_device_id = null;\r\n\t String[] str_device_id_parts = null;\r\n\t // ignore the first line which is \"List of devices attached\"\r\n\t for (int i = 1; i < device_id_list.length; i++)\r\n\t\t{\r\n\t\t\tstr_device_id = device_id_list[i];\r\n\t\t\tstr_device_id_parts = str_device_id.split(\"\\\\s+\");\r\n\t\t\t// add the online device\r\n\t\t\tif (str_device_id_parts[1].equals(\"device\"))\r\n\t\t\t\tret_device_id_list.add(str_device_id_parts[0]);\r\n\t\t}\r\n\t \r\n\t return ret_device_id_list;\r\n\t}", "private Set<String> getNeededChdFiles() {\n Set<String> chds = new HashSet<>();\n if (!this.disks.isEmpty()) {\n for (MachineDisk d : this.disks) {\n chds.add(d.getName() + \".chd\");\n }\n }\n return chds;\n }", "private static String files()\n\t{\n\t\tString path = dirpath + \"\\\\Server\\\\\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tString msg1 = \"\";\n\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\tif (listOfFiles[i].isFile())\n\t\t\t{\n\t\t\t\tmsg1 = msg1 + \"&\" + listOfFiles[i].getName();\n\t\t\t}\n\t\t}\n\t\tmsg1 = msg1 + \"#\" + path + \"\\\\\";\n\t\treturn msg1;\n\t}", "public static ArrayList B() {\n int n10;\n ArrayList<String[]> arrayList = new ArrayList<String[]>();\n Object object = Environment.getRootDirectory().getAbsoluteFile();\n ((StringBuilder)((Object)arrayList)).append(object);\n object = File.separator;\n ((StringBuilder)((Object)arrayList)).append((String)object);\n Object object2 = \"etc\";\n ((StringBuilder)((Object)arrayList)).append((String)object2);\n ((StringBuilder)((Object)arrayList)).append((String)object);\n object = \"vold.fstab\";\n ((StringBuilder)((Object)arrayList)).append((String)object);\n arrayList = ((StringBuilder)((Object)arrayList)).toString();\n Object object3 = new File((String)((Object)arrayList));\n arrayList = new ArrayList<String[]>();\n boolean bl2 = ((File)object3).exists();\n if (!bl2) {\n return arrayList;\n }\n object = new ArrayList();\n try {\n object.clear();\n Object object4 = new FileReader((File)object3);\n object2 = new BufferedReader((Reader)object4);\n while ((object3 = ((BufferedReader)object2).readLine()) != null) {\n object4 = \"dev_mount\";\n n10 = ((String)object3).startsWith((String)object4);\n if (n10 == 0) continue;\n object.add(object3);\n }\n ((BufferedReader)object2).close();\n object.trimToSize();\n }\n catch (IOException iOException) {}\n object3 = object.iterator();\n while (bl2 = object3.hasNext()) {\n int n11;\n object = (String)object3.next();\n if (object == null || (object = object.split((String)(object2 = \" \"))) == null || (n11 = ((String[])object).length) < (n10 = 4) || (object = object[n11 = 2]) == null || (n11 = (int)(((File)(object2 = new File((String)object))).exists() ? 1 : 0)) == 0) continue;\n arrayList.add((String[])object);\n }\n return arrayList;\n }", "public static String[] getFilenamesUsed(String prefix) {\n\t\tString ar[] = new String[EXTENSIONS.length];\n\t\tfor (int i=0; i<EXTENSIONS.length; i++)\n\t\t\tar[i] = new String(prefix+EXTENSIONS[i]);\n\t\treturn ar;\n\t}", "private String[] getFileNames() {\n\t\tFile directory = new File(this.getClass().getClassLoader()\n\t\t\t\t.getResource(\"data\").getFile());\n\t\tList<String> fileNames = new ArrayList<String>();\n\n\t\tfor (File file : directory.listFiles())\n\t\t\tfileNames.add(file.getName());\n\n\t\treturn fileNames.toArray(new String[fileNames.size()]);\n\t}", "public String[] getPictureNames() {\r\n\t\tif(!isReady) prepare();\r\n\t\tif(!isReady) {\r\n\t\t\tLog.e(TAG,\"The system was not ready. No external media\");\r\n\t\t\treturn new String[]{};\r\n\t\t}\r\n\t\tFile[] pictureFiles = directory.listFiles(new AlbumFileFilter());\r\n\t\tString[] pictureFileNames = new String[pictureFiles.length];\r\n\t\tfor(int a=0;a<pictureFiles.length;a++) {\r\n\t\t\tpictureFileNames[a] = pictureFiles[a].getName();\r\n\t\t}\r\n\t\treturn pictureFileNames;\r\n\t}", "public File[] elements() {\n File plik = new File(katalog);\n katalog = plik.getAbsolutePath();\n if (katalog.endsWith(\".\")) {\n katalog = katalog.substring(0, katalog.length() - 1);\n }\n return plik.listFiles();\n }", "private List<String> getExtendedDeviceInfo(IBuildInfo buildInfo) {\n List<String> extendedDeviceInfo = new ArrayList<>();\n File deviceInfoPath = buildInfo.getFile(DeviceInfoCollector.DEVICE_INFO_DIR);\n if (deviceInfoPath == null || !deviceInfoPath.exists()) {\n CLog.w(\"Device Info directory was not created (Make sure you are not running plan \" +\n \"\\\"*ts-dev\\\" or including option -d/--skip-device-info)\");\n return extendedDeviceInfo;\n }\n List<String> requiredDeviceInfo = null;\n try {\n requiredDeviceInfo = DynamicConfigFileReader.getValuesFromConfig(\n buildInfo, getSuiteName(), DYNAMIC_CONFIG_EXTENDED_DEVICE_INFO_KEY);\n } catch (XmlPullParserException | IOException e) {\n CLog.e(\"Failed to pull business logic Extended DeviceInfo from dynamic config. \"\n + \"Error: %s\", e);\n return extendedDeviceInfo;\n }\n File ediFile = null;\n String[] fileAndKey = null;\n try{\n for (String ediEntry: requiredDeviceInfo) {\n fileAndKey = ediEntry.split(\":\");\n if (fileAndKey.length <= 1) {\n CLog.e(\"Dynamic config Extended DeviceInfo key has problem.\");\n return new ArrayList<>();\n }\n ediFile = FileUtil\n .findFile(deviceInfoPath, fileAndKey[0] + \".deviceinfo.json\");\n if (ediFile == null) {\n CLog.e(\n \"Could not find Extended DeviceInfo JSON file: %s.\",\n deviceInfoPath + fileAndKey[0] + \".deviceinfo.json\");\n return new ArrayList<>();\n }\n String jsonString = FileUtil.readStringFromFile(ediFile);\n JSONObject jsonObj = new JSONObject(jsonString);\n String value = jsonObj.getString(fileAndKey[1]);\n extendedDeviceInfo\n .add(String.format(\"%s:%s:%s\", fileAndKey[0], fileAndKey[1], value));\n }\n }catch(JSONException | IOException | RuntimeException e){\n CLog.e(\n \"Failed to read or parse Extended DeviceInfo JSON file: %s. Error: %s\",\n deviceInfoPath + fileAndKey[0] + \".deviceinfo.json\", e);\n return new ArrayList<>();\n }\n return extendedDeviceInfo;\n }", "java.util.List<java.lang.String>\n getProcessorpathList();", "public static List<String> getDeviceList() {\n\t\tList<String> str = CommandRunner.exec(CMD_GET_DEVICE_ID);\n\t\tList<String> ids = new ArrayList<String>();\n\t\tfor (int i = 1; i < str.size(); i++) {\n\t\t\tString id = str.get(i).split(\" |\\t\")[0].trim();\n\t\t\tif (!id.isEmpty()) {\n\t\t\t\tids.add(id);\n\t\t\t}\n\t\t}\n\t\treturn ids;\n\t}", "public void getPeerFiles(){\n\t\t\n\t\tFile[] files = new File(path).listFiles();\n\t\tfor (File file : files) {\n\t\t\tfileNames.add(file.getName());\n\t\t}\n\t\tSystem.out.println(\"Number of Files Registerd to the server - \"+fileNames.size());\n\t\tSystem.out.println(\"To search for file give command: get <Filename>\");\n\t\tSystem.out.println(\"To refresh type command: refresh\");\n\t\tSystem.out.println(\"To disconnect type command: disconnect\");\n\t}", "protected List<PCIDevice> probeDevices() {\n final ArrayList<PCIDevice> result = new ArrayList<PCIDevice>();\n rootBus.probeDevices(result);\n return result;\n }", "public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }", "public static ArrayList<File> findDevices(String dir) {\n ArrayList<File> path = new ArrayList<>();\n\n for (File file : new File(dir).listFiles()) {\n if (file.getName().startsWith(\"vtplayer\")) {\n path.add(file);\n }\n }\n\n return path;\n }", "private List<String> getFiles(String path){\n workDir = Environment.getExternalStorageDirectory().getAbsolutePath() + path;\n List<String> files = new ArrayList<String>();\n File file = new File(workDir);\n File[] fs = file.listFiles();\n for(File f:fs)\n if (f.isFile())\n files.add(String.valueOf(f).substring(workDir.length()));\n return files;\n }", "private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}", "private void searchParts(AbstractFile part1) {\r\n \t\tAbstractFile parent = part1.getParentSilently();\r\n \t\tif (parent == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tString ext = part1.getExtension();\r\n \t\tint firstIndex;\r\n \t\ttry {\r\n \t\t\tfirstIndex = Integer.parseInt(ext);\r\n \t\t} catch (NumberFormatException e) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tString name = part1.getNameWithoutExtension();\r\n \t\tFilenameFilter startsFilter = new StartsFilenameFilter(name, false);\r\n \t\tAttributeFileFilter filesFilter = new AttributeFileFilter(AttributeFileFilter.FILE);\r\n \t\tEqualsFilenameFilter part1Filter = new EqualsFilenameFilter(part1.getName(), false);\r\n \t\tpart1Filter.setInverted(true);\r\n \t\tAndFileFilter filter = new AndFileFilter();\r\n \t\tfilter.addFileFilter(startsFilter);\r\n \t\tfilter.addFileFilter(filesFilter);\r\n \t\tfilter.addFileFilter(part1Filter);\r\n \t\ttry {\r\n \t\t\tAbstractFile[] otherParts = parent.ls(filter);\r\n \t\t\tfor (int i = 0; i < otherParts.length; i++) {\r\n \t\t\t\tString ext2 = otherParts[i].getExtension();\r\n \t\t\t\ttry {\r\n \t\t\t\t\tint partIdx = Integer.parseInt(ext2);\r\n \t\t\t\t\tif (partIdx > firstIndex)\r\n \t\t\t\t\t\tfiles.add(otherParts[i]);\r\n \t\t\t\t} catch (NumberFormatException e) {\r\n \t\t\t\t\t// nothing\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t} catch (IOException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n\t\tsetFiles(files);\r\n \t}", "public void enquire_files()\n {\n out.println(\"ENQUIRY\");\n String rd_in = null;\n Matcher m_eom = eom.matcher(\"start\"); // initializing the matcher. \"start\" does not mean anything\n // get filenames till EOM message is received and update the files list\n try\n {\n while(!m_eom.find())\n {\n rd_in = in.readLine();\n m_eom = eom.matcher(rd_in);\n if(!m_eom.find())\n {\n String filename = rd_in;\n cnode.files.add(filename);\n } \n else { break; } // break out of loop when EOM is received\n }\n }\n catch (IOException e) \n {\n \tSystem.out.println(\"Read failed\");\n \tSystem.exit(-1);\n }\n }", "public String [] getDriveNames()\n throws CdbException , InterruptedException {\n return _pvr.getDriveNames() ;\n }", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();", "private File[] getFiles() {\n\n if (mPPTFilePath == null) {\n mPPTFilePath = getArguments().getString(PPTPathString);\n }\n\n String Path = mPPTFilePath;\n File mFile = new File(Path);\n if (mFile.exists() && mFile.isDirectory() && mFile.listFiles()!=null) {\n\n return mFile.listFiles();\n } else {\n Log.d(TAG, \"File==null\");\n return null;\n }\n }", "private void getFilenames() {\n\t\tString[] filenames = getApplicationContext().fileList();\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(int i = 0; i<filenames.length; i++){\n\t\t\t//Log.d(\"Filename\", filenames[i]);\n\t\t\tlist.add(filenames[i]);\n\t\t}\n\t\tArrayAdapter<String> filenameAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list);\n\t\tspinner.setAdapter(filenameAdapter);\n\t}", "java.util.List<java.lang.String>\n getBootclasspathList();", "public List<FileWithFaultLocations> getFaultyFiles();", "private void getPairedDevices() {\n\t\tdevicesArray = btAdapter.getBondedDevices();\n\t\tif(devicesArray.size()>0){\n\t\t\tfor(BluetoothDevice device:devicesArray){\n\t\t\t\tpairedDevices.add(device.getName());\n\t\t\t}\n\t\t}\n\t}", "java.util.List<java.lang.String>\n getBootclasspathList();", "public String[] getStringDescriptors() {\r\n if(stringDescriptor1==null) {\r\n log.warning(\"USBAEMonitor: getStringDescriptors called but device has not been opened\");\r\n String[] s=new String[numberOfStringDescriptors];\r\n for (int i=0;i<numberOfStringDescriptors;i++) {\r\n s[i]=\"\";\r\n }\r\n return s;\r\n }\r\n String[] s=new String[numberOfStringDescriptors];\r\n s[0]=stringDescriptor1.Str;\r\n s[1]=stringDescriptor2.Str;\r\n if (numberOfStringDescriptors==3) {\r\n s[2]=stringDescriptor3.Str;\r\n }\r\n return s;\r\n }", "private final Set<String> m880b() {\n if (Build.VERSION.SDK_INT < 21) {\n return Collections.emptySet();\n }\n try {\n PackageInfo packageInfo = this.f1350b.getPackageManager().getPackageInfo(this.f1350b.getPackageName(), 0);\n HashSet hashSet = new HashSet();\n if (packageInfo == null || packageInfo.splitNames == null) {\n return hashSet;\n }\n Collections.addAll(hashSet, packageInfo.splitNames);\n return hashSet;\n } catch (PackageManager.NameNotFoundException e) {\n f1349a.mo44091d(\"App '%s' is not found in PackageManager\", this.f1350b.getPackageName());\n return Collections.emptySet();\n }\n }", "public String[] getFilesOnServer() {\n Log.i(\"getFilesFor\", \"Getting all files on server available to \"\n + new KeyGenerator(context).getPublicKeyAsString());\n Cursor resultSet = database.rawQuery(\n \"SELECT DISTINCT File FROM FileKeys WHERE UserPublicKey = \" +\n \"'\" + new KeyGenerator(context).getPublicKeyAsString() + \"'\", null);\n String[] fileNames = new String[resultSet.getCount()];\n resultSet.moveToFirst();\n int i = 0;\n while (!resultSet.isAfterLast()) {\n Log.i(\"getFilesFor\", \"File namme: \" + resultSet.getString(0));\n fileNames[i++] = resultSet.getString(0);\n resultSet.moveToNext();\n }\n resultSet.close();\n return fileNames;\n }", "public String[] list() {\n String[] list = _file.list();\n if (list == null) {\n return null;\n }\n for (int i = list.length; i-- > 0; ) {\n if (new File(_file, list[i]).isDirectory() && !list[i].endsWith(\"/\")) {\n list[i] += \"/\";\n }\n }\n return list;\n }", "String[] getCrashReportFilesList() {\r\n File dir = mContext.getFilesDir();\r\n \r\n Log.d(LOG_TAG, \"Looking for error files in \" + dir.getAbsolutePath());\r\n \r\n // Filter for \".stacktrace\" files\r\n FilenameFilter filter = new FilenameFilter() {\r\n public boolean accept(File dir, String name) {\r\n return name.endsWith(\".stacktrace\");\r\n }\r\n };\r\n return dir.list(filter);\r\n }", "public static void getDevicesList()\n {\n MidiDevice.Info[]\taInfos = MidiSystem.getMidiDeviceInfo();\n\t\tfor (int i = 0; i < aInfos.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMidiDevice\tdevice = MidiSystem.getMidiDevice(aInfos[i]);\n\t\t\t\tboolean\t\tbAllowsInput = (device.getMaxTransmitters() != 0);\n\t\t\t\tboolean\t\tbAllowsOutput = (device.getMaxReceivers() != 0);\n\t\t\t\tif (bAllowsInput || bAllowsOutput)\n\t\t\t\t{\n\n\t\t\t\t\tSystem.out.println(i + \"\" + \" \"\n\t\t\t\t\t\t+ (bAllowsInput?\"IN \":\" \")\n\t\t\t\t\t\t+ (bAllowsOutput?\"OUT \":\" \")\n\t\t\t\t\t\t+ aInfos[i].getName() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVendor() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVersion() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getDescription());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\" + i + \" \" + aInfos[i].getName());\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (MidiUnavailableException e)\n\t\t\t{\n\t\t\t\t// device is obviously not available...\n\t\t\t\t// out(e);\n\t\t\t}\n\t\t}\n\t\tif (aInfos.length == 0)\n\t\t{\n\t\t\tSystem.out.println(\"[No devices available]\");\n\t\t}\n\t\t//System.exit(0);\n }", "public static List<String> GetDriverOnMacOS() {\n\t\tList<String> providerList = new ArrayList<String>();\n\t\tFile folder = new File(PROVIDER_FOLDER);\n\t\tFile[] files = folder.listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isFile()) {\n\t\t\t\tif (file.getPath().toString().contains(\".dylib\")) {\n\t\t\t\t\tproviderList.add(file.getPath().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn providerList;\n\t}", "private DMTFile[] listFilesWithoutConsoleMessage(String path) {\t\n\t\tDMTFile[] fileList = listFiles(path, true);\n\t\treturn fileList;\n\t}", "public static List<String> getProviderExist() {\n\t\tList<String> providerExist = new ArrayList<String>();\n\t\ttry {\n\t\t\t// load provider found previous\n\t\t\tString providerFound = Utils.getValueFromConfig(Utils.KEY_PROVIDER_FOUND);\n\t\t\tString[] providerFoundArr = providerFound == null ? null : providerFound.split(\",\");\n\t\t\tif (providerFoundArr != null && providerFoundArr.length > 0)\n\t\t\t{\n\t\t\t\tfor (String provider : providerFoundArr) {\n\t\t\t\t\tString providerPath = IsFileExistInSystem(provider);\n\t\t\t\t\tif (null != providerPath) {\n\t\t\t\t\t\tproviderExist.add(providerPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// load a properties file\n\t\t\tString providerList = Utils.getValueFromConfig(Utils.KEY_PROVIDER_LIST);\n\t\t\t// get from string\n\t\t\tString[] providerArr = providerList.split(\",\");\n\t\t\tfor (String provider : providerArr) {\n\t\t\t\tif (providerFoundArr != null && !Arrays.asList(providerFoundArr).contains(provider))\n\t\t\t\t{\n\t\t\t\t\tString providerPath = IsFileExistInSystem(provider);\n\t\t\t\t\tif (null != providerPath && !providerExist.contains(providerPath)) {\n\t\t\t\t\t\tproviderExist.add(providerPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t// get from system\n\t\t\tList<String> listOnSystem = GetDriverOnSystem();\n\t\t\tfor (String path : listOnSystem) {\n\t\t\t\tif (!providerExist.contains(path)) {\n\t\t\t\t\tproviderExist.add(path);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tLOG.write(\"CryptoTokenHelper\", e.getMessage());\n\t\t}\n\t\treturn providerExist;\n\t}", "public Map<String, Set<String>> getBufferedDeviceNamesByType();", "public String[] listFilesString() {\n\t\tFile[] FL = listFiles();\n\t\treturn FU.listFilesString(FL);\n\t}", "@NotNull\n public List<String> extractPotentialPaths(@NotNull PsiElement element) {\n List<String> qualifiedNames = new ArrayList<>();\n\n String path = extractPathName(element, OclTypes.INSTANCE);\n if (!path.isEmpty()) {\n PsiQualifiedNamedElement moduleAlias = PsiFinder.getInstance().findModuleAlias(element.getProject(), path);\n String modulePath = moduleAlias == null ? path : moduleAlias.getQualifiedName();\n qualifiedNames.add(modulePath);\n qualifiedNames.add(((FileBase) element.getContainingFile()).asModuleName() + \".\" + modulePath);\n }\n\n // Walk backward until top of the file is reached, trying to find local opens and opens/includes\n PsiElement item = element;\n while (item != null) {\n if (100 < qualifiedNames.size()) {\n break; // There must be a problem with the parser\n }\n\n if (item instanceof FileBase) {\n qualifiedNames.add(((FileBase) item).asModuleName());\n break;\n } else if (item instanceof PsiOpen || item instanceof PsiInclude) {\n String openName = ((PsiNamedElement) item).getName();\n // Add open value to all previous elements\n List<String> withOpenQualifier = qualifiedNames.stream().map(name -> openName + \".\" + name).collect(Collectors.toList());\n qualifiedNames.addAll(withOpenQualifier);\n\n qualifiedNames.add(openName);\n } else if (item instanceof PsiModule) {\n PsiModule module = (PsiModule) item;\n String moduleName = module.getName();\n String moduleAlias = findModuleAlias(element.getProject(), module.getAlias());\n\n if (moduleAlias != null && !moduleAlias.equals(moduleName)) {\n // Replace module name in resolved paths with the module alias\n qualifiedNames = qualifiedNames.stream().map(name -> {\n if (name.equals(moduleName)) {\n return moduleAlias;\n } else if (name.startsWith(moduleName + \".\")) {\n int length = moduleAlias.length();\n if (length <= moduleName.length()) {\n return moduleAlias + \".\" + moduleName.substring(length);\n }\n } else if (name.endsWith(\".\" + moduleName)) {\n return name.replace(\".\" + moduleName, \".\" + moduleAlias);\n }\n return name;\n }).collect(Collectors.toList());\n }\n }\n\n PsiElement prevItem = item.getPrevSibling();\n if (prevItem == null) {\n PsiElement parent = item.getParent();\n if (parent instanceof PsiLocalOpen) {\n String localOpenName = ((PsiLocalOpen) parent).getName();\n String localOpenAlias = findModuleAlias(element.getProject(), localOpenName);\n qualifiedNames.add(localOpenAlias == null || localOpenAlias.equals(localOpenName) ? localOpenName : localOpenAlias);\n }\n item = parent;\n } else {\n item = prevItem;\n }\n }\n\n qualifiedNames.add(\"Pervasives\");\n return qualifiedNames;\n }", "public static List<File> getDevTextFiles( File batchesDirectory ) {\n return getTextFilesFor( batchesDirectory, Pattern.compile( \"^(ss[1234]_batch1[07])$\" ), BATCH_TEXT_SUBDIR );\n }", "private ArrayList<String> getTrackPathList() {\n String MEDIA_TRACKS_PATH = \"CuraContents/tracks\";\n File fileTracks = new File(Environment.getExternalStorageDirectory(), MEDIA_TRACKS_PATH);\n if (fileTracks.isDirectory()) {\n File[] listTracksFile = fileTracks.listFiles();\n ArrayList<String> trackFilesPathList = new ArrayList<>();\n for (File file1 : listTracksFile) {\n trackFilesPathList.add(file1.getAbsolutePath());\n }\n return trackFilesPathList;\n }\n return null;\n }", "public static ArrayList<MTPDeviceInfo> getDeviceModels() {\r\n\t\tArrayList<MTPDeviceInfo> models = new ArrayList<>();\r\n\r\n\t\tPortableDeviceManager manager = new PortableDeviceManager();\r\n\t\tmanager.refreshDeviceList();\r\n\r\n\t\tfor (PortableDevice device : manager.getDevices()) {\r\n\t\t\tdevice.open();\r\n\t\t\tmodels.add(new MTPDeviceInfo(device.getModel(), device.getSerialNumber()));\r\n\t\t\tdevice.close();\r\n\t\t}\r\n\r\n\t\treturn models;\r\n\t}", "public File[] getUsedAudioFiles(){\n \tArrayList<File> afList=new ArrayList<File>();\n \tif(source instanceof FileAudioSource){\n \t\tafList.add(((FileAudioSource)source).getFile());\n \t}\n \tfor (AudioPlugin ap : plugins) {\n\t\t\tif (ap instanceof SourcePlugin) {\n\t\t\t\tAudioSource as = ((SourcePlugin) ap).getAudioSource();\n\t\t\t\tif (as instanceof FileAudioSource) {\n\t\t\t\t\tafList.add(((FileAudioSource) source).getFile());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \treturn afList.toArray(new File[0]);\n }", "public static List<String> getDrives(){\n root = new ArrayList<>();\n for(String temp : rootDir){\n File file = new File(temp);\n if(file.isDirectory()){\n root.add(temp);\n }\n }\n return root;\n }", "@Override\n public void buildListDevices(final String fileName) {\n XMLStreamReader reader;\n String name;\n try (FileInputStream inputStream\n = new FileInputStream(new File(fileName))) {\n reader = inputFactory.createXMLStreamReader(inputStream);\n\n while (reader.hasNext()) {\n int type = reader.next();\n if (type == XMLStreamConstants.START_ELEMENT) {\n name = reader.getLocalName();\n parseSpecificDevice(name, reader);\n }\n }\n\n LOGGER.info(\"Parsing by DOM parser was successfully done!\");\n } catch (XMLStreamException ex) {\n LOGGER.error(\"StAX parsing error!\");\n } catch (FileNotFoundException ex) {\n LOGGER.error(\"File \" + fileName + \" not found!\");\n } catch (ParsingException e) {\n LOGGER.error(e.getMessage());\n } catch (IOException e) {\n LOGGER.error(\"Exception with file.\");\n }\n }", "private static ArrayList<String> getPlayerFileNames() {\n\n ArrayList<String> fileNames = new ArrayList<String>();\n\n File folder = new File(\"otterbein/pig/player\");\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n if (listOfFiles[i].getName().endsWith(\".class\")) {\n fileNames.add(listOfFiles[i].getName());\n }\n }\n }\n\n return fileNames;\n }", "private void loadBasePaths() {\n\n Log.d(TAG, \"****loadBasePaths*****\");\n List<FileInfo> paths = BaseMediaPaths.getInstance().getBasePaths();\n for (FileInfo path : paths) {\n\n }\n }", "public String[] getVideoDevicesList();", "private List<Device> getDeviceCandidates(Node node, State state) {\n\t\tList<Device> candidates = new ArrayList<Device>();\n\t\tfor (Device device : Basic_ILS.devices) {\n\t\t\tif (state.deviceConstraint(node, device)\n\t\t\t\t\t&& state.colocationConstraint(node, device)\n\t\t\t\t\t&& state.memoryConstraint(node, device)) {\n\t\t\t\tcandidates.add(device);\n\t\t\t}\n\t\t}\n\t\treturn candidates;\n\t}", "public DataPartition[] getFileParts() throws HpccFileException\n {\n\t if (dataParts == null)\n\t\t createDataParts();\n\n return dataParts;\n }", "private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}", "private void listDevices(Context context) {\n\t DeviceList list = new DeviceList();\n\t int result = LibUsb.getDeviceList(context, list);\n\t if(result < 0) throw new LibUsbException(\"Unable to get device list\", result);\n\n\t try\n\t {\n\t for(Device device: list)\n\t {\n\t DeviceDescriptor descriptor = new DeviceDescriptor();\n\t result = LibUsb.getDeviceDescriptor(device, descriptor);\n\t if (result != LibUsb.SUCCESS) throw new LibUsbException(\"Unable to read device descriptor\", result);\n\t System.out.println(\"vendorId=\" + descriptor.idVendor() + \", productId=\" + descriptor.idProduct());\n\t }\n\t }\n\t finally\n\t {\n\t // Ensure the allocated device list is freed\n\t LibUsb.freeDeviceList(list, true);\n\t }\n\t}", "public static File[] getFiles() /*throws IOException*/ {\n\n String os = (System.getProperty(\"os.name\")).toUpperCase();\n File path;\n if (os.contains(\"WIN\")) {\n path = new File(System.getenv(\"APPDATA\")+\"\\\\SudokuGR04\");\n }\n else\n {\n path = new File(System.getProperty(\"user.home\" + \"/Library/Application Support/SudokuGR04\" ));\n }\n\n FileFilter fileFilter = dir -> {\n return dir.isFile();\n };\n //in the files-array there is a list of all files in the dir\n files = path.listFiles(fileFilter);\n return files;\n }", "public Set<String> getSpectrumFileNames() {\n\n \n return spectrumFiles.keySet();\n\n }", "public String[] getIncludedFiles()\n {\n int count = filesIncluded.size();\n String[] files = new String[ count ];\n for( int i = 0; i < count; i++ )\n {\n files[ i ] = (String)filesIncluded.get( i );\n }\n return files;\n }", "public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}", "@Override\n public Map<String, List<Sensor>> getDeviceSchemaList() {\n Path path = Paths.get(config.getFILE_PATH(), Constants.SCHEMA_PATH);\n if (!Files.exists(path) || !Files.isRegularFile(path)) {\n LOGGER.error(\"Failed to find schema file in \" + path.getFileName().toString());\n System.exit(0);\n }\n Map<String, List<Sensor>> result = new HashMap<>();\n try {\n List<String> schemaLines = Files.readAllLines(path);\n for (String schemaLine : schemaLines) {\n if (schemaLine.trim().length() != 0) {\n String line[] = schemaLine.split(\" \");\n String deviceName = line[0];\n if (!result.containsKey(deviceName)) {\n result.put(deviceName, new ArrayList<>());\n }\n Sensor sensor = new Sensor(line[1], SensorType.getType(Integer.parseInt(line[2])));\n result.get(deviceName).add(sensor);\n }\n }\n } catch (IOException exception) {\n LOGGER.error(\"Failed to init register\");\n }\n return result;\n }", "private String[] detectFeatures() {\n \t\t\tchangeStampIsValid = false;\n \t\t\tfeaturesChangeStampIsValid = false;\n \t\t\tparent.changeStampIsValid = false;\n \t\t\tparent.featuresChangeStampIsValid = false;\n \n \t\t\tfeatures = new ArrayList();\n \n \t\t\tif (!supportsDetection(resolvedURL))\n \t\t\t\treturn new String[0];\n \n \t\t\t// locate feature entries on site\n \t\t\tFile siteRoot = new File(resolvedURL.getFile().replace('/', File.separatorChar));\n \t\t\tFile root = new File(siteRoot, FEATURES);\n \n \t\t\tString[] list = root.list();\n \t\t\tString path;\n \t\t\tFile plugin;\n \t\t\tfor (int i = 0; list != null && i < list.length; i++) {\n \t\t\t\tpath = list[i] + File.separator + FEATURE_XML;\n \t\t\t\tplugin = new File(root, path);\n \t\t\t\tif (!plugin.exists()) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tfeatures.add(FEATURES + \"/\" + path.replace(File.separatorChar, '/')); //$NON-NLS-1$\n \t\t\t}\n \t\t\tif (DEBUG) {\n \t\t\t\tdebug(resolvedURL.toString() + \" located \" + features.size() + \" feature(s)\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \n \t\t\treturn (String[]) features.toArray(new String[0]);\n \t\t}", "protected List<String> getFileNames(@NonNull ConfigQuery query, @NonNull T context) {\n val paths = interpolateVarStrings(getPaths(), query);\n log.trace(\"{} retrieving filenames for paths: {}\", this, paths);\n return paths.stream()\n .flatMap(name -> maybeListDirectory(name, context))\n .distinct()\n .collect(Collectors.toList());\n }", "public void getFiles()\n\t{\n\t\tif(fileList.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"There is no file or file not found\");\n\t\t}\n\t\tfor(int i = 0; i < fileList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(\"File is at: \" + fileList.get(i));\n\t\t}\n\t}", "public static List<String> getProjectTreeRingDataFileNames(Project project)\n\t{\n\t\tList<String> resultList = new ArrayList<String>();\n\n\t\tList<MeasurementSeriesEntity> measurementList = project.getMeasurementSeriesEntities();\n\t\t// only series with external file ref's\n\t\tfor(MeasurementSeriesEntity measurementSeries : measurementList)\n\t\t{\n\t\t\t// check the genericFields\n\t\t\tTridasMeasurementSeries tridas = (TridasMeasurementSeries)measurementSeries.getTridasAsObject();\n\n\t\t\tif (tridas.isSetGenericFields())\n\t\t\t{\n\t\t\t\t// Ok we have potential candidates\n\t\t\t\tList<TridasGenericField> fields = tridas.getGenericFields();\n\t\t\t\tfor(TridasGenericField field : fields)\n\t\t\t\t{\n\t\t\t\t\tif (field.isSetValue() && field.isSetName() &&\n\t\t\t\t\t\tisTreeRingDataFileIndicator(field.getName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tresultList.add(field.getValue());\n\t\t\t\t\t\tbreak; // only one, the first in this case!\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// also derived series\n\t\t// TODO refactor into two functions\n\t\tList<DerivedSeriesEntity> derivedList = project.getDerivedSeriesEntities();\n\t\t// only series with external file ref's\n\t\tfor(DerivedSeriesEntity derivedtSeries : derivedList)\n\t\t{\n\t\t\t// check the genericFields\n\t\t\tTridasDerivedSeries tridas = (TridasDerivedSeries)derivedtSeries.getTridasAsObject();\n\n\t\t\tif (tridas.isSetGenericFields())\n\t\t\t{\n\t\t\t\t// Ok we have potential candidates\n\t\t\t\tList<TridasGenericField> fields = tridas.getGenericFields();\n\t\t\t\tfor(TridasGenericField field : fields)\n\t\t\t\t{\n\t\t\t\t\tif (field.isSetValue() && field.isSetName() &&\n\t\t\t\t\t\tisTreeRingDataFileIndicator(field.getName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tresultList.add(field.getValue());\n\t\t\t\t\t\tbreak; // only one, the first in this case!\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn resultList;\n\t}", "public static String[] showAddressBookName()\n\t{\n\t\tFile file=new File(ConstantValue.PATH);\n\t\treturn file.list();\n\t}", "@android.annotation.SuppressLint({\"NewApi\"})\n private void listRoots() {\n /*\n r23 = this;\n r21 = 0;\n r0 = r21;\n r1 = r23;\n r1.currentDir = r0;\n r0 = r23;\n r0 = r0.items;\n r21 = r0;\n r21.clear();\n r17 = new java.util.HashSet;\n r17.<init>();\n r21 = android.os.Environment.getExternalStorageDirectory();\n r5 = r21.getPath();\n r12 = android.os.Environment.isExternalStorageRemovable();\n r6 = android.os.Environment.getExternalStorageState();\n r21 = \"mounted\";\n r0 = r21;\n r21 = r6.equals(r0);\n if (r21 != 0) goto L_0x003c;\n L_0x0031:\n r21 = \"mounted_ro\";\n r0 = r21;\n r21 = r6.equals(r0);\n if (r21 == 0) goto L_0x0084;\n L_0x003c:\n r8 = new org.telegram.ui.DocumentSelectActivity$ListItem;\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r8.<init>();\n r21 = android.os.Environment.isExternalStorageRemovable();\n if (r21 == 0) goto L_0x02ae;\n L_0x004d:\n r21 = \"SdCard\";\n r22 = 2131494825; // 0x7f0c07a9 float:1.861317E38 double:1.0530983673E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r8.title = r0;\n r21 = 2131165433; // 0x7f0700f9 float:1.7945083E38 double:1.052935626E-314;\n r0 = r21;\n r8.icon = r0;\n L_0x0062:\n r0 = r23;\n r21 = r0.getRootSubtitle(r5);\n r0 = r21;\n r8.subtitle = r0;\n r21 = android.os.Environment.getExternalStorageDirectory();\n r0 = r21;\n r8.file = r0;\n r0 = r23;\n r0 = r0.items;\n r21 = r0;\n r0 = r21;\n r0.add(r8);\n r0 = r17;\n r0.add(r5);\n L_0x0084:\n r3 = 0;\n r4 = new java.io.BufferedReader;\t Catch:{ Exception -> 0x0302 }\n r21 = new java.io.FileReader;\t Catch:{ Exception -> 0x0302 }\n r22 = \"/proc/mounts\";\n r21.<init>(r22);\t Catch:{ Exception -> 0x0302 }\n r0 = r21;\n r4.<init>(r0);\t Catch:{ Exception -> 0x0302 }\n L_0x0094:\n r14 = r4.readLine();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r14 == 0) goto L_0x02dd;\n L_0x009a:\n r21 = \"vfat\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x00b0;\n L_0x00a5:\n r21 = \"/mnt\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 == 0) goto L_0x0094;\n L_0x00b0:\n r21 = org.telegram.messenger.BuildVars.LOGS_ENABLED;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 == 0) goto L_0x00b7;\n L_0x00b4:\n org.telegram.messenger.FileLog.d(r14);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n L_0x00b7:\n r19 = new java.util.StringTokenizer;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = \" \";\n r0 = r19;\n r1 = r21;\n r0.<init>(r14, r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r20 = r19.nextToken();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r16 = r19.nextToken();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r0 = r17;\n r1 = r16;\n r21 = r0.contains(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x00d5:\n r21 = \"/dev/block/vold\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 == 0) goto L_0x0094;\n L_0x00e0:\n r21 = \"/mnt/secure\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x00eb:\n r21 = \"/mnt/asec\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x00f6:\n r21 = \"/mnt/obb\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x0101:\n r21 = \"/dev/mapper\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x010c:\n r21 = \"tmpfs\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x0117:\n r21 = new java.io.File;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r0 = r21;\n r1 = r16;\n r0.<init>(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = r21.isDirectory();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0163;\n L_0x0126:\n r21 = 47;\n r0 = r16;\n r1 = r21;\n r11 = r0.lastIndexOf(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = -1;\n r0 = r21;\n if (r11 == r0) goto L_0x0163;\n L_0x0136:\n r21 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21.<init>();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r22 = \"/storage/\";\n r21 = r21.append(r22);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r22 = r11 + 1;\n r0 = r16;\n r1 = r22;\n r22 = r0.substring(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = r21.append(r22);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r15 = r21.toString();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = new java.io.File;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r0 = r21;\n r0.<init>(r15);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = r21.isDirectory();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 == 0) goto L_0x0163;\n L_0x0161:\n r16 = r15;\n L_0x0163:\n r0 = r17;\n r1 = r16;\n r0.add(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r13 = new org.telegram.ui.DocumentSelectActivity$ListItem;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r13.<init>();\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r21 = r16.toLowerCase();\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r22 = \"sd\";\n r21 = r21.contains(r22);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n if (r21 == 0) goto L_0x02c5;\n L_0x0182:\n r21 = \"SdCard\";\n r22 = 2131494825; // 0x7f0c07a9 float:1.861317E38 double:1.0530983673E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r13.title = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n L_0x0190:\n r21 = 2131165433; // 0x7f0700f9 float:1.7945083E38 double:1.052935626E-314;\n r0 = r21;\n r13.icon = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r23;\n r1 = r16;\n r21 = r0.getRootSubtitle(r1);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r13.subtitle = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r21 = new java.io.File;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r1 = r16;\n r0.<init>(r1);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r13.file = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r23;\n r0 = r0.items;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r21 = r0;\n r0 = r21;\n r0.add(r13);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n goto L_0x0094;\n L_0x01bd:\n r7 = move-exception;\n org.telegram.messenger.FileLog.e(r7);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n goto L_0x0094;\n L_0x01c3:\n r7 = move-exception;\n r3 = r4;\n L_0x01c5:\n org.telegram.messenger.FileLog.e(r7);\t Catch:{ all -> 0x0300 }\n if (r3 == 0) goto L_0x01cd;\n L_0x01ca:\n r3.close();\t Catch:{ Exception -> 0x02ec }\n L_0x01cd:\n r9 = new org.telegram.ui.DocumentSelectActivity$ListItem;\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r9.<init>();\n r21 = \"/\";\n r0 = r21;\n r9.title = r0;\n r21 = \"SystemRoot\";\n r22 = 2131495071; // 0x7f0c089f float:1.8613668E38 double:1.053098489E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r9.subtitle = r0;\n r21 = 2131165426; // 0x7f0700f2 float:1.7945069E38 double:1.0529356226E-314;\n r0 = r21;\n r9.icon = r0;\n r21 = new java.io.File;\n r22 = \"/\";\n r21.<init>(r22);\n r0 = r21;\n r9.file = r0;\n r0 = r23;\n r0 = r0.items;\n r21 = r0;\n r0 = r21;\n r0.add(r9);\n r18 = new java.io.File;\t Catch:{ Exception -> 0x02f7 }\n r21 = android.os.Environment.getExternalStorageDirectory();\t Catch:{ Exception -> 0x02f7 }\n r22 = \"Telegram\";\n r0 = r18;\n r1 = r21;\n r2 = r22;\n r0.<init>(r1, r2);\t Catch:{ Exception -> 0x02f7 }\n r21 = r18.exists();\t Catch:{ Exception -> 0x02f7 }\n if (r21 == 0) goto L_0x0254;\n L_0x0223:\n r10 = new org.telegram.ui.DocumentSelectActivity$ListItem;\t Catch:{ Exception -> 0x02f7 }\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r10.<init>();\t Catch:{ Exception -> 0x02f7 }\n r21 = \"Telegram\";\n r0 = r21;\n r10.title = r0;\t Catch:{ Exception -> 0x02fd }\n r21 = r18.toString();\t Catch:{ Exception -> 0x02fd }\n r0 = r21;\n r10.subtitle = r0;\t Catch:{ Exception -> 0x02fd }\n r21 = 2131165426; // 0x7f0700f2 float:1.7945069E38 double:1.0529356226E-314;\n r0 = r21;\n r10.icon = r0;\t Catch:{ Exception -> 0x02fd }\n r0 = r18;\n r10.file = r0;\t Catch:{ Exception -> 0x02fd }\n r0 = r23;\n r0 = r0.items;\t Catch:{ Exception -> 0x02fd }\n r21 = r0;\n r0 = r21;\n r0.add(r10);\t Catch:{ Exception -> 0x02fd }\n r9 = r10;\n L_0x0254:\n r9 = new org.telegram.ui.DocumentSelectActivity$ListItem;\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r9.<init>();\n r21 = \"Gallery\";\n r22 = 2131493847; // 0x7f0c03d7 float:1.8611186E38 double:1.053097884E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r9.title = r0;\n r21 = \"GalleryInfo\";\n r22 = 2131493848; // 0x7f0c03d8 float:1.8611188E38 double:1.0530978846E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r9.subtitle = r0;\n r21 = 2131165529; // 0x7f070159 float:1.7945278E38 double:1.0529356735E-314;\n r0 = r21;\n r9.icon = r0;\n r21 = 0;\n r0 = r21;\n r9.file = r0;\n r0 = r23;\n r0 = r0.items;\n r21 = r0;\n r0 = r21;\n r0.add(r9);\n r0 = r23;\n r0 = r0.listView;\n r21 = r0;\n org.telegram.messenger.AndroidUtilities.clearDrawableAnimation(r21);\n r21 = 1;\n r0 = r21;\n r1 = r23;\n r1.scrolling = r0;\n r0 = r23;\n r0 = r0.listAdapter;\n r21 = r0;\n r21.notifyDataSetChanged();\n return;\n L_0x02ae:\n r21 = \"InternalStorage\";\n r22 = 2131493929; // 0x7f0c0429 float:1.8611352E38 double:1.0530979246E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r8.title = r0;\n r21 = 2131165528; // 0x7f070158 float:1.7945276E38 double:1.052935673E-314;\n r0 = r21;\n r8.icon = r0;\n goto L_0x0062;\n L_0x02c5:\n r21 = \"ExternalStorage\";\n r22 = 2131493730; // 0x7f0c0362 float:1.8610948E38 double:1.0530978263E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r13.title = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n goto L_0x0190;\n L_0x02d5:\n r21 = move-exception;\n r3 = r4;\n L_0x02d7:\n if (r3 == 0) goto L_0x02dc;\n L_0x02d9:\n r3.close();\t Catch:{ Exception -> 0x02f2 }\n L_0x02dc:\n throw r21;\n L_0x02dd:\n if (r4 == 0) goto L_0x0305;\n L_0x02df:\n r4.close();\t Catch:{ Exception -> 0x02e5 }\n r3 = r4;\n goto L_0x01cd;\n L_0x02e5:\n r7 = move-exception;\n org.telegram.messenger.FileLog.e(r7);\n r3 = r4;\n goto L_0x01cd;\n L_0x02ec:\n r7 = move-exception;\n org.telegram.messenger.FileLog.e(r7);\n goto L_0x01cd;\n L_0x02f2:\n r7 = move-exception;\n org.telegram.messenger.FileLog.e(r7);\n goto L_0x02dc;\n L_0x02f7:\n r7 = move-exception;\n L_0x02f8:\n org.telegram.messenger.FileLog.e(r7);\n goto L_0x0254;\n L_0x02fd:\n r7 = move-exception;\n r9 = r10;\n goto L_0x02f8;\n L_0x0300:\n r21 = move-exception;\n goto L_0x02d7;\n L_0x0302:\n r7 = move-exception;\n goto L_0x01c5;\n L_0x0305:\n r3 = r4;\n goto L_0x01cd;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.ui.DocumentSelectActivity.listRoots():void\");\n }", "String[] getParts();", "public List<String> nomsFactures() {\n File folder = new File(\"factures/\");\n File[] listOfFiles = folder.listFiles();\n List<String> noms = new ArrayList<String>();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n noms.add(listOfFiles[i].getName());\n }\n }\n return noms;\n }", "private static File[] filesMiner(String path) {\n try {\n File directoryPath = new File(path);\n FileFilter onlyFile = new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n return pathname.isFile();\n }\n }; // filter directories\n return directoryPath.listFiles(onlyFile);\n } catch (Exception e) {\n System.err.println(UNKNOWN_ERROR_WHILE_ACCESSING_FILES);\n return null;\n }\n\n }", "public static List<String> getScannableNames() throws DeviceException {\n\t\tlogger.debug(\"Called 'getScannableNames'\");\n\n\t\tList<String> scannables = new ArrayList<String>();\n\n\t\tMap<String, Object> map = InterfaceProvider.getJythonNamespace().getAllFromJythonNamespace();\n\t\tfor (String objName : map.keySet()) {\n\t\t\tObject obj = map.get(objName);\n\t\t\tif (obj instanceof Scannable) {\n\t\t\t\tscannables.add(((Scannable) obj).getName());\n\t\t\t}\n\t\t}\n\n\t\treturn scannables;\n\n\t}", "public String searchExportedPlugins()\n\t{\n\t\tFile parent = null;\n\t\tif (System.getProperty(\"eclipse.home.location\") != null)\n\t\t\tparent = new File(URI.create(System.getProperty(\"eclipse.home.location\").replaceAll(\" \", \"%20\")));\n\t\telse parent = new File(System.getProperty(\"user.dir\"));\n\n\t\tList<String> pluginLocations = exportModel.getPluginLocations();\n\t\tfor (String libName : NG_LIBS)\n\t\t{\n\t\t\tint i = 0;\n\t\t\tboolean found = false;\n\t\t\twhile (!found && i < pluginLocations.size())\n\t\t\t{\n\t\t\t\tFile pluginLocation = new File(pluginLocations.get(i));\n\t\t\t\tif (!pluginLocation.isAbsolute())\n\t\t\t\t{\n\t\t\t\t\tpluginLocation = new File(parent, pluginLocations.get(i));\n\t\t\t\t}\n\t\t\t\tFileFilter filter = new WildcardFileFilter(libName);\n\t\t\t\tFile[] libs = pluginLocation.listFiles(filter);\n\t\t\t\tif (libs != null && libs.length > 0)\n\t\t\t\t{\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (!found) return libName;\n\t\t}\n\t\treturn null;\n\t}", "public static ArrayList<String> availableSaveFiles() {\n String path = \"saveFiles/\";\n\n ArrayList<String> files = new ArrayList<String>();\n File folder = new File(path);\n \n //if the save folder exists\n if (folder.exists()) {\n //get list of XML files\n String[] listOfFiles = folder.list(new FilenameFilter() {\n public boolean accept(File directory, String fileName) {\n return fileName.endsWith(\".xml\");\n }\n });\n \n //if there are any XML files\n if (listOfFiles.length > 0) {\n for (int i = 0; i < listOfFiles.length; i++) {\n files.add(listOfFiles[i]);\n }\n } else {\n StdOut.println(\"No savefiles in \" + path + \" directory.\");\n }\n \n } else {\n StdOut.println(\"No \" + path + \" directory!\");\n }\n return files;\n }", "private static String[] findFiles(String dirpath) {\n\t\tString fileSeparator = System.getProperty(\"file.separator\");\n\t\tVector<String> fileListVector = new Vector<String>();\n\t\tFile targetDir = null;\n\t\ttry {\n\t\t\ttargetDir = new File(dirpath);\n\t\t\tif (targetDir.isDirectory())\n\t\t\t\tfor (String val : targetDir.list(new JavaFilter()))\n\t\t\t\t\tfileListVector.add(dirpath + fileSeparator + val);\n\t\t} catch(Exception e) {\n\t\t\tlogger.error(e);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tString fileList = \"\";\n\t\tfor (String filename : fileListVector) {\n\t\t\tString basename = filename.substring(filename.lastIndexOf(fileSeparator) + 1);\n\t\t\tfileList += \"\\t\" + basename;\n\t\t}\n\t\tif (fileList.equals(\"\")) \n\t\t\tfileList += \"none.\";\n\t\tlogger.trace(\"Unpackaged source files found in dir \" + dirpath + fileSeparator + \": \" + fileList);\n\t\t\n\t\treturn (String[]) fileListVector.toArray(new String[fileListVector.size()]);\n\t}", "private static String m119220d() {\n File externalFilesDir = C6399b.m19921a().getExternalFilesDir(null);\n if (externalFilesDir == null) {\n return null;\n }\n C7276d.m22805a(externalFilesDir);\n return externalFilesDir.getAbsolutePath();\n }", "private void getDriveContents() {\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n // get only the folders in the root directory of drive account\n List<File> files = getContents(TOP_LEVEL + \" and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n \n prune(targetDir, files);\n processLanguages(files);\n }\n });\n t.start();\n }", "public static String[] getFolders() throws IOException {\n\t\tString[] paths = new String[2];\n\t\tif ((new File(PATHS)).exists()) {\n\t\t\tpaths = readPaths();\n\t\t} else {\n\t\t\tpaths[0] = checkSaveGameFolder();\n\t\t\tpaths[1] = checkInstallFolder();\n\t\t}\n\t\treturn paths;\n\t}", "public Lab[] getAvailableLabs()\n {\n List<Lab> labsList = new ArrayList<Lab> ();\n File [] files = directory.listFiles();\n for (File file : files)\n {\n Lab lab = Lab.getInstance(file);\n if (lab != null)\n labsList.add(lab);\n }\n return labsList.toArray(new Lab [0]);\n }", "public List<Device> getRunningDevices();", "public List<String> getFilmsFromFacture(String plat, String filepath) {\n\n List<String> res = new ArrayList<String>();\n List<String> films = new ArrayList<String>();\n\n boolean bCommande = false;\n boolean bIdPlat = false;\n boolean bClient = false;\n boolean bFilm = false;\n boolean targetAudience = false;\n\n try {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n XMLEventReader eventReader\n = factory.createXMLEventReader(new FileReader(\"factures/\" + filepath));\n\n while (eventReader.hasNext()) {\n XMLEvent event = eventReader.nextEvent();\n\n switch (event.getEventType()) {\n\n case XMLStreamConstants.START_ELEMENT:\n StartElement startElement = event.asStartElement();\n String qName = startElement.getName().getLocalPart();\n\n if (qName.equalsIgnoreCase(\"facture\")) {\n } else if (qName.equalsIgnoreCase(\"client\")) {\n bClient = true;\n } else if (qName.equalsIgnoreCase(\"idPlat\")) {\n bIdPlat = true;\n } else if (qName.equalsIgnoreCase(\"film\")) {\n bFilm = true;\n }\n break;\n\n case XMLStreamConstants.CHARACTERS:\n Characters characters = event.asCharacters();\n if (bIdPlat) {\n if (plat.equals(characters.getData())) {\n targetAudience = true;\n }\n bIdPlat = false;\n } else if (bFilm) {\n films.add(characters.getData());\n bFilm = false;\n } else if (bClient) {\n bClient = false;\n }\n break;\n\n case XMLStreamConstants.END_ELEMENT:\n EndElement endElement = event.asEndElement();\n\n if (endElement.getName().getLocalPart().equalsIgnoreCase(\"facture\")) {\n if (targetAudience) {\n for (String p : films) {\n res.add(p);\n System.out.println(p);\n }\n }\n }\n break;\n }\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception: \" + e);\n }\n\n return res;\n }", "private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}", "public abstract List<String> getRequiredProfiles();", "public List<File> getClasspathElements() {\n\t\tthis.parseSystemClasspath();\n\t return classpathElements;\n\t}", "public String[] getFilenames(String directory) {\n File path = new File(directory);\n String[] filenames;\n if (path.exists()) {\n filenames = path.list();\n if (filenames != null) {\n Log.d(TAG, \"getFilenames: filenames length: \" + filenames.length);\n }\n else {\n Log.d(TAG, \"getFilenames: filenames length: null\" );\n }\n }\n else {\n filenames = new String[0];\n }\n return filenames;\n }", "public static void listDevices()\n\t{\n\t\tfor(SerialPort port : SerialPort.getCommPorts())\n\t\t{\n\t String portName = port.getSystemPortName();\n\t System.out.println(portName);\n\t\t}\n\t}", "public Set<String> getApplicationNames() {\n ImmutableSet.Builder<String> names = ImmutableSet.builder();\n File[] files = appsDir.listFiles(File::isDirectory);\n if (files != null) {\n for (File file : files) {\n names.add(file.getName());\n }\n }\n return names.build();\n }" ]
[ "0.62152004", "0.61822", "0.5991184", "0.56929487", "0.5612432", "0.5562276", "0.5551752", "0.5538117", "0.54616725", "0.543583", "0.5384457", "0.5360708", "0.5352374", "0.5292658", "0.5269473", "0.5258233", "0.52327675", "0.5226592", "0.52200204", "0.52175087", "0.51972747", "0.5172953", "0.51582426", "0.51356584", "0.5122953", "0.5063725", "0.50536376", "0.50462675", "0.5042155", "0.5038505", "0.503715", "0.501811", "0.5005764", "0.49930996", "0.49689007", "0.494108", "0.49265662", "0.4884891", "0.48649272", "0.48560023", "0.484939", "0.4842948", "0.483758", "0.48363143", "0.48257107", "0.48217094", "0.4819911", "0.48133105", "0.48079598", "0.48062414", "0.48038745", "0.47887227", "0.47870278", "0.47725183", "0.4770526", "0.4770454", "0.47646257", "0.47600332", "0.47565022", "0.47446707", "0.47303247", "0.47217712", "0.47070825", "0.47010174", "0.46964562", "0.46943685", "0.4686835", "0.4684308", "0.46836537", "0.46780637", "0.46768647", "0.46748227", "0.46629396", "0.4662321", "0.46580708", "0.46525946", "0.4649936", "0.4648613", "0.4640244", "0.46397182", "0.4631265", "0.46269816", "0.4619779", "0.461583", "0.46120322", "0.46080714", "0.46076378", "0.46037504", "0.45976102", "0.45936006", "0.45857698", "0.45790052", "0.4577745", "0.45776322", "0.4573853", "0.45720574", "0.45717123", "0.45700315", "0.45678413", "0.45644587" ]
0.7431858
0
Checks for all device files present in the current RapidSmith family path and returns a list of strings of those part names available to be used by the tool within the specified family.
public static ArrayList<String> getAvailableParts(FamilyType type) { ArrayList<String> allParts = new ArrayList<String>(); String pattern = "_db.dat"; File dir = new File(getRapidSmithPath() + File.separator + "devices" + File.separator + type.toString().toLowerCase()); if (!dir.exists()) { MessageGenerator.briefErrorAndExit("ERROR: No part files exist. Please run " + Installer.class.getCanonicalName() + " to create part files."); } for (String part : dir.list()) { if (part.endsWith(pattern)) { allParts.add(part.replace(pattern, "")); } } return allParts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "public static ArrayList<File> findDevices() {\n return findDevices(\"/dev/\");\n }", "public List<String> checkFiles() {\n List<String> instances = new ArrayList<String>();\n if (StringUtils.isBlank(getPathOffset())) return instances;\n File[] directories = listFiles(new File(getPathOffset()), \"gcm_\");\n for (File dir : directories) {\n File[] files = listFiles(new File(dir.toString() + \"\\\\logs\"), \"GcmWebServices\");\n for (File file : files)\n instances.add(file.toString());\n }\n return instances;\n }", "@Override\n\tpublic String[] query() {\n\t\t// Return an array of (decoded) filenames\n\t\tif (!serviceDir.exists()) {\n\t\t\treturn new String[0];\n\t\t}\n\t\tFile[] files = serviceDir.listFiles();\n\t\tString[] addrs = new String[files.length];\n\t\tfor (int i = 0; i < addrs.length; ++i) {\n\t\t\taddrs[i] = decode(files[i].getName());\n\t\t}\n\t\treturn addrs;\n\t}", "String[] getQualifierNames(String family) {\n\t\tMap<String, TypeInformation<?>> qualifierMap = familyMap.get(family);\n\n\t\tif (qualifierMap == null) {\n\t\t\tthrow new IllegalArgumentException(\"Family \" + family + \" does not exist in schema.\");\n\t\t}\n\n\t\tString[] qualifierNames = new String[qualifierMap.size()];\n\t\tint i = 0;\n\t\tfor (String qualifier: qualifierMap.keySet()) {\n\t\t\tqualifierNames[i] = qualifier;\n\t\t\ti++;\n\t\t}\n\t\treturn qualifierNames;\n\t}", "public final List<File> mo14817d() {\n ArrayList arrayList = new ArrayList();\n try {\n if (mo14820g().exists()) {\n if (mo14820g().listFiles() != null) {\n for (File file : mo14820g().listFiles()) {\n if (!file.getCanonicalPath().equals(mo14819f().getCanonicalPath())) {\n arrayList.add(file);\n }\n }\n return arrayList;\n }\n }\n return arrayList;\n } catch (IOException e) {\n f6563c.mo14884b(6, \"Could not process directory while scanning installed packs. %s\", new Object[]{e});\n }\n }", "public List<String> getFilmsFromFacture(String plat, String filepath) {\n\n List<String> res = new ArrayList<String>();\n List<String> films = new ArrayList<String>();\n\n boolean bCommande = false;\n boolean bIdPlat = false;\n boolean bClient = false;\n boolean bFilm = false;\n boolean targetAudience = false;\n\n try {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n XMLEventReader eventReader\n = factory.createXMLEventReader(new FileReader(\"factures/\" + filepath));\n\n while (eventReader.hasNext()) {\n XMLEvent event = eventReader.nextEvent();\n\n switch (event.getEventType()) {\n\n case XMLStreamConstants.START_ELEMENT:\n StartElement startElement = event.asStartElement();\n String qName = startElement.getName().getLocalPart();\n\n if (qName.equalsIgnoreCase(\"facture\")) {\n } else if (qName.equalsIgnoreCase(\"client\")) {\n bClient = true;\n } else if (qName.equalsIgnoreCase(\"idPlat\")) {\n bIdPlat = true;\n } else if (qName.equalsIgnoreCase(\"film\")) {\n bFilm = true;\n }\n break;\n\n case XMLStreamConstants.CHARACTERS:\n Characters characters = event.asCharacters();\n if (bIdPlat) {\n if (plat.equals(characters.getData())) {\n targetAudience = true;\n }\n bIdPlat = false;\n } else if (bFilm) {\n films.add(characters.getData());\n bFilm = false;\n } else if (bClient) {\n bClient = false;\n }\n break;\n\n case XMLStreamConstants.END_ELEMENT:\n EndElement endElement = event.asEndElement();\n\n if (endElement.getName().getLocalPart().equalsIgnoreCase(\"facture\")) {\n if (targetAudience) {\n for (String p : films) {\n res.add(p);\n System.out.println(p);\n }\n }\n }\n break;\n }\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception: \" + e);\n }\n\n return res;\n }", "public String[] GetAllFileNames() {\n \tFile dir = new File(fileStorageLocation.toString());\n \tString[] matchingFiles = dir.list(new FilenameFilter() {\n \t public boolean accept(File dir, String name) {\n \t return name.startsWith(\"1_\");\n \t }\n \t});\n \t\n \tfor (int i=0; i < matchingFiles.length; i++)\n \t{\n \t\tmatchingFiles[i] = matchingFiles[i].replaceFirst(\"1_\", \"\");\n \t}\n \t\n return matchingFiles;\n }", "private void findRecordings(){\n File[] files = new File(\"Concatenated/\").listFiles();\n _records.clear();\n _versionNum = 1;\n for (File file : files){\n if (file.isFile()){\n String nameOnFile = file.getName().substring(file.getName().lastIndexOf('_')+1,file.getName().lastIndexOf('.')).toUpperCase();\n if (nameOnFile.equals(_name.toUpperCase())){\n _records.add(file.getName());\n _versionNum++;\n }\n }\n }\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "public static String[] getFilenamesUsed(String prefix) {\n\t\tString ar[] = new String[EXTENSIONS.length];\n\t\tfor (int i=0; i<EXTENSIONS.length; i++)\n\t\t\tar[i] = new String(prefix+EXTENSIONS[i]);\n\t\treturn ar;\n\t}", "public static List<String> GetDriverOnWindows() {\n\t\tList<String> providerList = new ArrayList<String>();\n\t\tString folderDriver = System.getenv(\"WINDIR\") + \"\\\\system32\";\n\t\tFile folder = new File(folderDriver);\n\t\tFile[] files = folder.listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isFile()) {\n\t\t\t\tif (file.getPath().toString().contains(\".dll\")) {\n\t\t\t\t\tif (file.getName().toLowerCase().contains(\"microsoft\") \n\t\t\t\t\t\t\t|| file.getName().toLowerCase().contains(\"windows\")\n\t\t\t\t\t\t\t|| file.getName().toLowerCase().contains(\"terminator\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tproviderList.add(file.getPath().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn providerList;\n\t}", "public String[] getSoundDevicesList();", "@SuppressWarnings(\"unused\")\n\t@TargetApi(Build.VERSION_CODES.KITKAT)\n\tprotected String[] getExtSdCardPaths() {\n\t\tList<String> paths = new ArrayList<>();\n\t\tfor (File file : getExternalFilesDirs(\"external\")) {\n\t\t\tif (file != null && !file.equals(getExternalFilesDir(\"external\"))) {\n\t\t\t\tint index = file.getAbsolutePath().lastIndexOf(\"/Android/data\");\n\t\t\t\tif (index < 0) {\n\t\t\t\t\tLog.w(TAG, \"Unexpected external file dir: \" + file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString path = file.getAbsolutePath().substring(0, index);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpath = new File(path).getCanonicalPath();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (IOException e) {\n\t\t\t\t\t\t// Keep non-canonical path.\n\t\t\t\t\t}\n\t\t\t\t\tpaths.add(path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn paths.toArray(new String[paths.size()]);\n\t}", "ImmutableList<SchemaOrgType> getIsFamilyFriendlyList();", "private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}", "public Collection<String> listDevices();", "public void getPeerFiles(){\n\t\t\n\t\tFile[] files = new File(path).listFiles();\n\t\tfor (File file : files) {\n\t\t\tfileNames.add(file.getName());\n\t\t}\n\t\tSystem.out.println(\"Number of Files Registerd to the server - \"+fileNames.size());\n\t\tSystem.out.println(\"To search for file give command: get <Filename>\");\n\t\tSystem.out.println(\"To refresh type command: refresh\");\n\t\tSystem.out.println(\"To disconnect type command: disconnect\");\n\t}", "String getFamily();", "String getFamily();", "private USBInfo[] getValidUsbDir() {\r\n String directoryList;\r\n StringTokenizer tokens;\r\n String pathEntry;\r\n USBInfo usbInfos[];\r\n USBInfo singleInfo;\r\n Vector entries;\r\n File f;\r\n int idxSeparator;\r\n\r\n entries = new Vector();\r\n directoryList = Config.getStringProperty(\"UsbDirectoryList\", PathConfigUtils.createUSBPath(0, false));\r\n tokens = new StringTokenizer(directoryList, \";\");\r\n while (tokens.hasMoreElements()) {\r\n pathEntry = tokens.nextToken();\r\n idxSeparator = pathEntry.indexOf(\"|\");\r\n singleInfo = new USBInfo();\r\n singleInfo.usbPath = pathEntry.substring(0, idxSeparator);\r\n singleInfo.displayName = pathEntry.substring(idxSeparator + 1);\r\n f = new File(singleInfo.usbPath);\r\n if (f.exists() && f.isDirectory()) {\r\n entries.addElement(singleInfo);\r\n }\r\n }\r\n usbInfos = new USBInfo[entries.size()];\r\n for (int i = 0; i < entries.size(); i++) {\r\n usbInfos[i] = (USBInfo) entries.elementAt(i);\r\n }\r\n return usbInfos;\r\n }", "public static List<File> getDevTextFiles( File batchesDirectory ) {\n return getTextFilesFor( batchesDirectory, Pattern.compile( \"^(ss[1234]_batch1[07])$\" ), BATCH_TEXT_SUBDIR );\n }", "public static String[] getSchemaList() {\n final File dataFile = new File(kMemoryPath);\n final File[] schemaFiles = dataFile.listFiles();\n String[] schemaNames = new String[schemaFiles.length];\n\n for (int i = 0; i < schemaNames.length; ++i) {\n schemaNames[i] = schemaFiles[i].getName();\n }\n\n return schemaNames;\n }", "public String[] getPictureNames() {\r\n\t\tif(!isReady) prepare();\r\n\t\tif(!isReady) {\r\n\t\t\tLog.e(TAG,\"The system was not ready. No external media\");\r\n\t\t\treturn new String[]{};\r\n\t\t}\r\n\t\tFile[] pictureFiles = directory.listFiles(new AlbumFileFilter());\r\n\t\tString[] pictureFileNames = new String[pictureFiles.length];\r\n\t\tfor(int a=0;a<pictureFiles.length;a++) {\r\n\t\t\tpictureFileNames[a] = pictureFiles[a].getName();\r\n\t\t}\r\n\t\treturn pictureFileNames;\r\n\t}", "private Set<String> getNeededChdFiles() {\n Set<String> chds = new HashSet<>();\n if (!this.disks.isEmpty()) {\n for (MachineDisk d : this.disks) {\n chds.add(d.getName() + \".chd\");\n }\n }\n return chds;\n }", "public static String[] showAddressBookName()\n\t{\n\t\tFile file=new File(ConstantValue.PATH);\n\t\treturn file.list();\n\t}", "public static ArrayList B() {\n int n10;\n ArrayList<String[]> arrayList = new ArrayList<String[]>();\n Object object = Environment.getRootDirectory().getAbsoluteFile();\n ((StringBuilder)((Object)arrayList)).append(object);\n object = File.separator;\n ((StringBuilder)((Object)arrayList)).append((String)object);\n Object object2 = \"etc\";\n ((StringBuilder)((Object)arrayList)).append((String)object2);\n ((StringBuilder)((Object)arrayList)).append((String)object);\n object = \"vold.fstab\";\n ((StringBuilder)((Object)arrayList)).append((String)object);\n arrayList = ((StringBuilder)((Object)arrayList)).toString();\n Object object3 = new File((String)((Object)arrayList));\n arrayList = new ArrayList<String[]>();\n boolean bl2 = ((File)object3).exists();\n if (!bl2) {\n return arrayList;\n }\n object = new ArrayList();\n try {\n object.clear();\n Object object4 = new FileReader((File)object3);\n object2 = new BufferedReader((Reader)object4);\n while ((object3 = ((BufferedReader)object2).readLine()) != null) {\n object4 = \"dev_mount\";\n n10 = ((String)object3).startsWith((String)object4);\n if (n10 == 0) continue;\n object.add(object3);\n }\n ((BufferedReader)object2).close();\n object.trimToSize();\n }\n catch (IOException iOException) {}\n object3 = object.iterator();\n while (bl2 = object3.hasNext()) {\n int n11;\n object = (String)object3.next();\n if (object == null || (object = object.split((String)(object2 = \" \"))) == null || (n11 = ((String[])object).length) < (n10 = 4) || (object = object[n11 = 2]) == null || (n11 = (int)(((File)(object2 = new File((String)object))).exists() ? 1 : 0)) == 0) continue;\n arrayList.add((String[])object);\n }\n return arrayList;\n }", "public static List<String> getProviderExist() {\n\t\tList<String> providerExist = new ArrayList<String>();\n\t\ttry {\n\t\t\t// load provider found previous\n\t\t\tString providerFound = Utils.getValueFromConfig(Utils.KEY_PROVIDER_FOUND);\n\t\t\tString[] providerFoundArr = providerFound == null ? null : providerFound.split(\",\");\n\t\t\tif (providerFoundArr != null && providerFoundArr.length > 0)\n\t\t\t{\n\t\t\t\tfor (String provider : providerFoundArr) {\n\t\t\t\t\tString providerPath = IsFileExistInSystem(provider);\n\t\t\t\t\tif (null != providerPath) {\n\t\t\t\t\t\tproviderExist.add(providerPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// load a properties file\n\t\t\tString providerList = Utils.getValueFromConfig(Utils.KEY_PROVIDER_LIST);\n\t\t\t// get from string\n\t\t\tString[] providerArr = providerList.split(\",\");\n\t\t\tfor (String provider : providerArr) {\n\t\t\t\tif (providerFoundArr != null && !Arrays.asList(providerFoundArr).contains(provider))\n\t\t\t\t{\n\t\t\t\t\tString providerPath = IsFileExistInSystem(provider);\n\t\t\t\t\tif (null != providerPath && !providerExist.contains(providerPath)) {\n\t\t\t\t\t\tproviderExist.add(providerPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t// get from system\n\t\t\tList<String> listOnSystem = GetDriverOnSystem();\n\t\t\tfor (String path : listOnSystem) {\n\t\t\t\tif (!providerExist.contains(path)) {\n\t\t\t\t\tproviderExist.add(path);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tLOG.write(\"CryptoTokenHelper\", e.getMessage());\n\t\t}\n\t\treturn providerExist;\n\t}", "private List<String> getExtendedDeviceInfo(IBuildInfo buildInfo) {\n List<String> extendedDeviceInfo = new ArrayList<>();\n File deviceInfoPath = buildInfo.getFile(DeviceInfoCollector.DEVICE_INFO_DIR);\n if (deviceInfoPath == null || !deviceInfoPath.exists()) {\n CLog.w(\"Device Info directory was not created (Make sure you are not running plan \" +\n \"\\\"*ts-dev\\\" or including option -d/--skip-device-info)\");\n return extendedDeviceInfo;\n }\n List<String> requiredDeviceInfo = null;\n try {\n requiredDeviceInfo = DynamicConfigFileReader.getValuesFromConfig(\n buildInfo, getSuiteName(), DYNAMIC_CONFIG_EXTENDED_DEVICE_INFO_KEY);\n } catch (XmlPullParserException | IOException e) {\n CLog.e(\"Failed to pull business logic Extended DeviceInfo from dynamic config. \"\n + \"Error: %s\", e);\n return extendedDeviceInfo;\n }\n File ediFile = null;\n String[] fileAndKey = null;\n try{\n for (String ediEntry: requiredDeviceInfo) {\n fileAndKey = ediEntry.split(\":\");\n if (fileAndKey.length <= 1) {\n CLog.e(\"Dynamic config Extended DeviceInfo key has problem.\");\n return new ArrayList<>();\n }\n ediFile = FileUtil\n .findFile(deviceInfoPath, fileAndKey[0] + \".deviceinfo.json\");\n if (ediFile == null) {\n CLog.e(\n \"Could not find Extended DeviceInfo JSON file: %s.\",\n deviceInfoPath + fileAndKey[0] + \".deviceinfo.json\");\n return new ArrayList<>();\n }\n String jsonString = FileUtil.readStringFromFile(ediFile);\n JSONObject jsonObj = new JSONObject(jsonString);\n String value = jsonObj.getString(fileAndKey[1]);\n extendedDeviceInfo\n .add(String.format(\"%s:%s:%s\", fileAndKey[0], fileAndKey[1], value));\n }\n }catch(JSONException | IOException | RuntimeException e){\n CLog.e(\n \"Failed to read or parse Extended DeviceInfo JSON file: %s. Error: %s\",\n deviceInfoPath + fileAndKey[0] + \".deviceinfo.json\", e);\n return new ArrayList<>();\n }\n return extendedDeviceInfo;\n }", "protected List<PCIDevice> probeDevices() {\n final ArrayList<PCIDevice> result = new ArrayList<PCIDevice>();\n rootBus.probeDevices(result);\n return result;\n }", "@Override\r\n\tpublic List<ProductFamily> findProductFamily() {\n\t\treturn iImportSalesRecordDao.findProductFamily();\r\n\t}", "private String[] detectFeatures() {\n \t\t\tchangeStampIsValid = false;\n \t\t\tfeaturesChangeStampIsValid = false;\n \t\t\tparent.changeStampIsValid = false;\n \t\t\tparent.featuresChangeStampIsValid = false;\n \n \t\t\tfeatures = new ArrayList();\n \n \t\t\tif (!supportsDetection(resolvedURL))\n \t\t\t\treturn new String[0];\n \n \t\t\t// locate feature entries on site\n \t\t\tFile siteRoot = new File(resolvedURL.getFile().replace('/', File.separatorChar));\n \t\t\tFile root = new File(siteRoot, FEATURES);\n \n \t\t\tString[] list = root.list();\n \t\t\tString path;\n \t\t\tFile plugin;\n \t\t\tfor (int i = 0; list != null && i < list.length; i++) {\n \t\t\t\tpath = list[i] + File.separator + FEATURE_XML;\n \t\t\t\tplugin = new File(root, path);\n \t\t\t\tif (!plugin.exists()) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tfeatures.add(FEATURES + \"/\" + path.replace(File.separatorChar, '/')); //$NON-NLS-1$\n \t\t\t}\n \t\t\tif (DEBUG) {\n \t\t\t\tdebug(resolvedURL.toString() + \" located \" + features.size() + \" feature(s)\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \n \t\t\treturn (String[]) features.toArray(new String[0]);\n \t\t}", "private Set<String> getNeededRomFiles(MachineRomSetFormat format) {\n Set<String> romSets = new HashSet<>();\n\n // If this machine is a clone of another, only include cloned machine roms\n // if format is merged (clones are included in parent roms on merged\n // romsets)\n\n if (!this.roms.isEmpty() && (this.clonedMachine == null\n || format.equals(MachineRomSetFormat.SPLIT))) {\n romSets.add(this.name);\n }\n\n // This machine is a clone of another which needs roms ?\n\n if (this.clonedMachine != null) {\n Set<String> psRomSets = this.clonedMachine.getNeededRomFiles(format);\n if (!psRomSets.isEmpty()) {\n romSets.addAll(psRomSets);\n }\n }\n\n // This machine if a \"rom\" of another (ex neogeo) ?\n\n if (this.romOfMachine != null) {\n Set<String> psRomSets = this.romOfMachine.getNeededRomFiles(format);\n if (!psRomSets.isEmpty()) {\n romSets.addAll(psRomSets);\n }\n }\n\n // Any sub machine componants of this machine need roms ?\n\n for (Machine subm : this.getSubMachines()) {\n Set<String> submRomSets = subm.getNeededRomFiles(format);\n if (!submRomSets.isEmpty()) {\n romSets.addAll(submRomSets);\n }\n }\n\n return romSets;\n }", "private void searchParts(AbstractFile part1) {\r\n \t\tAbstractFile parent = part1.getParentSilently();\r\n \t\tif (parent == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tString ext = part1.getExtension();\r\n \t\tint firstIndex;\r\n \t\ttry {\r\n \t\t\tfirstIndex = Integer.parseInt(ext);\r\n \t\t} catch (NumberFormatException e) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tString name = part1.getNameWithoutExtension();\r\n \t\tFilenameFilter startsFilter = new StartsFilenameFilter(name, false);\r\n \t\tAttributeFileFilter filesFilter = new AttributeFileFilter(AttributeFileFilter.FILE);\r\n \t\tEqualsFilenameFilter part1Filter = new EqualsFilenameFilter(part1.getName(), false);\r\n \t\tpart1Filter.setInverted(true);\r\n \t\tAndFileFilter filter = new AndFileFilter();\r\n \t\tfilter.addFileFilter(startsFilter);\r\n \t\tfilter.addFileFilter(filesFilter);\r\n \t\tfilter.addFileFilter(part1Filter);\r\n \t\ttry {\r\n \t\t\tAbstractFile[] otherParts = parent.ls(filter);\r\n \t\t\tfor (int i = 0; i < otherParts.length; i++) {\r\n \t\t\t\tString ext2 = otherParts[i].getExtension();\r\n \t\t\t\ttry {\r\n \t\t\t\t\tint partIdx = Integer.parseInt(ext2);\r\n \t\t\t\t\tif (partIdx > firstIndex)\r\n \t\t\t\t\t\tfiles.add(otherParts[i]);\r\n \t\t\t\t} catch (NumberFormatException e) {\r\n \t\t\t\t\t// nothing\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t} catch (IOException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n\t\tsetFiles(files);\r\n \t}", "private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}", "List<File> getSystemDescriptionFiles();", "public List<String> getPlatsFromFacture(String film, String filepath) {\n\n List<String> res = new ArrayList<String>();\n List<String> plats = new ArrayList<String>();\n\n boolean bCommande = false;\n boolean bIdPlat = false;\n boolean bClient = false;\n boolean bFilm = false;\n boolean targetAudience = false;\n\n try {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n XMLEventReader eventReader\n = factory.createXMLEventReader(new FileReader(\"factures/\" + filepath));\n\n while (eventReader.hasNext()) {\n XMLEvent event = eventReader.nextEvent();\n\n switch (event.getEventType()) {\n\n case XMLStreamConstants.START_ELEMENT:\n StartElement startElement = event.asStartElement();\n String qName = startElement.getName().getLocalPart();\n\n if (qName.equalsIgnoreCase(\"facture\")) {\n } else if (qName.equalsIgnoreCase(\"client\")) {\n bClient = true;\n } else if (qName.equalsIgnoreCase(\"idPlat\")) {\n bIdPlat = true;\n } else if (qName.equalsIgnoreCase(\"film\")) {\n bFilm = true;\n }\n break;\n\n case XMLStreamConstants.CHARACTERS:\n Characters characters = event.asCharacters();\n if (bIdPlat) {\n plats.add(characters.getData());\n bIdPlat = false;\n } else if (bFilm) {\n if (film.equals(characters.getData())) {\n targetAudience = true;\n bFilm = false;\n }\n } else if (bClient) {\n bClient = false;\n }\n break;\n\n case XMLStreamConstants.END_ELEMENT:\n EndElement endElement = event.asEndElement();\n\n if (endElement.getName().getLocalPart().equalsIgnoreCase(\"facture\")) {\n if (targetAudience) {\n for (String p : plats) {\n res.add(p);\n }\n }\n }\n break;\n }\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception: \" + e);\n }\n\n return res;\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public List<String> execAdbDevices()\r\n\t{\r\n\t\tList<String> ret_device_id_list = new ArrayList<>();\r\n\t\t\r\n\t\tProcess proc = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tproc = new ProcessBuilder(this.adb_directory, \"devices\").start();\r\n\t\t\tproc.waitFor();\r\n\t\t} catch (IOException ioe)\r\n\t\t{\r\n\t\t\tioe.printStackTrace();\r\n\t\t} catch (InterruptedException ire)\r\n\t\t{\r\n\t\t\tire.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tString devices_result = this.collectResultFromProcess(proc);\r\n\t String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\r\n\r\n\t if (device_id_list.length <= 1)\r\n\t {\r\n\t \tSystem.out.println(\"No Devices Attached.\");\r\n\t \treturn ret_device_id_list;\r\n\t }\r\n\t \r\n\t /**\r\n\t * collect the online devices \r\n\t */\r\n\t String str_device_id = null;\r\n\t String[] str_device_id_parts = null;\r\n\t // ignore the first line which is \"List of devices attached\"\r\n\t for (int i = 1; i < device_id_list.length; i++)\r\n\t\t{\r\n\t\t\tstr_device_id = device_id_list[i];\r\n\t\t\tstr_device_id_parts = str_device_id.split(\"\\\\s+\");\r\n\t\t\t// add the online device\r\n\t\t\tif (str_device_id_parts[1].equals(\"device\"))\r\n\t\t\t\tret_device_id_list.add(str_device_id_parts[0]);\r\n\t\t}\r\n\t \r\n\t return ret_device_id_list;\r\n\t}", "private List<Device> getDeviceCandidates(Node node, State state) {\n\t\tList<Device> candidates = new ArrayList<Device>();\n\t\tfor (Device device : Basic_ILS.devices) {\n\t\t\tif (state.deviceConstraint(node, device)\n\t\t\t\t\t&& state.colocationConstraint(node, device)\n\t\t\t\t\t&& state.memoryConstraint(node, device)) {\n\t\t\t\tcandidates.add(device);\n\t\t\t}\n\t\t}\n\t\treturn candidates;\n\t}", "@Test\r\n public void testGetFamilies() throws Exception {\r\n TDataPrepDBInputDefinition fixture = new TDataPrepDBInputDefinition();\r\n\r\n String[] result = fixture.getFamilies();\r\n\r\n assertNotNull(result);\r\n assertEquals(1, result.length);\r\n assertEquals(\"DataPrep/DB\", result[0]);\r\n }", "private String[] getFileNames() {\n\t\tFile directory = new File(this.getClass().getClassLoader()\n\t\t\t\t.getResource(\"data\").getFile());\n\t\tList<String> fileNames = new ArrayList<String>();\n\n\t\tfor (File file : directory.listFiles())\n\t\t\tfileNames.add(file.getName());\n\n\t\treturn fileNames.toArray(new String[fileNames.size()]);\n\t}", "public List<String> getAvailableDevices() {\n if (getEcologyDataSync().getData(\"devices\") != null) {\n return new ArrayList<>((Collection<? extends String>) ((Map<?, ?>) getEcologyDataSync().\n getData(\"devices\")).keySet());\n } else {\n return Collections.emptyList();\n }\n }", "private final Set<String> m880b() {\n if (Build.VERSION.SDK_INT < 21) {\n return Collections.emptySet();\n }\n try {\n PackageInfo packageInfo = this.f1350b.getPackageManager().getPackageInfo(this.f1350b.getPackageName(), 0);\n HashSet hashSet = new HashSet();\n if (packageInfo == null || packageInfo.splitNames == null) {\n return hashSet;\n }\n Collections.addAll(hashSet, packageInfo.splitNames);\n return hashSet;\n } catch (PackageManager.NameNotFoundException e) {\n f1349a.mo44091d(\"App '%s' is not found in PackageManager\", this.f1350b.getPackageName());\n return Collections.emptySet();\n }\n }", "public List<String> nomsFactures() {\n File folder = new File(\"factures/\");\n File[] listOfFiles = folder.listFiles();\n List<String> noms = new ArrayList<String>();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n noms.add(listOfFiles[i].getName());\n }\n }\n return noms;\n }", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();", "private static String files()\n\t{\n\t\tString path = dirpath + \"\\\\Server\\\\\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tString msg1 = \"\";\n\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\tif (listOfFiles[i].isFile())\n\t\t\t{\n\t\t\t\tmsg1 = msg1 + \"&\" + listOfFiles[i].getName();\n\t\t\t}\n\t\t}\n\t\tmsg1 = msg1 + \"#\" + path + \"\\\\\";\n\t\treturn msg1;\n\t}", "public void enquire_files()\n {\n out.println(\"ENQUIRY\");\n String rd_in = null;\n Matcher m_eom = eom.matcher(\"start\"); // initializing the matcher. \"start\" does not mean anything\n // get filenames till EOM message is received and update the files list\n try\n {\n while(!m_eom.find())\n {\n rd_in = in.readLine();\n m_eom = eom.matcher(rd_in);\n if(!m_eom.find())\n {\n String filename = rd_in;\n cnode.files.add(filename);\n } \n else { break; } // break out of loop when EOM is received\n }\n }\n catch (IOException e) \n {\n \tSystem.out.println(\"Read failed\");\n \tSystem.exit(-1);\n }\n }", "private List<String> scoutForFiles(FileType fileType, Path path) {\n\t\tfinal List<String> filesFound = new ArrayList<>();\n\n\t\t// Create a stream of Paths for the contents of the directory\n\t\ttry (Stream<Path> walk = Files.walk(path)) {\n\n\t\t\t// Filter the stream to find only Paths that match the filetype we are looking\n\t\t\tfilesFound.addAll(walk.map(x -> x.toString())\n\t\t\t\t.filter(f -> f.endsWith(fileType.suffix)).collect(Collectors.toList()));\n\t\t} catch (IOException e) {\n\t\t\tthrow new MessagePassableException(EventKey.ERROR_EXTERNAL_DIR_NOT_READABLE, e, path.toString());\n\t\t}\n\n\t\treturn filesFound;\n\t}", "protected static Path[] globInternal(Path folderOrFile, FileSystem fs) throws IOException {\n\t\tPath input = folderOrFile;\n\t\tPath[] files;\n\t\t\n\t\tif (fs != null && fs.exists(input)) {\n\t\t\tif (fs.isDirectory(input)) {\n\t\t\t\tinput = new Path(input.toUri().toString() + \"/part-*\");\n\t\t\t\tFileStatus[] fStatus= fs.globStatus(input);\n\t\t\t\tfiles = FileUtil.stat2Paths(fStatus);\n\t\t\t} else {\n\t\t\t\tPath[] temp = {input};\n\t\t\t\tfiles = temp;\n\t\t\t}\n\t\t\treturn files;\n\t\t} else\n\t\t\treturn null;\n\t}", "public static List<String> GetDriverOnMacOS() {\n\t\tList<String> providerList = new ArrayList<String>();\n\t\tFile folder = new File(PROVIDER_FOLDER);\n\t\tFile[] files = folder.listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isFile()) {\n\t\t\t\tif (file.getPath().toString().contains(\".dylib\")) {\n\t\t\t\t\tproviderList.add(file.getPath().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn providerList;\n\t}", "@TargetApi(Build.VERSION_CODES.KITKAT)\n public static String[] getExtSdCardPaths(Context context) {\n List<String> paths = new ArrayList<>();\n for (File file : context.getExternalFilesDirs(\"external\")) {\n if (file != null && !file.equals(context.getExternalFilesDir(\"external\"))) {\n int index = file.getAbsolutePath().lastIndexOf(\"/Android/data\");\n if (index < 0) {\n Log.w(\"AmazeFileUtils\", \"Unexpected external file dir: \" + file.getAbsolutePath());\n } else {\n String path = file.getAbsolutePath().substring(0, index);\n try {\n path = new File(path).getCanonicalPath();\n } catch (IOException e) {\n // Keep non-canonical path.\n }\n paths.add(path);\n }\n }\n }\n if (paths.isEmpty()) paths.add(\"/storage/sdcard1\");\n return paths.toArray(new String[0]);\n }", "public File[] getUsedAudioFiles(){\n \tArrayList<File> afList=new ArrayList<File>();\n \tif(source instanceof FileAudioSource){\n \t\tafList.add(((FileAudioSource)source).getFile());\n \t}\n \tfor (AudioPlugin ap : plugins) {\n\t\t\tif (ap instanceof SourcePlugin) {\n\t\t\t\tAudioSource as = ((SourcePlugin) ap).getAudioSource();\n\t\t\t\tif (as instanceof FileAudioSource) {\n\t\t\t\t\tafList.add(((FileAudioSource) source).getFile());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \treturn afList.toArray(new File[0]);\n }", "private static ArrayList<String> getPlayerFileNames() {\n\n ArrayList<String> fileNames = new ArrayList<String>();\n\n File folder = new File(\"otterbein/pig/player\");\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n if (listOfFiles[i].getName().endsWith(\".class\")) {\n fileNames.add(listOfFiles[i].getName());\n }\n }\n }\n\n return fileNames;\n }", "public abstract List<String> getRequiredProfiles();", "private List<S3ObjectSummary> findObsoleteProgspecFiles() {\n // Get the current local program specification state.\n Properties localProgspec = getProgSpecETags();\n\n // Compare the actual state to the state cached lcoally.\n Map<String, S3ObjectSummary> currentProgspec = Authenticator.getInstance().getProjectsHelper().getProgSpecInfo(getProgramId());\n List<S3ObjectSummary> result = new ArrayList<>();\n for (Map.Entry<String, S3ObjectSummary> e : currentProgspec.entrySet()) {\n // If we don't have the file locally, or if the eTag doesn't match, add to the result list.\n String localTag = localProgspec.containsKey(e.getKey()) ? localProgspec.get(e.getKey()).toString() : \"\";\n if (!e.getValue().getETag().equalsIgnoreCase(localTag))\n result.add(e.getValue());\n }\n return result;\n }", "public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }", "public Map<String, Set<String>> getBufferedDeviceNamesByType();", "public List getFiles(HasMetricsFilter filter) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n List<BaseFileInfo> result = newArrayList();\n for (BaseFileInfo fileInfo : fileLookup.values()) {\n if (filter.accept(fileInfo)) {\n result.add(fileInfo);\n }\n }\n return result;\n }", "public static ArrayList<File> findDevices(String dir) {\n ArrayList<File> path = new ArrayList<>();\n\n for (File file : new File(dir).listFiles()) {\n if (file.getName().startsWith(\"vtplayer\")) {\n path.add(file);\n }\n }\n\n return path;\n }", "protected List<String> getFileNames(@NonNull ConfigQuery query, @NonNull T context) {\n val paths = interpolateVarStrings(getPaths(), query);\n log.trace(\"{} retrieving filenames for paths: {}\", this, paths);\n return paths.stream()\n .flatMap(name -> maybeListDirectory(name, context))\n .distinct()\n .collect(Collectors.toList());\n }", "public List<String> getSpecies() {\n\t\tif (species == null || species.isEmpty())\n\t\t\tspecies = getSpeciesFromMiapes();\n\t\tif (species != null) {\n\t\t\tfinal List<String> ret = new ArrayList<String>();\n\t\t\tfor (final String specie : species) {\n\t\t\t\tret.add(ProteomeXchangeFilev2_1.MTD + TAB + \"species\" + TAB + specie);\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t\treturn null;\n\t}", "private List<String> getFiles(String path){\n workDir = Environment.getExternalStorageDirectory().getAbsolutePath() + path;\n List<String> files = new ArrayList<String>();\n File file = new File(workDir);\n File[] fs = file.listFiles();\n for(File f:fs)\n if (f.isFile())\n files.add(String.valueOf(f).substring(workDir.length()));\n return files;\n }", "public String[] getFilenames(String directory) {\n File path = new File(directory);\n String[] filenames;\n if (path.exists()) {\n filenames = path.list();\n if (filenames != null) {\n Log.d(TAG, \"getFilenames: filenames length: \" + filenames.length);\n }\n else {\n Log.d(TAG, \"getFilenames: filenames length: null\" );\n }\n }\n else {\n filenames = new String[0];\n }\n return filenames;\n }", "String family();", "@Override\n public List<String> call() {\n List<String> nameList = null;\n nameList = doScan(basePackage, new ArrayList<>());\n\n return nameList;\n }", "@Override\n\tpublic List<HumanFile> findHumanFileAll() {\n\t\treturn HumanFileMapper.findHumanFileAll();\n\t}", "byte[][] getQualifierKeys(String family) {\n\t\tMap<String, TypeInformation<?>> qualifierMap = familyMap.get(family);\n\n\t\tif (qualifierMap == null) {\n\t\t\tthrow new IllegalArgumentException(\"Family \" + family + \" does not exist in schema.\");\n\t\t}\n\t\tCharset c = Charset.forName(charset);\n\n\t\tbyte[][] qualifierKeys = new byte[qualifierMap.size()][];\n\t\tint i = 0;\n\t\tfor (String name : qualifierMap.keySet()) {\n\t\t\tqualifierKeys[i++] = name.getBytes(c);\n\t\t}\n\t\treturn qualifierKeys;\n\t}", "@RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void searchBleEspDevices(String prefix, BleScanListener bleScannerListener) {\n\n Log.d(TAG, \"Search for BLE devices\");\n bleScanner = new BleScanner(context, prefix, bleScannerListener);\n bleScanner.startScan();\n }", "public static List<String> getDeviceList() {\n\t\tList<String> str = CommandRunner.exec(CMD_GET_DEVICE_ID);\n\t\tList<String> ids = new ArrayList<String>();\n\t\tfor (int i = 1; i < str.size(); i++) {\n\t\t\tString id = str.get(i).split(\" |\\t\")[0].trim();\n\t\t\tif (!id.isEmpty()) {\n\t\t\t\tids.add(id);\n\t\t\t}\n\t\t}\n\t\treturn ids;\n\t}", "private static String getOsFamily()\n {\n Set families = getValidFamilies();\n\n Iterator iter = families.iterator();\n while ( iter.hasNext() )\n {\n String fam = (String) iter.next();\n if ( Os.isFamily( fam ) )\n {\n return fam;\n }\n }\n return null;\n }", "public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}", "@Override\n public void buildListDevices(final String fileName) {\n XMLStreamReader reader;\n String name;\n try (FileInputStream inputStream\n = new FileInputStream(new File(fileName))) {\n reader = inputFactory.createXMLStreamReader(inputStream);\n\n while (reader.hasNext()) {\n int type = reader.next();\n if (type == XMLStreamConstants.START_ELEMENT) {\n name = reader.getLocalName();\n parseSpecificDevice(name, reader);\n }\n }\n\n LOGGER.info(\"Parsing by DOM parser was successfully done!\");\n } catch (XMLStreamException ex) {\n LOGGER.error(\"StAX parsing error!\");\n } catch (FileNotFoundException ex) {\n LOGGER.error(\"File \" + fileName + \" not found!\");\n } catch (ParsingException e) {\n LOGGER.error(e.getMessage());\n } catch (IOException e) {\n LOGGER.error(\"Exception with file.\");\n }\n }", "private void getPairedDevices() {\n\t\tdevicesArray = btAdapter.getBondedDevices();\n\t\tif(devicesArray.size()>0){\n\t\t\tfor(BluetoothDevice device:devicesArray){\n\t\t\t\tpairedDevices.add(device.getName());\n\t\t\t}\n\t\t}\n\t}", "public String[] getFilesOnServer() {\n Log.i(\"getFilesFor\", \"Getting all files on server available to \"\n + new KeyGenerator(context).getPublicKeyAsString());\n Cursor resultSet = database.rawQuery(\n \"SELECT DISTINCT File FROM FileKeys WHERE UserPublicKey = \" +\n \"'\" + new KeyGenerator(context).getPublicKeyAsString() + \"'\", null);\n String[] fileNames = new String[resultSet.getCount()];\n resultSet.moveToFirst();\n int i = 0;\n while (!resultSet.isAfterLast()) {\n Log.i(\"getFilesFor\", \"File namme: \" + resultSet.getString(0));\n fileNames[i++] = resultSet.getString(0);\n resultSet.moveToNext();\n }\n resultSet.close();\n return fileNames;\n }", "private void getFilenames() {\n\t\tString[] filenames = getApplicationContext().fileList();\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(int i = 0; i<filenames.length; i++){\n\t\t\t//Log.d(\"Filename\", filenames[i]);\n\t\t\tlist.add(filenames[i]);\n\t\t}\n\t\tArrayAdapter<String> filenameAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list);\n\t\tspinner.setAdapter(filenameAdapter);\n\t}", "public static ArrayList<MTPDeviceInfo> getDeviceModels() {\r\n\t\tArrayList<MTPDeviceInfo> models = new ArrayList<>();\r\n\r\n\t\tPortableDeviceManager manager = new PortableDeviceManager();\r\n\t\tmanager.refreshDeviceList();\r\n\r\n\t\tfor (PortableDevice device : manager.getDevices()) {\r\n\t\t\tdevice.open();\r\n\t\t\tmodels.add(new MTPDeviceInfo(device.getModel(), device.getSerialNumber()));\r\n\t\t\tdevice.close();\r\n\t\t}\r\n\r\n\t\treturn models;\r\n\t}", "private void bonded_devices_get()\n\t\t{\n\t\t\tmPairedDevList.clear();\n\t\t\tSet<BluetoothDevice> PairedDevices = btAdapter.getBondedDevices();\n\t\t\tif(PairedDevices.size() > 0)\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.VISIBLE);\n\t\t\t\tfor(BluetoothDevice device : PairedDevices)\n\t\t\t\t{\n\t\t\t\t\tString device_info = device.getName()+\"\\n\"+device.getAddress();\n\t\t\t\t\tmPairedDevList.add(device_info);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.GONE);\n\t\t\t\tmPairedDevList.add(\"No Bonded Devices\");\n\t\t\t}\n\t\t}", "public String searchExportedPlugins()\n\t{\n\t\tFile parent = null;\n\t\tif (System.getProperty(\"eclipse.home.location\") != null)\n\t\t\tparent = new File(URI.create(System.getProperty(\"eclipse.home.location\").replaceAll(\" \", \"%20\")));\n\t\telse parent = new File(System.getProperty(\"user.dir\"));\n\n\t\tList<String> pluginLocations = exportModel.getPluginLocations();\n\t\tfor (String libName : NG_LIBS)\n\t\t{\n\t\t\tint i = 0;\n\t\t\tboolean found = false;\n\t\t\twhile (!found && i < pluginLocations.size())\n\t\t\t{\n\t\t\t\tFile pluginLocation = new File(pluginLocations.get(i));\n\t\t\t\tif (!pluginLocation.isAbsolute())\n\t\t\t\t{\n\t\t\t\t\tpluginLocation = new File(parent, pluginLocations.get(i));\n\t\t\t\t}\n\t\t\t\tFileFilter filter = new WildcardFileFilter(libName);\n\t\t\t\tFile[] libs = pluginLocation.listFiles(filter);\n\t\t\t\tif (libs != null && libs.length > 0)\n\t\t\t\t{\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (!found) return libName;\n\t\t}\n\t\treturn null;\n\t}", "public static File[] getFiles() /*throws IOException*/ {\n\n String os = (System.getProperty(\"os.name\")).toUpperCase();\n File path;\n if (os.contains(\"WIN\")) {\n path = new File(System.getenv(\"APPDATA\")+\"\\\\SudokuGR04\");\n }\n else\n {\n path = new File(System.getProperty(\"user.home\" + \"/Library/Application Support/SudokuGR04\" ));\n }\n\n FileFilter fileFilter = dir -> {\n return dir.isFile();\n };\n //in the files-array there is a list of all files in the dir\n files = path.listFiles(fileFilter);\n return files;\n }", "public static List<File> getAllFonts(string dir)\r\n\t{\r\n\t\t File d_file = new File(dir);\r\n\r\n\t\t\tif(dir != null && d_file != null)\r\n\t\t\t{\r\n\t\t\t\tList<File> fl = (List<File>)\r\n\t\t\t\t\t(FileUtils.listFiles(d_file,\r\n\t\t\t\t\t\tTrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE));\r\n\t\t\t\treturn fl;\r\n\t\t\t}\r\n\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//if nothing is founded return list that contains only null\r\n\t\t\t\treturn new List<File>(null);\r\n\t\t\t}\r\n\t}", "public static String listFather() {\n\t\tString s = \"\";\n\t\tString i1 = \" \";\n\t\tfor (Entry<String, TreeMap<String, Set<String>>> en:getFatherMap().entrySet()) {\n\t\t\ts = s + en.getKey() + \":\\n\";\n\t\t\tTreeMap<String, Set<String>> fathers = en.getValue();\n\t\t\tfor (Entry<String, Set<String>> father:fathers.entrySet()) {\n\t\t\t\ts = s + i1 + father.getKey() + \" ( \";\n\t\t\t\tfor (String root:father.getValue()) {\n\t\t\t\t\ts = s + root + \" \";\n\t\t\t\t}\n\t\t\t\ts = s + \")\\n\";\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t}", "private String[] detectPlugins() {\n \t\t\tchangeStampIsValid = false;\n \t\t\tpluginsChangeStampIsValid = false;\n \t\t\tparent.changeStampIsValid = false;\n \t\t\tparent.pluginsChangeStampIsValid = false;\n \n \t\t\tplugins = new ArrayList();\n \n \t\t\tif (!supportsDetection(resolvedURL))\n \t\t\t\treturn new String[0];\n \n \t\t\t// locate plugin entries on site\n \t\t\tFile root = new File(resolvedURL.getFile().replace('/', File.separatorChar) + PLUGINS);\n \t\t\tString[] list = root.list();\n \t\t\tString path;\n \t\t\tFile plugin;\n \t\t\tfor (int i = 0; list != null && i < list.length; i++) {\n \t\t\t\tpath = list[i] + File.separator + PLUGIN_XML;\n \t\t\t\tplugin = new File(root, path);\n \t\t\t\tif (!plugin.exists()) {\n \t\t\t\t\tpath = list[i] + File.separator + FRAGMENT_XML;\n \t\t\t\t\tplugin = new File(root, path);\n \t\t\t\t\tif (!plugin.exists())\n \t\t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tplugins.add(PLUGINS + \"/\" + path.replace(File.separatorChar, '/')); //$NON-NLS-1$\n \t\t\t}\n \t\t\tif (DEBUG) {\n \t\t\t\tdebug(resolvedURL.toString() + \" located \" + plugins.size() + \" plugin(s)\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \n \t\t\treturn (String[]) plugins.toArray(new String[0]);\n \t\t}", "public static String chooseAvailableRDFSSchemas()\n\t{\n\t\tFile folder = new File(PATH_TO_RDFS_SCHEMAS.toString());\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tMap<Integer, String> availableLinkedDatasources = new TreeMap<Integer, String>();\n\t\tString extensionRDFLower = \".rdf\";\n\t\tString extensionRDFUpper = \".RDF\";\n\t\t\n\t\tSystem.out.println(\"Which RDFS schema do you want to use?\");\n\n\t\treturn PATH_TO_RDFS_SCHEMAS.append(\"/\").append(chooseFiles(listOfFiles, availableLinkedDatasources,\n\t\t\t\textensionRDFLower, extensionRDFUpper)).toString();\n\t}", "public abstract List<String> getValidDescriptors();", "public static void getDevicesList()\n {\n MidiDevice.Info[]\taInfos = MidiSystem.getMidiDeviceInfo();\n\t\tfor (int i = 0; i < aInfos.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMidiDevice\tdevice = MidiSystem.getMidiDevice(aInfos[i]);\n\t\t\t\tboolean\t\tbAllowsInput = (device.getMaxTransmitters() != 0);\n\t\t\t\tboolean\t\tbAllowsOutput = (device.getMaxReceivers() != 0);\n\t\t\t\tif (bAllowsInput || bAllowsOutput)\n\t\t\t\t{\n\n\t\t\t\t\tSystem.out.println(i + \"\" + \" \"\n\t\t\t\t\t\t+ (bAllowsInput?\"IN \":\" \")\n\t\t\t\t\t\t+ (bAllowsOutput?\"OUT \":\" \")\n\t\t\t\t\t\t+ aInfos[i].getName() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVendor() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVersion() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getDescription());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\" + i + \" \" + aInfos[i].getName());\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (MidiUnavailableException e)\n\t\t\t{\n\t\t\t\t// device is obviously not available...\n\t\t\t\t// out(e);\n\t\t\t}\n\t\t}\n\t\tif (aInfos.length == 0)\n\t\t{\n\t\t\tSystem.out.println(\"[No devices available]\");\n\t\t}\n\t\t//System.exit(0);\n }", "private void listDevices(Context context) {\n\t DeviceList list = new DeviceList();\n\t int result = LibUsb.getDeviceList(context, list);\n\t if(result < 0) throw new LibUsbException(\"Unable to get device list\", result);\n\n\t try\n\t {\n\t for(Device device: list)\n\t {\n\t DeviceDescriptor descriptor = new DeviceDescriptor();\n\t result = LibUsb.getDeviceDescriptor(device, descriptor);\n\t if (result != LibUsb.SUCCESS) throw new LibUsbException(\"Unable to read device descriptor\", result);\n\t System.out.println(\"vendorId=\" + descriptor.idVendor() + \", productId=\" + descriptor.idProduct());\n\t }\n\t }\n\t finally\n\t {\n\t // Ensure the allocated device list is freed\n\t LibUsb.freeDeviceList(list, true);\n\t }\n\t}", "public File[] elements() {\n File plik = new File(katalog);\n katalog = plik.getAbsolutePath();\n if (katalog.endsWith(\".\")) {\n katalog = katalog.substring(0, katalog.length() - 1);\n }\n return plik.listFiles();\n }", "java.util.List<java.lang.String>\n getProcessorpathList();", "public static FontData[] getAllFonts() {\n if (fonts == null) {\n fonts = new ArrayList();\n\n String os = System.getProperty(\"os.name\");\n File[] locs = new File[0];\n\n if (os.startsWith(\"Windows\")) {\n locs = win32;\n }\n if (os.startsWith(\"Linux\")) {\n locs = linux;\n }\n if (os.startsWith(\"Mac OS\")) {\n locs = macos;\n }\n\n for (int i = 0; i < locs.length; i++) {\n File loc = locs[i];\n\n processFontDirectory(loc, fonts);\n }\n\n if (os.startsWith(\"Linux\")) {\n locateLinuxFonts(new File(\"/etc/fonts/fonts.conf\"));\n }\n }\n\n return (FontData[]) fonts.toArray(new FontData[0]);\n }", "public static List<FTDevice> getDevices() throws FTD2XXException {\n return getDevices(false);\n }", "private File[] getFiles() {\n\n if (mPPTFilePath == null) {\n mPPTFilePath = getArguments().getString(PPTPathString);\n }\n\n String Path = mPPTFilePath;\n File mFile = new File(Path);\n if (mFile.exists() && mFile.isDirectory() && mFile.listFiles()!=null) {\n\n return mFile.listFiles();\n } else {\n Log.d(TAG, \"File==null\");\n return null;\n }\n }", "private String findPeersForFile(String fileNameToSearch, String failedPeerList) {\r\n\t\tStringBuilder peersWithFile = new StringBuilder();\r\n\t\tSet<Machine> peersWithThisFile = getPeersForFile(fileNameToSearch);\r\n\t\tList<Machine> failedPeerCollection = getCollectionFromPeerString(failedPeerList);\r\n\t\tLoggingUtils.logDebug(logger, \"peersWithThisFile=%s;failedPeerCollection=%s\", peersWithThisFile,\r\n\t\t\t\tfailedPeerCollection);\r\n\t\tpeersWithThisFile.removeAll(failedPeerCollection);\r\n\r\n\t\tif (removeFailedPeers) {\r\n\t\t\tfor (Machine m : failedPeerCollection) {\r\n\t\t\t\tremoveMachine(m);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (Machine mc : peersWithThisFile) {\r\n\t\t\tpeersWithFile.append(mc.toString());\r\n\t\t}\r\n\t\tLoggingUtils.logDebug(logger, \"peersWithThisFile=%s;failedPeerCollection=%s;peersWithFile=%s\",\r\n\t\t\t\tpeersWithThisFile, failedPeerCollection, peersWithFile.toString());\r\n\t\treturn peersWithFile.toString();\r\n\t}", "public int[] getStorageUsers(String path) throws RemoteException;", "String[] getParts();", "private static Cursor getFamilyInfo(Context context, String id)\n\t{\n\t\tString whereName = ContactsContract.Data.MIMETYPE + \" = ? AND \" + ContactsContract.CommonDataKinds.StructuredName.LOOKUP_KEY + \" = ?\";\n\t\tString[] whereNameParams = new String[] { ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE, id };\n\t return context.getContentResolver().query(\n\t \t\tContactsContract.Data.CONTENT_URI,\n\t \t\tnew String[] {\tContactsContract.CommonDataKinds.StructuredName.LOOKUP_KEY,\n\t \t\t\t\t\t\tContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,\n\t \t\t\t\t\t\tContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME\n\t \t\t\t\t\t\t},\n\t\t\t whereName, \n\t \t\twhereNameParams, \n\t \t\tnull);\n\t \n\t}", "List<String> getFileSystemEntries(String path) throws IOException;", "public String[] listFc() {\n\t\treturn new String[] { \"component\", \"counterResync\" };\n\t}" ]
[ "0.71101815", "0.70349526", "0.56913495", "0.5380946", "0.525206", "0.5053311", "0.5051247", "0.50504565", "0.5044595", "0.5040266", "0.5030283", "0.5006646", "0.49990928", "0.49911714", "0.49641743", "0.49452916", "0.49300697", "0.49168497", "0.4913453", "0.48762476", "0.48699903", "0.48699903", "0.48690903", "0.48516232", "0.4847854", "0.48451072", "0.48404884", "0.48300263", "0.48297697", "0.4827075", "0.48053622", "0.4784328", "0.47642237", "0.47345835", "0.47264874", "0.47154233", "0.4708428", "0.4695627", "0.46952316", "0.46746266", "0.4673359", "0.46596655", "0.46593675", "0.46551505", "0.46383196", "0.46367902", "0.46248493", "0.4622685", "0.46084136", "0.46065503", "0.45711616", "0.45671272", "0.4556903", "0.45285377", "0.45100027", "0.4508785", "0.45077488", "0.45068005", "0.45062628", "0.4506086", "0.45010456", "0.44986", "0.4496485", "0.44913587", "0.44858068", "0.44790363", "0.4477015", "0.44766456", "0.44752356", "0.4470618", "0.44638345", "0.44544408", "0.44534963", "0.44529206", "0.4452594", "0.44522956", "0.44459534", "0.44436464", "0.4443215", "0.44235057", "0.44174883", "0.44022125", "0.43964303", "0.4395698", "0.43953854", "0.43925336", "0.43897876", "0.43868262", "0.4361533", "0.43604425", "0.43557477", "0.43429375", "0.43395948", "0.43276054", "0.432533", "0.43199855", "0.4304839", "0.4304624", "0.4303981", "0.43028814" ]
0.6222587
2
This method returns an ArrayList of family types currently supported
public static ArrayList<FamilyType> getAvailableFamilies() { ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>(); File dir = new File(getRapidSmithPath() + File.separator + "devices"); if (!dir.exists()) { MessageGenerator.briefErrorAndExit("ERROR: No part files exist. Please run " + Installer.class.getCanonicalName() + " to create part files."); } for (String partFamily : dir.list()) { FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily); if (type != null) allFamilies.add(type); } return allFamilies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String [] getSupportedTypes();", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public SemanticType[] family() {\n return values();\n }", "ImmutableList<SchemaOrgType> getIsFamilyFriendlyList();", "public abstract List<QualifiedName> getAffectedFeatureTypes();", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public List<String> getAvailableDataTypes() {\n Set<String> typeSet = new TreeSet<String>();\n\n ITimer timer = TimeUtil.getTimer();\n timer.start();\n\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n for (ProviderType type : provider.getProviderType()) {\n typeSet.add(type.getDataType().toString());\n }\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the provider list.\", e);\n }\n\n List<String> typeList = new ArrayList<String>(typeSet);\n timer.stop();\n\n return typeList;\n }", "public String[] getFfTypes(){\n return ffc.getFfTypes();\n }", "default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }", "public Type[] types();", "public String[] getTypes() {\n return impl.getTypes();\n }", "UsedTypes getTypes();", "protected static DangerousFileType[] getKnownTypes() {\n return new DangerousFileType[] {\n // Add known file types here\n new DangerousFileType(ASF_TYPE, ASF_EXTENSIONS),\n new DangerousFileType(EXE_TYPE, EXE_EXTENSIONS)\n };\n }", "public List<String> getSupportedObjectTypes() {\n\n\t\tList<String> types = super.getSupportedObjectTypes();\n\t\ttypes.add(OBJECT_TYPE_GROUP);\n\t\treturn types;\n\t}", "TypeInformation<?>[] getQualifierTypes(String family) {\n\t\tMap<String, TypeInformation<?>> qualifierMap = familyMap.get(family);\n\n\t\tif (qualifierMap == null) {\n\t\t\tthrow new IllegalArgumentException(\"Family \" + family + \" does not exist in schema.\");\n\t\t}\n\n\t\tTypeInformation<?>[] typeInformation = new TypeInformation[qualifierMap.size()];\n\t\tint i = 0;\n\t\tfor (TypeInformation<?> typeInfo : qualifierMap.values()) {\n\t\t\ttypeInformation[i] = typeInfo;\n\t\t\ti++;\n\t\t}\n\t\treturn typeInformation;\n\t}", "public abstract String[] getSupportedMediaTypes();", "List<Type> getAllTypeList();", "@Override\n public Set<String> validTypes() {\n return factory.validTypes();\n }", "public List getTypeSpecifiers() {\n return member.getTypeSpecifiers();\n }", "public Set<String> getAvailableTypes() {\n return ApiSpecificationFactory.getTypes();\n }", "public List<SecTyp> getAllTypes();", "@UML(identifier=\"featureType\", obligation=OPTIONAL, specification=ISO_19139)\n Collection<? extends LocalName> getFeatureTypes();", "@Override\n\tpublic ArrayList<Class<?>> getSupportedClassifier() {\n\t\treturn null;\n\t}", "public List<Class<?>> getKnownClasses();", "Set<String> getBaseTypes();", "public List<Optype> getOptypeList() throws Exception {\n\t\treturn mapper.getOptypeList();\n\t}", "List<? extends HasListBox> getAllDataTypes();", "List<CmdType> getSupportedTypes();", "public List<Feature> getSupportedFeatures(String objectType) {\n\t\treturn Arrays.asList(Feature.values());\n\t}", "Collection<StructuralFeature> getTypedFeatures();", "public List<SimpleFeatureType> getCurrentTypes() {\n \tList<SimpleFeatureType> ret = new ArrayList<SimpleFeatureType>();\n \tfor (Set<SimpleFeature> s : typeNameIndex.values()) {\n \t\tif (s.size()>0) {\n \t\t\tret.add( s.iterator().next().getFeatureType() );\n \t\t}\n \t}\n \treturn ret;\n }", "public String[] getTypes() {\n/* 388 */ return getStringArray(\"type\");\n/* */ }", "public List<String> getAllDocumentTypes() {\n\t\tList<String> toReturn = new ArrayList<String>();\n\n\t\tint size = combBoxDocumentTypes.getItemCount();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttoReturn.add((String) combBoxDocumentTypes.getItemAt(i));\n\t\t}\n\n\t\treturn toReturn;\n\t}", "public ResultFormat[] getTypes() {\n\n if (types == null) {\n types = loadFormats();\n }\n return types.clone();\n }", "public List<__Type> getTypes() {\n return (List<__Type>) get(\"types\");\n }", "ImmutableList<SchemaOrgType> getGenreList();", "public List<TypeInfo> getTypes() {\r\n return types;\r\n }", "public Set<MediaType> getSupportedMediaTypes();", "public ArrayList<String> getTypes(){\n return this.types;\n }", "public Iterator getSupportedMechanismTypes() {\n if (mechanisms == null) {\n mechanisms = new Vector(1);\n mechanisms.add(Constants.AXIS_SAX);\n }\n return mechanisms.iterator();\n }", "@Override\n\tpublic List<FoodType> FindAllType() {\n\t\treturn ftb.FindAllType();\n\t}", "java.util.List<UserType>\n getUserTypesList();", "public void addFamilies() {\n GraphicsEnvironment env =\n GraphicsEnvironment.getLocalGraphicsEnvironment();\n family_list = env.getAvailableFontFamilyNames(); /*FAULT:: family_list = new String[10]; */\n for (int i = 0; i < family_list.length; i++) {\n families.addItem(family_list[i]);\n }\n\n\n\n }", "public List<Class<? extends Resource>> getAvailableTypes(OgemaLocale locale);", "public String[] getMimeTypes() {\n/* 187 */ Set types = new HashSet(this.type_hash.keySet());\n/* 188 */ types.addAll(this.fallback_hash.keySet());\n/* 189 */ types.addAll(this.native_commands.keySet());\n/* 190 */ String[] mts = new String[types.size()];\n/* 191 */ mts = (String[])types.toArray((Object[])mts);\n/* 192 */ return mts;\n/* */ }", "public String[] getSupportedFileFormatsList();", "public static Set getValidFamilies()\n {\n if ( validFamilies != null )\n {\n return validFamilies;\n }\n\n Set valid = new HashSet();\n valid.add( FAMILY_DOS );\n valid.add( FAMILY_MAC );\n valid.add( FAMILY_NETWARE );\n valid.add( FAMILY_NT );\n valid.add( FAMILY_OPENVMS );\n valid.add( FAMILY_OS2 );\n valid.add( FAMILY_OS400 );\n valid.add( FAMILY_TANDEM );\n valid.add( FAMILY_UNIX );\n valid.add( FAMILY_WIN9X );\n valid.add( FAMILY_WINDOWS );\n valid.add( FAMILY_ZOS );\n\n return Collections.unmodifiableSet( valid );\n }", "public Collection<String> getSupportedRecordTypes() {\n\t\tif (this.supportedRecordTypes == null){ this.supportedRecordTypes=new ArrayList<>();}\n\t\treturn supportedRecordTypes;\n\t}", "public String[] getAcceptedTypes() {\n\t\tLinkedList<String> typelist = new LinkedList<String>(acceptedEventTypes.keySet());\n\t\tCollections.sort(typelist);\n\t\tString[] result = new String[typelist.size()];\n\t\tint c = 0;\n\t\tfor (String t : typelist) {\n\t\t\tresult[c] = t;\n\t\t\tc++;\n\t\t}\n\t\treturn result;\n\t}", "public List<ResourceBase> listTypes() throws ResourceException;", "public synchronized static Set<String> getAvailableTypes() {\n populateCache();\n return Collections.unmodifiableSet(cache.keySet());\n }", "public List<URI> getType();", "java.util.List<org.mojolang.mojo.lang.NominalType> \n getInheritsList();", "public ArrayList<String> getFileTypes() { return new ArrayList<String>(); }", "public List<Type> getAll();", "public java.util.List<String> getInstanceTypes() {\n if (instanceTypes == null) {\n instanceTypes = new com.amazonaws.internal.SdkInternalList<String>();\n }\n return instanceTypes;\n }", "public java.util.List getMemberTypes()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MEMBERTYPES$2);\n if (target == null)\n {\n return null;\n }\n return target.getListValue();\n }\n }", "public List<ModelType> findAllModelTypes() {\r\n\t\t// sparql\r\n\t\tString sparql = \"SELECT ?modelType WHERE {?modelType rdfs:subClassOf onto:ModelType.}\";\r\n\t\t// test\r\n\t\tString jsonString = findJsonResult(sparql);\r\n\t\tSystem.out.println(\"findAllModelTypes:\" + jsonString);\r\n\t\t// result\r\n\t\tJSONObject json;\r\n\t\ttry {\r\n\t\t\tjson = new JSONObject(jsonString);\r\n\t\t\tJSONArray jsonArray = json.getJSONObject(\"results\").getJSONArray(\"bindings\");\r\n\t\t\tList<ModelType> list = new ArrayList<ModelType>();\r\n\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\tModelType modelType = new ModelType();\r\n\t\t\t\tif (jsonObject.has(\"modelType\")) {\r\n\t\t\t\t\tmodelType.setModelTypeName(jsonObject.getJSONObject(\"modelType\").getString(\"value\").split(\"#\")[1]);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(modelType);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "ImmutableList<SchemaOrgType> getProviderList();", "public ArrayList<GameType> getGameTypes()\r\n {\r\n\treturn new ArrayList<GameType>(gameTypes);\r\n }", "List<Type> getTypeList(String type);", "public Collection getSupportedUIDTypes() {\n return null;\r\n }", "@Override\n public java.util.List<UserType> getUserTypesList() {\n return userTypes_;\n }", "public List<String> getListFontFamily() {\n return Collections.unmodifiableList(this.listFontFamily);\n }", "public Collection<Resolver> getSupports() {\r\n return Collections.unmodifiableCollection(supports);\r\n }", "java.util.List<? extends UserTypeOrBuilder>\n getUserTypesOrBuilderList();", "public static List<String> getallSupertype(\n String forClass\n ) throws ServiceException {\n ModelElement modelElement = modelTypeNames.get(forClass);\n if(modelElement == null) {\n return null;\n } else {\n final List allSupertype = modelElement.allSupertypes;\n return allSupertype;\n }\n }", "ImmutableList<SchemaOrgType> getAccessibilityFeatureList();", "static String[] getAllTypeNames()\n\t{\n\t\treturn new String[] {\"String\", \"int\", \"double\", \"long\", \"boolean\", \"String[]\", \"int[]\", \"double[]\", \"long[]\"};\n\t}", "public static Set<Type> getBiomeTypes() {\n\t\ttry {\n\t\t\tfinal Field accessor = ReflectionHelper.findField(BiomeDictionary.Type.class, \"byName\");\n\t\t\tif (accessor != null) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tfinal Map<String, BiomeDictionary.Type> stuff = (Map<String, BiomeDictionary.Type>) accessor.get(null);\n\t\t\t\treturn new ReferenceOpenHashSet<>(stuff.values());\n\t\t\t}\n\n\t\t\treturn ImmutableSet.of();\n\n\t\t} catch (final Throwable t) {\n\t\t\tthrow new RuntimeException(\"Cannot locate BiomeDictionary.Type table!\");\n\t\t}\n\n\t}", "ImmutableList<SchemaOrgType> getFileFormatList();", "ISourceType[] getMemberTypes();", "@Override\r\n\tpublic List<Type> getTypes() {\n\t\treturn (List<Type>)BaseDao.select(\"select * from type\", Type.class);\r\n\t}", "public java.util.List<google.maps.fleetengine.v1.TripType> getSupportedTripTypesList() {\n return new com.google.protobuf.Internal.ListAdapter<\n java.lang.Integer, google.maps.fleetengine.v1.TripType>(supportedTripTypes_, supportedTripTypes_converter_);\n }", "@Override\n\tpublic List<Type> listType() {\n\t\treturn goodsDao.listType();\n\t}", "List<IFeature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "ImmutableList<SchemaOrgType> getAudioList();", "public java.util.List<java.lang.Integer>\n getSupportedTripTypesValueList() {\n return java.util.Collections.unmodifiableList(supportedTripTypes_);\n }", "@java.lang.Override\n public java.util.List<google.maps.fleetengine.v1.TripType> getSupportedTripTypesList() {\n return new com.google.protobuf.Internal.ListAdapter<\n java.lang.Integer, google.maps.fleetengine.v1.TripType>(supportedTripTypes_, supportedTripTypes_converter_);\n }", "UserType[] getUserTypes();", "public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public List<InstanceType> listInstanceTypes() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(InstanceType.class);\n\t}", "public final ArrayList<Application.ApplicationType> getApplicationTypes() {\n\n\t\t// TODO - check if it works\n\t\tList<String> list = JsUtils.listFromJsArrayString(JsUtils.getNativePropertyArrayString(this, \"applicationTypes\"));\n\t\tArrayList<Application.ApplicationType> result = new ArrayList<Application.ApplicationType>();\n\t\tfor (String s : list) {\n\t\t\tresult.add(Application.ApplicationType.valueOf(s));\n\t\t}\n\t\treturn result;\n\n\t}", "public List getTypes(String attrName) {\n String typeDef = getAttrTypeDef(attrName); // does toLower()\n return AttrType.attrTypeListForTypeDef(typeDef);\n }", "java.util.List<org.landxml.schema.landXML11.ClassificationDocument.Classification> getClassificationList();", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "public Set<TypeDescriptor> getAllRelatedTypes() {\n final var types = getTypeParameters().stream()\n .flatMap(type -> type.getAllRelatedTypes().stream())\n .collect(Collectors.toCollection(HashSet::new));\n\n types.add(this);\n return types;\n }", "String[] getQualifierNames(String family) {\n\t\tMap<String, TypeInformation<?>> qualifierMap = familyMap.get(family);\n\n\t\tif (qualifierMap == null) {\n\t\t\tthrow new IllegalArgumentException(\"Family \" + family + \" does not exist in schema.\");\n\t\t}\n\n\t\tString[] qualifierNames = new String[qualifierMap.size()];\n\t\tint i = 0;\n\t\tfor (String qualifier: qualifierMap.keySet()) {\n\t\t\tqualifierNames[i] = qualifier;\n\t\t\ti++;\n\t\t}\n\t\treturn qualifierNames;\n\t}", "public java.util.List<UserType> getUserTypesList() {\n if (userTypesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(userTypes_);\n } else {\n return userTypesBuilder_.getMessageList();\n }\n }", "public static List<String> getSupportedGraphics()\n {\n List<String> graphics = new ArrayList<String>();\n graphics.addAll(getTacGrpGraphics());\n graphics.addAll(getMetocGraphics());\n graphics.addAll(getEmsGraphics());\n return graphics;\n }", "public java.util.List<UserType.Builder>\n getUserTypesBuilderList() {\n return getUserTypesFieldBuilder().getBuilderList();\n }", "public final CompositeType[] getCompositeTypes()\n {\n CompositeType[] names = new CompositeType[listModel.size()];\n\tfor(int i=0; i<names.length; i++) {\n\t names[i] = (CompositeType) listModel.elementAt(i);\n\t}\n\treturn names;\n }", "public Vector getMimeTypes()\n\tthrows SdpException {\n\tMediaField mediaField = (MediaField)getMedia();\n\tString type = mediaField.getMediaType();\n\tString protocol = mediaField.getProtocol();\n\tVector formats = mediaField.getMediaFormats(false);\n \n\tVector v = new Vector();\n\tfor (int i = 0; i < formats.size(); i++) {\n\t String result = null;\n\t if (protocol.equals(\"RTP/AVP\")) {\n\t\tif (getAttribute(SdpConstants.RTPMAP) != null)\n\t\t result = type + \"/\"+protocol;\n\t\telse {\n \n\t\t}\n\t } else\n\t\tresult = type + \"/\" + protocol;\n\t v.addElement(result);\n\t}\n\treturn v;\n }", "public List<Preference<MediaType>> getAcceptedMediaTypes() {\n // Lazy initialization with double-check.\n List<Preference<MediaType>> a = this.acceptedMediaTypes;\n if (a == null) {\n synchronized (this) {\n a = this.acceptedMediaTypes;\n if (a == null) {\n this.acceptedMediaTypes = a = new ArrayList<Preference<MediaType>>();\n }\n }\n }\n return a;\n }", "@Override\r\n public String[] listMimeTypes() {\r\n return new String[]{\r\n \"text/xml\"\r\n };\r\n }", "protected DataFlavor[] getRicherFlavors() {\n if (richText == null) {\n return null;\n }\n\n try {\n DataFlavor[] flavors = new DataFlavor[3];\n flavors[0] = new DataFlavor(mimeType + \";class=java.lang.String\");\n flavors[1] = new DataFlavor(mimeType + \";class=java.io.Reader\");\n flavors[2] = new DataFlavor(mimeType + \";class=java.io.InputStream;charset=unicode\");\n return flavors;\n } catch (ClassNotFoundException cle) {\n // fall through to unsupported (should not happen)\n }\n\n return null;\n }", "public Collection<DasType> getTypes() throws DataSourceException {\n Collection<DasType> types = new ArrayList<DasType>(5);\n types.add(new DasType(\"gene\", \"gene\", \"Gene description\"));\n types.add(new DasType(\"efv\", \"efv\", \"Experiment factor value\"));\n types.add(new DasType(\"exp\", \"exp\", \"Experiment\"));\n return types;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }" ]
[ "0.73458916", "0.7291303", "0.703097", "0.6737232", "0.6731121", "0.66314155", "0.66041887", "0.64750946", "0.64611423", "0.6411751", "0.640337", "0.63609535", "0.6359856", "0.6287064", "0.6284606", "0.6254312", "0.6240989", "0.6231487", "0.6225156", "0.62140536", "0.61997145", "0.61884755", "0.61707664", "0.61626786", "0.6148859", "0.61427504", "0.61418027", "0.61075914", "0.6076282", "0.6061203", "0.60381526", "0.6026732", "0.6024705", "0.6020738", "0.60147315", "0.60087013", "0.59918237", "0.5989948", "0.5979973", "0.59745365", "0.59549093", "0.5905475", "0.58923024", "0.5884542", "0.5880196", "0.58788383", "0.5865256", "0.58601785", "0.58518565", "0.5847974", "0.58445877", "0.5816589", "0.581245", "0.5802848", "0.5799821", "0.57737553", "0.57656944", "0.57564294", "0.57489425", "0.5737765", "0.5733298", "0.5718301", "0.5712693", "0.5711066", "0.5705024", "0.56878257", "0.56780845", "0.5676212", "0.56743085", "0.5665838", "0.56556034", "0.56546026", "0.5651872", "0.5647029", "0.564614", "0.56312287", "0.5630349", "0.5630349", "0.56190634", "0.5618831", "0.5618306", "0.5610384", "0.55905914", "0.5580902", "0.55791724", "0.5578644", "0.55612624", "0.55510634", "0.5541445", "0.55378175", "0.55377805", "0.5535145", "0.55323446", "0.55322635", "0.553064", "0.55281496", "0.55275244", "0.551757", "0.5517447", "0.5516293" ]
0.64721787
8
Looks at the current device file for the part name specified and retrieves its current device version.
public static String getDeviceVersion(String partName) { String fileName = getDeviceFileName(partName); String version; try { Hessian2Input his = FileTools.getInputStream(fileName); version = his.readString(); his.close(); } catch (FileNotFoundException e) { return null; } catch (IOException e) { return null; } return version; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade(partName);\n Device device = Device.getInstance(canonicalName);\n String path = getDeviceFileName(canonicalName);\n\n // Don't reload the device if same part is already loaded\n if (device.getPartName() != null) {\n return device;\n }\n\n if (!device.readDeviceFromCompactFile(path)) {\n return null;\n } else {\n return device;\n }\n }", "public static String getCurrentProgramVersionInfo() {\n String versionText = \"V15.08\";\n String versionFilename = \"version.txt\";\n URL versionUrl = ExplodeTcpMonMessages.class.getResource(versionFilename);\n InputStream versionInputStream = null;\n if ( versionUrl != null ) {\n try {\n versionInputStream = versionUrl.openStream();\n int count;\n int bufferSize = 256;\n byte data[] = new byte[bufferSize];\n while ((count = versionInputStream.read(data, 0, bufferSize)) != -1) {\n String value = new String(data,0,count);\n if ( value != null && !\"\".equals(value) ) {\n int iPos = value.indexOf(\"\\n\");\n if ( iPos > 0 ) {\n value = value.substring(0, iPos).trim();\n }\n iPos = value.indexOf(\"\\r\");\n if ( iPos > 0 ) {\n value = value.substring(0, iPos).trim();\n }\n iPos = value.indexOf(\".\");\n if ( iPos == 4 ) {\n versionText = \"V\" + value.substring(2).trim();\n } else if ( iPos > 0 ) {\n versionText = \"V\" + value.trim();\n }\n }\n }\n versionInputStream.close();\n } catch ( Exception ce ) {\n ce.printStackTrace();\n return versionText; // Version cannot be loaded\n }\n }\n return versionText;\n }", "public static String getVersion() {\n\t\t String data = \"\";\n\t\ttry {\n\t\t File myObj = new File(rootdir+\"/version.txt\");\n\t Scanner myReader = new Scanner(myObj);\n\t while (myReader.hasNextLine()) {\n\t data = myReader.nextLine();\n\t break;\n\t }\n\t myReader.close();\n\t return data;\n\t } catch (FileNotFoundException e) {\n\t \tSystem.out.println(\"An error occurred.\");\n\t \te.printStackTrace();\n\t }\n\t\treturn null;\n\t}", "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n PartNameTools.removeSpeedGrade(partName) +\n deviceFileSuffix;\n }", "public static synchronized String getVersion(String name) {\r\n try {\r\n Document doc = getDocument();\r\n Element root = doc.getRootElement();\r\n Iterator iter = root.elementIterator(\"product\");\r\n while (iter.hasNext()) {\r\n Element product = (Element)iter.next();\r\n if (product.attributeValue(\"name\").equals(name)) {\r\n return product.attributeValue(\"version\");\r\n }\r\n }\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public static String getVersion() {\n\n try {\n //Open file\n ClassLoader classLoader = new ResourceLoader().getClass().getClassLoader();\n File file = new File(classLoader.getResource(RELEASE_NOTES).getFile());\n //Read File Content\n String content = new String(Files.readAllBytes(file.toPath()));\n content = content.split(\"VERSION \")[1]; //version number comes after VERSION\n content = content.split(\"\\n\")[0]; //and before the next new line\n return content;\n } catch (IOException ex) {\n Logger.getLogger(ResourceLoader.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n\n }", "public String getFoundVersion() {\r\n\t\treturn this.fnd;\r\n\t}", "public void getSelectedPart(Part selectedPart){\n this.part = selectedPart;\n if(selectedPart instanceof InHouse){\n labelPartSource.setText(\"Machine ID\");\n InHouse inHouse = (InHouse)selectedPart;\n ModPartIDField.setText(Integer.toString(inHouse.getId()));\n ModPartNameField.setText(inHouse.getName());\n ModPartInventoryField.setText(Integer.toString(inHouse.getStock()));\n ModPartPriceField.setText(Double.toString(inHouse.getPrice()));\n ModPartMaxField.setText(Integer.toString(inHouse.getMax()));\n ModPartMinField.setText(Integer.toString(inHouse.getMin()));\n partSourceField.setText(Integer.toString(inHouse.getMachineId()));\n inHouseRadBtn.setSelected(true);\n } else if (selectedPart instanceof Outsourced){\n labelPartSource.setText(\"Company Name\");\n Outsourced outsourced = (Outsourced) selectedPart;\n ModPartIDField.setText(Integer.toString(outsourced.getId()));\n ModPartNameField.setText(outsourced.getName());\n ModPartInventoryField.setText(Integer.toString(outsourced.getStock()));\n ModPartPriceField.setText(Double.toString(outsourced.getPrice()));\n ModPartMaxField.setText(Integer.toString(outsourced.getMax()));\n ModPartMinField.setText(Integer.toString(outsourced.getMin()));\n partSourceField.setText(outsourced.getCompanyName());\n OutsourcedRadBtn.setSelected(true);\n }\n }", "public Object getPart(String partName);", "private static String getKernelVersion() {\n String procVersionStr;\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(\"/proc/version\"), 256);\n try {\n procVersionStr = reader.readLine();\n }\n finally {\n reader.close();\n }\n\n if (procVersionStr == null) {\n FLog.e(TAG, \"Unable to read the kernel version!\");\n return \"N/A\";\n }\n\n return procVersionStr;\n }\n catch (IOException e) {\n FLog.e(TAG, \"Getting kernel version failed\", e);\n return \"N/A\";\n }\n }", "public static synchronized String getVersionDate(String name) {\r\n try {\r\n Document doc = getDocument();\r\n Element root = doc.getRootElement();\r\n Iterator iter = root.elementIterator(\"product\");\r\n while (iter.hasNext()) {\r\n Element product = (Element)iter.next();\r\n if (product.attributeValue(\"name\").equals(name)) {\r\n return product.attributeValue(\"date\");\r\n }\r\n }\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public static WTPart getPartByNumber(String sPartNumber) throws WTException \r\n\t{\n\t QuerySpec qs = new QuerySpec(WTPart.class);\r\n\t SearchCondition condition = new SearchCondition(WTPart.class, WTPart.NUMBER, SearchCondition.EQUAL, sPartNumber);\r\n\t qs.appendWhere(condition, new int[]{0});\r\n\t QueryResult qr = PersistenceHelper.manager.find((StatementSpec)qs);\r\n\t WTPart part = null;\r\n\t WTPart part2 = null;\r\n\t\twhile(qr.hasMoreElements())\r\n\t\t{\r\n\t\t\tpart = (WTPart)qr.nextElement();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif(part != null)\r\n\t\t{\r\n\t\t\tQueryResult qr2 = VersionControlHelper.service.allVersionsOf(part);\r\n\t\t\tpart2= (WTPart)qr2.nextElement();\r\n\t\t}\r\n\t\t\r\n\t\treturn part2;\r\n\t}", "private void getVersionName(String packageName) {\n String versionName = \"\";\n //Get the current App Version\n try {\n PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);\n versionName = packageInfo.versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n\n\n final String finalVersionName = versionName;\n Observable<String> versionObserver = VersionInfo.getInstance().isUpdateAvailable(packageName, this);\n if (versionObserver == null) {\n Toast.makeText(this, \"Package => \" + packageName + \" not found on Play Store\", Toast.LENGTH_SHORT).show();\n return;\n }\n versionObserver.subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Observer<String>() {\n @Override public void onCompleted() {\n\n }\n\n @Override public void onError(Throwable e) {\n e.printStackTrace();\n }\n\n @Override public void onNext(String s) {\n if (s != null && !s.isEmpty()) {\n mTextViewVersionInfo.setText(s);\n //Version class will help us to compare two different versions\n Version currentVersion = new Version(finalVersionName);\n Version playStoreVersion = new Version(s);\n\n\n\n if (currentVersion.compareTo(playStoreVersion) == -1) {\n //A new Version is available\n //TODO SHOW UPDATE DIALOG\n } else {\n //No Update Available\n //TODO No Dialog Required\n }\n }\n }\n });\n }", "public String getKernelVersion() {\n String procVersionStr;\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(\"/proc/version\"), 256);\n try {\n procVersionStr = reader.readLine();\n } finally {\n reader.close();\n }\n\n final String PROC_VERSION_REGEX = \"\\\\w+\\\\s+\" + /* ignore: Linux */\n \"\\\\w+\\\\s+\" + /* ignore: version */\n \"([^\\\\s]+)\\\\s+\" + /* group 1: 2.6.22-omap1 */\n \"\\\\(([^\\\\s@]+(?:@[^\\\\s.]+)?)[^)]*\\\\)\\\\s+\" + /* group 2: ([email protected]) */\n \"\\\\((?:[^(]*\\\\([^)]*\\\\))?[^)]*\\\\)\\\\s+\" + /* ignore: (gcc ..) */\n \"([^\\\\s]+)\\\\s+\" + /* group 3: #26 */\n \"(?:PREEMPT\\\\s+)?\" + /* ignore: PREEMPT (optional) */\n \"(.+)\"; /* group 4: date */\n\n Pattern p = Pattern.compile(PROC_VERSION_REGEX);\n Matcher m = p.matcher(procVersionStr);\n\n if (!m.matches()) {\n Log.print(\"Regex did not match on /proc/version: \" + procVersionStr);\n return \"Unavailable\";\n } else if (m.groupCount() < 4) {\n Log.print(\"Regex match on /proc/version only returned \" + m.groupCount()\n + \" groups\");\n return \"Unavailable\";\n } else {\n return (new StringBuilder(m.group(1)).append('\\n').append(m.group(2)).append(' ')\n .append(m.group(3)).append('\\n').append(m.group(4))).toString();\n }\n } catch (IOException e) {\n Log.print(\"IO Exception when getting kernel version for Device Info screen\\n\" + e);\n\n return \"Unavailable\";\n }\n }", "public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }", "public static String getVersion(FileSystem fs, Path rootdir)\n throws IOException, DeserializationException {\n final Path versionFile = new Path(rootdir, HConstants.VERSION_FILE_NAME);\n FileStatus[] status = null;\n try {\n // hadoop 2.0 throws FNFE if directory does not exist.\n // hadoop 1.0 returns null if directory does not exist.\n status = fs.listStatus(versionFile);\n } catch (FileNotFoundException fnfe) {\n return null;\n }\n if (ArrayUtils.getLength(status) == 0) {\n return null;\n }\n String version = null;\n byte[] content = new byte[(int) status[0].getLen()];\n FSDataInputStream s = fs.open(versionFile);\n try {\n IOUtils.readFully(s, content, 0, content.length);\n if (ProtobufUtil.isPBMagicPrefix(content)) {\n version = parseVersionFrom(content);\n } else {\n // Presume it pre-pb format.\n try (DataInputStream dis = new DataInputStream(new ByteArrayInputStream(content))) {\n version = dis.readUTF();\n }\n }\n } catch (EOFException eof) {\n LOG.warn(\"Version file was empty, odd, will try to set it.\");\n } finally {\n s.close();\n }\n return version;\n }", "public CimString getFullVersion() {\n return fullVersion;\n }", "@Override\n\tpublic PartInfo getPartInfoBy(long partId) {\n\t\treturn this.simpleDao.getPartInfoBy(partId);\n\t}", "public void getNXCurrentVersion() {\n //Validating if NX kernel is installed.\n if (kernelname.length() > 11 && kernelname.length() < 14 && kernelname.substring(7, 9).equals(\"NX\")) {\n kernelversion = kernelname.substring(11); //Shorting the kernel to only show the version.\n ckernel = Integer.parseInt(kernelversion);\n currentVersion.setText(\"R\" + kernelversion);\n } else {\n currentVersion.setText(R.string.cvError);\n currentVersion.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);\n }\n }", "public String getProductVersion();", "private int getMeasurementVersion(String measurement) {\n synchronized (measurementVersions) {\n if (measurementVersions.containsKey(measurement)) {\n return measurementVersions.get(measurement);\n }\n \n // This should never be necessary, unless the measurement does not exist.\n int value = integerQuery(\"measurements\", \"version\", \"name = ?\", new String[] {measurement}, 0);\n measurementVersions.put(measurement, value);\n return value;\n }\n }", "@Override\n\tpublic ArrayList<Product> findByName(String partName) {\n\t\tArrayList<Product> p = productRepository.findProductByName(partName);\n\t\treturn p;\n\t}", "private static String getGrassVersion() {\r\n\r\n final String sFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);\r\n InputStreamReader isr = null;\r\n BufferedReader br = null;\r\n try {\r\n final File file = new File(sFolder + File.separator + \"etc\" + File.separator + \"VERSIONNUMBER\");\r\n isr = new InputStreamReader(new FileInputStream(file));\r\n br = new BufferedReader(isr);\r\n final String sLine = br.readLine().trim();\r\n return (sLine);\r\n }\r\n catch (final Exception e) {\r\n return (null);\r\n }\r\n finally {\r\n try {\r\n br.close();\r\n isr.close();\r\n }\r\n catch (final Exception e) {\r\n return (null);\r\n }\r\n }\r\n }", "public String getFirmware() {\n\t\treturn \"2.1.0\";\n\t}", "public char[] os_custom_version_GET()\n {return os_custom_version_GET(new char[8], 0);}", "public int getFileVersion() {\n\n return fileVersion;\n\n }", "public String getSoftwareDriverVersion();", "public static String getOsFirmwareDate() throws IOException, InterruptedException, ParseException {\n \treturn pi4jSystemInfoConnector.getOsFirmwareDate();\r\n }", "int getCurrentVersion();", "public void checkFirmwareVersion()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfor (SensorData sensorData : sCollect.getList())\n\t\t\t{\n\t\t\t\tif (sensorData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t\t{\n\t\t\t\t\tif (!ConnectionManager.getInstance().currentSensor(0).getFirwareVersion()\n\t\t\t\t\t\t\t.equals(sensorData.getFirmware()))\n\t\t\t\t\t{\n\t\t\t\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"firmware\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}catch (SensorNotFoundException e){\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t\t\n\n\t}", "private String getRevision() {\r\n Properties p = new Properties();\r\n try{\r\n String toolsdir = System.getProperty(Main.TOOLSDIR);\r\n File sourceProp;\r\n if (toolsdir == null || toolsdir.length() == 0) {\r\n sourceProp = new File(SdkConstants.FN_SOURCE_PROP);\r\n } else {\r\n sourceProp = new File(toolsdir, SdkConstants.FN_SOURCE_PROP);\r\n }\r\n FileInputStream fis = null;\r\n try {\r\n fis = new FileInputStream(sourceProp);\r\n p.load(fis);\r\n } finally {\r\n if (fis != null) {\r\n try {\r\n fis.close();\r\n } catch (IOException ignore) {\r\n }\r\n }\r\n }\r\n\r\n String revision = p.getProperty(PkgProps.PKG_REVISION);\r\n if (revision != null) {\r\n return revision;\r\n }\r\n } catch (FileNotFoundException e) {\r\n // couldn't find the file? don't ping.\r\n } catch (IOException e) {\r\n // couldn't find the file? don't ping.\r\n }\r\n\r\n return \"?\";\r\n }", "public Part getPart(String name) throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form.getPart(name);\n }", "private static String getVersion() throws IOException {\n URL res = Main.class.getResource(\"/META-INF/MANIFEST.MF\");\n if(res!=null) {\n Manifest manifest = new Manifest(res.openStream());\n String v = manifest.getMainAttributes().getValue(\"Implementation-Version\");\n if(v!=null)\n return v;\n }\n return \"?\";\n }", "String getPartWithPort();", "private void testGetVersion() {\r\n\t\t\r\n\t\t// Get the value from the pointer\r\n\t\tPointer hEngine = this.phEngineFD.getValue();\r\n\t\tSystem.out.println(hEngine);\r\n\t\t\r\n\t\t// Get the version information from the engine\r\n\t\tAFD_FSDK_Version version = AFD_FSDK_Library.INSTANCE.AFD_FSDK_GetVersion(hEngine);\r\n\t\tSystem.out.println(version);\r\n\t}", "private String getVersionName() {\n\n\t\tString versionName = \"\";\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager\n\t\t\t\t\t.getPackageInfo(getPackageName(), 0);// 获取包的内容\n\t\t\t// int versionCode = packageInfo.versionCode;\n\t\t\tversionName = packageInfo.versionName;\n\t\t\tSystem.out.println(\"versionName = \" + versionName);\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn versionName;\n\t}", "public long getVersion(){\n return localVersion;\n }", "public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}", "public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}", "public int GetFirmwareRev() { // (simple test of getting Arduino input)\r\n int g0 = 0, g1 = 0, g2 = 0, prio = GotFirmVersion, why = -1;\r\n String gottem = \"\";\r\n byte[] reply = null;\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/GetFirmRev..\"); // SpeakEasy=true\r\n }\r\n GotFirmVersion = 0; // so we know we got most recent result\r\n Send3bytes(Arduino.REPORT_VERSION, 1, 2); // = 0xF9 (249)\r\n try {\r\n Thread.sleep(1000); // delay 1 second -- give it time to respond\r\n if (surrealPort.getInputBufferBytesCount() > 0){ // if (GetFirmData)\r\n reply = surrealPort.readBytes(3);\r\n }\r\n if (reply != null) { // we caught it before ProcessInp..\r\n if (reply.length > 0) {\r\n g0 = reply[0];\r\n gottem = \" => \" + g0;\r\n } //~if\r\n if (reply.length > 1) {\r\n g1 = reply[1];\r\n gottem = gottem + \" \" + g1;\r\n } //~if\r\n if (reply.length > 2) {\r\n g2 = reply[2];\r\n gottem = gottem + \" \" + g2;\r\n } //~if\r\n why = reply.length;\r\n } //~if\r\n if (GotFirmVersion > 0) { // ProcessInp got it..\r\n g1 = GotFirmVersion >> 16;\r\n g2 = GotFirmVersion & 0xFFF;\r\n g0 = Arduino.REPORT_VERSION;\r\n gottem = \" => \" + g0 + \" \" + g1 + \" \" + g2;\r\n why = 7;\r\n } //~if\r\n else if ((g0 & 255) == Arduino.REPORT_VERSION){\r\n GotFirmVersion = (g1 << 16) + (g2 & 0xFFFF);\r\n } // large Java bytes -> <0\r\n if (why >= 3) {\r\n if (SpeakEasy) {\r\n if (GotFirmVersion == 0) {\r\n System.out.println(\" **F%%F/GotWhatever**\" + gottem\r\n + \" = \" + ((g2 << 7) + g1) + \" (\" + why + \")\");\r\n GotFirmVersion = prio;\r\n } //~if\r\n else System.out.println(\" (F%%F/GetFirmRev)\" + gottem);\r\n } //~if\r\n return GotFirmVersion;\r\n } //~if\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n if (SpeakEasy){\r\n System.out.println(\" (F%%F/GetFirmRev)? = \" + why + gottem);\r\n }\r\n return GotFirmVersion;\r\n }", "public String getVersionNum();", "public int getFileVersion() {\r\n\t\treturn this.fileVersion;\r\n\t}", "private String getValue(Part part) {\n\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\ttry (BufferedReader reader = new BufferedReader(new InputStreamReader(part.getInputStream()));) {\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "String getLatestVersion(long padId);", "public char[] flight_custom_version_GET()\n {return flight_custom_version_GET(new char[8], 0);}", "default String getVersion()\n {\n return getString( \"version\", \"Unknown Version\");\n }", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "java.lang.String getWindowsVersion();", "public static String getOsFirmwareBuild() throws IOException, InterruptedException {\n return pi4jSystemInfoConnector.getOsFirmwareBuild();\r\n }", "public byte[] Bldr_version() {return bldr_version;}", "@Resource(resourceId = 2216, operation = Operation.Read)\n public Long readVolume()\t{\n ActionInvocation actionInvocation =\n new ActionInvocation(renderingControlService.getAction(ACTION_GET_VOLUME));\n actionInvocation.setInput(ARG_INSTANCE_ID, new UnsignedIntegerFourBytes(0));\n actionInvocation.setInput(ARG_CHANNEL, VALUE_CHANNEL_MASTER);\n Map<String, ActionArgumentValue> output = UpnpController.getInstance().executeUpnpAction(actionInvocation);\n return ((UnsignedIntegerTwoBytes)output.get(ARG_CURRENT_VOLUME).getValue()).getValue();\n }", "@Override\n\tpublic String findLatestVersion(String curversion) {\n\t\treturn versionDao.findLatestVersion(curversion);\n\t}", "public org.hl7.fhir.String getVersion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().find_element_user(VERSION$4, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getBuildVersion() {\n try {\n Properties versionFileProperties = new Properties();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(\"version.properties\");\n if (inputStream != null) {\n versionFileProperties.load(inputStream);\n return versionFileProperties.getProperty(\"version\", \"\") + \" \" + versionFileProperties.getProperty(\"timestamp\", \"\");\n }\n } catch (IOException e) {\n Logger.getLogger(OnStartup.class.getName()).log(Level.SEVERE, null, e);\n }\n return \"\";\n }", "private String m5297b() {\n String str = \"\";\n try {\n return getPackageManager().getPackageInfo(getPackageName(), 0).versionName;\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n return str;\n }\n }", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "public String version() throws CallError, InterruptedException {\n return (String)service.call(\"version\").get();\n }", "CompletableFuture<String> getHardwareRevision();", "public String getVersion()\n {\n //\n // Send EFFECT_CMD_GET_PARAM\n //\n int verLen = 32;\n byte[] version = new byte[verLen];\n getParameter(EFFECT_PARAM_VERSION, version);\n String strFull = new String(version);\n // find the '\\0' in c/c++ format\n int endPos = strFull.indexOf(0);\n String strVer = new String(version, 0, endPos);\n return strVer;\n }", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "@Test\n void versionFirst() throws URISyntaxException, IOException {\n String parsedVersion = Files.readString(Paths.get(SDKTest.class.getResource(\"/shogun/version-first.txt\").toURI()));\n String version = new SDK().parseSDKVersion(parsedVersion);\n assertEquals(\"SDKMAN 5.7.3+337\", version);\n }", "public String getPartNumber()\r\n {\r\n return partNumber; // should validate\r\n }", "String offerVersion();", "public static native int getUBootEnvVersion(byte[] info);", "com.microsoft.schemas.office.x2006.digsig.STVersion xgetWindowsVersion();", "private void checkUpdateAvailability() {\n\t\t\n\t\t// Grab the data from the device and manifest\n\t\tString currentVersion = Utils.getProp(\"ro.ota.version\");\n\t\tcurrentVersion = currentVersion.replaceAll(\"[^0-9]\", \"\"); // Strip anyhting not a number\n\t\tString manifestVer = results.getVersion();\n\t\tmanifestVer = manifestVer.replaceAll(\"[^0-9]\", \"\");\n\n\t\t// Parse ints\n\t\tint manifestNumber = Integer.parseInt(manifestVer);\n\t\tint currentNumber = Integer.parseInt(currentVersion);\n\t\t\n\t\t// Pad out to be at least 5 digits long\n\t\t// That way, 1.2 shows bigger than 1.1.1\n\t\t// Because 12000 > 11100\n\t\t// Without this it would show 12 > 111\n\t\tif(manifestVer.length() <= 2){\n\t\t\tmanifestNumber *= 1000;\n\t\t} else if(manifestVer.length() <= 3) {\n\t\t\tmanifestNumber *= 100;\n\t\t} else if(manifestVer.length() <= 4) {\n\t\t\tmanifestNumber *= 10;\n\t\t}\n\t\t\n\t\t// Same again\n\t\tif(currentVersion.length() <= 2){\n\t\t\tcurrentNumber *= 1000;\n\t\t} else if(currentVersion.length() <= 3) {\n\t\t\tcurrentNumber *= 100;\n\t\t} else if(currentVersion.length() <= 4) {\n\t\t\tcurrentNumber *= 10;\n\t\t}\n\t\t\n\t\t// Set pref\n\t\tPreferences.setUpdateAvailable(mContext, manifestNumber > currentNumber);\n\t}", "public String getPartNo(){\n\t\treturn partNo;\n\t}", "private File getDeploymentDescriptorFile(String applicationShortName) {\n\t\t\n\t\tString deploymentDescriptorFile = Configuration.getDeploymentDescriptorFile();\n\t\tif (deploymentDescriptorFile != null ) {\n\t\t\tFile file = new File(deploymentDescriptorFile);\n\t\t\tif (! file.exists()){\n\t\t\t\tthrow new RuntimeException(\"DeploymentDescriptor file '\"+file.getAbsolutePath()+\"' specified with property '\"+Configuration.DEPLOYMENT_CONFIG_DEPLOYMENT_DESCRIPTOR+\"' does not exist.\");\n\t\t\t}\n\t\t\treturn file;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif (!Configuration.isDontCheckoutDeploymentDescriptorsFolder()) {\n\t\t\t\tlog.debug(\"Checking out deployment descriptor files\");\n\t\t\t EMGitManager.checkoutRemoteEnvironmentDeploymentDescriptorsFiles();\n\t\t\t}\n\t\t\t\n\t\t\tFile ddDir = new File(Configuration.getLocalEnvironmentDeploymentDescriptorsCheckoutDir());\n\t\t\t//find the right directory\n\t\t\tString shortName = getApplicationVersion(applicationShortName).getApplication().getShortName();\n\t\t\tString version = getApplicationVersion(applicationShortName).getVersion();\n\t\t\t\n\t\t\tlog.debug(String.format(\"Shortname:%s Version:%s\", shortName, version));\n\t\t\tFile directory = new File(ddDir, shortName);\n\t\t\tif (!directory.exists()) {\n\t\t\t\tthrow new RuntimeException(\"Cannot find deployment descriptor sub-directory for applicaitons with a shot name of '\"+shortName+\"'.. There should be a subfolder of '\"+ddDir.getAbsolutePath()+\"' with the same name as the application short name of the application being deployed and the deployment descriptors for that application should be in there.\");\n\t\t\t}\n\t\t\tFile[] possibleFiles = directory.listFiles();\n\t\t\t\n\t\t\tFile currentSelectedDD = null;\n\t\t\t\n\t\t\tMap<String, File> orderedDDs = orderDDsByMinVersion(possibleFiles, applicationShortName);\n\t\t\t\n\t\t\t// Loop through DDs is ascending minApplicationVersion order\n\t\t\tfor (String minVersion : orderedDDs.keySet()) {\n\t\t\t\tVersionCompare versionCompare = new VersionCompare();\n\t\t\t\tlog.debug(String.format(\"Comparing: '%s' '%s'\", version, minVersion));\n\t\t\t\tint result = versionCompare.compare(version, minVersion);\n\t\t\t\tlog.debug(String.format(\"Compare Result: %s\", result));\t\t\t\n\t\t\t\t\n\t\t\t\tif (result < 0) {\n\t\t\t\t\t// This version is less than the minimum version supported by the descriptor we are looking at.\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t// This version is supported by the deployment descriptor\n\t\t\t\t\tlog.debug(String.format(\"Setting file: %s MinVersion: %s\", orderedDDs.get(minVersion).getAbsolutePath(), minVersion));\n\t\t\t\t\tcurrentSelectedDD = orderedDDs.get(minVersion);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tif (currentSelectedDD == null) {\n\t\t\t\tthrow new RuntimeException(\"Could not find a suitable deployment descriptor.\");\n\t\t\t}\n\t\t\t\n\t\t\treturn currentSelectedDD;\n\t\t}\n\t}", "int getVendorListVersion();", "private static String getAppVersionNumber(Context c) {\n String version = \"N/A\";\n try {\n final PackageManager packageManager = c.getPackageManager();\n if (packageManager == null) {\n return version;\n }\n\n PackageInfo packageInfo = packageManager.getPackageInfo(c.getPackageName(), 0);\n version = packageInfo.versionName;\n }\n catch (Exception e) {\n FLog.e(TAG, \"Unable to read the app version!\", e);\n }\n\n return version;\n }", "String getDeviceName();", "public String getPartNumber(int partNumber){\n if(partNumbers.size() > partNumber) return partNumbers.get(partNumber);\n else return null;\n }", "public Path resolve(String part) {\n return Paths.get(part);\n }", "public static String getStringVersion() throws IOException {\n return \"0.0.1\";//attr.getValue(\"Implementation-Version\");\n }", "public void checkForUpdate(String currentVersion);", "public static String obtenerversionApp(Context context){\n String respuesta=\"\";\n try {\n PackageInfo packageInfo=context.getPackageManager().getPackageInfo(context.getPackageName(),0);\n respuesta=packageInfo.versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n return respuesta;\n }", "com.microsoft.schemas.office.x2006.digsig.STVersion xgetApplicationVersion();", "public static String getVersionInfo() {\n return getCommonManifestEntry(getJarPathFromClassPath(getAppJarName()),null);\n }", "public String getCurrentVersion() {\n return this.currentVersion;\n }", "@Override\n public IndexPartStatistics getIndexPartStatistics(String part) {\n IndexPartStatistics stats = this.currentMemoryIndex.getIndexPartStatistics(part);\n for (DiskIndex di : this.geometricParts.getIndexes()) {\n stats.add(di.getIndexPartStatistics(part));\n }\n // fix the part name\n stats.partName = part;\n return stats;\n }", "private static String getVerName(Context context) {\r\n String verName = \"unKnow\";\r\n try {\r\n verName = context.getPackageManager().\r\n getPackageInfo(context.getPackageName(), 0).versionName;\r\n } catch (PackageManager.NameNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n return verName;\r\n }", "public static String getVersionInfo(String pmaCoreURL) {\n\t\tif (pmaCoreURL == null) {\n\t\t\tpmaCoreURL = pmaCoreLiteURL;\n\t\t}\n\t\tString url = PMA.join(pmaCoreURL, \"api/json/GetVersionInfo\");\n\t\tString version = null;\n\t\tif (PMA.debug) {\n\t\t\tSystem.out.println(url);\n\t\t}\n\t\ttry {\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\tPMA.logger.severe(\"getVersionInfo failed : \" + jsonResponse.get(\"Message\"));\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Exception(\"getVersionInfo failed : \" + jsonResponse.get(\"Message\"));\n\t\t\t\t} else if (jsonResponse.has(\"d\")) {\n\t\t\t\t\tversion = jsonResponse.getString(\"d\");\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tversion = jsonString.replaceAll(\"\\\"$|^\\\"\", \"\");\n\t\t\t}\n\n\t\t\tif (version.startsWith(\"3.0\")){\n\t\t\t\tString revision = getBuildRevision(pmaCoreURL);\n\t\t\t\tif (!revision.isEmpty()){\n\t\t\t\t\tversion += \".\" + revision;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn version;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "public String getVersion()\n {\n return ver;\n }" ]
[ "0.6280809", "0.59067", "0.5833997", "0.5789312", "0.57692987", "0.55176586", "0.54400474", "0.532904", "0.530477", "0.519708", "0.5170874", "0.51291424", "0.51126647", "0.509921", "0.50729316", "0.5063867", "0.5043052", "0.5025811", "0.50200605", "0.5018973", "0.50040096", "0.4976236", "0.4974271", "0.49643248", "0.49614102", "0.49613148", "0.49591425", "0.49455616", "0.4937932", "0.4915492", "0.491319", "0.49059182", "0.48927477", "0.48917958", "0.488399", "0.48688757", "0.48484847", "0.48359147", "0.48359147", "0.48273262", "0.48255548", "0.48177263", "0.48144877", "0.48024598", "0.4799421", "0.4799334", "0.47969094", "0.4791701", "0.47897717", "0.47892052", "0.47800136", "0.4777375", "0.47763038", "0.4764183", "0.47630093", "0.4758053", "0.4758053", "0.4758053", "0.4758053", "0.4758053", "0.4758053", "0.4758053", "0.4758053", "0.4758053", "0.4758053", "0.4758053", "0.4754547", "0.4752653", "0.47455364", "0.4731154", "0.4731154", "0.4731154", "0.4731154", "0.4731154", "0.4731154", "0.4731154", "0.4731154", "0.47184968", "0.46969977", "0.4695944", "0.46919534", "0.46896642", "0.46895033", "0.46837047", "0.46817428", "0.46807143", "0.467825", "0.4677987", "0.46761274", "0.4672916", "0.46700236", "0.46651393", "0.4662295", "0.46612668", "0.46575263", "0.46565166", "0.4655602", "0.46410847", "0.46231395", "0.46194834" ]
0.7978883
0
This method will get and return the current time as a string formatted in the same way used in most Xilinx report and XDL files. The format used in the using the same syntax as SimpleDateFormat which is "EEE MMM dd HH:mm:ss yyyy".
public static String getTimeString() { SimpleDateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy"); return formatter.format(new java.util.Date()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String currentDateTime() {\r\n Calendar c = Calendar.getInstance();\r\n return String.format(\"%tB %te, %tY%n%tl:%tM %tp%n\", c, c, c, c, c, c);\r\n }", "public static final String CurrentTime() {\n\t\t\n\t\tfinal SimpleDateFormat DF = new SimpleDateFormat(\"HH:mm:ss\");\n\t\treturn DF.format(new Date());\n\t}", "public static String getTime() {\r\n\r\n\t\t//Gets current date and time\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tDate date = new Date();\r\n\t\tcurrDateTime = dateFormat.format(date);\r\n\t\treturn currDateTime;\r\n\t}", "private static String getFormattedCurrentDateAndTime(){\n StringBuilder dateAndTime = new StringBuilder();\n LocalDateTime now = LocalDateTime.now();\n\n String hour = Integer.toString(now.getHour());\n String minute = Integer.toString(now.getMinute());\n\n if (hour.length() == 1){\n hour = \"0\" + hour;\n }\n if (minute.length() == 1){\n minute = \"0\" + minute;\n }\n\n //Creates \"XX/XX/XX @ XX:XX\" format (24 hours)\n dateAndTime.append(now.getMonthValue()).append(\"/\").\n append(now.getDayOfMonth()).append(\"/\").\n append(now.getYear()).append(\" @ \").\n append(hour).append(\":\").\n append(minute);\n\n return dateAndTime.toString();\n }", "public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }", "public static String getNowTime(){\r\n\t\tDate date = new Date();\r\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tString time = format.format(date);\r\n\t\treturn time;\r\n\t}", "private String getCurrentTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "public static String getCurrentTime() {\r\n\t\tDate date = new Date();\r\n\t\treturn date.toString();\r\n\t}", "public static String getCurrentDateTime() {\n String format = null;\n format = sdfNormal.format(new Date());\n return format;\n }", "public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }", "public String getTimeString()\n\t{\n\t\treturn TimeUtils.getTimeString(this.timesCurrentMillis);\n\t}", "public String getSystemDateTime() {\n\t\tjava.text.SimpleDateFormat sdfDate = new java.text.SimpleDateFormat(\"yyyy/MM/dd\");\n java.text.SimpleDateFormat sdfTime = new java.text.SimpleDateFormat(\"HH:mm\");\n Date now = new Date();\n String strDate = sdfDate.format(now);\n String strTime = sdfTime.format(now);\n System.out.println(\"Date: \" + strDate);\n System.out.println(\"Time: \" + strTime); \n return \"date\"+strDate+\" \"+strTime;\n\t}", "public String getCurrentTime() {\r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy HH:mm:ss\"); //https://www.javatpoint.com/java-get-current-date\r\n LocalDateTime now = LocalDateTime.now();\r\n return dtf.format(now);\r\n }", "public static String now() {\n // TODO: move this method to DateUtils\n return fromCalendar(GregorianCalendar.getInstance());\n }", "private String getcurrentTimeStamp() {\n\t\tDateTimeFormatter format = DateTimeFormatter\n\t\t\t\t.ofPattern(RidGeneratorPropertyConstant.TIMESTAMP_FORMAT.getProperty());\n\t\treturn LocalDateTime.now().format(format);\n\t}", "private String currentTime()\t{\n\t\tCalendar c = Calendar.getInstance(); \n\n\t\tString seconds;\n\t\tif(c.get(Calendar.SECOND) < 10)\t{\n\t\t\tseconds = \"0\"+Integer.toString(c.get(Calendar.SECOND));\n\t\t} else {\n\t\t\tseconds = Integer.toString(c.get(Calendar.SECOND));\n\t\t}\n\n\t\tString minutes;\n\t\tif(c.get(Calendar.MINUTE) < 10)\t{\n\t\t\tminutes = \"0\"+Integer.toString(c.get(Calendar.MINUTE));\n\t\t} else {\n\t\t\tminutes = Integer.toString(c.get(Calendar.MINUTE));\n\t\t}\n\n\t\tString hours;\n\t\tif(c.get(Calendar.HOUR_OF_DAY) < 10)\t{\n\t\t\thours = \"0\"+Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t} else {\n\t\t\thours = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t}\n\n\t\tString day;\n\t\tif(c.get(Calendar.DATE) < 10)\t{\n\t\t\tday = \"0\"+Integer.toString(c.get(Calendar.DATE));\n\t\t} else {\n\t\t\tday = Integer.toString(c.get(Calendar.DATE));\n\t\t}\n\n\t\tString month;\n\t\tif((c.get(Calendar.MONTH)+1) < 10)\t{\n\t\t\tmonth = \"0\"+Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t} else {\n\t\t\tmonth = Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t}\n\n\t\tString year;\n\t\tif(c.get(Calendar.YEAR) < 10)\t{\n\t\t\tyear = \"0\"+Integer.toString(c.get(Calendar.YEAR));\n\t\t} else {\n\t\t\tyear = Integer.toString(c.get(Calendar.YEAR));\n\t\t}\n\n\t\treturn day+\"/\"+month+\"/\"+year + \" \"+hours+\":\"+minutes+\":\"+seconds;\t\n\t}", "public static String getCurrentTime(String format) {\n\t\tString dateString = \"0000\";\n\t\ttry {\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(format);\n\t\t\tDate d = new Date();\n\t\t\tdateString = formatter.format(d);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn dateString;\n\t}", "public static String now(){\n return now(DATE_FORMAT_PATTERN);\n }", "String getTime(){\n\t\tCalendar c = Calendar.getInstance();\n int mseconds = c.get(Calendar.MILLISECOND);\n String currentDateandTime = mDateFormat.format(new Date()) + String.format(\"-%04d\", mseconds);\n \n return currentDateandTime;\n\t}", "public static String getCurrentTime()\n\t{\n\t\treturn getTime(new Date());\n\t}", "public static String now() {\n\t\t\treturn fromCalendar(GregorianCalendar.getInstance());\n\t\t}", "public String getSystemTime() {\n return DateFormat.getDateTimeInstance().format(new Date().getTime());\n }", "private static String currentTimestamp()\r\n {\n \r\n long currentTime = System.currentTimeMillis();\r\n sCalendar.setTime(new Date(currentTime));\r\n \r\n String str = \"\";\r\n str += sCalendar.get(Calendar.YEAR) + \"-\";\r\n \r\n final int month = sCalendar.get(Calendar.MONTH) + 1;\r\n if (month < 10)\r\n {\r\n str += 0;\r\n }\r\n str += month + \"-\";\r\n \r\n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\r\n if (day < 10)\r\n {\r\n str += 0;\r\n }\r\n str += day;\r\n \r\n str += \"T\";\r\n \r\n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\r\n if (hour < 10)\r\n {\r\n str += 0;\r\n }\r\n str += hour + \":\";\r\n \r\n final int minute = sCalendar.get(Calendar.MINUTE);\r\n if (minute < 10)\r\n {\r\n str += 0;\r\n }\r\n str += minute + \":\";\r\n \r\n final int second = sCalendar.get(Calendar.SECOND);\r\n if (second < 10)\r\n {\r\n str += 0;\r\n }\r\n str += second + \".\";\r\n \r\n final int milli = sCalendar.get(Calendar.MILLISECOND);\r\n str += milli;\r\n \r\n str += \"Z\";\r\n \r\n return str;\r\n }", "public String getTime() {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\n String date = simpleDateFormat.format(new Date());\n return date;\n }", "private String getCurrentDate() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Calendar cal = Calendar.getInstance();\n return dateFormat.format(cal.getTime());\n }", "public static String now() {\n return dateTimeFormatZ.format(new Date());\n }", "public String getCurrentDateTime(){\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\", Locale.getDefault()\n );\n Date date = new Date();\n return simpleDateFormat.format(date);\n }", "public static String currentTimestamp()\n {\n \n long currentTime = System.currentTimeMillis();\n sCalendar.setTime(new Date(currentTime));\n \n String str = \"\";\n str += sCalendar.get(Calendar.YEAR) + \"-\";\n \n final int month = sCalendar.get(Calendar.MONTH) + 1;\n if (month < 10)\n {\n str += 0;\n }\n str += month + \"-\";\n \n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\n if (day < 10)\n {\n str += 0;\n }\n str += day;\n \n str += \"T\";\n \n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\n if (hour < 10)\n {\n str += 0;\n }\n str += hour + \":\";\n \n final int minute = sCalendar.get(Calendar.MINUTE);\n if (minute < 10)\n {\n str += 0;\n }\n str += minute + \":\";\n \n final int second = sCalendar.get(Calendar.SECOND);\n if (second < 10)\n {\n str += 0;\n }\n str += second + \".\";\n \n final int milli = sCalendar.get(Calendar.MILLISECOND);\n str += milli;\n \n str += \"Z\";\n \n return str;\n }", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public static String getCurrentDate() {\n\n long now = System.currentTimeMillis();\n if ((now - currentDateGenerated) > 1000) {\n synchronized (format) {\n if ((now - currentDateGenerated) > 1000) {\n currentDateGenerated = now;\n currentDate = format.format(new Date(now));\n }\n }\n }\n return currentDate;\n\n }", "public static String fn_GetCurrentTimeStamp() {\n\t\tDate dte = new Date();\n\t\tDateFormat df = DateFormat.getDateTimeInstance();\n\t\tString strdte = df.format(dte);\n\t\tstrdte = strdte.replaceAll(\":\", \"_\");\n\t\treturn strdte;\n\t}", "public String getTimeString() {\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n\n String AM_PM = \"PM\";\n if (date.get(Calendar.AM_PM) == Calendar.AM) AM_PM = \"AM\";\n\n String hour_fixed = String.valueOf(hour);\n if (hour == 0) hour_fixed = \"12\";\n\n String minute_fixed = String.valueOf(minute);\n while (minute_fixed.length() < 2) {\n minute_fixed = \"0\" + minute_fixed;\n }\n\n return hour_fixed + \":\" + minute_fixed + ' ' + AM_PM;\n }", "private String currentDateTime() {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "public static String getDate()\r\n {\r\n Date now = new Date();\r\n DateFormat df = new SimpleDateFormat (\"yyyy-MM-dd'T'hh-mm-ss\");\r\n String currentTime = df.format(now);\r\n return currentTime; \r\n \r\n }", "public String getNow() {\n\t\treturn new Date().toString();\n\t}", "String timeStamp() {\n\n\t\tCalendar now = Calendar.getInstance();\n\n\t\t String y = String.valueOf(now.get(now.YEAR));\n\t\t String mo = String.valueOf(now.get(now.MONTH)+1);\n\t\t String d = String.valueOf(now.get(now.DAY_OF_MONTH));\n\t\t String h = String.valueOf(now.get(now.HOUR_OF_DAY));\n\t\t String m = String.valueOf(now.get(now.MINUTE));\n\t\t String s = String.valueOf(now.get(now.SECOND));\n\t\t String ms = String.valueOf(now.get(now.MILLISECOND));\n\n\n\t return h + m + s + ms;\n\n\n\n }", "public static String getCurrentDateTime()\n\t{\n\t\treturn getDateTime(new Date());\n\t}", "public static String datetimeNow(){\n return now(DATETIME_FORMAT_PATTERN);\n }", "public String getTime(){\r\n\t\tDate date = new GregorianCalendar().getTime();\r\n\r\n\t\tString time= new SimpleDateFormat(\"HH:mm:ss\").format(date.getTime());\r\n\t\t\r\n\t\treturn time;\r\n\t}", "public String getTime() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString time = dateFormat.format(cal.getTime());\n\t\t\treturn time;\n\t\t}", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "private String getCurrentTimestamp() {\n\n String mytime = java.text.DateFormat.getTimeInstance().format(Calendar.getInstance().getTime());\n String mydate =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());\n return mytime;\n }", "public String getTimeAndDate() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd MMM hh:mm\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString dateAndTime = dateFormat.format(cal.getTime());\n\t\t\treturn dateAndTime;\n\t\t}", "public static String getCurrentDateTimeFull() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "@SimpleFunction(description = \"Gets the current time.\"\n + \"It is formatted correctly for iSENSE\")\n public String GetTime() {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n return sdf.format(cal.getTime()).toString();\n }", "public static String getTime()\n {\n Date time = new Date();\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return timeFormat.format(time);\n }", "java.lang.String getTime();", "public String getCurrentTime(String timeForm) {\n DateFormat timeFormat = new SimpleDateFormat(timeForm);\n\n //get current date time with Date()\n Date time = new Date();\n\n // Now format the date\n String time1 = timeFormat.format(time);\n\n return time1;\n }", "public String toString() {\n synchronized (FORMATTER) {\n return FORMATTER.format(_calendar.getTime());\n }\n }", "public static String getCurrentDate()\n\t{\n\t\treturn getDate(new Date());\n\t}", "private static String getTime() {\n\t\tDate getDate = new Date();\n\t\tString timeFormat = \"M/d/yy hh:mma\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(timeFormat);\n\t\treturn \"[\" + sdf.format(getDate) + \"]\\t\";\n\t}", "protected final static String getDateStamp() {\n\n\t\treturn\n\n\t\tnew SimpleDateFormat(\"MMM d, yyyy h:mm:ss a zzz\").format(new Date());\n\n\t}", "public String getDateTime() {\n\t\t\n\t\tDateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(\"yyyy/MM/dd HH:mm:ss\"); \n\t\t\n\t\tLocalDateTime currentDateTime = LocalDateTime.now(); \n\t\t\n\t\treturn dateTimeFormatter.format(currentDateTime);\n\t}", "public static String getDateTime() {\n\t\tString sDateTime=\"\";\n\t\ttry {\n\t\t\tSimpleDateFormat sdfDate = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\tSimpleDateFormat sdfTime = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tDate now = new Date();\n\t\t\tString strDate = sdfDate.format(now);\n\t\t\tString strTime = sdfTime.format(now);\n\t\t\tstrTime = strTime.replace(\":\", \"-\");\n\t\t\tsDateTime = \"D\" + strDate + \"_T\" + strTime;\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e);\n\t\t}\n\t\treturn sDateTime;\n\t}", "public String toString() {\n return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\n }", "public static String getCurrentTime(){\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"Asia/Singapore\"));\n Date currentDate = calendar.getTime();\n return currentDate.toString();\n }", "public static String timestamp()\n\t{\n\t\t/**\n\t\t * Get the current time formatted as HH:mm:ss.\n\t\t */\t\t\n\t\treturn new SimpleDateFormat(\"HH:mm:ss\").format(new Date());\n\t}", "public static String getCurrentTimeStamp(){\n try {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n // Find todays date\n String currentDateTime = dateFormat.format(new Date());\n\n return currentDateTime;\n } catch (Exception e) {\n e.printStackTrace();\n\n return null;\n }\n }", "public static String getNowAsTimestamp() {\r\n\r\n DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN);\r\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\r\n return dateFormat.format(new Date()).replaceAll(\"\\\\+0000\", \"Z\").replaceAll(\"([+-][0-9]{2}):([0-9]{2})\", \"$1$2\");\r\n }", "public String getTime() {\n String show = time;\n return show;\n }", "public static String getDateTime(){\n String pattern = \"MM/dd/yyyy HH:mm:ss\";\n DateFormat df = new SimpleDateFormat(pattern);\n Date today = Calendar.getInstance().getTime();\n String todayAsString = df.format(today);\n return todayAsString;\n }", "public String getTime() {\n return dateTime.format(c.getTime());\n }", "public String getTimeStamp() {\n Calendar instance = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMM-dd-yyyy-HH:mm:ss:ms\");\n return sdf.format(instance.getTime());\n }", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "public String getTime() {\n Date date = new Date();\n return (date.toString());\n }", "public String getTime()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"HH:mm\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "public String getCurrentTimeHourMinSec() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public String getTimeString() {\n // Converts slot to the minute it starts in the day\n int slotTimeMins =\n SlopeManagerApplication.OPENING_TIME * 60 + SESSION_LENGTHS_MINS * getSlot();\n\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, slotTimeMins/60);\n cal.set(Calendar.MINUTE, slotTimeMins % 60);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm\");\n return sdf.format(cal.getTime());\n }", "public String toString() {\n StringBuilder output = new StringBuilder();\n LocalDateTime currentTime = getCurrentTime();\n output.append(currentTime.getYear()).append(\":\").append(currentTime.getMonthValue()).append(\":\")\n .append(currentTime.getDayOfMonth());\n return output.toString();\n }", "private static String getTimeStamp()\r\n\t{\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH.mm.ss\");\r\n\t\tDate date = new Date();\r\n\t\treturn dateFormat.format(date);\r\n\t}", "public static String getPrintToFileTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n return sdf.format(System.currentTimeMillis());\n }", "public static String getToday() {\n return getToday(\"yyyy-MM-dd HH:mm:ss\");\n }", "public static String getDate() {\n\t\tString\ttoday=\"\";\n\n\t\tCalendar Datenow=Calendar.getInstance();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t today = formatter.format(Datenow.getTime());\n\n\t return today;\n\t}", "public String getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\n }", "public static String getSystemDate()\n {\n\t DateFormat dateFormat= new SimpleDateFormat(\"_ddMMyyyy_HHmmss\");\n\t Date date = new Date();\n\t return dateFormat.format(date);\n }", "private static String time() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH-mm-ss \");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public String getCurrentTime() {\n return currentTime;\n }", "public static String timeStamp()\n {\n DateFormat format = new SimpleDateFormat(\"ddMMyyHHmmSS\");\n return format.format(new Date());\n }", "public static String getDateTime() {\n\t\treturn new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\").format(new Date());\n\t}", "public String getTime() {\n return String.format(\"%02d\", hours) + \":\" + String.format(\"%02d\", minutes);\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "String getCurTime();", "public static String getDateTime() {\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n Date currentLocalTime = cal.getTime();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n df.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String date = df.format(currentLocalTime);\n return date;\n }", "public String getTimeStamp() {\n return new SimpleDateFormat(\"dd.MM.yyyy HH.mm.ss\").format(new Date());\n }", "public String getCurrentDateTimeHourMinSec() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }", "public String getTime()\r\n\t{\r\n\t\treturn displayString;\r\n\t}", "public static String getCurrentDate() {\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate dateobj = new Date();\n\t\treturn df.format(dateobj);\n\t}", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public String toString() {\n if (time != null) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n return time.format(formatter);\n } else {\n return \"INVALID TIME\";\n }\n }", "public String getTimeString(){\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(hourPicker.getValue())\n .append(':')\n .append(minutePicker.getValue())\n .append(':')\n .append(secondsPicker.getValue())\n .append('.')\n .append(decimalPicker.getValue());\n return sBuilder.toString();\n }", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "public String getTime(){\r\n String time = \"\";\r\n return time;\r\n }", "public String getTimeStamp()\n\t{\n\t\tString timeStamp = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(Calendar.getInstance().getTime());\n\t\treturn timeStamp; \n\t}", "public static String getTimeStamp() {\r\n\r\n\t\tlong now = (System.currentTimeMillis() - startTime) / 1000;\r\n\r\n\t\tlong hours = (now / (60 * 60)) % 24;\r\n\t\tnow -= (hours / (60 * 60)) % 24;\r\n\r\n\t\tlong minutes = (now / 60) % 60;\r\n\t\tnow -= (minutes / 60) % 60;\r\n\r\n\t\tlong seconds = now % 60;\r\n\r\n\t return String.format(\"%02d:%02d:%02d\", hours, minutes, seconds);\r\n\t}", "protected String toXSTime() {\n\t\treturn String.format(\"%s,%s,%s,%s\",\"{0:00}:{1:00}:{2:00}\",\n\t\t\t\tthis.getHours(), this\n\t\t\t\t.getMinutes(), this.getSeconds());\n\t}", "public static String getCurrentDate() {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"); \n LocalDateTime now = LocalDateTime.now(); \n return dtf.format(now);\n }" ]
[ "0.80080456", "0.79747903", "0.7851599", "0.7829346", "0.7813123", "0.77848125", "0.7750272", "0.7726216", "0.7694695", "0.76890045", "0.76859283", "0.76755697", "0.76267445", "0.7608691", "0.7567472", "0.75658244", "0.7548397", "0.7519212", "0.7509286", "0.74990773", "0.749266", "0.74830174", "0.7449976", "0.74482584", "0.743188", "0.7399382", "0.73980993", "0.7377451", "0.73557353", "0.7325159", "0.73050946", "0.73030216", "0.7282431", "0.7275965", "0.7263919", "0.7249546", "0.72425383", "0.7223918", "0.7201439", "0.7198559", "0.71976024", "0.7184984", "0.7174304", "0.7161373", "0.7151123", "0.7146658", "0.7129091", "0.71182376", "0.7109446", "0.71062446", "0.7102339", "0.70868516", "0.70784074", "0.70713437", "0.70678115", "0.70657974", "0.70566034", "0.7016465", "0.70029753", "0.7000967", "0.6993508", "0.6987192", "0.6982687", "0.69601953", "0.69384825", "0.6928709", "0.69162804", "0.69098806", "0.69027925", "0.69016385", "0.6898962", "0.6891034", "0.68685216", "0.68661493", "0.6865774", "0.6864227", "0.68585974", "0.6853078", "0.6849558", "0.6842393", "0.6840288", "0.681186", "0.6810489", "0.68019164", "0.68011594", "0.6793382", "0.6791696", "0.678749", "0.678279", "0.6778677", "0.6768595", "0.6768595", "0.6760441", "0.6754961", "0.6708985", "0.6703741", "0.67027336", "0.6689259", "0.66826636", "0.6680302" ]
0.799224
1
Gets and returns the file separator character for the given OS
public static String getDirectorySeparator() { if (FileTools.cygwinInstalled()) { return "/"; } else { return File.separator; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getSeparator() {\n return System.getProperty(\"file.separator\");\n }", "public String getFileSeparator() {\n\t\treturn File.separator;\n\t}", "public String getFileSeparator() {\n\t\treturn fileSeparator;\n\t}", "public String getFilesep() {\n\teval(\"filesep();\");\n\treturn get(OctaveString.class, ANS).getString();\n }", "String getSeparator();", "public String getLineSeparator();", "public static String getPathSeparator() {\n return File.separator;\n }", "public String getDelimiterOrOctal() {\n\t\tString octal = getOctalDelimiter();\n\t\treturn octal != null ? octal\n\t\t\t\t: getProperty(MapRedTextFileType.key_delimiter);\n\t}", "public char getDateSeparator()\r\n {\r\n return (m_dateSeparator);\r\n }", "public String getSeparator() {\n\t\treturn separator;\n\t}", "public char getDecimalSeparator()\r\n {\r\n return (m_decimalSeparator);\r\n }", "public String getDefaultExtractLineSeparator ();", "private String getSeparator(List<String> file)\n {\n String line = file.get(0);\n \n if (line.contains(\" \") || line.contains(\" ,\")) {\n /* for these delimeters the \"data\" and \"quantidade\" column are not\n * separated correctly, so we need to add one space to support them.\n */\n for (int i = 0; i < file.size(); i++) {\n String l = file.get(i);\n String a = l.substring(0, 16);\n String b = l.substring(16, l.length() - 1);\n file.set(i, a + \" \" + b);\n }\n }\n\n return FileUtil.SEPARATOR(line);\n }", "public String getExtractLineSeparator ();", "public Character getAttributesSeparator( )\n {\n if ( _strAttributesSeparator == null )\n {\n _strAttributesSeparator = AppPropertiesService.getProperty( PROPERTY_IMPORT_EXPORT_USER_SEPARATOR, CONSTANT_DEFAULT_IMPORT_EXPORT_USER_SEPARATOR )\n .charAt( 0 );\n }\n\n return _strAttributesSeparator;\n }", "public static String getLineSeparator() {\r\n // /- - - - - - - - - - - - - - - - - - - - - -\r\n // Because 'CR + LF' caused many trouble!\r\n\t\t// And Now 'LF' have little trouble. \r\n\t\t// \r\n // return System.getProperty(\"line.separator\");\r\n // - - - - - - - - - -/\r\n\t\treturn \"\\n\";\r\n }", "public String getOctalDelimiter() {\n\t\tString asciiCode = getProperty(key_delimiter);\n\t\tString result = null;\n\t\tif (asciiCode != null && asciiCode.startsWith(\"#\")\n\t\t\t\t&& asciiCode.length() > 1) {\n\t\t\tresult = Integer.toOctalString(Integer.valueOf(asciiCode\n\t\t\t\t\t.substring(1)));\n\t\t\tif (result.length() == 2) {\n\t\t\t\tresult = \"\\\\0\" + result;\n\t\t\t} else {\n\t\t\t\tresult = \"\\\\\" + result;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public String getSourceLineSeparator ();", "@Override\n protected String getFileSeparator() { return \"/\"; }", "public Integer getSep() {\n return sep;\n }", "public String getDecimalSeparator() {\n NumberFormat nf = NumberFormat.getInstance(getLocalCurrency().getLocale());\n if (nf instanceof DecimalFormat) {\n DecimalFormatSymbols sym = ((DecimalFormat) nf).getDecimalFormatSymbols();\n return Character.toString(sym.getDecimalSeparator());\n }\n return \".\";\n }", "@Override\n\tpublic String getSeparator() {\n\t\treturn null;\n\t}", "public char getTimeSeparator()\r\n {\r\n return (m_timeSeparator);\r\n }", "public String getSeparator() {\n\t\treturn mSeparator;\n\t}", "public char getColumnSeparator(){\n\t\treturn DEFAULT_COLUMN_SEPARATOR;\n\t}", "public static String getLetterWindows(){\r\n\t\treturn System.getenv(\"windir\").substring(0, 3);\r\n\t}", "public final String getOS() {\n String out = System.getProperty(\"os.name\");\n String os = out.split(\" \")[0];\n\n return os.toLowerCase();\n }", "@Accessor(qualifier = \"fieldSeparator\", type = Accessor.Type.GETTER)\n\tpublic Character getFieldSeparator()\n\t{\n\t\tfinal Character value = getPersistenceContext().getPropertyValue(FIELDSEPARATOR);\n\t\treturn value != null ? value : Character.valueOf(';');\n\t}", "java.lang.String getOs();", "protected char getDelim()\n {\n char cDelim = m_cDelim;\n if (cDelim == Character.UNASSIGNED)\n {\n String sDelim = m_xml.getSafeElement(TAG_DELIM).getString(VALUE_TAB);\n\n m_cDelim = cDelim = sDelim.equals(VALUE_TAB)\n ? '\\t'\n : sDelim.equals(VALUE_SPACE) ? ' ' : sDelim.charAt(0);\n }\n\n return cDelim;\n }", "private void setFileSeparator() {\n\t\tthis.fileSeparator = System.getProperty(\"file.separator\");\n\t}", "private JSeparator getSepFile1() {\r\n\t\tif (sepFile1 == null) {\r\n\t\t\tsepFile1 = new JSeparator();\r\n\t\t}\r\n\t\treturn sepFile1;\r\n\t}", "public abstract char getCustomDelimiter();", "public String getDefaultSourceLineSeparator ();", "public String getLineSeparator() {\n return lineSeparator;\n }", "protected String getSeparator() {\n return isNewLineParameters() ? NEW_LINE_SEPARATOR : ONE_LINE_SEPARATOR;\n }", "public String getFieldSeparator()\n\t{\n\t\treturn fieldSeparator;\n\t}", "public String getOS(){\n\t\treturn OS;\n\t}", "public static String osName() {\r\n Object _osname=null;\r\n \r\n try {\r\n _osname=System.getProperty(\"os.name\");\r\n }\r\n catch (Exception ex) {\r\n _osname=null;\r\n ex.printStackTrace();\r\n }\r\n \r\n String _name=\"\";\r\n if (_osname!=null) _name=_osname.toString();\r\n \r\n return _name;\r\n }", "public String getClusterPathSeparator() {\n return System.getProperty( \"hadoop.cluster.path.separator\", \",\" );\n }", "public String getChar() {\n\t\tString asciiCode = getProperty(key_delimiter);\n\t\tCharacter c = null;\n\t\tif (asciiCode == null) {\n\t\t\tc = '|';\n\t\t} else if (asciiCode != null && asciiCode.startsWith(\"#\")\n\t\t\t\t&& asciiCode.length() > 1) {\n\t\t\tint i = Integer.valueOf(asciiCode.substring(1));\n\t\t\tc = new Character((char) i);\n\t\t} else if (asciiCode.length() == 1) {\n\t\t\tc = asciiCode.charAt(0);\n\t\t}\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif (c != null){\n\t\t\tresult = String.valueOf(c);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private String getCSVSeparator(){\n DecimalFormatSymbols s = new DecimalFormatSymbols(getLocale());\n if(s.getDecimalSeparator() == ',')\n return \";\";\n else\n return \",\";\n }", "protected String getOrConcatenatorSplitter() {\n\t\treturn \"\\\\\" + getOrConcatenator();\n\t}", "public static String getOSName() {\n\t\treturn System.getProperties().getProperty(\"os.name\");\n\t}", "private String sep(String path) {\n return path == null ? \"\" : \"/\" + path;\n }", "public static String getOs() {\r\n\t\treturn os;\r\n\t}", "String getOs();", "String operatingSystem();", "public String detectOsPath(String os) {\n\t\tif (os==null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (os.contains(\"win\") || os.contains(\"Win\") || os.contains(\"WIN\")) {\n\t\t\tthis.defaultFileOutputLocation = System.getProperty(\"user.home\") + \"\\\\Desktop\\\\convertedProducts\";\n\t\t\t\n\t\t\treturn WIN;\n\t\t}\n\t\tif (os.contains(\"mac\") || os.contains(\"Mac\") || os.contains(\"MAC\") || os.contains(\"IOS\") || os.contains(\"iOS\")) {\n\t\t\tthis.defaultFileOutputLocation = System.getProperty(\"user.home\") + \"/Desktop/convertedProducts\";\n\t\t\t\n\t\t\treturn MAC;\n\t\t}\n\t\tif (os.contains(\"nix\") || os.contains(\"aix\") || os.contains(\"nux\") || os.contains(\"unt\") || os.contains(\"UNT\") || os.contains(\"sunos\")) {\n\t\t\tthis.defaultFileOutputLocation = System.getProperty(\"user.home\") + \"/Desktop/convertedProducts\";\n\t\t\t\n\t\t\treturn UNIX;\n\t\t}\n\t\treturn null;\n\t}", "public String getOperatingSystem() {\n\t\tString os = System.getProperty(\"os.name\");\n\t\t// Returning the os eg - windows 10\n\t\treturn os;\n\t}", "public final String getDelimiter() {\n return properties.get(DELIMITER_PROPERTY);\n }", "private ELOperandToken readSeparatorToken() {\r\n \t\tfState = STATE_SEPARATOR;\r\n \t\tint ch = readCharBackward();\r\n \t\t\r\n \t\treturn (ch == '.' ? new ELOperandToken(index, 1, getCharSequence(index, 1), ELOperandToken.EL_SEPARATOR_TOKEN) :\r\n \t\t\tELOperandToken.EOF);\r\n \t}", "public static String OSDetector() {\r\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\r\n\t\tif (os.contains(\"win\")) {\r\n\t\t\treturn \"Windows\";\r\n\t\t} else if (os.contains(\"nux\") || os.contains(\"nix\")) {\r\n\t\t\treturn \"Linux\";\r\n\t\t} else if (os.contains(\"mac\")) {\r\n\t\t\treturn \"Mac\";\r\n\t\t} else if (os.contains(\"sunos\")) {\r\n\t\t\treturn \"Solaris\";\r\n\t\t} else {\r\n\t\t\treturn \"Other\";\r\n\t\t}\r\n\t}", "public String getPatternSeparator()\r\n\t{\r\n\t\treturn patternSeparator;\r\n\t}", "public static OS getOS()\n {\n String os = System.getProperty(\"os.name\").toLowerCase();\n if(os.indexOf(\"win\") != -1)\n return OS.Windows;\n else if(os.indexOf(\"linux\") != -1)\n return OS.Linux;\n else\n return OS.Unknown;\n }", "String platform();", "private String getLineSeparator(String givenStr) {\n if (givenStr.indexOf(\"\\r\\n\") == -1) {\n return \"\\n\";\n } else {\n return \"\\r\\n\";\n }\n }", "public static String getLocaleKeySeparator() {\n\t\treturn localeKeySeparator;\n\t}", "String getDelimiter();", "public String getOs() {\n\t\treturn os;\n\t}", "public String getErrorSeparator() {\r\n\t\treturn errorSeparator;\r\n\t}", "protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }", "public static String newline() {\n return System.getProperty(JavaSystemProperty.LINE_SEPARATOR);\n }", "public java.lang.Integer getOS() {\n\t\t return OS;\n\t }", "public String getRootValueSeparator()\n/* */ {\n/* 704 */ return this._rootValueSeparator == null ? null : this._rootValueSeparator.getValue();\n/* */ }", "public char getDelimiter()\n {\n return delimiter;\n }", "@Override\n\tprotected String getPathSeparator() {\n\t\treturn null;\n\t}", "private static final String appendSeparatorIfNeeded(String path) {\n if (path.length() > 0) {\n return (path.charAt(path.length() - 1) == File.separatorChar ? path : path.concat(File.separator));\n } else {\n return path;\n }\n }", "protected boolean isSeparator(char c) {\n return c == SEPARATOR;\n }", "public void setDefaultExtractLineSeparator (String linesep);", "protected String getDefaultAfter()\n {\n return String.valueOf(ConventionDefaults.BLANK_LINES_AFTER_HEADER);\n }", "public static String getFileName(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator)) //Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return null;\n else\n {\n\t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t }\n\t //Bug Id 81741, End\n\t return (new File(file_path)).getName();\n }\n \n }", "java.util.Optional<String> getItemSeparator();", "@Accessor(qualifier = \"fieldSeparator\", type = Accessor.Type.SETTER)\n\tpublic void setFieldSeparator(final Character value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(FIELDSEPARATOR, value);\n\t}", "public String getLineEndingStyle() {\n/* 412 */ return getCOSObject().getNameAsString(COSName.LE, \"None\");\n/* */ }", "public AVT getGroupingSeparator()\n {\n return m_groupingSeparator_avt;\n }", "@Override\n\tprotected String getItemSeparator() {\n\t\treturn SVG_PATHSEG_LIST_SEPARATOR;\n\t}", "String getOperatingModeName();", "public static String[] returnGroupDecimalSep()\n {\n String[] returnVal = new String[]{\",\",\".\"};\n // if at level of presentation level then take the separators from session\n if(ActionContext.getContext() != null && ServletActionContext.getRequest() != null)\n {\n \t HashMap<String , Object> theFormats = RootUtil.returnNumberFormat(ServletActionContext.getRequest().getSession());\n \t returnVal[0] = StringUtil.nullEmptyToValue(theFormats.get(\"groupSepa\"), \",\");\n \t returnVal[1] = StringUtil.nullEmptyToValue(theFormats.get(\"decimalSepa\"), \".\");\n }\n else\n {\n \t// if there is not session then need to take the separators from initial load if available\n \tif(ConstantsCommon.PATH_GROUP_SEPARATOR != null)\n \t{\n \t returnVal[0] = ConstantsCommon.PATH_GROUP_SEPARATOR;\n \t}\n \tif(ConstantsCommon.PATH_DECIMAL_SEPARATOR != null)\n \t{\n \t returnVal[1] = ConstantsCommon.PATH_DECIMAL_SEPARATOR;\n \t}\n }\n return returnVal;\n }", "private static LineEnding fromEol(EOL eol) {\n // @formatter:off\n switch (eol) {\n case CRLF: return LineEnding.WINDOWS;\n case LF: return LineEnding.UNIX;\n case NATIVE: return LineEnding.PLATFORM_NATIVE;\n default: throw new IllegalArgumentException(\"Unknown eol \" + eol);\n }\n // @formatter:on\n }", "public String getFieldSeparatorRegex()\n\t{\n\t\treturn fieldSeparatorRegex;\n\t}", "public String getRowSeparator()\n\t{\n\t\treturn rowSeparator;\n\t}", "public static String getOSInfo() {\n String os = System.getProperty(\"os.name\");\n String osVersion = System.getProperty(\"os.version\");\n String osArchitecture = System.getProperty(\"os.arch\");\n\n return \"OS Detection:\" + os + \",\" + osVersion + \",\" + osArchitecture;\n }", "boolean separatorLine(String mode);", "@java.lang.Override\n public java.lang.String getOs() {\n java.lang.Object ref = os_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n os_ = s;\n return s;\n }\n }", "public void setExtractLineSeparator (String linesep);", "public String getDelimiter(){\n\t\tString comboValue = delimiterCombo.getText();\n\t\t\n\t\tString[] delimiterKeys = delimiterMap.keySet().toArray(new String[delimiterMap.size()]);\n\t\tfor(int i=0; i < delimiterKeys.length; i++){\n\t\t\tif(comboValue.equals(delimiterKeys[i])){\n\t\t\t\treturn delimiterMap.get(comboValue);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn delimiterCombo.getText();\n\t}", "public java.lang.String getOs() {\n java.lang.Object ref = os_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n os_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static void setFieldSeparator(char field) {\r\n\t\tfieldSep=\"\"+field;\r\n\t}", "public abstract String getInCellDelimiter();", "private Token scanNewlineSeparator() {\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n c = in.read();\n return new Token(\"\\n\", TokenType.SEPARATOR, pos);\n }", "public static OS get() {\n if (OS.Mac.isCurrent()) {\n return Mac;\n } else if (OS.Windows.isCurrent()) {\n return Windows;\n } else if (OS.Linux.isCurrent()) {\n return Linux;\n }\n return Unsupported;\n }", "public char getThousandsSeparator()\r\n {\r\n return (m_thousandsSeparator);\r\n }", "public char paddingchar() {\n return paddingChar;\n }", "private static int appendSeparator (StringBuilder str, boolean catSep) {\n int added = 0;\n if (catSep) {\n str.append (PREFERRED_TAG_SEPARATOR);\n str.append (\" \");\n added = 2;\n } else {\n str.append (PREFERRED_LEVEL_SEPARATOR);\n added = 1;\n }\n return added;\n }", "private void printSeparator() {\r\n\t\tthis.printLineGap();\r\n\t}", "public Token delimiterMachine (int character) throws IOException {\n\t\tFileManipulator fileManipulator = FileManipulator.getInstance();\n\t\t// Variáveis de apoio\n\t\tString tokenValue = \"\";\n\t\ttokenValue += (char) character;\n\t\treturn new DelimiterToken(tokenValue, fileManipulator.getLineCounter(), fileManipulator.getColumnCounter());\n\t}", "public void setSeparator(String separator) {\n\t\tthis.separator = separator;\n\t}", "public String getDefaultStyleString() {\n/* 552 */ return getCOSObject().getString(COSName.DS);\n/* */ }", "public String getAsciidocDiagramBlockDelimiter() {\n\t\treturn asciidocDiagramBlockDelimiter;\n\t}" ]
[ "0.74707735", "0.71675944", "0.70982444", "0.7063601", "0.67960745", "0.6637641", "0.6572021", "0.6431484", "0.63578224", "0.626412", "0.6238417", "0.6199048", "0.61924756", "0.6169333", "0.6137844", "0.61343235", "0.6132234", "0.613022", "0.6081673", "0.60576195", "0.6012678", "0.598397", "0.5971969", "0.59566975", "0.59508586", "0.58885765", "0.58858556", "0.58840203", "0.5831936", "0.5815312", "0.5801799", "0.5740013", "0.57315946", "0.5696825", "0.5690545", "0.56862974", "0.5672658", "0.56530136", "0.56364006", "0.5606611", "0.55797446", "0.55546", "0.55501235", "0.5546428", "0.5535502", "0.55336696", "0.5503421", "0.54688", "0.5458567", "0.5455473", "0.540456", "0.5398093", "0.53902346", "0.5362705", "0.53590906", "0.5337244", "0.5328401", "0.53111094", "0.5304993", "0.5302311", "0.5279829", "0.52256733", "0.51718813", "0.515673", "0.51334095", "0.5131358", "0.51208836", "0.5120799", "0.5116454", "0.51054966", "0.5078376", "0.5059016", "0.505082", "0.50353247", "0.5024263", "0.5010065", "0.49994937", "0.49864912", "0.49763262", "0.49665216", "0.4951164", "0.48926288", "0.48804933", "0.48730284", "0.48658165", "0.4849338", "0.48489928", "0.48391458", "0.483603", "0.4823046", "0.4819722", "0.4812398", "0.48058242", "0.47607863", "0.47548082", "0.47388113", "0.47315735", "0.47199872", "0.47171986", "0.47080332" ]
0.6716074
5
Checks if Cygwin is installed on the system
public static boolean cygwinInstalled() { return System.getenv("CYGWIN") != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean onWindows() {\n return System.getProperty(\"os.name\").toLowerCase(Locale.US).startsWith(\"windows\");\n }", "private boolean checkIfGccExists() {\n\t\tboolean itExists = false;\n\n\t\tLocalConfiguration local = LocalConfiguration.getInstance();\n\n\t\tString gcc = \"\";\n\t\t\n\t\tSystem.out.println(local.getGccPath());\n\t\t\n\t\tif (!Files.exists(Paths.get(local.getGccPath()))) {\n\t\t\t//C:\\\\Program Files (x86)\\\\Dev-Cpp\\\\MinGW64\\\\bin\\\\gcc.exe\n\t\t\t//C:\\Program Files (x86)\\Dev-Cpp\\MinGW64\\bin\\gcc.exe\n\t\t\tgcc = JOptionPane.showInputDialog(\"Input the GCC (GNU Compiler Collection) location.\");\n\t\t\tif (Files.exists(Paths.get(gcc))) {\n\t\t\t\titExists = true;\n\n\t\t\t\tPath path = Paths.get(gcc);\n\t\t\t\tlocal.setGccPath(path.toAbsolutePath().toString());\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Files.exists(Paths.get(gcc))) {\n\t\t\titExists = true;\n\t\t}\n\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null, \"QUEST cannot find the gcc.exe specified. Please use the settings to fix the path.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\treturn itExists;\n\t}", "private static boolean isWindows() {\n\n String osName = System.getProperty(\"os.name\");\n return osName != null && osName.startsWith(\"Windows\");\n }", "public static boolean isWindows()\n {\n return (System.getProperty(\"os.name\").indexOf(\"Windows\") != -1) ;\n }", "public static boolean isWindows() {\n\t\treturn (SWT.getPlatform().equalsIgnoreCase(\"win32\"));\n\t}", "public static boolean isWindows() {\n\t\treturn (System.getProperty(\"os.name\").indexOf(\"Windows\") != -1);\n\t}", "public static boolean isWindows() {\n return (System.getProperty(\"os.name\").toLowerCase().indexOf(\"win\") >= 0);\n }", "private boolean isWindowsOs() {\n String osName = System.getProperty(\"os.name\");\n if (osName == null) {\n return false;\n }\n osName = osName.toLowerCase(Locale.ENGLISH);\n return osName.contains(\"windows\");\n }", "public static final boolean isWindows() {\n return (getOperatingSystem() & OS_WINDOWS_MASK) != 0;\n }", "public static boolean isWindowsPlatform() {\n\t\tString os = System.getProperty(\"os.name\");\n\t\tif (os != null && os.startsWith(WIN_ID))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t}", "public static boolean isLinux() {\n\t\treturn (SWT.getPlatform().equalsIgnoreCase(\"gtk\"));\n\t}", "private boolean osIstLinux() {\n\t\treturn System.getProperty(\"os.name\").equals(\"Linux\");\n\t}", "private void determinePlatform() {\n \t\tString os = System.getProperty(\"os.name\");\n \t\t\n \t\tif (os == null)\n \t\t\tthrow new RuntimeException();\n \t\t\n \t\tif (os.startsWith(WINDOWS_ID))\n \t\t\tisWindows = true;\n \t\telse\n \t\t\tisUnixLike = true;\n \t}", "public static boolean isSolaris() {\n\t\treturn (SWT.getPlatform().equalsIgnoreCase(\"motif\"));\n\t}", "public String getCygwinCvs() {\r\n\t\treturn cygwinCvs;\r\n\t}", "public static boolean isPlatformWindows() {\r\n\t\tPlatform current = Platform.getCurrent();\r\n\t\treturn Platform.WINDOWS.is(current);\r\n\t}", "public static boolean isSupported() {\n boolean supported = false;\n\n try {\n Process process = new ProcessBuilder().command( \"svn\", \"help\" ).start();\n int exitCode = process.waitFor();\n\n supported = (exitCode == 0);\n\n } catch (Exception e) {\n // Ignore and return false\n }\n return supported;\n }", "public static boolean useIText() {\n\t\treturn (isWindows() || isLinux() || isSolaris());\n\t}", "boolean isInstalled();", "boolean isExecutable();", "public void setCygwinCvs(String cygwinCvs) {\r\n\t\tthis.cygwinCvs = cygwinCvs;\r\n\t}", "public boolean isSystemPackage(PackageInfo pkgInfo) {\n return ((pkgInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0);\n }", "public boolean isOSLinux() {\n\t\tboolean result = false;\n\t\tString linuxEnvKey = \"HOME\";\n\t\tString linuxValue = \"/\";\n\t\tif(System.getenv(linuxEnvKey) != null) {\n\t\t\tif(System.getenv(linuxEnvKey).startsWith(linuxValue)) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static final boolean isUnix() {\n return (getOperatingSystem() & OS_UNIX_MASK) != 0;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkPlatform() {\n\t\tboolean flag = oTest.checkPlatform();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public static boolean isInstalled()\n\t{\n\t\treturn PackageUtils.exists(General.PKG_MESSENGERAPI);\n\t}", "private void checkOperatingSystem()\n throws MojoExecutionException\n {\n final PtOperatingSystem opSystem = PtUserSniffer.getOS();\n final boolean isProperOpSystem = opSystem == PtOperatingSystem.MAC;\n\n this.logger.info( \"Checking operating system '\" + opSystem + \"' ... \" + ( isProperOpSystem ? \"ok\" : \"error\" ) );\n if ( isProperOpSystem == false )\n {\n throw new MojoExecutionException( \"Invalid Operating System '\" + opSystem + \"' (Mac OS X required)!\" );\n }\n }", "public static boolean isMSJVM() {\n\t\treturn (System.getProperty(\"java.vendor\").indexOf(\"Microsoft\") != -1);\n\t}", "boolean supportsExternalTool();", "public boolean isSystem() {\n return name.equals(\"jdk\") || name.equals(\"label\");\n }", "public void checkRequirements() throws TNotFoundEx{\n\t\t\n\t\tArrayList<SimpleEntry> toolsCheck = new ArrayList<>();\n\t\t\n\t\t//adb\n\t\ttoolsCheck.add(new SimpleEntry<String, String>(\"adb\", \"adb devices\"));\n\t\t//sqlite3\n\t\ttoolsCheck.add(new SimpleEntry<String, String>(\"sqlite3\", \"sqlite3 -version\"));\n\t\t//strings\n\t\ttoolsCheck.add(new SimpleEntry<String, String>(\"strings\", \"strings -v\"));\n\t\t\n\t\tboolean pass = this.checkToolOnHost(toolsCheck);\n\t\t\n\t\tif (!pass)\n\t\t\tthrow new TNotFoundEx(\"Missing tools on host: Please install the missing tools and rerun the command\");\n\t}", "boolean isSystemPackage(String packageName);", "public static boolean isJavaVersionOK() {\n boolean isJavaVersionOK = true;\n String version = System.getProperty(\"java.version\");\n char minor = version.charAt(2);\n char point = version.charAt(4);\n if (minor < '6' || point < '0') {\n isJavaVersionOK = false;\n System.err.println();\n System.err.println(Globals.getWorkbenchInfoString());\n System.err.println();\n System.err.print(\"JDK 1.6.0 or higher is required to run MOA. \");\n System.err.println(\"JDK version \" + version + \" found\");\n }\n return isJavaVersionOK;\n }", "public static void operatingSystemDetect(){\n String operatingSystem = System.getProperty(\"os.name\");\n if ((operatingSystem.contains(\"Linux\")) || (operatingSystem.contains(\"Mac OS X\"))) {\n shutdownCommand = \"shutdown -h now\";\n } else if (operatingSystem.contains(\"Windows\")) {\n shutdownCommand = \"shutdown.exe -s -t 0\";\n } else {\n throw new RuntimeException(\"Unsupported operating system.\");\n }\n\n }", "boolean hasConsole();", "boolean hasExitStatus();", "public static boolean useInternalBrowser() {\n\t\treturn (isWindows() || isLinux() || isMac());\n\t}", "public boolean checkSetup(){\n return checkSetup(folderName);\n }", "public static boolean isUseGlint() {\n/* 962 */ return useGlint;\n/* */ }", "boolean hasJvm();", "boolean hasOperatingSystemVersionConstant();", "boolean isSetSystem();", "boolean hasGcePersistentDiskCsiDriverConfig();", "private static boolean isMacOSX() {\n String os = System.getProperty(\"os.name\").toLowerCase();\n return os.contains(\"mac\") || os.contains(\"darwin\");\n }", "boolean hasGcsFuseCsiDriverConfig();", "public final boolean isSystem() {\n\t\treturn m_info.isSystem();\n\t}", "public static boolean hasHoneycomb() {\n\t\treturn Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;\n\t}", "private static boolean executeTool(final String windows, final String unix, final File input, final File output) {\r\n\t\tProcessBuilder pb = null;\r\n\t\tif (SystemUtils.IS_OS_WINDOWS) {\r\n\t\t\t// use the batch\r\n\t\t\tpb = new ProcessBuilder(DEX2JAR_BASEPATH + windows, input.getAbsolutePath(), \"-o\",\r\n\t\t\t\t\toutput.getAbsolutePath());\r\n\t\t} else if (SystemUtils.IS_OS_LINUX || SystemUtils.IS_OS_MAC) {\r\n\t\t\t// use the sh\r\n\t\t\tpb = new ProcessBuilder(DEX2JAR_BASEPATH + unix, input.getAbsolutePath(), \"-o\", output.getAbsolutePath());\r\n\t\t}\r\n\r\n\t\tif (pb != null) {\r\n\t\t\ttry {\r\n\t\t\t\tpb.start().waitFor();\r\n\t\t\t} catch (IOException | InterruptedException e) {\r\n\t\t\t\tLOG.error(\"Failed to execute dex2jar or other similar subtooling.\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private void checkFstab() {\n\t\tFile f = new File(getBasePath(), ETC_FSTAB_LOCATION);\n\t\tif (f.exists()) {\n\t\t\tString line = null;\n\t\t\tstatus = RsyncStatus.ETC_FSTAB_INVALID;\n\t\t\ttry (BufferedReader reader = new BufferedReader(new FileReader(f))) {\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tif (!line.startsWith(COMMENT_PREFIX) && line.contains(CYGDRIVE) && line.contains(NOACL_FLAG)) {\n\t\t\t\t\t\tstatus = RsyncStatus.OK;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tstatus = RsyncStatus.ETC_FSTAB_INVALID;\n\t\t\t}\n\n\t\t} else {\n\t\t\tstatus = RsyncStatus.ETC_FSTAB_NOT_FOUND;\n\t\t}\n\t}", "public boolean isSetTechPlatformEnv() {\n return this.techPlatformEnv != null;\n }", "public static boolean isBrowserChrome() {\r\n\t\treturn ConfigProperties.BROWSER.equalsIgnoreCase(CHROME);\r\n\t}", "public static boolean isMac() {\n\t\tString platform = SWT.getPlatform();\n\t\t\n\t\treturn (platform.equalsIgnoreCase(\"carbon\") || platform.equalsIgnoreCase(\"cocoa\"));\n\t}", "public boolean isSystemApp(String pkg) {\n if (DBG) {\n Slog.d(TAG, \"check system app pkg : \" + pkg);\n }\n if (TextUtils.isEmpty(pkg)) {\n return false;\n }\n\n try {\n return ActivityThread.getPackageManager().isSystemApp(pkg);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n\n return false;\n }", "private void checkJavaHome()\n\t{\n\t\tString javaHome = System.getProperty(\"java.home\");\n \tif(!javaHome.matches(\".*jdk.*\"))\n \t{\n \t\tFile jHome = new File(javaHome);\n \t\tString[] possibleFolders = jHome.getParentFile().list();\n \t\tString match = \".*jdk\" + System.getProperty(\"java.version\");\n \t\tfor( String possibleFolder : possibleFolders)\n \t\t{\n \t\t\tif(possibleFolder.matches(match))\n \t\t\t{\n \t\t\t\tSystem.setProperty(\"java.home\", jHome.getParent() + \"\\\\\" + possibleFolder);\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\tif(!javaHome.matches(\".*jdk.*\"))\n \t\t{\n \t\t\tfor( String possibleFolder : possibleFolders)\n \t\t{\n \t\t\tif(possibleFolder.matches(\".*jdk.*\"))\n \t\t\t{\n \t\t\t\tSystem.setProperty(\"java.home\", jHome.getParent() + \"\\\\\" + possibleFolder);\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} \t\t\t\n \t\t}\n \t}\n\t}", "public static boolean onMac() {\n return System.getProperty(\"mrj.version\") != null || System.getProperty(\"os.name\").toLowerCase(Locale.US).startsWith(\"mac \");\n }", "boolean hasMinCpuPlatform();", "public boolean isSetOs() {\n return this.os != null;\n }", "public final boolean isLinux() {\n\t\treturn isLinux;\n\t}", "boolean hasChromeVersion();", "public static boolean isInstalledOnSDCard(Context context) {\n return isInstalledOnSDCard(getApplication(context));\n }", "@Override\n public void installKettleEnvironment() throws Exception {\n assumeTrue( !isWindows() );\n super.installKettleEnvironment();\n }", "public static boolean isMac()\n {\n return System.getProperty(\"os.name\").toLowerCase().startsWith(\"mac os x\");\n }", "private static boolean hypervisorAbsent()\n {\n try {\n final BufferedReader cpuinfo\n = Files.newBufferedReader(\n Paths.get(\"/proc/cpuinfo\"), StandardCharsets.UTF_8);\n String line;\n while ((line = cpuinfo.readLine()) != null) {\n if (line.startsWith(\"flags\")) {\n return !line.contains(\" hypervisor\");\n }\n }\n return false;\n }\n catch (IOException e) {\n return false;\n }\n }", "public static String getLetterWindows(){\r\n\t\treturn System.getenv(\"windir\").substring(0, 3);\r\n\t}", "private boolean checkExecutable(File parent, String path) {\n File f = new File(parent, path);\n if (!f.isDirectory())\n return f.canExecute();\n return false;\n }", "public static boolean isJavaDBPresent(File installdir){\n\t//check for both names, derby or jaadb\n File derbyInstall = new File(installdir,\"derby\");//NOI18N\n if (!derbyInstall.exists()){\n derbyInstall = new File(installdir,\"javadb\");//NOI18N for latest Glassfish\n }\t\n\treturn derbyInstall.exists();\n }", "private boolean checkToolOnHost(ArrayList<SimpleEntry> toolCheck) throws TNotFoundEx{\n\t\tint result=13;\n\t\tString cmd=\"\";\n\t\tboolean pass=true;\n\t\tfor(SimpleEntry s: toolCheck){\n\t\t\tcmd = s.getValue().toString();\n\t\t\tresult = this.commando.executeProcessListPrintOP(cmd, false);\n\n\t\t\t\tif (result != 0){\n\t\t\t\t\tOutBut.printError(\"Tool \"+s.getKey().toString()+\" does not exist on the host, please install it first\");\n\t\t\t\t\tpass=false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn pass;\n\t}", "boolean isIncludeExecutable();", "private static String getSetCommand()\n {\n String setCmd;\n String osName = System.getProperty(\"os.name\");\n\n if (osName.indexOf(\"indows\") != -1)\n {\n if (osName.indexOf(\"indows 9\") != -1)\n {\n setCmd = \"command.com /c set\";\n }\n else\n {\n setCmd = \"cmd.exe /c set\";\n }\n }\n else\n {\n setCmd = \"/usr/bin/env\";\n //should double check for all unix platforms\n }\n return setCmd;\n }", "private static final native boolean isSupported()/*-{\n\t\treturn !!(chrome.extension);\n\t}-*/;", "public boolean getIsQxlSupported() {\n boolean isLinux = getIsLinuxOS();\n boolean isQxl = getDisplayType().getSelectedItem() == DisplayType.qxl;\n boolean isSpice = getGraphicsType().getSelectedItem() == GraphicsTypes.SPICE;\n boolean clusterSupportsSinglePci = getSelectedCluster() != null &&\n Version.v3_3.compareTo(getSelectedCluster().getCompatibilityVersion()) <= 0;\n\n return isLinux && isQxl && isSpice && clusterSupportsSinglePci;\n }", "synchronized public static boolean isInstalled() {\n return installed > 0;\n }", "private static boolean m4017c() {\n String property = System.getProperty(\"java.runtime.name\");\n if (property == null) {\n return false;\n }\n return property.toLowerCase(Locale.US).contains(AlibcMiniTradeCommon.PF_ANDROID);\n }", "public static boolean isECIDAvailable(Context context) {\n PackageManager pm = context.getPackageManager();\n\n if ( pm == null ) return false;\n\n try {\n pm.getPackageInfo(PROVIDER_NAME, 0);\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n return true;\n }", "public boolean isSystem(PackageInfo pi) {\n // check if bit the for the flag \"system\" is 1.\n // if is NOT system, (f1 & flag_system) = 0\n //is system if (f1 & flag_system) != 0\n // (basic bitwise operation)\n\n return (pi.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;\n }", "String operatingSystem();", "@Override\n public void isPmrInstalledAt() throws IOException {\n assumeTrue( !isWindows() );\n super.isPmrInstalledAt();\n }", "public static boolean isAvailable() {\n\n CommandLineExecutorService cles = Framework.getService(CommandLineExecutorService.class);\n CommandAvailability ca = cles.getCommandAvailability(WebpageToBlob.COMMANDLINE_DEFAULT_wkhtmltopdf);\n return ca.isAvailable();\n }", "protected boolean checkFileSystem() {\n if (this.fsOk && fs != null) {\n try {\n FSUtils.checkFileSystemAvailable(fs);\n } catch (IOException e) {\n LOG.fatal(\"Shutting down HRegionServer: file system not available\", e);\n abort();\n fsOk = false;\n }\n }\n return this.fsOk;\n }", "public\n static\n String\n which( CharSequence cmd )\n {\n String cmdStr = inputs.notNull( cmd, \"cmd\" ).toString();\n\n String path = System.getenv( ENV_PATH );\n\n if ( path != null ) \n {\n for ( String dir : PAT_PATH_SEP.split( path ) )\n {\n File f = new File( dir, cmdStr );\n if ( f.exists() && f.canExecute() ) return f.toString();\n }\n }\n\n return null; // if we get here\n }", "public static boolean isHoneycomb()\n {\n return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;\n }", "@Override public boolean hasNativeTextFields () {\n return _os == OS.WINDOWS || _os == OS.LINUX;\n }", "boolean isPackageInstaller(String packageName);", "private static final boolean isSupport(String key) {\n return SystemProperties.get(key).equals(SUPPORT_YES);\n }", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify the path to the RhapsodyCL.exe file\");\n else if(!value.contains(\"RhapsodyCL.exe\")) {\n \terror(\"didn't find RhapsodyCL.exe in the path !\");\n }else{\n \tok(); \t\n }\n }", "public String getOperatingSystem() {\n\t\tString os = System.getProperty(\"os.name\");\n\t\t// Returning the os eg - windows 10\n\t\treturn os;\n\t}", "public static boolean isLibc64() {\n boolean bb = false;\n File libcFile = new File(SYSTEM_LIB_C_PATH);\n if (libcFile != null && libcFile.exists()) {\n byte[] header = readELFHeadrIndentArray(libcFile);\n if (header != null && header[EI_CLASS] == ELFCLASS64) {\n return true;\n }\n }\n File libcFile64 = new File(SYSTEM_LIB_C_PATH_64);\n if (libcFile64 != null && libcFile64.exists()) {\n byte[] header = readELFHeadrIndentArray(libcFile64);\n byte b = header[EI_CLASS];\n if (String.valueOf(b).equals(\"2\")) {\n bb = true;\n }\n }\n return bb;\n }", "public boolean checkWin() throws Exception {\r\n\t\treturn getOcean().checkWin();\r\n\t}", "boolean hasSoftware();", "public static boolean usePrinting() {\n\t\treturn (isWindows() || isSolaris() || isMac());\n\t}", "boolean check (Env env) {\n return true;\n }", "boolean hasIsSupportComp();", "public static boolean inDockerEnv() {\n\t\treturn DOCKER_ENV_FLAG_FILE.isFile();\n\t}", "private boolean isRecDirWindows() {\n File testfile = new File(RecDir + LINUX_SEPARATOR + \"PodcastRecorder.tst\");\n\n // If it failed assume it's a Windows filesystem. Linux filesystems will happily accept the Windows separator.\n if (testfile==null || !(testfile instanceof File)) {\n return true;\n }\n\n // If the testfile exists it must be a Linux filesystem.\n if (testfile.exists()) {\n testfile.delete();\n return false;\n }\n\n // Try to create a new file.\n try {\n\n // If it worked it must be a Linux filesystem.\n if (testfile.createNewFile()) {\n testfile.delete();\n return false;\n }\n } catch (Exception e) {\n return true;\n }\n\n return false;\n }", "public static boolean isSystemApplication(Context context,\n String packageName) {\n PackageManager packageManager = context.getPackageManager();\n if (packageManager == null || packageName == null\n || packageName.length() == 0) {\n return false;\n }\n try {\n ApplicationInfo app = packageManager.getApplicationInfo(\n packageName, 0);\n return (app != null && (app.flags & ApplicationInfo.FLAG_SYSTEM) > 0);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "public static boolean zzcz(Context context) {\n synchronized (zzbhd.class) {\n Context context2 = context.getApplicationContext();\n if (zzgfe != null && zzgff != null && zzgfe == context2) {\n return zzgff;\n }\n zzgff = null;\n if (zzq.isAtLeastO()) {\n zzgff = context2.getPackageManager().isInstantApp();\n } else {\n try {\n context.getClassLoader().loadClass(\"com.google.android.instantapps.supervisor.InstantAppsRuntime\");\n zzgff = true;\n }\n catch (ClassNotFoundException classNotFoundException) {\n zzgff = false;\n }\n }\n zzgfe = context2;\n return zzgff;\n }\n }", "public boolean isSetPlatform() {\n return this.platform != null;\n }", "public Boolean runCommand(String cmd) {\n Boolean isSuccessful = false;\n String whichOS = System.getProperty(\"os.name\");\n Boolean isWindows = true;\n\n\n if (!whichOS.toLowerCase().startsWith(\"windows\")) {\n isWindows = false;\n }\n\n Process process = null;\n try {\n if (isWindows) {\n process = Runtime.getRuntime()\n .exec(\"cmd.exe \" + cmd);\n\n } else {\n process = Runtime.getRuntime()\n .exec(cmd);\n }\n\n StreamGobbler streamGobbler =\n new StreamGobbler(process.getInputStream(), System.out::println);\n Executors.newSingleThreadExecutor().submit(streamGobbler);\n int exitCode = process.waitFor();\n System.out.println(\"Exit Code: \" + exitCode);\n assert exitCode == 0;\n isSuccessful = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return isSuccessful;\n }", "private static boolean isProcessRunning(ManufactureProcessInfo processInfo, Manufacture manufactureBuilding) {\n\t\tboolean result = false;\n\n\t\tIterator<ManufactureProcess> i = manufactureBuilding.getProcesses().iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tManufactureProcess process = i.next();\n\t\t\tif (process.getInfo().getName() == processInfo.getName()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public boolean isGoogleMapsInstalled()\n {\n try\n {\n ApplicationInfo info = getPackageManager().getApplicationInfo(\"com.google.android.apps.maps\", 0 );\n return true;\n }\n catch(PackageManager.NameNotFoundException e)\n {\n return false;\n }\n }" ]
[ "0.62674356", "0.6251252", "0.6174279", "0.6078884", "0.6029735", "0.6014929", "0.597937", "0.57938194", "0.5754587", "0.56692135", "0.5535141", "0.5504379", "0.5458051", "0.54220843", "0.5350156", "0.5316704", "0.5253541", "0.51912755", "0.51835656", "0.51484334", "0.5128785", "0.5035321", "0.5034099", "0.50275034", "0.5005028", "0.4998846", "0.4972465", "0.49706712", "0.4947073", "0.49300042", "0.49177825", "0.490366", "0.48024252", "0.47739553", "0.4754221", "0.4726357", "0.4693591", "0.466422", "0.4647435", "0.4647221", "0.46115953", "0.46029103", "0.45954254", "0.4579326", "0.4569584", "0.45619664", "0.45538256", "0.45261887", "0.45222804", "0.44999442", "0.44973266", "0.4484028", "0.4475903", "0.4454429", "0.44543466", "0.44492754", "0.4445447", "0.4439922", "0.44372514", "0.44245324", "0.44024345", "0.43957338", "0.43664894", "0.43636316", "0.4340858", "0.43398613", "0.43377826", "0.43334112", "0.43263853", "0.43180814", "0.4315097", "0.43124035", "0.43078297", "0.43049094", "0.43032402", "0.43020085", "0.43015605", "0.42946205", "0.42884904", "0.42877194", "0.4267632", "0.42587277", "0.42573312", "0.4246795", "0.42376217", "0.42327988", "0.42314088", "0.42301163", "0.42287812", "0.42228267", "0.4221588", "0.42214432", "0.42205822", "0.42125005", "0.4209931", "0.420905", "0.42052504", "0.4204965", "0.4203365", "0.42016944" ]
0.86570966
0
/Change the filename depending on the dataset being used (data1.txt or data2.txt
public static void main(String[] args) { String fileName = "data1.txt"; //Load the data from the dataset file dataSet = getDataSet(fileName); //Setting up the output file String outputFileName = ""; if (fileName.indexOf(".") > 0) { outputFileName = fileName.substring(0, fileName.lastIndexOf(".")); } createFile(outputFileName+".csv"); //log the time the algorithm started long startTime = System.currentTimeMillis(); //Placeholder of the fittest individual fittestIndividual = new Individual(GENE_SIZE, NUM_RULES, COND_LEN); fittestIndividual.generateRulebase(); //Setup the mating pool matingPool = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN); //used to run the GA multiple times without doing it manually //set to 1 because we want to run the GA once for (int a = 0; a < 1; a++) { currentBest = new Individual(GENE_SIZE, NUM_RULES, COND_LEN); currentBest.generateRulebase(); //Generate a population generatePopulation(); //Initial calculation of the fitness calculateFitness(population); for (int i = 0; i < GENERATION; i++) { average = 0; //reset the average currentBestArray[i] = currentBest.getFitness(); tournamentSelect(population); //Calculate the fitness of the mating pool calculateFitness(matingPool); //Perfrom crossover on the mating pool crossover(matingPool); //Mutation mutation(matingPool); //Calculate the fitness of the mating pool calculateFitness(matingPool); //Evaluate the current population for (Individual individual : matingPool) { if (individual.getFitness() > currentBest.getFitness()) { currentBest = new Individual(individual); } average = average + individual.getFitness(); } //Replace the population with the new generation for (int j = 0; j < POP_SIZE; j++) { population[j] = new Individual(matingPool[j]); } averageArray[i] = average / POP_SIZE; } //Check whether the current best is fitter than the global fittest individual if (currentBest.fitness > fittestIndividual.fitness) { fittestIndividual = new Individual(currentBest); //copy the fittest individuals performance fittestArray = Arrays.copyOf(currentBestArray, currentBestArray.length); } } System.out.println("Best fitness generated for the dataset: " + fittestIndividual.fitness); //output the rules printRules(fittestIndividual.getRulebase()); //Save the performance data into the output file for (int i = 0; i < fittestArray.length; i++) { addToFile(i, fittestArray[i], averageArray[i]); } //close the file close(); //Evaluate the fitness agaisnt the dataset calculateFitness(fittestIndividual); double accuracyPercentage = ((double) 100 / dataSet.size()) * fittestIndividual.fitness; System.out.format("%.2f%% accuracy on the datase set.\n", accuracyPercentage); //Log the duration it took long duration = System.currentTimeMillis() - startTime; System.out.println("Completed in " + String.format("%02d min, %02d.%02d sec", TimeUnit.MILLISECONDS.toMinutes(duration), TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(duration)), TimeUnit.MILLISECONDS.toMillis(duration) - TimeUnit.SECONDS.toMillis(TimeUnit.MILLISECONDS.toSeconds(duration)) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillFilenames() {\r\n if (this.pl_LastFiles.getParam(\"nodelist-file\") != null\r\n && this.pl_LastFiles.getParam(\"edgelist-file\") != null) {\r\n this.nodefileText.setText(this.pl_LastFiles.getParam(\"nodelist-file\"));\r\n this.edgeFileText.setText(this.pl_LastFiles.getParam(\"edgelist-file\"));\r\n } else {\r\n this.nodefileText.setText(\"examples\" + System.getProperty(\"file.separator\") + \"20nodes.txt\");\r\n this.edgeFileText.setText(\"examples\" + System.getProperty(\"file.separator\") + \"20edges.txt\");\r\n }\r\n }", "public void save() {\r\n File distDataFile = new File(path);\r\n\r\n //String basePath = path;\r\n String endOfPath = path.substring(path.lastIndexOf(\"/\"));\r\n\r\n File rootDataFile;\r\n if (!path.contains(\"artists\")) {\r\n rootDataFile = new File(BASEDIR + \"/resources/data\" + endOfPath);\r\n } else {\r\n rootDataFile = new File(BASEDIR + \"/resources/data/artists\" + endOfPath);\r\n }\r\n\r\n File distTempFile = new File(path.substring(0, path.lastIndexOf(\"/\")) + \"/myTempFile.txt\");\r\n\r\n File rootTempFile;\r\n if (!path.contains(\"artists\")) {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/myTempFile.txt\");\r\n } else {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/artists/myTempFile.txt\");\r\n }\r\n \r\n try {\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(distTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw.write(line);\r\n bw.newLine();\r\n }\r\n\r\n bw.close();\r\n distDataFile.delete();\r\n distTempFile.renameTo(distDataFile);\r\n\r\n BufferedWriter bw2 = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(rootTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw2.write(line);\r\n bw2.newLine();\r\n }\r\n\r\n bw2.close();\r\n rootDataFile.delete();\r\n rootTempFile.renameTo(rootDataFile);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOExceptoin in save1 : FileData\");\r\n }\r\n }", "public void setDataFileName(String dataFileName) {\n this.dataFileName = dataFileName;\n }", "public void setFileName(String filename)\n\t{\n\t\tsuper.setFileName(filename);\n\t\t\n\t\t//#CM702602\n\t\t// Generate the path name of Working data File. \n\t\tworkingDataFileName = wFileName.replaceAll(\"\\\\\\\\send\\\\\\\\\", \"\\\\\\\\recv\\\\\\\\\");\n\t}", "public static String generateDatasetName() {\n return DATASET_NAME_PREFIX + UUID.randomUUID().toString().replace('-', '_');\n }", "public String renameDataset(){\n if(dataset.getRight() == DataConstants.EXECUTIVE_RIGHT){\n RenameDatasetDialog dialog = new RenameDatasetDialog(this, dataset.getName());\n dialog.setVisible(true);\n }\n return this.dataset.getName();\n }", "private static void writeToFile(String[] data) {\n\t\t// Regatta hasn't been calculated.\n\t\tif(r == null) {\n\t\t\tSystem.out.println(\"\\nYou haven't processed a regatta yet! \\nUse regatta to begin processing.\\n\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Just the command was specified, we need to get the filename.\n\t\tif(data.length == 1) {\n\t\t\tSystem.out.println(\"Oops, looks like you didn't specify an output file.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\t// Filename was specified but is invalid. Need to get another one.\n\t\tif(!isValidFileName(data[1])) {\n\t\t\tSystem.out.println(\"Looks like your filename is incorrect.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\tinitializeOutput(data[1]);\n\n\t\t// Write out.\n\t\tfileOutput.print(r.podium());\n\t\tfileOutput.close();\n\t}", "private String setFileName() {\n Calendar c = Calendar.getInstance();\n\n String LOG = \"\";\n\n LOG += c.get(Calendar.YEAR);\n\n if (c.get(Calendar.MONTH) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MONTH) + 1;\n\n if (c.get(Calendar.DATE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.DATE);\n\n if (c.get(Calendar.HOUR_OF_DAY) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.HOUR_OF_DAY);\n\n if (c.get(Calendar.MINUTE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MINUTE);\n\n LOG += \".csv\";\n\n return LOG;\n }", "public void setFilename( String name) {\n\tfilename = name;\n }", "public void setFilename(String name){\n\t\tfilename = name;\n\t}", "public void updateFileName()\n {\n\n String fn= presenter.getCurrentTrack().getFileName();\n if(fn!=null && !fn.isEmpty()) {\n File file = new File(fn);\n fn=file.getName();\n }\n if(fn==null || fn.isEmpty())\n fn=\"*\";\n fileNameTextView.setText(fn);\n }", "public String getDataFileName() {\treturn dataFileName;\t}", "protected String getMethodSpecificTestDataFileName() {\r\n StringBuffer result = new StringBuffer()\r\n .append(TESTDATA+\"/\")\r\n .append(getClassNameWithoutPackage())\r\n .append(\"_\")\r\n .append(getName())\r\n .append(\".xml\");\r\n return result.toString();\r\n }", "void setFileName( String fileName );", "public String getFileNameToInsert()\r\n\t{\n\t\tif(n1<n2 || algo==1)\r\n\t\t\treturn getFileName(0);\r\n\t\telse\r\n\t\t\treturn getFileName(1);\r\n\t}", "public void reWriteFile(String filename,String data) {\n\n if (filename.trim().length() > 0) {\n try {\n PrintWriter output = new PrintWriter(filename);\n\n output.write(data);\n\n output.close();\n } catch (IOException e) {\n System.out.println(\"I/O Error\");\n }\n } else {\n System.out.println(\"Enter a filename:\");\n }\n }", "public void setFileName( String name ) {\n\tfilename = name;\n }", "private void updateFileName(ImageDataModel dataModel, String rename) {\r\n try {\r\n File file = dataModel.getFile();\r\n // method to rename the file and then set to model data for update the index of file in main list\r\n dataModel.setFile(FileUtils.renameFile(dataModel.getFile(), rename));\r\n if (SharedPref.getListType(MediaVaultController.getSharedPreferencesInstance())\r\n .equals(Constant.LIST_VIEW)) {\r\n GalleryHelper.imageFolderMap.get(nameKey).get(0).setFile(dataModel.getFile());\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n GalleryHelper.imageDataModelList.get(0).setFile(dataModel.getFile());\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n VideoViewData.imageDataModelList.get(0).setFile(dataModel.getFile());\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n AudioViewData.imageDataModelList.get(0).setFile(dataModel.getFile());\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n PhotoViewData.imageDataModelList.get(0).setFile(dataModel.getFile());\r\n }\r\n }\r\n if (SharedPref.getAlbumType(MediaVaultController.getSharedPreferencesInstance()).\r\n equals(Constant.ALBUM_VIEW)) {\r\n // Update the name of Main List of GalleryHelper.class\r\n GalleryHelper.imageFolderMap.get(nameKey).get(0).setFile(dataModel.getFile());\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n GalleryHelper.imageDataModelList.get(0).setFile(dataModel.getFile());\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n VideoViewData.imageDataModelList.get(0).setFile(dataModel.getFile());\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n AudioViewData.imageDataModelList.get(0).setFile(dataModel.getFile());\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n PhotoViewData.imageDataModelList.get(0).setFile(dataModel.getFile());\r\n }\r\n }\r\n\r\n /*\r\n * Scan old and new file to update entry into content provider.\r\n * */\r\n FileUtils.scanFile(PhotoViewActivity.this, dataModel.getFile());\r\n FileUtils.scanFile(PhotoViewActivity.this, file);\r\n // update local database for time\r\n mediaFileDuration.updateFileName(dataModel.getFile().getAbsolutePath(), file.getAbsolutePath());\r\n //Update toolbar with new file name\r\n String name = dataModel.getFile().getName();\r\n String actualName = FileUtils.getSecureFileName(name);\r\n if (actualName != null && !actualName.equalsIgnoreCase(\"\")) {\r\n updateTileBar(actualName);\r\n } else {\r\n updateTileBar(name);\r\n }\r\n } catch (Exception e) {\r\n SDKUtils.showToast(PhotoViewActivity.this, e.toString());\r\n }\r\n }", "public void writeFile(String filename,String data) {\n\n BufferedWriter out = null;\n if (filename.trim().length() > 0) {\n try {\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename,true)));\n out.write(data);\n out.close();\n } catch (IOException e) {\n System.out.println(\"I/O Error\");\n }\n } else {\n System.out.println(\"Enter a filename:\");\n }\n }", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public void setDataSetName(String datasetname) {\r\n _datasetname=datasetname;\r\n }", "private static String buildFileName(int exportMode, String currentTimestamp)\n {\n String fileNamePrefix;\n\n if(exportMode != -1)\n {\n fileNamePrefix = ExportModeHandler.getFilePrefix(exportMode);\n }\n else\n {\n fileNamePrefix = \"RAW_\";\n }\n\n return fileNamePrefix + Utilities.getDeviceName() + \"_\" + currentTimestamp + \".txt\";\n }", "static void ReadAndWriteDataSet(String folderName) throws IOException\n\t{\n\t\t\n\t\t String path = \"data\"+FS+\"data_stage_one\"+FS+folderName; // Folder path \n\t\t \n\t\t String filename, line;\n\t\t File folder = new File(path);\n\t\t File[] listOfFiles = folder.listFiles();\n\t\t BufferedReader br = null;\n\t\t for(int i=0; i < listOfFiles.length; i++)\n\t\t { \n\t\t\t System.out.println(listOfFiles[i].getName());\n\t\t\t filename = path+FS+listOfFiles[i].getName();\n\t\t\t try\n\t\t\t {\n\t\t\t\t br= new BufferedReader(new FileReader(new File(filename)));\n\t\t\t\t while((line = br.readLine())!= null)\n\t\t\t\t {\n\t\t\t\t\tfor(int j=0; j<prep.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t\t\twhile(st.hasMoreTokens())\n\t\t\t\t\t\t\tif(st.nextToken().equalsIgnoreCase(prep[j]))\n\t\t\t\t\t\t\t{\t//System.out.println(line);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(arr[j] == null)\n\t\t\t\t\t\t\t\t\tarr[j] = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarr[j].add(line.toLowerCase().replaceAll(\"\\\\p{Punct}\",\"\").trim().replaceAll(\"\\\\s+\", \" \"));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }\n\t\t\t catch(Exception e)\n\t\t\t {\n\t\t\t\t System.err.println(\"exception: \"+e.getMessage() );\n\t\t\t\t e.printStackTrace();\n\t\t\t\t System.exit(0);\n\t\t\t }\n\t\t\t finally\n\t\t\t {\n\t\t\t\t br.close();\n\t\t\t }\n\t\t }\n\t\t \n\t\t // Writes the entire arraylist(preposition wise seperated files)\n\t\t \n\t\t WriteSeperated(folderName);\n\t\t \n\t\t for(int i=0; i<prep.length; i++)\n\t\t {\n\t\t\t arr[i].clear();\n\t\t }\n\t\t \n\t}", "private static void writeData(Instances data, String filename) {\n\t\ttry {\n\t\t\tArffSaver saver = new ArffSaver();\n\t\t\tsaver.setInstances(data);\n\t\t\tsaver.setFile(new File(filename));\n\t\t\tsaver.writeBatch();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "java.lang.String getFilename();", "java.lang.String getFilename();", "private void outputExtraFile(String datasetName, Field[] selects,\r\n\t\t\tString fileName) {\r\n\t\tFile f = new File(fileName + \".xml\");\r\n\t\ttry {\r\n\t\t\tFileWriter fw = new FileWriter(f);\r\n\t\t\tSystem.out.println (\"Encoding\"+fw.getEncoding());\r\n\t\t\tString str = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\r\n\t\t\tfw.write(str);\r\n\t\t\tstr = \"<Extra><Datasets><Dataset><id>\" + datasetName\r\n\t\t\t\t\t+ \"</id><Fields>\";\r\n\t\t\tfw.write(str);\r\n\t\t\tfor (int i = 0; i < selects.length; i++) {\r\n\t\t\t\tfw.write(\"<Field>\");\r\n\t\t\t\t// Output the Label of Field.\r\n\t\t\t\tstr = \"<label>\" + selects[i].label.getBytes(\"UTF-8\") + \"</label>\";\r\n\t\t\t\tfw.write(str);\r\n\t\t\t\t// Output the ID of Field.\r\n\t\t\t\tstr = \"<name>field\" + (i + 1) + \"</name>\";\r\n\t\t\t\tfw.write(str);\r\n\t\t\t\tfw.write(\"</Field>\");\r\n\t\t\t}\r\n\t\t\tstr = \"</Fields></Dataset></Datasets></Extra>\";\r\n\t\t\tfw.write(str);\r\n\t\t\tfw.flush();\r\n\t\t\tfw.close();\r\n\t\t\t/* Output the Log */\r\n\t\t\tSystem.out.println(\"CARA LOG: Generate Extra \" + fileName\r\n\t\t\t\t\t+ \" successfully.\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString short_1_A_Path = args[0];\n\t\tString short_1_B_Path = args[1];\n\t\tString OutPutPath = args[2];\n\t\tString DataSetName = args[3];\n\t\ttry {\n\t\t\tint Num=0;\n\t\t\tString readtemp1=\"\";\n\t\t\tString readtemp2=\"\";\n\t\t\tint Short1_NumLeft=0;\n\t\t\tint Short1_NumRight=0;\n\t\t\tString encoding = \"utf-8\";\n\t\t\tFile file1 = new File(short_1_A_Path);\n\t\t\tFile file2 = new File(short_1_B_Path);\n\t\t\tif (file1.exists()&&file2.exists()) {\n\t\t\t\tInputStreamReader read1 = new InputStreamReader(new FileInputStream(file1), encoding);\n\t\t\t\tInputStreamReader read2 = new InputStreamReader(new FileInputStream(file2), encoding);\n\t\t\t\tBufferedReader bufferedReader1 = new BufferedReader(read1);\n\t\t\t\tBufferedReader bufferedReader2 = new BufferedReader(read2);\n\t\t\t\twhile ((bufferedReader1.readLine())!=null && (bufferedReader2.readLine())!= null)\n\t\t\t\t{\n\t\t\t\t\t//The second line.\n readtemp1=bufferedReader1.readLine();\n readtemp2=bufferedReader2.readLine();\t\t\t\t\t\t\n\t\t\t\t //Write left.\n\t\t\t\t\tFileWriter writer1 = new FileWriter(OutPutPath + DataSetName+\".left.fasta\",true);\n\t\t\t\t\twriter1.write(\">\"+(Short1_NumLeft++)+\"\\n\"+readtemp1+\"\\n\");\n\t\t\t\t\twriter1.close();\n\t\t\t\t\t//Write right.\t\n\t\t\t\t\tFileWriter writer2 = new FileWriter(OutPutPath + DataSetName+\".right.fasta\",true);\n\t\t\t\t\twriter2.write(\">\"+(Short1_NumRight++)+\"\\n\"+readtemp2+\"\\n\");\n\t\t\t\t\twriter2.close();\n\t\t\t\t\t//Write all.\t\n\t\t\t\t\tFileWriter writer3 = new FileWriter(OutPutPath + DataSetName+\".fasta\", true);\n\t\t\t\t\twriter3.write(\">\"+(Num)+\"\\n\"+readtemp1 +\"\\n\"+\">\"+(Num)+\"\\n\"+readtemp2+\"\\n\");\n\t\t\t\t\twriter3.close();\n\t\t\t\t\t//The third line.\n\t\t\t\t\tbufferedReader1.readLine();\n\t\t\t\t\tbufferedReader2.readLine();\n\t\t\t\t //The fourth line.\n\t\t\t\t\tbufferedReader1.readLine();\n\t\t\t\t\tbufferedReader2.readLine();\n\t\t\t\t}\n\t\t\t\tbufferedReader1.close();\n\t\t\t\tbufferedReader2.close();\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"File is not exist!\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error liaoxingyu\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void record_data(String filename, String data_type) throws IOException {\t\t\n\t\tString _filename;\n\t\tVector<svm_node[]> _set;\n\t\t/* set file name for record */\n\t\tif (data_type.toLowerCase() == ORIGINAL) {\n\t\t\t_filename = \"./datasets/data.\" + filename + \"_original\";\n\t\t\t_set = original_set;\n\t\t} else if (data_type.toLowerCase() == SCALED) {\n\t\t\t_filename = \"./datasets/data.\" + filename + \"_scaled\";\n\t\t\t_set = scaled_set;\n\t\t} else {\n\t\t\tSystem.out.println(\"wrong data type, record failed\");\n\t\t\treturn;\n\t\t}\n\t\tFile file = new File(_filename);\n\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\tOutputStreamWriter writer = new OutputStreamWriter(fos, \"UTF-8\");\n\t\t\n\t svm_node[] sample;\n\t for (int i = 0; i < this.sample_num; i++) {\n\t \twriter.append(labels.get(i) + \" \");\n\t \tsample = _set.get(i);\n\t \tfor (int j = 0; j < this.feature_num; j++) {\n\t \t\twriter.append(sample[j].index + \":\" + sample[j].value + \" \");\n\t \t}\n\t \twriter.append(\"\\n\");\n\t }\n\t System.out.println(\"Data record done! see \" + _filename);\n\t if (writer != null) {\n\t \twriter.close();\n\t }\n\t\tif (fos != null) {\n\t\t\tfos.close();\n\t\t}\n\t}", "private String getFileName()\r\n {\r\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd__HH_mm\");\r\n \r\n String ret = new String();\r\n ret += preferences.getPreference(UserPreferences.SAVE_LOCATION_PROP);\r\n ret += format.format(new Date());\r\n \r\n String notationStr = notation.getText().trim();\r\n if (!notationStr.isEmpty()) \r\n {\r\n ret += \"__\" + notationStr.replaceAll(\" \\t/\\\\:\", \"_\");\r\n }\r\n \r\n ret += \".csv\";\r\n \r\n return ret;\r\n }", "@Override\n protected String generateFileNameForKeyValue(Text key, Text value, String name) {\n if (key.toString().startsWith(\"total_\")) {\n return \"total_simulation.txt\";\n }\n\n String[] split = value.toString().split(\"'\");\n for (String s : split) {\n if (s.contains(\"_\")) {\n int startIndex = s.indexOf(\"_\") + 1;\n return \"results/\" + s.substring(startIndex, s.indexOf(\";\", startIndex)) + \".txt\";\n }\n }\n\n return super.generateFileNameForKeyValue(key, value, name);\n }", "public void setFilename(String f){\n\t\tfilename = f;\n\t}", "public void setName(String filename) {\n\t\tthis.filename = filename;\n\t}", "public String getDataFileName() {\n return dataFileName;\n }", "protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }", "public void outputToFile(String filemame)\n {\n }", "String getFilename();", "public void chooseDatasetDescriptionFile() {\n JFileChooser fileChooser = new JFileChooser(\n new java.io.File(defaultDirectory));\n fileChooser.setDialogTitle(NbBundle.getMessage(\n SessionTopComponent.class, \"ChooseDatasetDescriptionFile\"));\n fileChooser.setFileSelectionMode(\n JFileChooser.FILES_AND_DIRECTORIES);\n FileNameExtensionFilter fileFilter = new FileNameExtensionFilter(\n \"XML-filer\", \"xml\");\n fileChooser.setFileFilter(fileFilter);\n int returnVal = fileChooser.showOpenDialog(this);\n\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n datasetDescriptionFile = fileChooser.getSelectedFile();\n\n datasetDescriptionFileTextField.setText(\n datasetDescriptionFile.getAbsolutePath());\n defaultDirectory = datasetDescriptionFile.getPath();\n }\n enableStartButton();\n }", "public static String getFileName()\r\n\t{\r\n\t\tString name = \"d3_\";\r\n\t\tjava.util.Date tNow = new java.util.Date();\r\n\r\n\t\tjava.text.SimpleDateFormat df = new java.text.SimpleDateFormat(\"mm_ss\");\r\n\r\n\t\tname = name + \"_\" + df.format(tNow) + \".wmf\";\r\n\r\n\t\treturn name;\r\n\t}", "public abstract String createFilename(Entity entity);", "DatasetFile getDatasetFile();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "public void setFileName(String nomeFile) {\n\t\tthis.fileName = nomeFile;\n\t}", "private String getEditedFilename(File f) {\n \tString name = \"$Corrupted$\";\n \tString s = \"$Corrupted$\";\n \t\n \ttry {\n \t\tBufferedReader br = new BufferedReader( new FileReader(f) );\n \t\ts = br.readLine();\n \t\tbr.close();\n \t\n \t}catch (IOException e) {\n \t\te.printStackTrace();\n \t}\n \t\n\n \tif ( s.substring(0,6).equals(\"title\"+dataSep) ) {\n \t\tname = s.substring(6,s.length());\n \t\t\n \t}\n \t\n \treturn name;\n \t\n }", "private static String writeToFile(String data, String fileName, Context context) {\n try {\n File documentsPath = new File(context.getExternalFilesDir(null).toString());\n if (!documentsPath.exists()) {\n documentsPath.mkdirs();\n }\n File myExternalFile = new File(documentsPath, fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(myExternalFile);\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream);\n outputStreamWriter.write(data);\n outputStreamWriter.close();\n fileOutputStream.close();\n return myExternalFile.getAbsolutePath();\n } catch (IOException e) {\n writeLog(LOG_LEVEL.ERROR, \"File write failed: \" + e.toString());\n }\n return \"\";\n }", "@Override\n public void saveFile(String fileString, String filename) throws IOException {\n }", "private String getOutputFilename(JFrame anAppFrame)\n {\n String fn = \"\";\n\n // setup file chooser\n JFileChooser csvChooser = new JFileChooser();\n CSVFileFilter filter = new CSVFileFilter();\n csvChooser.setFileFilter(filter);\n\n // prompt user for output file\n int returnVal = csvChooser.showSaveDialog(anAppFrame);\n\n // process result\n if (returnVal == JFileChooser.APPROVE_OPTION)\n {\n fn = csvChooser.getSelectedFile().getPath();\n if (TRACE)\n System.out.println(\"DataGenModel: saving \" + fn);\n }\n return fn;\n }", "@Override\r\n\tpublic String getFileName() {\n\t\treturn \"PFF_MONITOREOMENSUAL.csv\";\r\n\t}", "public void setSrcDatasetName(String srcDatasetName) {\r\n this.srcDatasetName = srcDatasetName;\r\n }", "public void saveData(String leftPath, String rightPath) throws IOException {\r\n File leftSource = new File(\"././ressources/savedataleft.csv\");\r\n File rightSource = new File(\"././ressources/savedataright.csv\");\r\n File leftDest = new File(leftPath);\r\n File rightDest = new File(rightPath);\r\n Files.copy(leftSource.toPath(), leftDest.toPath(), StandardCopyOption.REPLACE_EXISTING);\r\n Files.copy(rightSource.toPath(), rightDest.toPath(), StandardCopyOption.REPLACE_EXISTING);\r\n }", "public void setOriginalFileName(String newValue);", "public String getDatasetName(){\n return this.dataset.getName();\n }", "public void setFileName(String name)\n\t{\n\t\tfileName = name;\n\t}", "public static void DatasetAndQueryToFiles(double d, double e) throws IOException {\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch1.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch2.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch3.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch4.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch5.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch6.dat\");\r\n\t\tReadInDataset.findMinAndMax();\r\n\t\tReadInDataset.finalizeDataset();\r\n\t\tReadInDataset.writeToFile2(\"FinalDataset\"+\".arff\",ReadInDataset.finalDataset); //write down the used dataset\r\n\t\tquery=assignScoreToQueries(); //assign the scores to queries\r\n\t\ttrainQueries=takeTrainingQuerySet(query,d);\r\n\t\ttestQueries=takeTestingQuerySet(query,e,d);\r\n\t\tscoreToFile(Queries.NumberOfDimensions, trainQueries, \"TrainScoreSet.arff\"); //write down the queries with the scores\r\n\t\tscoreToFile(Queries.NumberOfDimensions, testQueries, \"TestScoreSet.arff\"); //write down the queries with the scores\r\n\t//\tqueryAndDataToCSV(); // this produces a graph with both queries and the dataset, not needded right now\r\n\t\twriteQueriesToCSV(testQueries, \"test\"); \r\n\t\twriteQueriesToCSV(trainQueries, \"train\"); \r\n\t}", "public String VerticalOp(String name) {\n String line;\n try {\n BufferedReader br = new BufferedReader(new FileReader(file1));\n BufferedReader br2 = new BufferedReader(new FileReader(file2));\n BufferedWriter bw = new BufferedWriter(new FileWriter(name));\n\n do{\n line = br.readLine();\n bw.write(line);\n }while(line != null);\n\n do{\n line = br2.readLine();\n bw.write(line);\n }while(line != null);\n bw.flush();\n }\n catch(FileNotFoundException e) {\n System.out.println(\"ERROR: File does not exist. Please input a valid input file.\");\n }\n catch(IOException e) {\n System.out.println(\"ERROR: Failure while reading from file.\");\n }\n ++mProcCount;\n return name;\n }", "public void setFilename(String fn) {\n\t\tfilename = fn;\n\t}", "private String generateFilename() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "public StrColumn getDataFileName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"data_file_name\", StrColumn::new) :\n getBinaryColumn(\"data_file_name\"));\n }", "public void save(String newFilePath) {\r\n File deletedFile = new File(path);\r\n deletedFile.delete();\r\n path = newFilePath;\r\n File dataFile = new File(path);\r\n File tempFile = new File(path.substring(0, path.lastIndexOf(\"/\")) + \"/myTempFile.txt\");\r\n\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(tempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw.write(line);\r\n bw.newLine();\r\n }\r\n\r\n bw.close();\r\n dataFile.delete();\r\n tempFile.renameTo(dataFile);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOException in save2 : FileData\");\r\n }\r\n }", "public abstract String toStringForFileName();", "public void setFileName(final String theName)\r\n {\r\n\r\n // this means we are currently in a save operation\r\n _modified = false;\r\n\r\n // store the filename\r\n _fileName = theName;\r\n\r\n // and use it as the name\r\n if (theName.equals(NewSession.DEFAULT_NAME))\r\n setName(theName);\r\n\r\n }", "public void setFilename(String filename) {\n this.filename = filename;\n }", "public void setFilename(String filename) {\n this.filename = filename;\n }", "public String getFileName();", "public String getFileName();", "public static void saveFile(String targetData) throws IOException{\r\n\t\tJFileChooser chooser = new JFileChooser();\t\t\t\t\t//declare jfilechooser to let user choose file\r\n\t\tchooser.showSaveDialog(null);\t\t\t\t\t\t\t\t//shows save dialog box for user to choose save location\r\n\t\tString fileName = chooser.getSelectedFile().toString();\t\t//takes file and converts it to string\r\n\t\tif(!fileName.endsWith(\".txt\"))fileName += \".txt\";\t\t\t//if filename doesn't end in .txt, add .txt to filename\r\n\t\tBufferedWriter bWriter = new BufferedWriter(new FileWriter(fileName));\t\t//creates writer object\r\n\t\tbWriter.write(targetData);\t\t\t\t\t\t\t\t\t//writes the string passed in as an argument to the file we specified earlier\r\n\t\tbWriter.close();\t\t\t\t\t\t\t\t\t\t\t//close writer - don't waster resources\r\n\t}", "public String getFilename();", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "private void toFile(OutputData data) {\n if(data == null) {\r\n JOptionPane.showMessageDialog(this, \"Dane wynikowe nie zostały jeszcze umieszczone w pamieci\");\r\n return;\r\n }\r\n\r\n // Sprawdzenie sciezki zapisu\r\n String filePath = this.outputFileSelector.getPath();\r\n if(filePath.length() <= 5) {\r\n JOptionPane.showMessageDialog(this, \"Nie można zapisać wyniku w wybranej lokacji!\");\r\n return;\r\n }\r\n\r\n // Zapisujemy plik na dysk\r\n try{\r\n PrintWriter writer = new PrintWriter(filePath, \"UTF-8\");\r\n OutputDataFormatter odf = new OutputDataFormatter(this.outputData);\r\n\r\n String userPattern = this.outputFormatPanel.getPattern();\r\n writer.write(odf.getParsedString(userPattern.length() < 2 ? defaultFormatting : userPattern));\r\n\r\n writer.close();\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(this, \"Wystąpił błąd IO podczas zapisu.\");\r\n }\r\n\r\n }", "public String getSecondFilename() {\n\t\tTreeMap<Double,File> tm = new TreeMap<Double,File>();\n\t\tFile file=new File(\"C:\\\\temp\");\n\t\tFile subFile[] = file.listFiles();\n\t\tint fileNum = subFile.length;\n\t\tfor (int i = 0; i < fileNum; i++) {\n\t\t Double tempDouble = new Double(subFile[i].lastModified());\n\t\t tm.put(tempDouble, subFile[i]);\n\t\t }\t \n\t\t System.out.println(\"第二个log的文件名称-->\"+tm.get(tm.lastKey()).getName());\n\t\t return tm.get(tm.lastKey()).getName();\n\t}", "public void writeFile(String data){\n\t\t\n\t\tcurrentLine = data;\n\t\t\n\t\t\ttry{ \n\t\t\t\tFile file = new File(\"/Users/bpfruin/Documents/CSPP51036/hw3-bpfruin/src/phfmm/output.txt\");\n \n\t\t\t\t//if file doesnt exists, then create it\n\t\t\t\tif(!file.exists()){\n\t\t\t\t\tfile.createNewFile();\n\t\t\t\t}\n \n\t\t\t\t//true = append file\n\t\t\t\tFileWriter fileWriter = new FileWriter(file,true);\n \t \tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\n \t \tbufferWriter.write(data);\n \t \tbufferWriter.close();\n \n \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}", "public String getFileName(String diffDirName, Integer ontologyVersionId1,\n\t\t\tInteger ontologyVersionId2) {\n\t\treturn diffDirName + \"/\" + ontologyVersionId1 + SEPARATOR_IN_FILE_NAME\n\t\t\t\t+ ontologyVersionId2;\n\t}", "public static void Algorunner(String pathOfDataset,String reportPath) throws Exception\n\t{\n\t String path = pathOfDataset; //Map to pathOfDataset \n\t String files;\n\t File folder = new File(path);\n\t File[] listOfFiles = folder.listFiles(); \n\t \n\t int fileCounter=0;\n\t for (int i = 0; i < listOfFiles.length; i++) \n\t {\n\t \n\t \t if (listOfFiles[i].isFile()) \n\t \t {\n\t \t\t files = listOfFiles[i].getName();\n\t \t\t if (files.endsWith(\".arff\"))\n\t \t\t {\n\t \t\t\t fileCounter++;\n\t \t\t }\n\t \t }\n\t }\n\t File[] arffFiles = new File[fileCounter];\n\t fileCounter=0;\n\t for (int i = 0; i < listOfFiles.length; i++) \n\t {\n\t \n\t \t if (listOfFiles[i].isFile()) \n\t \t {\n\t \t\t files = listOfFiles[i].getName();\n\t \t\t if (files.endsWith(\".arff\"))\n\t \t\t {\n\t \t\t\t arffFiles[fileCounter] = listOfFiles[i];\n\t \t\t\t fileCounter++;\n\t \n\t \t\t }\n\t \t }\n\t }\n\t //Code For printing all file name\n\t System.out.println(\"Files for Testing :\");\n\t for (int i = 0; i < arffFiles.length; i++) \n\t {\n\t \t if (arffFiles[i].isFile()) \n\t \t {\n\t \t\t System.out.println((i+1)+\") \"+arffFiles[i].getName());\n\t \t }\n\t }\n\t \n\t Classifier[] models = { \tnew J48(),\n \t\t\t\t\t\tnew PART(),\n \t\t\t\t\t\tnew DecisionTable(),\n \t\t\t\t\t\tnew DecisionStump(),\n \t\t\t\t\t\tnew SimpleCart(),\n \t\t\t\t\t\tnew NaiveBayes(), // Naive Bayes Classifier\n \t\t\t\t\t\tnew Logistic(),\n \t\t\t\t\t\tnew Bagging(),\n \t\t\t\t\t\tnew WLSVM(),\t// SVM \n \t\t\t\t\t\tnew RandomForest(),\t// Random Forest\n \t\t\t\t\t\tnew IBk(), \t// K- nearest neighbour\t\n \t\t\t\t\t\tnew MultilayerPerceptron(), //Neural Network\n \t\t\t\t\t\tnew AdaBoostM1() //Ada boosting\n\t \t\t\t\t\t\t};\n\t //\n\t \n\t //Start writing about csv\n\t StringBuilder csv2 = new StringBuilder(\",\");\t \n\t StringBuilder csvFile = new StringBuilder(\",\");\n\t for(int k=0;k<models.length;k++)\n\t {\n\t\t csv2.append(models[k].getClass().getSimpleName());\n\t\t if(k!=models.length-1)\n\t\t\t csv2.append(\",\");\n\t\t else\n\t\t\t csv2.append(\"\\n\");\n\t }\n\t System.out.println(csvFile.toString());\n\n \t\n \tdouble[][] Comparision = new double[arffFiles.length][models.length];\n \tint[][] weight = new int[arffFiles.length][models.length];\n \tfor (int i = 0; i < arffFiles.length; i++) \n \t{\n \t\tBufferedReader datafile = readDataFile(arffFiles[i].getName().toString(),pathOfDataset);\n \t\tSystem.out.println(\"File Under Testing..... : \"+arffFiles[i].getName().toString());\n \t\tInstances data = new Instances(datafile);\n \t\tdata.setClassIndex(data.numAttributes() - 1);\n \n \t\t// Choose a type of validation split\n \t\t//Instances[][] split = crossValidationSplit(data, 10);\n \n \t\t// Separate split into training and testing arrays\n \t\t//Instances[] trainingSplits = split[0];\n \t\t//Instances[] testingSplits = split[1];\n \n \t\t// Choose a set of classifiers\n \n \t\t// Run for each classifier model\n \t\tfor(int j = 0; j < models.length; j++) \n \t\t{\n \t\t\t\n \t\t\t//Code For error rate\n \t\t\tEvaluation eval = new Evaluation(data);\n \t\t\tmodels[j].buildClassifier(data);\n \t\t\t//used when training and test set is given\n \t\t\t//eval.evaluateModel(svm, filedata2);\n \t\t\t//single data\n \t\t\teval.crossValidateModel(models[j], data,5, new Random(1));\n \t\t\tdouble recall = eval.fMeasure(0)+eval.fMeasure(1);\n \t\t\t//eval.areaUnderROC(arg0)\n \t\t\tdouble aoc = eval.areaUnderROC(0);\n \t\t\taoc = eval.areaUnderROC(1);\n \t\t\t\n \t\t\tdouble accuracy = 1-eval.errorRate();\n \t\t\t// System.out.println(\"SVM error rate : \"+errormid*100);\n \t\t\t// System.out.println(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", (1-errormid)*100) + \"\\n=====================\");\n \t\t\n \t\t\t\n \t\t\t//double param2 = eval.fMeasure(1);\n \t\t\t\n \t\t\tComparision[i][j]= 1-eval.errorRate();\n \t\t\t\n \t\t\t}\n \n \t\t}\n \t\t\n \t\tSystem.out.println();\n \t\tSystem.out.println(\"Accuray of classifiers : Actual : \");\n \t\tfor(int k=0;k<arffFiles.length;k++)\n \t\t{\n \t\t\tcsv2.append(arffFiles[k].getName().toString());\n \t\t\tcsv2.append(\",\");\n \t\t\tfor(int l=0;l<models.length;l++)\n \t\t\t{\n \t\t\t\t//System.out.print(\" || \"+Comparision[k][l]);\n \t\t\t\t\n \t\t\t\tcsv2.append(Comparision[k][l]+\",\");\n \t\t\t\t\n \t\t\t}\n \t\t\tcsv2.deleteCharAt(csv2.length()-1);\n \t\t\tcsv2.append(\"\\n\");\n \t\t\t//System.out.println();\n \t\t\t//System.out.println(\"********************\");\n \t\t}\n \t\tcsv2.deleteCharAt(csv2.length()-1);\n \t\tfor(int k=0;k<arffFiles.length;k++)\n \t\t{\n \t\t\tdouble[][] sample = new double[2][models.length];\n \t\t\tfor(int l=0;l<models.length;l++)\n \t\t\t{\n \t\t\t\tsample[0][l]=Comparision[k][l];\n \t\t\t\tsample[1][l]=(l+1);\n \t\t\t}\n \t\t\t//test for work... working :)\n \t\t\t/*\n \t\t\tfor(int w=0;w<2;w++)\n \t\t\t{\n \t\t\t\tfor(int q=0;q<models.length;q++)\n \t\t\t\t{\n \t\t\t\tSystem.out.print(\" \"+sample[w][q]);\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"*******\");\n \t\t\t}\n */\n \t\t\tint n = models.length;\n \t\t\tdouble swap1,swap2;\n \t\t\tfor (int c = 0; c < ( n - 1 ); c++) \n \t\t\t{\n \t\t\t\tfor (int d = 0; d < n - c - 1; d++) \n \t\t\t\t{\n \t\t\t\t\tif (sample[0][d] > sample[0][d+1]) /* For descending order use < */\n \t\t\t\t\t{\n \t\t\t\t\t\tswap1 = sample[0][d];\n \t\t\t\t\t\tsample[0][d] = sample[0][d+1];\n \t\t\t\t\t\tsample[0][d+1] = swap1;\n \n \t\t\t\t\t\tswap2 = sample[1][d];\n \t\t\t\t\t\tsample[1][d] = sample[1][d+1];\n \t\t\t\t\t\tsample[1][d+1] = swap2;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tfor(int l=0;l<models.length;l++)\n \t\t\t{\n \t\t\t\tDouble d = new Double(sample[1][l]);\n \t\t\t\tweight[k][d.intValue()-1] = models.length-l;\n \t\t\t}\n \t\t}\n \t\t//testing\n \t\tSystem.out.println(\"Rank Vector \");\n \t\tfor(int k=0;k<arffFiles.length;k++)\n \t\t{\n \t\t\tcsvFile.append(arffFiles[k].getName().toString());\n \t\t\tcsvFile.append(\",\");\n \t\t\tfor(int l=0;l<models.length;l++)\n \t\t\t{\n \t\t\t\tSystem.out.print(\" || \"+weight[k][l]);\n \t\t\t\tcsvFile.append(weight[k][l]);\n \t\t\t\tif(l!=models.length-1)\n \t\t\t\t\tcsvFile.append(\",\");\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\t//if(k!=arffFiles.length-1)\n \t\t\t\t\tcsvFile.append(\"\\n\");\n \t\t\t\t} \n \t\t\t}\n \t\t\tSystem.out.println();\n \n \t\t}\n \t\t\tcsvFile.append(\"\\n\");\n \t\t\tcsvFile.append(\"Sum of Ranks (Lower is Better)\");\n \t\t\tcsvFile.append(\",\");\n \n \t\t\tStringBuilder rank = new StringBuilder();\n \n \t\t\tfor(int l=0;l<models.length;l++)\n \t\t\t{\n \t\t\t\tint sum=0;\n \t\t\t\tfor(int k=0;k<arffFiles.length;k++)\n \t\t\t\t{\n \t\t\t\t\tsum+=weight[k][l];\n \t\t\t\t}\n \t\t\t\t\trank.append((double)sum/(double)arffFiles.length);\n \t\t\t\t\tcsvFile.append(sum);\n \t\t\t\t\tif(l!=models.length-1)\n \t\t\t\t\t{\n \t\t\t\t\t\tcsvFile.append(\",\");\n \t\t\t\t\t\trank.append(\",\");\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\t//if(k!=arffFiles.length-1)\n \t\t\t\t\t\tcsvFile.append(\"\\n\");\n \t\t\t\t\t\trank.append(\"\\n\");\n \t\t\t\t\t} \n \t\t\t}\n \t \n \t\t\tcsvFile.append(\"\\n\");\n \t\t\tcsvFile.append(\"Avrage Ranks\");\n \t\t\tcsvFile.append(\",\");\n \t\t\tcsvFile.append(rank.toString());\n \t\t\t//Ranks of algorithms\n \n \n \t\t\tint sum=0;\n \t\t\tint series = models.length;\n \t\t\tseries = (series*(series+1))/2;\n \t\t\tseries = series*(arffFiles.length);\n \t\t\tfor(int l=0;l<models.length;l++)\n \t\t\t{\n \t\t\t\tfor(int k=0;k<arffFiles.length;k++)\n \t\t\t\t{\n \t\t\t\t\tsum += weight[k][l];\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"Parameter for \"+models[l].getClass().getSimpleName()+ \" : \"+sum+\"/\"+series );\n \t\t\t\tsum=0;\n \t\t\t\tSystem.out.println();\n \n \t\t\t}\n \n\t\t\t\t \t\t\t\n\t\t\t\t /*\n\t\t\t\t for(int w=0;w<2;w++)\n\t\t\t\t {\n\t\t\t\t \tfor(int q=0;q<models.length;q++)\n\t\t\t\t \t{\n\t\t\t\t \tSystem.out.print(\" \"+sample[w][q]);\n\t\t\t\t \t}\n\t\t\t\t \tSystem.out.println(\" \");\n\t\t\t\t \tSystem.out.println(\" \");\n\t\t\t\t \tSystem.out.println(\" \");\n\t\t\t\t }\n\t\t\t\t } \n\t\t\t */\n\t\t\t \n \t\t\t\t//arffFiles.length][models.length];\n \t\t\tSystem.out.println(\"Done\");\n \t\t\twriteCSVReport(csvFile.toString(),reportPath);\n \t\t\twriteCSVReport(csv2.toString(), reportPath);\n \t\t\tSystem.out.println(csvFile.toString());\n\t\t \n\t}", "public static void regenDataset(String fileName, int span, int granularity) {\n JSONArray devices = convertDevices(readDevices(), granularity);\n RuleGenerator ruleGen = new RuleGenerator(span, granularity, devices);\n Generator gen = new Generator(new Topology(1,1), ruleGen, 0, new int[]{1, 1, 1});\n\n try {\n FileWriter fileOut = new FileWriter(fileName.replaceAll(\".txt\", \"\")+\".json\");\n fileOut.write(gen.regenerate(fileName).toString(2));\n fileOut.flush();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void setDataWriterForFilename(String filename) throws KettleException {\n\t\t// First handle the writers themselves.\n\t\t// If we didn't have a writer yet, we create one.\n\t\t// Basically we open a new file\n\t\tdata.writer = data.fileWriterMap.get(filename);\n\t\tif (data.writer==null) {\n\t\t\topenNewFile(filename);\n\t\t\tdata.oneFileOpened = true;\n\n\t\t\tdata.fileWriterMap.put(filename, data.writer);\n\t\t\n\t\t\t// If it's the first time we open it and we have a header, we write a header...\n\t\t\t//\n\t\t\tif (!meta.isFileAppended() && meta.isHeaderEnabled()) {\n\t\t\t\tif (writeHeader()) {\n\t\t\t\t\tincrementLinesOutput();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void saveToFile(String datafile) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException {\n try {\n FileWriter writer = new FileWriter(\"test.html\");\n writer.write(datafile);\n writer.flush();\n writer.close();\n } catch (IOException ioe) {\n System.out.println(\"Error writing file\");\n }\n }", "public abstract String getFileName();", "@Override\r\n\tpublic String getName() {\n\t\treturn \"C:/path/to/file/rdfSpecimen_2013-06-28.xml\";\r\n\t}", "private void replaceData(String folderName, ArrayList<String> loader1, ArrayList<String> loader2) throws IOException {\n LoadAndSave las =new LoadAndSave();\n las.load(folderName);\n las.loader1=loader1;\n las.loader2=loader2;\n las.save(folderName);\n \n }", "@Override\n public void setRecommend2File(double[][] recommend) {\n //TODO: write your code here\n \t\n \tStringBuilder stringBuilder=new StringBuilder();\n for(int i=0;i<500;i++){\n for(int j=0;j<10;j++){\n stringBuilder.append(recommend[i][j]);\n if(j!=9)\n stringBuilder.append(\"\\t\");\n }\n stringBuilder.append('\\n');\n }\n BufferedWriter writer = null;\n\t\ttry {\n\t\t\twriter = new BufferedWriter(new FileWriter(this.getClass().getClassLoader().getResource(\".\").getPath()+\"Recommend.txt\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n //BufferedWriter writer=new BufferedWriter(new FileWriter(\"D:/Recommend.txt\"));\n try {\n\t\t\twriter.write(stringBuilder.toString());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n try {\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public String generateFileName(String midName)\r\n {\r\n return dir + nameBase + midName + nameSuffix;\r\n }", "private String generateFileName() {\n\t\t\n\t\treturn \"/tmp/logger.java_log\" + new Random().nextInt();\n\t}", "public static String getFilename()\n\t{\n\t\tString s = \"scene \"\n//\t\t\t\t+(LORENTZ_WINDOW?\"through Lorentz Window \":\"\")\n\t\t\t\t+\"with camera with \" + APERTURE_SIZE + \" aperture size \"\n\t\t\t\t+\"focussed at z=\"+FOCUSSING_DISTANCE + \" \"\n\t\t\t\t+\"and focus-surface fixed shutter model \"\n\t\t\t\t+(BETA_0?\"at rest\":(\"moving with beta=\"+beta))\n\t\t\t\t+(TEST?\" (test)\":\"\");\n//\t\tif(!PINHOLE_CAMERA)\n//\t\t{\n//\t\t\ts = s+(FOCUSSED_ON_IMAGE?\"image\":\"object\");\n//\t\t}\n\t\treturn s+\".bmp\";\n\t}", "@Override\n\tprotected String getFileName() {\n\t\treturn null;\n\t}", "public void testSetName_fixture2_2()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture2();\n\t\tString name = \"\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}", "public void setFilename(String filename) {\n\t\tthis.filename = filename;\n\t}", "public void setFilename(String filename) {\n\t\tthis.filename = filename;\n\t}", "static void createNewFile(String path) \n\t\t{\n\t\tLinkedList<String> defaultData = new LinkedList<String>();\n\t\tdefaultData.add(\"1,Frank,West,98,95,87,78,77,80\");\n\t\tdefaultData.add(\"2,Dianne,Greene,78,94,88,87,95,92\");\n\t\tdefaultData.add(\"3,Doug,Lei,78,94,88,87,95,92\");\n\t\tdefaultData.add(\"4,James,Hewlett,69,92,74,77,89,91\");\n\t\tdefaultData.add(\"5,Aroha,Wright,97,92,87,83,82,92\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tPrintWriter newFile = new PrintWriter(path, \"UTF-8\"); // Create .txt file in given path\n\t\t\t\n\t\t\tfor (String s : defaultData) \n\t\t\t{\n\t\t\t\tnewFile.println(s); // Write To file\n\t\t\t}\n\t\t\t\n\t\t\tnewFile.close(); // Close File\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"studentData.txt Created Successfully!\");\n\t\t\n\t}", "public String getFileName ();" ]
[ "0.6403794", "0.6060349", "0.6002582", "0.59790254", "0.5837944", "0.5823814", "0.57850915", "0.5744048", "0.56761754", "0.5672381", "0.56558406", "0.56466967", "0.5610044", "0.5593189", "0.55591935", "0.5552801", "0.55486244", "0.5544229", "0.5538526", "0.5535922", "0.5535922", "0.5535922", "0.5535922", "0.5535922", "0.5535922", "0.5535922", "0.5535922", "0.5535922", "0.5516886", "0.5509248", "0.5505001", "0.55004144", "0.5477204", "0.5477204", "0.54558706", "0.54481", "0.54341465", "0.5432456", "0.54310817", "0.54258186", "0.5417858", "0.53859764", "0.5385615", "0.5380541", "0.53798145", "0.5354839", "0.5320119", "0.5308217", "0.53068733", "0.5289482", "0.5289482", "0.5289482", "0.5289482", "0.5289482", "0.528277", "0.5277721", "0.52734643", "0.5257692", "0.5241531", "0.5234022", "0.5228411", "0.52282023", "0.52252364", "0.5224801", "0.52222866", "0.52170384", "0.5216677", "0.5210273", "0.5206224", "0.5204281", "0.52012277", "0.5196187", "0.51799256", "0.5174237", "0.5174237", "0.5157187", "0.5157187", "0.5150228", "0.5149607", "0.5148799", "0.5148371", "0.5145373", "0.5142955", "0.51417166", "0.5137913", "0.513123", "0.51243037", "0.51203877", "0.5110452", "0.51047784", "0.509887", "0.5096536", "0.509417", "0.5085528", "0.5081633", "0.5080537", "0.5073034", "0.5068878", "0.5068878", "0.5066861", "0.506477" ]
0.0
-1
Function to generate the population
public static void generatePopulation() { population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN); for (Individual individual : population) { for (int i = 0; i < individual.getGene().length; i++) { individual.gene[i] = bits.get(new Random().nextInt(2)); } individual.generateRulebase(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "private int[][] generateInitialPopulation(int binCt, int binSize, int pkgCt, int populationSize) {\n\t\tint[][] population = new int[populationSize][pkgCt];\n\t\tfor (int i = 0; i < populationSize; i++) {\n\t\t\tfor (int j = 0; j < pkgCt; j++) {\n\t\t\t\tpopulation[i][j] = rand.nextInt(binCt);\n\t\t\t}\n\t\t}\n\t\treturn population;\n\t}", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "private static List<Cell> initiatePopulation(int required_population_size)\n {\n List<Cell> population = new ArrayList<Cell>(); //Define an arraylist to hold the initial population of cells\n int[][][] diploid_genome = newEmptyDeploidGenome();\n int cell_generation = newest_generation + 1, last_div = -1;\n \n //Set the label status of all DNA strands in the genome to unlabelled\n for(int chromosome_count = 0; chromosome_count < diploid_genome.length; chromosome_count++)\n {\n for(int homologous_pair_count= 0; homologous_pair_count < diploid_genome[chromosome_count].length; homologous_pair_count++)\n {\n for(int dna_strand_count = 0; dna_strand_count < diploid_genome[chromosome_count][homologous_pair_count].length; dna_strand_count++)\n {\n diploid_genome[chromosome_count][homologous_pair_count][dna_strand_count] = STRAND_UNLABELLED; //Set each DNA strand to unlabelled\n }\n }\n }\n \n // !****!Create the starting population of cells, all as generation 0!****!\n for (int counter = 0; counter < required_population_size; counter++)\n {\n int cell_id = counter;\n population.add(new Cell(cell_id, cell_generation, last_div, CAN_DIVIDE, diploid_genome)); // Create a new Cell object with the following values.\n id_of_last_created_cell = cell_id; // Track the id of the last created cell\n }// for\n newest_generation++;\n return population;\n }", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){\n \n ArrayList<Population> PopulationsList = new ArrayList();\n \n if(NumberOfPopulations == 1){\n \n PopulationsList.add(InitSinglePopulation(NumberOfAgents));\n \n }else{\n \n for(int i = 0; i < NumberOfPopulations; i++){ \n double temp = rand.nextDouble();\n PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp));\n }\n \n }\n \n \n return PopulationsList;\n }", "public void generatePopulation(String filePathAndName) {\n\t\t\n\t\tList<String> dataAll = SU.readFile(filePathAndName);\n\t\tList<String> dataAgents = new ArrayList<String>();\n\t\tList<String> dataStock = new ArrayList<String>();\n\t\tList<String> dataRelations = new ArrayList<String>();\n\t\t\n\t\tint typeOfData = -1;\n\t\tfor (String datum : dataAll) {\n\t\t\tif (!datum.startsWith(\"%\")) {\n\t\t\t\tswitch(typeOfData) {\n\t\t\t\tcase 0:\tdataAgents.add(datum); break;\n\t\t\t\tcase 1: dataStock.add(datum); break;\n\t\t\t\tcase 2: dataRelations.add(datum); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttypeOfData = Integer.parseInt(datum.substring(1,2));\n\t\t\t}\n\t\t}\n\t\t\n\t\tgenerateAgents(dataAgents);\n\t\tgenerateStock(dataStock);\n\t\tgenerateRelations(dataRelations);\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "private static ArrayList<Chromosome> generatePopulation(ArrayList<City> cities, int pathLength, int populationSize) {\n // generating part of the initial population using a Nearest Neighbour Algorithm\n int nnPopulationSize = (int) (0.1*populationSize);\n // if the required number of chromosomes to be generated by the NN Algorithm is greater then the number of cities\n // then set the required number of chromosomes to the number of cities\n if (nnPopulationSize > cities.size()) {\n nnPopulationSize = cities.size();\n }\n ArrayList<Chromosome> nnPopulation = generateNearestNeighbourPopulation(pathLength, nnPopulationSize);\n\n // generating the rest of the initial population randomly\n int randomPopulationSize = populationSize - nnPopulationSize;\n ArrayList<Chromosome> randomPopulation = new ArrayList<>();\n randomPopulation.addAll( generateRandomPopulation(pathLength, randomPopulationSize) );\n\n // Combining the 2 parts of the population into one initial population\n ArrayList<Chromosome> population = new ArrayList<>();\n population.addAll(nnPopulation);\n population.addAll(randomPopulation);\n\n return population;\n }", "public double getPopulation () { return n.getPopulation(); }", "public void generateGenes() {\n\t\tfor(int i = 0; i < geneNumber; i++){\n\t\t\tdouble[] vector = new double[NUM_HEURISTICS];\n\t\t\tfor(int j = 0; j < NUM_HEURISTICS; j++){\n\t\t\t\t// To get a number in [-0.5, 0.5)\n\t\t\t\tvector[j] = Math.random() - 0.5;\n\t\t\t}\n\t\t\tGene newGene = new Gene(vector, true);\n\t\t\tgenepool.add(newGene);\n\t\t}\n\t}", "public abstract int getPopulation(int west, int south, int east, int north);", "public void generateOffspringPopulation() throws JMException{\n\n offspringPopulation_ = new SolutionSet[problemSet_.size()];\n\n for (int task = 0; task < problemSet_.size(); task++){\n offspringPopulation_[task] = new SolutionSet(populationSize_);\n if (crossover_.getClass() == SBXCrossover.class){\n Solution[] parents = new Solution[2];\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n parents = (Solution[]) selection_.execute(population_[task]);\n\n Solution[] offSpring = (Solution[]) crossover_\n .execute(parents);\n mutation_.execute(offSpring[0]);\n problemSet_.get(task).evaluate(offSpring[0]);\n problemSet_.get(task).evaluateConstraints(offSpring[0]);\n offspringPopulation_[task].add(offSpring[0]);\n } // for\n }\n else if (crossover_.getClass() == EGG.class){\n\n int[] permutation = new int[populationSize_];\n Utils.randomPermutation(permutation, populationSize_);\n etmo.util.Ranking ranking = new etmo.util.Ranking(population_[task]);\n SolutionSet front = ranking.getSubfront(0);\n\n front.Suppress();\n SolutionSet KP = null;\n if(front.size()> problemSet_.get(task).getNumberOfObjectives())\n KP = findingKneePoint(front, task);\n if(KP == null){\n KP = population_[task];\n }\n\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n int n = permutation[i];\n // STEP 2.1. Mating selection\n int r1,r2;\n r1 = PseudoRandom.randInt(0, KP.size() - 1);\n do {\n r2 = PseudoRandom.randInt(0, KP.size() - 1);\n } while (r2==r1);\n // STEP 2.2. Reproduction\n Solution child;\n Solution[] parents = new Solution[3];\n\n// 加入迁移:\n double tranRand = PseudoRandom.randDouble();\n if (tranRand <= 0.1){\n parents[1] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[2] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n\n else {\n parents[1] = KP.get(r1);\n parents[2] = KP.get(r2);\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n } // for\n }\n\n }\n\n\n\n\n }", "SolutionPopulation initialise(ArrayList<City> cities, int populationSize);", "private void generateData(int popsize, int ntrials) {\n data = new double[ntrials][100];\n \n for (int i = 0; i < ntrials; i++) {\n Population pop = new Population(popsize, rand);\n for (int j = 0; j < 100; j++) {\n data[i][j] = pop.totalA();\n pop.advance();\n }\n }\n }", "private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }", "public static void runAGeneration() {\n //Breeds Population until max population size for genetic drift\n breedAll();\n\n //Genocides Population by fitness\n genocide();\n\n System.out.println(\"\\nPopulation: \");\n\n //prints population\n printPopulation();\n }", "public static void printPopulation() {\n printPopulation(false);\n }", "public static void genocide() {\n //Assigns fitness levels\n evaluateFitnesses();\n\n //Sorts by fitness\n sortByFitlvl();\n\n //Simple genocide, kills off all until population size.\n for (int i = Population.size() - 1; i >= populationSize; i--) {\n Population.remove(i);\n }\n\n /*\n //Different kind of Genocide, selects organisms based on gaussian distribution\n\n while(Population.size() > populationSize){\n int randomOrganism = (int)(Population.size() - (Population.size()*Utilities.sharpGauss(2)));\n Population.remove(randomOrganism);\n }\n */\n }", "public void initialiseNewRandomPopulation(Random rnd) {\n\t\tthis.population = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < this.popSize; i++) {\t\t\t\t\t//FOR ALL DESIRED POPULATION SIZE\n\t\t\tdouble[] randomValues = new double[DIMENSIONS];\t\t\t//INITIATE RANDOM X ARRAY WITH CORRECT DIMENSIONS\n\t\t\tfor (int j = 0; j < DIMENSIONS; j++) {\t\t\t\t\t//CREATE RANDOM X VALUES\n\t\t\t\trandomValues[j] = -5 + rnd.nextDouble() * 10;\t\t//ASSIGN VALUES TO EACH POSITION IN ARRAY\n\t\t\t}\n\t\t\tIndividual newInd = new Individual(randomValues);\t\t//CREATE NEW INDIVIDUAL WITH RANDOM X VALUES\n\t\t\tthis.population.add(newInd);\t\t\t\t\t\t\t//ADD INDIVIDUAL TO POPULATION\n\t\t}\n\t}", "public void runGenerational() {\n\n\t\tSystem.out.println(\"Runing pure generational demo.\");\n\t\tFunction<BitSet, Double> knapsackFitnessFunction = new KnapsackFitness(capacity, parseElements());\n\t\tSpace<BitSet> space = new BitSetSpace(weights.length);\n\n\t\tGeneticSelector<BitSet, Double> rouletteSelector = new RouletteGeneticSelector<>(POP_SIZE);\n\t\tGeneticCrossover<BitSet, Double> crossover = new BinaryCrossover<>(0.9);\n\t\tGeneticOperator<BitSet, Double> geneticOperator = new CustomGeneticOperator<>(crossover);\n\t\tGeneticReplacement<BitSet, Double> replacement = new GenerationalReplacement<>();\n\t\tTracer.add(Population.class);\n\t\tTracer.start();\n\n\t\tSearch<BitSet, Double> search = new GeneticAlgorithm<>(POP_SIZE, NUM_ITER, rouletteSelector, geneticOperator,\n\t\t\t\treplacement);\n\t\tOptimizationProblem<BitSet, Double> problem = new OptimizationProblem<>(space, knapsackFitnessFunction,\n\t\t\t\tComparator.reverseOrder());\n\t\tSolution<BitSet, Double> foundSolution = search.solve(problem);\n\n\t\tSystem.out.println(String.format(\"Best found solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(foundSolution.getSolution()), foundSolution.getSolution()));\n\n\t\tBitSet optimalBitSet = parseOptimalBitSet();\n\t\tSystem.out.println(String.format(\"Optimal solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(optimalBitSet), optimalBitSet));\n\t\tKnapsackMetric metric = new KnapsackMetric();\n\t\tmetric.putDataOfBestInFile(1);\n\t}", "public ArrayList<Fish> generateGuppies() {\n ArrayList<Fish> generatedFish = new ArrayList<Fish>();\n\n final double femaleProbability = 0.5;\n\n Random generator = new Random();\n\n int ageInWeeks;\n double healthCoefficient;\n double femaleRoll;\n for (int i = 1; i <= numberOfGuppies; i++) {\n ageInWeeks = generator.nextInt(maxAge - minAge) + minAge;\n healthCoefficient = generator.nextDouble()\n * (maxHealthCoefficient - minHealthCoefficient)\n + minHealthCoefficient;\n femaleRoll = generator.nextDouble();\n\n generatedFish.add(new Guppy(\"Poecilia\", \"reticulata\",\n ageInWeeks, femaleRoll < femaleProbability, 0,\n healthCoefficient));\n }\n\n return generatedFish;\n }", "public static Population evolvePopulation(Population pop) {\n Population newPopulation = new Population(pop.populationSize(), false);\n\n // Keep our best individual if elitism is enabled\n int elitismOffset = 0;\n if (elitism) {\n newPopulation.saveTour(0, pop.getFittest());\n elitismOffset = 1;\n }\n\n // Crossover population\n // Loop over the new population's size and create individuals from\n // Current population\n for (int i = elitismOffset; i < newPopulation.populationSize(); i++) {\n // Select parents\n // Tour parent1 = tournamentSelection(pop);\n //Tour parent2 = tournamentSelection(pop);\n\n\n\n\n Tour[] temp_a = roullet( newPopulation);\n if( temp_a == null )\n {\n System.out.println(\"no a\");\n //r//eturn temp;\n }\n // Tour parent1 = tournamentSelection(pop);\n //Tour parent2 = tournamentSelection(pop);\n Tour parent1 = temp_a[0];\n Tour parent2 = temp_a[1];\n\n\n\n\n\n\n\n\n // Crossover parents\n Tour child = crossover(parent1, parent2);\n // Add child to new population\n newPopulation.saveTour(i, child);\n }\n\n // Mutate the new population a bit to add some new genetic material\n for (int i = elitismOffset; i < newPopulation.populationSize(); i++) {\n mutate(newPopulation.getTour(i));\n }\n\n return newPopulation;\n }", "private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "public void reproduce(int generation, IPopulation pop, List<ISpecies> sorted_species) {\n\t\tfor(ISpecies specie : sorted_species){\r\n\r\n\t\t\tList<IOrganism> organisms = specie.getOrganisms();\r\n\r\n\t\t\t// outside the species\r\n\t\t\tint orgnum = 0;\r\n\r\n\t\t\tIOrganism mom = null;\r\n\t\t\tIOrganism baby = null;\r\n\t\t\tIGenome new_genome = null;\r\n\t\t\tIOrganism _organism = null;\r\n\t\t\tIOrganism _dad = null;\r\n\r\n\t\t\tif (specie.getExpectedOffspring() > 0 && organisms.size() == 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t// elements for this species\r\n\t\t\tint poolsize = organisms.size() - 1;\r\n\r\n\t\t\t// the champion of the 'this' species is the first element of the species;\r\n\t\t\tIOrganism thechamp = organisms.get(0);\r\n\t\t\tboolean champ_done = false; // Flag the preservation of the champion\r\n\r\n\t\t\t// Create the designated number of offspring for the Species one at a time.\r\n\t\t\tfor (int count = 0; count < specie.getExpectedOffspring(); count++) {\r\n\r\n\t\t\t\t// If we have a super_champ (Population champion), finish off some special clones.\r\n\t\t\t\tif (thechamp.getSuperChampOffspring() > 0) {\r\n\r\n\t\t\t\t\t// save in mom current champ;\r\n\t\t\t\t\tmom = thechamp;\r\n\t\t\t\t\t// create a new genome from this copy\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tif ((thechamp.getSuperChampOffspring()) > 1) {\r\n\t\t\t\t\t\tif (RandomUtils.randomDouble() < .8 || evolutionParameters.getDoubleParameter(MUTATE_ADD_LINK_PROB) == 0.0)\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateLinkWeight(new_genome, evolutionParameters.getDoubleParameter(WEIGHT_MUT_POWER), 1.0, MutationType.GAUSSIAN);\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// Sometimes we add a link to a superchamp\r\n\t\t\t\t\t\t\tnew_genome.generatePhenotype(generation);\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateAddLink(new_genome,pop);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\tthechamp.incrementSuperChampOffspring();\r\n\t\t\t\t} // end population champ\r\n\r\n\t\t\t\t// If we have a Species champion, just clone it\r\n\t\t\t\telse if ((!champ_done) && (specie.getExpectedOffspring() > 5)) {\r\n\t\t\t\t\tmom = thechamp; // Mom is the champ\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation); // Baby is\r\n\t\t\t\t\t// just like mommy\r\n\t\t\t\t\tchamp_done = true;\r\n\r\n\t\t\t\t} else if (RandomUtils.randomDouble() < evolutionParameters.getDoubleParameter(MUTATE_ONLY_PROB) || poolsize == 1) {\r\n\r\n\t\t\t\t\t// Choose the random parent\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\r\n\t\t\t\t\t// Do the mutation depending on probabilities of various mutations\r\n\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\t// Otherwise we should mate\r\n\t\t\t\telse {\r\n\t\t\t\t\t// Choose the random mom\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\r\n\t\t\t\t\t// save in mom\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\t// Choose random dad...\r\n\t\t\t\t\t// Mate within Species\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(INTERSPECIES_MATE_RATE)) {\r\n\t\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\t\t_dad = _organism;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Mate outside Species\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// save current species\r\n\t\t\t\t\t\tISpecies randspecies = specie;\r\n\t\t\t\t\t\t// Select a random species\r\n\t\t\t\t\t\tint giveup = 0;\r\n\t\t\t\t\t\t// Give up if you can't find a different Species\r\n\t\t\t\t\t\twhile ((randspecies == specie) && (giveup < 5)) {\r\n\r\n\t\t\t\t\t\t\t// Choose a random species tending towards better species\r\n\t\t\t\t\t\t\tdouble randmult = Math.min(1.0, RandomUtils.randomGaussian() / 4);\r\n\r\n\t\t\t\t\t\t\t// This tends to select better species\r\n\t\t\t\t\t\t\tint sp_ext = Math.max(0, (int) Math.floor((randmult * (sorted_species.size() - 1.0)) + 0.5));\r\n\t\t\t\t\t\t\trandspecies = sorted_species.get(sp_ext);\r\n\t\t\t\t\t\t\t++giveup;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t_dad = randspecies.getOrganisms().get(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnew_genome = evolutionStrategy.getCrossoverStrategy().performCrossover(mom,_dad,count);\r\n\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(MATE_ONLY_PROB) || \r\n\t\t\t\t\t\t\t_dad.getGenome().getId() == mom.getGenome().getId() || \r\n\t\t\t\t\t\t\t_dad.getGenome().compatibility(mom.getGenome()) == 0.0) {\r\n\r\n\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\t} \r\n\t\t\t\t\t// end block of prob\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\r\n\t\t\t\t\t// Create the baby without mutating first\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\tevolutionStrategy.getSpeciationStrategy().addOrganismToSpecies(pop, baby);\r\n\t\t\t} // end offspring cycle\r\n\t\t}\r\n\t}", "public void setPopulation(int population) {\n this.population = population;\n }", "public int getPopulation() {\n return population;\n }", "public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }", "private static void generateOutput(List<Cell> population, List<String>genome_data)\n {\n String newLine = System.getProperty(\"line.separator\");\n printString(\"===================\" + newLine + \"GENERATE OUTPUT\" + newLine + \"===================\");\n int generation = -1;\n int[][] chromosome_sizes = new int[haploid_number][2]; //The size of each chromosome (deploid) stored in a 2D array\n int diploid_genome_size = 0; //The sum of all chromosome sizes\n \n //Produce array of chromosome sizes, garbage clean genome_data\n //For each element in genome_data, split by comma and place into two elements of chromosome sizes array\n int current_chromosome = 0;\n for(Iterator<String> i = genome_data.iterator(); i.hasNext();current_chromosome++)\n {\n String item = i.next();\n String[] homologous_pair_sizes = item.split(\",\");\n chromosome_sizes[current_chromosome][0] = Integer.parseInt(homologous_pair_sizes[0]);\n chromosome_sizes[current_chromosome][1] = Integer.parseInt(homologous_pair_sizes[1]);\n diploid_genome_size += chromosome_sizes[current_chromosome][0];\n diploid_genome_size += chromosome_sizes[current_chromosome][1];\n System.out.println(item);\n }\n \n //Print chromosome sizes array\n /*for(int chromosome_count = 0; chromosome_count < chromosome_sizes.length; chromosome_count++)\n {\n for(int homologous_pair_count= 0; homologous_pair_count < chromosome_sizes[chromosome_count].length; homologous_pair_count++)\n {\n printString(Integer.toString(chromosome_sizes[chromosome_count][homologous_pair_count]));\n }\n }*/\n \n printString(\"Size of diploid genome in base pairs = \" + Integer.toString(diploid_genome_size));\n genome_data = null; // Garbage collection\n\n \n //new Cell(cell_id, cell_generation, last_div, CAN_DIVIDE, diploid_genome));\n //For each cell in population 1)Track each generation and push cells to 2D array\n //2)Track % new DNA of each cell and total % new DNA of each generation\n \n double [] generation_label_percentage = new double[newest_generation+1];\n int [] cells_in_each_generation = new int[newest_generation+1];\n for (int this_generation : cells_in_each_generation)\n {\n this_generation = 0;\n }\n //Gather information from each cell\n\n //Go through each cell and obtain its generation number and update the corresponding % new DNA\n for(int cell_count = 0; cell_count < population.size(); cell_count++)\n {\n Cell current_cell = population.get(cell_count);\n int [][][] this_cells_genome = current_cell.getGenome();\n int generation_of_this_cell = current_cell.getGeneration();\n double cell_percentage_labelled = 0.0;\n \n for(int chromosome_count = 0; chromosome_count < this_cells_genome.length; chromosome_count++)\n {\n double chromo_percentage_labelled = 0;// Label status of each chromosome\n for(int homologous_pair_count= 0; homologous_pair_count < this_cells_genome[chromosome_count].length; homologous_pair_count++)\n {\n int homolog_size = chromosome_sizes[chromosome_count][homologous_pair_count]; //Chromosome size in base pairs\n double chromosome_proportion_of_genome = (double)homolog_size/diploid_genome_size; // The size of the chromosome relative to the diploid genome\n double strand_percentage_labelled = 0;\n for(int dna_strand_count = 0; dna_strand_count < this_cells_genome[chromosome_count][homologous_pair_count].length; dna_strand_count++)\n {\n int label_status = this_cells_genome[chromosome_count][homologous_pair_count][dna_strand_count];\n switch (label_status)\n {\n case STRAND_UNLABELLED:\n //double percentage_calc =\n //strand_percentage_labelled =\n\n \n break;\n case STRAND_LABELLED:\n strand_percentage_labelled = 1.0;\n chromo_percentage_labelled = (chromo_percentage_labelled + strand_percentage_labelled) / 2;\n strand_percentage_labelled = 0.0;\n //printString(Double.toString(chromo_percentage_labelled));\n\n break;\n }\n }\n cell_percentage_labelled += chromo_percentage_labelled * chromosome_proportion_of_genome;\n }\n }\n generation_label_percentage[generation_of_this_cell] += (generation_label_percentage[generation_of_this_cell] + cell_percentage_labelled) / 2;\n \n int temp_number_cells = cells_in_each_generation[generation_of_this_cell] + 1;\n cells_in_each_generation[generation_of_this_cell] = temp_number_cells;\n //printString(generation_of_this_cell + \" \" + cell_percentage_labelled);\n \n //population_by_generations.add(new Cell(current_generation),null);\n }// for\n \n //Go through the population and sort cells into the 2D array by their generation number\n //for(int current_cell = 0; current_cell < cells_in_each_generation.length; current_cell++)\n //{\n // printString(current_cell + \" \" + cells_in_each_generation[current_cell]);\n\n //}// for\n \n for(int current_generation = 0; current_generation < generation_label_percentage.length; current_generation++)\n {\n printString(\"Generation: \" + current_generation + \" % labelled: \" + generation_label_percentage[current_generation]);\n \n }// for\n \n //printLabelDistribOfPopulation(population);\n \n }", "private Level produce() {\n\t\tint[][]grid = new int[row][column];\n\t\tArrayList<Point> goals = new ArrayList<Point>();\n\t\tint newRand = 0;\n\t\tfor (int x = 0; x < row; x++)\t{\n\t\t\tfor (int y = 0; y < column; y++)\t{\n\t\t\t\tnewRand = rand.nextInt(TOTAL);\n\t\t\t\tif (newRand < CAT_1)\t{\n\t\t\t\t\tgrid[x][y] = 1;\n\t\t\t\t} else if (newRand < CAT_2)\t{\n\t\t\t\t\tgrid[x][y] = 2;\n\t\t\t\t} else if (newRand < CAT_3)\t{\n\t\t\t\t\tgrid[x][y] = 3;\n\t\t\t\t} else if (newRand < CAT_4)\t{\n\t\t\t\t\tgrid[x][y] = 4;\n\t\t\t\t} else if (newRand < CAT_5)\t{\n\t\t\t\t\tgoals.add(new Point(x,y));\n\t\t\t\t} else if (newRand < TOTAL)\t{\n\t\t\t\t\tgrid[x][y] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Level(grid, row, column, goals);\n\t}", "public Population evolve()\r\n {\r\n\tArrayList<Chromosome> tempPop = \r\n\t new ArrayList<Chromosome>(chromos.size());\r\n\tChromosome u;\r\n\tChromosome v;\r\n\r\n\tfor(int i = 0; i < chromos.size()/2; i++)\r\n\t {\r\n\t\tu = selectParent();\r\n\t\tv = selectParent();\r\n\t\t\r\n\t\t//System.out.println(\"*****Parent 1 : \\n\" + v);\r\n\t\t\r\n Chromosome c1 = u.child(v);\r\n Chromosome c2 = v.child(u);\r\n\t\ttempPop.add(c1);\r\n\t\ttempPop.add(c2);\r\n\t\t\r\n //System.out.println(\"****Generated new child: \\n\" + c1);\r\n\t }\t \r\n\t\r\n\t// if needed, add in the code for keeping the best chromosome\r\n\tPopulation pop = new Population(tempPop, selMethod, selPara, \r\n\t\t\t\t\tcrossMethod, crossPara, mutMethod, mutPara, \r\n\t\t\t\t\treplaceMethod, replacePara, powerStep, tourStep, ff);\r\n\r\n\tif(replaceMethod == ELITISM)\r\n\t {\r\n\t\tpop.remove(worstChromoIndex);\r\n\t\tpop.add(bestChromo.clone());\r\n\t\tpop.initialize();\r\n\t }\r\n\r\n\tgeneration++;\r\n\treturn pop;\r\n }", "public static void GA(ArrayList<City> cities){\n int pathLength = cities.size();\n // the number of chromosomes which will be generated\n int populationSize = 100;\n // the number of chromosomes that will be generated from crossover as a percentage of the population\n double crossoverRate = 0.8;\n // the number of chromosomes that will be generated from crossover\n int crossoverSize = (int) (populationSize * crossoverRate);\n // the probability that a chromosome can have a random mutation\n double mutationRate = 0.05;\n // the number of generations\n int generations = 5000;\n\n // Initialising the distance matrix using the initialiseDistanceMatrix method\n initialiseDistanceMatrix(cities);\n\n // Generating the Initial Population\n ArrayList<Chromosome> population = generatePopulation(cities, pathLength, populationSize);\n\n // The following is done for each generation of the population\n for (int i = 0; i < generations; i++) {\n // calculating the fitness of every chromosome in the current generation\n calculateFitnessOfPopulation(population);\n // sort the population so that the chromosomes with the highest fitness are at the start of the list\n Collections.sort(population);\n // call the method which performs crossover on the population\n Set<Chromosome> children = crossoverPopulation(population, populationSize, crossoverSize);\n // carry out mutation on the children of the current population\n children.addAll( mutatePopulation(children, mutationRate) );\n\n // evolve the population\n population.addAll(children);\n ArrayList<Chromosome> currentGeneration = new ArrayList<>(population);\n ArrayList<Chromosome> nextGeneration = evolvePopulation(currentGeneration, populationSize, cities, pathLength);\n population = new ArrayList<>(nextGeneration);\n }\n\n // find the fittest chromosome\n Chromosome fittestChromosome = population.get(0);\n double maxFitness = population.get(0).fitness;\n for (Chromosome c : population) {\n if (c.fitness > maxFitness) {\n maxFitness = c.fitness;\n fittestChromosome = c;\n }\n }\n // display the path and distance of the fittest chromosome\n System.out.println(fittestChromosome.getPath());\n System.out.println(\"Total Route Distance: \" + routeDistance(fittestChromosome));\n\n //printPopulation(population);\n }", "public int getPopulation() {\n\n return population;\n }", "public long getPopulation() {\n return population;\n }", "public long getPopulation() {\n return population;\n }", "public void setPoputlation (double population) { n.setPopulation(population); }", "public void setPopulation(int population) {\n\n this.population = population;\n }", "public void setpopulation(int population) {\n this.population = population;\n }", "public static int [] population() {\n \n // Declare int array containing plants, sheep, wolves population, and number of turns respectively\n int [] numCounter = new int [] {0, 0, 0, 0};\n \n // Check map for species\n for (int y = 0; y < map[0].length; y++) {\n for (int x = 0; x < map.length; x++) {\n \n // Find the number of plants and add one to the count each time a plant is found\n if (map[y][x] instanceof Plant) {\n numCounter[0] += 1;\n \n // Find the number of sheep and add one to the count each time a sheep is found\n } else if (map[y][x] instanceof Sheep) {\n numCounter[1] += 1;\n \n // Find the number of wolves and add one to the count each time a wolf is found\n } else if (map[y][x] instanceof Wolf) {\n numCounter[2] += 1;\n }\n \n }\n }\n \n // Add a turn\n numCounter[3] += 1;\n \n // Return the int array with population of each species\n return numCounter;\n \n }", "public MyPacMan optimise(List<double[]> dimensionList){\n for(int i = 0; i < POPULATION_SIZE; i++){\r\n MyPacMan individual = new MyPacMan(dimensionList);\r\n population.add(individual);\r\n \r\n } \r\n \r\n // try more than one iteration \r\n for(int iterationCount = 0; iterationCount < ITERATION_NO; iterationCount++){\r\n \r\n System.out.println(\"Iterazione n°: \" + Integer.toString(iterationCount));\r\n \r\n if(iterationCount%10 == 0 || iterationCount == ITERATION_NO-1){\r\n try {\r\n pw = new PrintWriter(new File(\"data/popoluation_\" + Integer.toString(iterationCount) +\".csv\"));\r\n } catch (FileNotFoundException ex) {\r\n \r\n } \r\n \r\n \r\n for(int n = 0; n < dimensionList.size(); n++){ \r\n pw.write(\"v\" + Integer.toString(n));\r\n pw.write(\",\");\r\n }\r\n \r\n pw.write(\"fValue\");\r\n\r\n pw.write(\"\\n\");\r\n \r\n for (MyPacMan individual : population) {\r\n pw.write(individual.toString());\r\n pw.write(\",\");\r\n pw.write(Double.toString(fitFunction(individual)));\r\n pw.write(\"\\n\");\r\n }\r\n \r\n pw.flush();\r\n }\r\n \r\n int loop = 0;\r\n \r\n // main loop for evolution\r\n while(loop < population.size()){ \r\n\r\n MyPacMan original = null;\r\n MyPacMan candidate = null;\r\n boolean boundsHappy;\r\n\r\n do{\r\n boundsHappy = true;\r\n // pick an agent from the the population\r\n int x = loop;\r\n int a,b,c = -1;\r\n\r\n // pick three random agents from the population\r\n // make sure that they are not identical to selected agent from\r\n // the population \r\n\r\n do{\r\n a = random.nextInt(population.size());\r\n }while(x == a);\r\n do{\r\n b = random.nextInt(population.size());\r\n }while(b==x || b==a);\r\n do{\r\n c = random.nextInt(population.size());\r\n }while(c == x || c == a || c == b);\r\n\r\n // create three agent individuals\r\n MyPacMan individual1 = population.get(a);\r\n MyPacMan individual2 = population.get(b);\r\n MyPacMan individual3 = population.get(c);\r\n\r\n // create a noisy random candidate\r\n MyPacMan noisyRandomCandicate = new MyPacMan(dimensionList);\r\n\r\n // mutation process\r\n // if an element of the trial parameter vector is\r\n // found to violate the bounds after mutation and crossover, it is reset in such a way that the bounds\r\n // are respected (with the specific protocol depending on the implementation)\r\n for(int n = 0; n < dimensionList.size(); n++){ \r\n noisyRandomCandicate.dataValue[n] = (individual1.dataValue[n] + DIFFERENTIAL_WEIGHT * (individual2.dataValue[n] - individual3.dataValue[n])); \r\n } \r\n\r\n // Create a trial candicate \r\n original = population.get(x);\r\n candidate = new MyPacMan(dimensionList);\r\n\r\n // copy values from original agent to the candidate agent\r\n for(int n = 0; n < dimensionList.size(); n++){ \r\n candidate.dataValue[n] = original.dataValue[n];\r\n } \r\n\r\n // crossver process with the selected individual\r\n // pick a random dimension, which defintely takes the value from the noisy random candidate\r\n int R = random.nextInt(dimensionList.size());\r\n\r\n for(int n = 0; n < dimensionList.size(); n++){\r\n\r\n double crossoverProbability = random.nextDouble();\r\n\r\n if(crossoverProbability < CROSSOVER_PROBABILITY || n == R){\r\n candidate.dataValue[n] = noisyRandomCandicate.dataValue[n];\r\n }\r\n\r\n }\r\n\r\n // check here if the trial candiate satisfies bounds for each value\r\n for(int n = 0; n < dimensionList.size(); n++){ \r\n if(candidate.dataValue[n] < dimensionList.get(n)[0] || candidate.dataValue[n] > dimensionList.get(n)[1]){\r\n boundsHappy = false;\r\n }\r\n }\r\n\r\n }while(boundsHappy == false);\r\n\r\n //see if the candidate is better than original, if so replace it\r\n if(fitFunction(original) < fitFunction(candidate)){\r\n population.remove(original);\r\n population.add(candidate); \r\n }\r\n loop++;\r\n } \r\n }\r\n \r\n MyPacMan bestFitness = new MyPacMan(dimensionList);\r\n \r\n // selecting the final best agent from the the population\r\n for(int i = 0; i < population.size(); i++){\r\n MyPacMan individual = population.get(i);\r\n \r\n if(fitFunction(bestFitness) < fitFunction(individual)){\r\n \r\n try {\r\n bestFitness = (MyPacMan) individual.clone();\r\n } catch (CloneNotSupportedException ex) {\r\n \r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"Fitness migliore: \" + fitFunction(bestFitness));\r\n return bestFitness;\r\n }", "private static Set<Chromosome> generateRandomPopulation(int pathLength, int randomPopulationSize) {\n Set<Chromosome> population = new HashSet<>();\n\n // create an arraylist of CityIDs, and initialise it with the cities in order of their ID\n ArrayList<Integer> basePath = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n basePath.add(i);\n }\n\n // repeat the following for as many chromosomes as are required (populationSize)\n while (population.size() < randomPopulationSize) {\n Chromosome chromosome = new Chromosome(pathLength);\n // randomise the order of the arraylist of cities\n Collections.shuffle(basePath);\n for (int j = 0; j < pathLength; j++) {\n chromosome.path[j] = basePath.get(j);\n }\n population.add(chromosome);\n }\n\n return population;\n }", "Population<T> operate(Population<T> population);", "public void createSelectedPopulation(Population previousPopulation, int populationSize, double perc) {\n\t\t\n\t\tint intendedSize = (int)(populationSize * perc/100);\n\t\tSystem.out.println(\"intended size: \" + intendedSize ) ;\n\t\tint currentSize = 0;\n\t\tint randomPopulationSize;\n\t\tSolution mutant;\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\n\t\t\n\t\t//copy solutions from the previous population until the cloning factor is bigger than 1\n\t\tfor(Solution solution : previousPopulation.getPopulation()) {\n\t\t\tif(solution.getCloningFactor() < 1.0) break;\n\t\t\t\n\t\t\t//add as many clones of the current solution\n\t\t\t//as indicates the cloning factor\n\t\t\t//eg. if cloning factor is 2 -> 3 copies of this solution will go to the next population\n\t\t\tfor(int i = 0; i <= (int) solution.getCloningFactor(); i++) {\n\t\t\t\t//if we get a complete population by cloning the solution from the previous population\n\t\t\t\t//leave the method\n\t\t\t\tif(currentSize == intendedSize) break;\n\t\t\t\t\n\t\t\t\t//we create a mutation of each clone\n\t\t\t\t//if mutation is less efficient or already exists in the population we discard it\n\t\t\t\tmutant = new Solution(solution.getFrequencyRelations(), solution.getCabinets());\n\t\t\t\tArrayList<String> mutantSol = solution.mutate();\n\t\t\t\tmutant.setPossibleSolution(mutantSol);\n\t\t\t\tmutant.setPath(mutant.countPath(mutant.getPossibleSolution()));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"M: \" + mutantSol + \" \" + mutant.getPath() );\n\t\t\t//\tSystem.out.println(\"S: \" + solution.getPossibleSolution() + \" \" + solution.getPath() );\n\n\n\t\t\t\tif(mutant.getPath() >= solution.getPath() || added.contains(mutant.getPossibleSolution()) ) {\n\t\t\t\t\tpopulation.add(solution);\n\t\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"original\");\n\t\t\t\t}else {\n\t\t\t\t\tpopulation.add(mutant);\n\t\t\t\t\tadded.add(mutant.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"mutant\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcurrentSize++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//count the number of random solutions that should be added\n\t\tif(currentSize <= populationSize) {\n\t\t\t randomPopulationSize = populationSize - currentSize;\n\t\t}else return;\n\t\t\n\t\t//create random solutions and add them to the population \n\t\t//until the wished size is reached\n\t\tcreateRandomPopulation(previousPopulation.getCabinetArrangement(), randomPopulationSize);\n\t\t\t\n\t}", "public static void makeGrid (Species map[][], int numSheepStart, int numWolfStart, int numPlantStart, int sheepHealth, int plantHealth, int wolfHealth, int plantSpawnRate) {\n \n // Declare coordinates to randomly spawn species\n int y = 0;\n int x = 0;\n \n // Initialise plants\n Plant plant;\n \n // Spawn plants\n for (int i = 0; i < numPlantStart; i++) {\n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Choose a random plant (50% chance healthy, 25% poisonous or energizing)\n int plantChoice = (int) Math.ceil(Math.random() * 100);\n \n // Create the new plants\n if ((plantChoice <= 100) && (plantChoice >= 50)) {\n plant = new HealthyPlant(plantHealth, x, y, plantSpawnRate);\n } else if ((plantChoice < 50) && (plantChoice >= 25)) {\n plant = new EnergizingPlant(plantHealth, x, y, plantSpawnRate);\n } else {\n plant = new PoisonousPlant(plantHealth, x, y, plantSpawnRate);\n }\n \n // Set plant coordinates\n plant.setX(x);\n plant.setY(y);\n map[y][x] = plant;\n \n // No space\n } else { \n i -= 1;\n }\n \n }\n \n // Spawn sheep\n for (int i = 0; i < numSheepStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) {\n \n // Create new sheep\n Sheep sheep = new Sheep(sheepHealth, x, y, 5); \n \n // Set sheep coordinates\n sheep.setX(x);\n sheep.setY(y);\n map[y][x] = sheep;\n \n // No space\n } else { \n i -= 1; \n }\n \n }\n \n // Spawn wolves\n for (int i = 0; i < numWolfStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Create new wolf\n Wolf wolf = new Wolf(wolfHealth, x, y, 5); \n \n // Set wolf coordinates\n wolf.setX(x);\n wolf.setY(y);\n map[y][x] = wolf; \n \n // No space\n } else { \n i -= 1; \n }\n }\n \n }", "private void createInitialPopulation() throws InterruptedException, TimeoutException {\n\n\t\tProteinDatabase ident = new ProteinDatabase();\n\t\tident.parseInput(\"proteins.fasta\");\n\t\tList<Protein> database = ident.getDatabase();\n\n\t\tfor (Protein data : database) {\n\t\t\tdata.setExperimental(es);\n\t\t}\n\n\t\tList<Protein> candidates = new ArrayList<Protein>();\n\t\tfor (Protein p : database)\n\t\t{\n\t\t\tTheoreticalSpectrum theoreticalSpectrum = new TheoreticalSpectrum(p.getAminoAcidsequence());\n\t\t\tif (Math.abs(parentMass - theoreticalSpectrum.getParentMass()) <= parentMassThreshold) {\n\t\t\t\tcandidates.add(p);\n\t\t\t}\n\t\t}\n\n\t\trunInitialFitnessCalculations(candidates);\n\n\t\tCollections.sort(candidates, new ProteinFitnessComparator());\n\t\tdebug(candidates, 0);\n\n\n\t\tpopulation = new ArrayList<Protein>(populationSize);\n\n\t\tpopulationActualSize = 0;\n\t\tfor (Protein p : candidates)\n\t\t{\n\t\t\tpopulation.add(p);\n\t\t\tpopulationActualSize++;\n\t\t\tif (populationActualSize == populationSize)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "public Population InitSinglePopulation(int NumberOfAgents) {\n \n SinglePopulation TempPopulation = new SinglePopulation();\n \n TempPopulation.setPopulationID(0);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble());\n boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false;\n TempAgentS.setAction(InitAction);\n \n TempPopulation.AgentList.add(TempAgentS);\n }\n \n TempPopulation.setStrategyList();\n TempPopulation.setActionList();\n return TempPopulation;\n }", "public void generate() {\n\t\tint randNum;\n\n\t\t// Generates variables.\n\t\tfor (int i = 0; i < variables.length; i++) {\n\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\twhile (!checkDuplicate(variables, i, randNum)) {\n\t\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\t}\n\t\t\tvariables[i] = randNum;\n\t\t}\n\n\t\t// Example sudoku.\n\t\trandNum = rand.nextInt(3) + 1;\n\t\tswitch (randNum) {\n\t\tcase 1:\n\t\t\tint[][] array1 = { { 4, 7, 1, 3, 2, 8, 5, 9, 6 },\n\t\t\t\t\t{ 6, 3, 9, 5, 1, 4, 7, 8, 2 },\n\t\t\t\t\t{ 5, 2, 8, 6, 7, 9, 1, 3, 4 },\n\t\t\t\t\t{ 1, 4, 2, 9, 6, 7, 3, 5, 8 },\n\t\t\t\t\t{ 8, 9, 7, 2, 5, 3, 4, 6, 1 },\n\t\t\t\t\t{ 3, 6, 5, 4, 8, 1, 2, 7, 9 },\n\t\t\t\t\t{ 9, 5, 6, 1, 3, 2, 8, 4, 7 },\n\t\t\t\t\t{ 2, 8, 4, 7, 9, 5, 6, 1, 3 },\n\t\t\t\t\t{ 7, 1, 3, 8, 4, 6, 9, 2, 5 } };\n\t\t\tcopy(array1, answer); // Copies example to answer.\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tint[][] array2 = { { 8, 3, 5, 4, 1, 6, 9, 2, 7 },\n\t\t\t\t\t{ 2, 9, 6, 8, 5, 7, 4, 3, 1 },\n\t\t\t\t\t{ 4, 1, 7, 2, 9, 3, 6, 5, 8 },\n\t\t\t\t\t{ 5, 6, 9, 1, 3, 4, 7, 8, 2 },\n\t\t\t\t\t{ 1, 2, 3, 6, 7, 8, 5, 4, 9 },\n\t\t\t\t\t{ 7, 4, 8, 5, 2, 9, 1, 6, 3 },\n\t\t\t\t\t{ 6, 5, 2, 7, 8, 1, 3, 9, 4 },\n\t\t\t\t\t{ 9, 8, 1, 3, 4, 5, 2, 7, 6 },\n\t\t\t\t\t{ 3, 7, 4, 9, 6, 2, 8, 1, 5 } };\n\t\t\tcopy(array2, answer);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tint[][] array3 = { { 5, 3, 4, 6, 7, 8, 9, 1, 2 },\n\t\t\t\t\t{ 6, 7, 2, 1, 9, 5, 3, 4, 8 },\n\t\t\t\t\t{ 1, 9, 8, 3, 4, 2, 5, 6, 7 },\n\t\t\t\t\t{ 8, 5, 9, 7, 6, 1, 4, 2, 3 },\n\t\t\t\t\t{ 4, 2, 6, 8, 5, 3, 7, 9, 1 },\n\t\t\t\t\t{ 7, 1, 3, 9, 2, 4, 8, 5, 6 },\n\t\t\t\t\t{ 9, 6, 1, 5, 3, 7, 2, 8, 4 },\n\t\t\t\t\t{ 2, 8, 7, 4, 1, 9, 6, 3, 5 },\n\t\t\t\t\t{ 3, 4, 5, 2, 8, 6, 1, 7, 9 } };\n\t\t\tcopy(array3, answer);\n\t\t\tbreak;\n\t\t}\n\n\t\treplace(answer); // Randomize once more.\n\t\tcopy(answer, problem); // Copies answer to problem.\n\t\tgenProb(); // Generates problem.\n\n\t\tshuffle();\n\t\tcopy(problem, player); // Copies problem to player.\n\n\t\t// Checking for shuffled problem\n\t\tcopy(problem, comp);\n\n\t\tif (!solve(0, 0, 0, comp)) {\n\t\t\tgenerate();\n\t\t}\n\t\tif (!unique()) {\n\t\t\tgenerate();\n\t\t}\n\t}", "public ArrayList<Building> getPopulation(){\n\t\treturn population;\n\t}", "public int getpopulation() {\n return population;\n }", "public AIAssign2(){\n \n Scanner console = new Scanner(System.in);\n \n System.out.print(\"Input population size \");\n popsize = console.nextInt();\n \n System.out.print(\"Input tournament size \");\n tournysize = console.nextInt();\n \n System.out.print(\"Input crossover chance (%) \");\n crossprob = console.nextDouble();\n \n System.out.print(\"Input mutation chance (%) \");\n mutaprob = console.nextDouble();\n \n System.out.print(\"Input max generation size \");\n maxgen = console.nextInt();\n \n System.out.print(\"Input problem width \");\n width = console.nextInt();\n \n System.out.print(\"Input problem height \");\n height = console.nextInt();\n \n System.out.print(\"Input start location x-1 \");\n startx = console.nextInt();\n \n System.out.print(\"Input start location y-1 \");\n starty = console.nextInt();\n \n System.out.print(\"Input seed value \");\n seed = console.nextLong();\n \n Random rnd = new Random(seed);\n \n population = new int[popsize][height*width];\n population2 = new int[popsize][height*width];\n popfitness = new int[popsize];\n \n for (int i = 0 ; i<popsize ; i++){\n for (int j = 0 ; j<population[0].length ; j++){\n population[i][j] = (rnd.nextInt(4));\n }\n }\n Print(population);\n \n //the generation loop\n for (int gen = 0 ; gen < maxgen ; gen++){\n \n //fitness of individuals is stored\n int btemp = 0;\n for (int i = 0 ; i < popsize ; i++){\n \n problem = new char[width][height];\n problem[startx][starty] = 'S';\n \n popfitness[i] = Fitness(population[i], problem, startx, starty, 0);\n \n if (popfitness[i] > btemp){ btemp = popfitness[i];}\n }\n bestavg = bestavg + btemp;\n \n String line=\"\";\n int avg=0;\n for (int i = 0 ; i < popsize ; i++){\n line = line + \"[\" + popfitness[i] + \"] \"; \n avg = avg + popfitness[i];\n }\n avg = avg/popsize;\n avgavg = avgavg + avg;\n bestavg = bestavg / (gen+1);\n avgavg = avgavg / (gen+1);\n System.out.println(\"Gen: \"+gen + \" Fitness: \"+ line + \" Avg: \"+ avg + \" BestAvg: \" + bestavg + \" AvgAvg: \" + avgavg);\n bestavg = bestavg * (gen+1);\n avgavg = avgavg * (gen+1);\n \n //Tournament selection\n for (int i = 0 ; i < popsize ; i++){\n int best = 0; \n int rand = (int)(rnd.nextInt(popsize));\n best = rand;\n \n for (int k = 0 ; k < tournysize ; k++){\n if (popfitness[rand] > popfitness[best]){\n best = rand;\n }\n \n rand = (int)(rnd.nextInt(popsize));\n }\n population2[i] = Copy(population[best]); \n }\n \n //single-focus-flip and block exchange mutations\n for (int i = 0 ; i < popsize-1 ; i++){\n if (crossprob > rnd.nextInt(100)){\n int temp; \n for (int a = 0 ; a < 5 ; a++){\n temp = population2[i][a];\n population2[i][a] = population2[i+1][a];\n population2[i+1][a] = temp;\n }\n }\n }\n \n for (int i = 0 ; i < popsize ; i++){\n if (mutaprob > rnd.nextInt(200)){\n int temp = (int) (rnd.nextInt(population2[0].length)); \n population2[i][temp] = (int)(rnd.nextInt(4));\n }\n else if (mutaprob > rnd.nextInt(200)){\n for (int j = 0 ; j < population2[0].length/2 ; j++){\n int temp = population2[i][j];\n population2[i][j] = population2[i][population2[0].length-1-j];\n population2[i][population2[0].length-1-j] = temp;\n }\n }\n }\n \n population = population2;\n population2 = new int[popsize][population[0].length];\n \n }\n \n bestavg = bestavg / maxgen;\n avgavg = avgavg / maxgen;\n Print(population);\n System.out.println(\"Best Avg: \" + bestavg + \" Average of Avg: \" + avgavg);\n }", "public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}", "protected Population(Infrastructure infra)\n\t\t{\tinds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++)\n\t\t\t\tinds[i] = new Individual(infra);\n\t\t\tthis_ind = 0;\n\t\t\tthis_gen = 0;\n\t\t}", "public int getPopulationSize(){\n\t\treturn populationSize;\n\t}", "public interface PopulationInitialiser {\n\t/**\n\t * this generates an initial solution population from which to start optimisation\n\t *\n\t * @param cities the set of cities which are part of each solution\n\t * @param populationSize the number of solutions to be included in a population\n\t */\n\tSolutionPopulation initialise(ArrayList<City> cities, int populationSize);\n}", "protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}", "public int produce(int min, int max, int start, int subpopulation, Individual[] inds, ec.EvolutionState state, int thread)\n/* */ {\n/* 27 */ int n = this.sources[0].produce(min, max, start, subpopulation, inds, state, thread);\n/* */ \n/* */ \n/* */ \n/* 31 */ if (!state.random[thread].nextBoolean(this.likelihood)) {\n/* 32 */ return reproduce(n, start, subpopulation, inds, state, thread, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 38 */ if (!(this.sources[0] instanceof ec.BreedingPipeline)) {\n/* 39 */ for (int q = start; q < n + start; q++) {\n/* 40 */ inds[q] = ((Individual)inds[q].clone());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 48 */ if (!(inds[start] instanceof TestCaseCandidate))\n/* 49 */ state.output.fatal(\"OurMutatorPipeline didn't get an Chromosome.The offending individual is in subpopulation \" + \n/* 50 */ subpopulation + \" and it's:\" + inds[start]);\n/* 51 */ ChromosomeSpecies species = (ChromosomeSpecies)inds[start].species;\n/* */ \n/* */ \n/* */ \n/* 55 */ for (int q = start; q < n + start; q++)\n/* */ {\n/* 57 */ TestCaseCandidate i = (TestCaseCandidate)inds[q];\n/* 58 */ double mutp = 1.0D / i.getGenes().size();\n/* */ \n/* 60 */ double[] propa = new double[i.getGenes().size()];\n/* 61 */ for (int x = 0; x < i.getGenes().size(); x++)\n/* 62 */ propa[x] = mutp;\n/* 63 */ for (int x = 0; x < i.getGenes().size(); x++) {\n/* 64 */ if (state.random[thread].nextBoolean(propa[x]))\n/* */ {\n/* */ \n/* 67 */ ((csbst.generators.AbsractGenerator)i.getGenes().get(x)).mutate();\n/* */ }\n/* */ }\n/* */ \n/* 71 */ i.evaluated = false;\n/* */ }\n/* */ \n/* 74 */ return n;\n/* */ }", "private void mutate() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tpopulationArray.set(i, populationArray.get(i).generateNeighbor());\n\t\t}\n\t}", "public void createRandomPopulation(List<String> cabinetArrangement, int populationSize){\n\t\t\n\t\tint size = 0;\n\t\t\n\t\t//list to check if the current solution\n\t\t//has been already added to the population \n\t\t\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\t\t\n\t\t//create a new solution object\n\t\tSolution solution = new Solution(relations, cabinetArrangement);\n\t\t//assign a cabinet arrangement to it, which is a possible solution\n\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\n\t\twhile(size < populationSize) {\n\t\t\t\t\n\t\t\t\t//continue, if the solution is already in the population\n\t\t\t\tif(added.contains(solution.getPossibleSolution())) {\n\t\t\t\t\tsolution = new Solution(relations, cabinetArrangement);\n\t\t\t\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsize++;\n\t\t\t\n\t\t\t\t//add solution to the population\n\t\t\t\tpopulation.add(solution);\n\t\t\t\t//and to the control list\n\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\n\t\t\t\tsolution = new Solution(relations, cabinetArrangement);\n\t\t\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\n\t\t}\n\t\t\n\t\tif(size == populationSize) {\n\t\t\t//count the average path when the population is already created\n\t\t\tcountAveragePath();\n\t\t\t\n\t\t\t//count and assign a cloning factor for all the solutions\n\t\t\tcloningFactor();\n\t\t}\n\t}", "private PMCGenotype[] advanceGeneration()\n\t{\n\t\tPMCGenotype[] newPop = new PMCGenotype[population.length];\n\t\tPMCGenotype[] parents = selectParents();\n\t\tArrayList<PMCGenotype> candidates = new ArrayList<PMCGenotype>();\n\n\t\t// Add the current population to the list of candidates.\n\t\tfor (PMCGenotype pmcg : population)\n\t\t{\n\t\t\tcandidates.add(pmcg);\n\t\t}\n\n\t\t// For each parent, generate a number of mutations (children), calculate their fitness\n\t\t// and add them to the list of candidates.\n\t\tint childrenPerParent = this.childrenPerGeneration / this.parentsToSelect;\n\t\tfor (PMCGenotype p : parents)\n\t\t{\n\t\t\tfor (int i = 0; i < childrenPerParent; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = PMCGenotype.mutate(p, r);\n\t\t\t\tpmcg.setFitness(fitness(pmcg, this.trials));\n\t\t\t\tcandidates.add(pmcg);\n\t\t\t}\n\t\t}\n\n\t\t// Find candidate with the best fitness and add it to the new population.\n\t\t// Repeat this until the new population size matches the previous population size.\n\t\tint candidatesChosen = 0;\n\t\twhile (candidatesChosen < this.population.length)\n\t\t{\n\t\t\tint numberOfRemainingCandidates = candidates.size();\n\t\t\tdouble currentBestFitnessScore = 0;\n\t\t\tint currentBestFitnessScoreIndex = 0;\n\n\t\t\tfor (int i = 0; i < numberOfRemainingCandidates; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = candidates.get(i);\n\t\t\t\tif (pmcg.getFitness() > currentBestFitnessScore)\n\t\t\t\t{\n\t\t\t\t\tcurrentBestFitnessScore = pmcg.getFitness();\n\t\t\t\t\tcurrentBestFitnessScoreIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewPop[candidatesChosen] = candidates.get(currentBestFitnessScoreIndex);\n\t\t\tcandidatesChosen++;\n\n\t\t\tcandidates.remove(currentBestFitnessScoreIndex);\n\t\t}\n\n\t\treturn newPop;\n\t}", "private Vector step(){\n// System.out.println();\n// System.out.println(generationCount);\n// System.out.println(\"The Population is:\");\n// System.out.println(population);\n \n //DETERMINE WHO SURVIVES INTO NEXT GENERATION\n Vector nextGeneration = surviveType.run(population, fitnessArray);\n\n //DO THE CROSSOVER PROCESS\n //WHILE THE NEXT GENERATION ISN'T FULL\n while (nextGeneration.size() < (populationSize - randGenes)){\n //FIND PARENTS\n Gene parentOne, parentTwo;\n do {\n Gene[] parents = selectType.run(population, fitnessArray);\n parentOne = parents[0];\n parentTwo = parents[1];\n } while (selectPairs && (! closeEnough(parentOne, parentTwo)));\n //ADD CHILDREN\n Gene[] kids = crossType.children(parentOne, parentTwo);\n\n nextGeneration.add(kids[0]);\n if (nextGeneration.size() < (populationSize - randGenes)){\n nextGeneration.add(kids[1]);\n }\n }\n //ADD RANDOM GENES TO THE POPULATION\n while (nextGeneration.size() < populationSize){\n nextGeneration.add(initializer.createRandomGene(fitnessFunction, minRadius, maxRadius));\n }\n //MUTATE THE NEXT GENERATION\n for (int j = 0; j < populationSize; j++){\n if (Math.random() < mutationProb){\n nextGeneration.set(j, mutationType.run((Gene) nextGeneration.get(j)));\n }\n }\n\n //COMPUTE FITNESSES AND RELOCATE IF NECESSARY\n Gene bestGene = (Gene) nextGeneration.get(0);\n int bestX = 0;\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n while (relocationType.move(bannedList, next)){\n Gene newGene = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n next = newGene;\n nextGeneration.set(x, next);\n }\n fitnessArray[x] = next.getFitness();\n\n //FOR THE PURPOSES OF UPDATING THE BANNED LIST\n if (next.getFitness() > bestGene.getFitness()){\n bestGene = next;\n bestX = x;\n }\n } //End for (int x = 0;...\n\n Arrays.sort(fitnessArray);\n\n //UPDATE THE BANNED LIST BY ADDING THE BEST GENE IN THE NEXT GENERATION IF IT'S ABOVE minAccepted AND CONTAINS MORE THAN minPoints POINTS\n if (useList){\n if ((generationCount >= firstAdd) &&\n (solutionCounter >= countNum) &&\n (bestGene.getFitness() >= minAccepted) &&\n (bestGene.getCount() >= minPoints)){\n solutionCounter = 0;\n// System.out.println(bestGene);\n Gene bestClone = new Gene (bestGene.getMajorAxisRadius(), //THIS KLUDGE IS DONE B/C .clone() IS\n bestGene.getMinorAxisRadius(), //PROTECTED, AND I CAN'T UNPROTECT IT.\n bestGene.getX(), //I USE A CLONED GENE TO PREVENT A MUTATION\n bestGene.getY(), //IN THE NEXT GENERATION FROM ALTERING bannedList\n bestGene.getOrientation(),\n bestGene.getFunction());\n bannedList = relocationType.updateBannedList(bannedList, bestClone);\n\n\n //IF NECESSARY, UPDATE THE SOLUTION LIST BY ADDING ALL CLUSTERS WITH MORE THAN minPoints POINTS AND A FITNESS OF AT LEAST minAccepted\n if (returnAllSolutions){\n for (int i = 0; i < populationSize; i++){\n Gene next = (Gene) nextGeneration.get(i);\n if ((next.getFitness() >= minAccepted) && (next.getCount() >= minPoints)){\n solutionList.add(next);\n }\n }//End for (int i = 0...\n } else {\n solutionList = bannedList;\n } //End if (returnAllSolutions){...}else{\n } //End if (generationCount > 4...\n } //End if (useList){\n\n generationCount = generationCount + 1;\n solutionCounter = solutionCounter + 1;\n\n //IF AVOIDING CONVERGENCE, AND IT HAS CONVERGED, START OVER WITH RANDOM GENES\n\n double bestFitness = bestGene.getFitness();\n double medianFitness = roundToHundredths((double) fitnessArray[(int) Math.floor(populationSize / 2)]);\n\n// System.out.println(bestFitness);\n// System.out.println(medianFitness);\n\n if ((antiConvergence) &&\n ((bestFitness - medianFitness) < (0.01 * bestFitness)) &&\n (generationCount > firstAdd)){\n nextGeneration = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n// System.out.println(\"EXPLODED CONVERGENCE!\");\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n fitnessArray[x] = next.getFitness();\n }\n Arrays.sort(fitnessArray);\n }\n\n return nextGeneration;\n }", "void generate() {\n rouletteSelection();\n do {\n updateParents();\n crossover();\n mutation();\n } while (!isValidOffset());\n insertOffspring();\n }", "public void setPopulation(Integer population) {\n this.population = population;\n }", "public void createGrid() {\r\n generator.generate();\r\n }", "public String getPopulation() {\n\t\treturn population;\n\t}", "private static ArrayList<Chromosome> generateNearestNeighbourPopulation(int pathLength, int nnPopulationSize){\n // declaring the arraylist of chromosomes which will store the\n ArrayList<Chromosome> nnPopualtion = new ArrayList<>();\n\n // declaring a set which will contain all the starting cities that will be used for the population\n Set<Integer> startingCities = new HashSet<>();\n // initialising the set of startingCities with random cities. It being a set no duplicates are allowed\n while (startingCities.size() < nnPopulationSize) {\n startingCities.add(ThreadLocalRandom.current().nextInt(0, pathLength));\n }\n\n // An ArrayList with all the cityIDs which can be copied to keep track of visited/unvisited cities\n ArrayList<Integer> cities = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n cities.add(i);\n }\n\n // for every starting city\n for (Integer startingCity : startingCities) {\n // set the currentCity as the Starting City\n int currentCity = startingCity;\n // Declare a new chromosome to store this new path\n Chromosome chromosome = new Chromosome(pathLength);\n // Set the first city in the path as the startingCity\n chromosome.path[0] = startingCity;\n\n // Declare a new Set of unvisitedCities, and initialise it as a copy of the ArrayList of cityIDs\n Set<Integer> unvisitedCities = new HashSet<>(cities);\n // remove the startingCity from the set of unvisitedCities\n unvisitedCities.remove(startingCity);\n\n // for the length of the path\n for (int i = 1; i < pathLength; i++) {\n // initially set the closestCity to a random city from the set of unvisitedCities\n int closestCity = unvisitedCities.iterator().next();\n // loop through every unvisitedCity to find the closestCity\n for (Integer city : unvisitedCities) {\n // if the distance between the currentCity and the unvisitedCity is < the distance between\n // the currentCity and the closestCity\n if (distanceMatrix[currentCity][city] < distanceMatrix[currentCity][closestCity]) {\n // set thet unvisitedCity as the closestCity\n closestCity = city;\n }\n }\n // add the closestCity as the next city in the path\n chromosome.path[i] = closestCity;\n // make the currentCity for the next iteration the current closestCity\n currentCity = closestCity;\n // remove the closestCity from the set of unvisitedCities\n unvisitedCities.remove(closestCity);\n }\n\n // add the generated chromosome to the ArrayList of the initial nnPopulation\n nnPopualtion.add(chromosome);\n }\n\n return nnPopualtion;\n }", "public Scenario generate() {\n\n //generate random number of Passenger(all human)\n ArrayList liPsg = new ArrayList();\n int totalNumOfPsg = (int) (rd.nextDouble() * PassengerCountMax + PassengerCountMin); //at least one Psg\n for (int i = 0; i < totalNumOfPsg; i++) {\n liPsg.add(getRandomPerson());\n }\n //System.out.println(\"PassengerNum= \"+totalNumOfPsg);\n\n\n //generate random number of Pedestrians(with Max 5) & allocate person+animal randomly(human+animal)\n ArrayList liPdt = new ArrayList();\n int totalNumOfPdst = (int) (rd.nextDouble() * PedestrianCountMax + PedestrianCountMin);//at least one Pdg\n int NumOfPerson = (int) Math.round(rd.nextDouble() * totalNumOfPdst);//if only 1 pdt,along with randomDouble<0.5 , 0.4x*1 rounded=0, will only an animal\n //so if you are random being in pdt but pdt only an animal, you neither wont be in scenario, so your negative probability in scenario is higher.\n int NumOfAnimal = totalNumOfPdst - NumOfPerson;\n for (int i = 0; i < NumOfPerson; i++) {\n liPdt.add(getRandomPerson());\n }\n for (int i = 0; i < NumOfAnimal; i++) {\n liPdt.add(getRandomAnimal());\n }\n //System.out.println(\"PedestrianNum= \"+totalNumOfPdst+\" with \"+NumOfPerson+\" human and \"+NumOfAnimal+\" animals\");\n\n\n //allocating where you are, 0=you absence & do nothing, 1=you in car, 2=you on road !!!!yeah happy solving\n int allocate_of_user = (int) Math.round(rd.nextDouble() * 2);\n if (allocate_of_user == 1) {\n ((Person) liPsg.get(0)).setAsYou(true); //set the first psg is you. !!!!!important Cast Obj into Person!!!!\n } else if (allocate_of_user == 2) {\n for (int i = 0; i < liPdt.size(); i++) {\n if (liPdt.get(i) instanceof Person) {//check whether a person\n ((Person) liPdt.get(i)).setAsYou(true);\n break; // only set once than break rather than set all of people of pdt is you\n }\n }\n }\n\n //Scenario(ArrayList<Character> passengers, ArrayList<Character> pedestrians, boolean isLegalCrossing)\n S = new Scenario(liPsg, liPdt, rd.nextBoolean()); //isLegalCrossing = red or green light;\n return S;\n }", "Chromosome from(List<Chromosome> population);", "RoachPopulation(int initial)\n {\n roaches = initial;\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "@Test\n\tpublic static void PersonTest01() {\n\t\t\tString targetTable = \"DATA_TEST\";\n\t\t\ttargetTable = \"test_sample\";\n\t\t\ttry{\n\t\t\tPriorDAO DAO = new PriorDAO();\n\t\t\tDAO.DropTempTable(targetTable);\n\t\t\tString[] inArgs ={\"CREATE_EMPTY_FACT_TABLE\",targetTable};\n\t\t\tDAO.RunProcedure(inArgs, null, null);\n\t\tGenerator Gen = new Generator();\n\t\tint crowedSize = 10000;\n\t\tcrowedSize = 1000;\n\t\tmakePop(Gen, crowedSize, targetTable);\n\t\tGeneratorType2 Gen2 = new GeneratorType2();\n\t\tmakePop(Gen2, crowedSize, targetTable);\n\t\tPrint(\"Finished\");\n\t\t\t}catch(Exception e)\n\t\t\t{\n\t\t\t\tPrint(\"Failed :\"+e.getMessage());\n\t\t\t}\n\t}", "public void initPopulation() throws JMException, ClassNotFoundException {\n population_ = new SolutionSet[problemSet_.size()];\n for (int i = 0; i < problemSet_.size(); i++){\n population_[i] = new SolutionSet(populationSize_);\n }\n\n for (int j = 0; j < problemSet_.size(); j++){\n for (int i = 0; i < populationSize_; i++) {\n Solution newSolution = new Solution(problemSet_);\n problemSet_.get(j).evaluate(newSolution);\n problemSet_.get(j).evaluateConstraints(newSolution);\n population_[j].add(newSolution);\n } // for\n }\n\n }", "static double[] evolveWeights() throws Exception {\n\t\t// Create a random initial population\n\t\tRandom r = new Random();\n\t\t// Matrix is a two dimensional array, populationSize are rows, Genes are columns\n\t\tMatrix population = new Matrix(populationSize, numberofGenes);\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\t// returns elements(genes) of every row\n\t\t\t// Think of every row as a seperate chromosome of parent\n\t\t\tdouble[] chromosome = population.row(i);\n\t\t\t// create every gene for each chrosome in the population\n\t\t\tfor (int j = 0; j < chromosome.length; j++) {\n\t\t\t\tdouble gene = 0.03 * r.nextGaussian();\n\t\t\t\tchromosome[j] = gene;\n\t\t\t}\n\t\t}\n\n\t\tint generationNum = 0;\n\t\t// do battle with chromosomes until winning condition is found\n\t\t// Controller.doBattleNoGui(new ReflexAgent(), new\n\t\t// NeuralAgent(population.row(0)))\n\t\twhile (Controller.doBattleNoGui(new ReflexAgent(), new NeuralAgent(population.row(0))) != -1) {\n\n\t\t\tSystem.out.println(\"Generation \" + (generationNum));\n\n\t\t\tint mightLive = r.nextInt(100);\n\n\t\t\tif (generationNum == 10)\n\t\t\t\tmutationRate -= 0.01;\n\t\t\tif (generationNum == 20)\n\t\t\t\tmutationRate -= 0.02;\n\t\t\tif (generationNum == 30)\n\t\t\t\tmutationRate -= 0.02;\n\n\t\t\t// Mutate the genes of the current population\n\t\t\tfor (int y = 0; y < populationSize; y++) {\n\t\t\t\tfor (int x = 0; x < numberofGenes; x++) {\n\t\t\t\t\tif (Math.random() <= mutationRate) {\n\t\t\t\t\t\tpopulation.changeGene(x, y, r.nextGaussian());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Make random number of battles\n\t\t\tfor (int i = 0; i < 40; i++) {\n\t\t\t\t// Create two teams with two random chromosomes from the population\n\t\t\t\tint soldier_a = r.nextInt(population.rows());\n\t\t\t\tint soldier_b = r.nextInt(population.rows());\n\n\t\t\t\t// Ensure that both teams don't have the same chromosome\n\t\t\t\tif (soldier_a == soldier_b)\n\t\t\t\t\tsoldier_b = r.nextInt(population.rows());\n\n\t\t\t\t// Do Battle between teams and select winner\n\t\t\t\tif (Controller.doBattleNoGui(new NeuralAgent(population.row(soldier_a)),\n\t\t\t\t\t\tnew NeuralAgent(population.row(soldier_b))) == 1) {\n\t\t\t\t\t// Chooses if the winner survives\n\t\t\t\t\tif (mightLive < winnerSurvivalRate)\n\t\t\t\t\t\tpopulation.removeRow(soldier_b);\n\t\t\t\t\telse\n\t\t\t\t\t\tpopulation.removeRow(soldier_a);\n\t\t\t\t}\n\n\t\t\t\telse if (Controller.doBattleNoGui(new NeuralAgent(population.row(soldier_a)),\n\t\t\t\t\t\tnew NeuralAgent(population.row(soldier_b))) == -1) {\n\t\t\t\t\t// Chooses if the winner survives\n\t\t\t\t\tif (mightLive < winnerSurvivalRate)\n\t\t\t\t\t\tpopulation.removeRow(soldier_a);\n\t\t\t\t\telse\n\t\t\t\t\t\tpopulation.removeRow(soldier_b);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Reproduce for the population (This is where the magic happens)\n\t\t\t// int currentPopulation = population.rows();\n\t\t\twhile (population.rows() < 100) {\n\t\t\t\t// Retrieve random parent\n\t\t\t\tint parentID = r.nextInt(population.rows());\n\t\t\t\tdouble[] parent = population.row(parentID);\n\t\t\t\tint[] potentialPartners = new int[10];\n\t\t\t\tint abs_min_value = Integer.MIN_VALUE;\n\t\t\t\tBoolean foundpartner = false;\n\t\t\t\tint partner = 0;\n\n\t\t\t\tfor (int i = 0; i < potentialPartners.length; i++) {\n\t\t\t\t\tint potentialPartnerID = r.nextInt(population.rows());\n\t\t\t\t\tif (parentID == potentialPartnerID)\n\t\t\t\t\t\tpotentialPartnerID = r.nextInt(population.rows());\n\t\t\t\t\tpotentialPartners[i] = potentialPartnerID;\n\t\t\t\t}\n\n\t\t\t\tfor (int i = 0; i < potentialPartners.length; i++) // Finding most compatiable parent #2.\n\t\t\t\t{\n\t\t\t\t\tint compatiablity = similarities(parent, population.row(potentialPartners[i]));\n\t\t\t\t\tif (compatiablity > abs_min_value) {\n\t\t\t\t\t\tpartner = potentialPartners[i];\n\t\t\t\t\t\tfoundpartner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (foundpartner == false)\n\t\t\t\t\tpartner = r.nextInt(population.rows());\n\n\t\t\t\tdouble[] secondParent = population.row(partner);\n\t\t\t\tdouble[] newChild = population.newRow();\n\t\t\t\tint splitpoint = r.nextInt((int) numberofGenes / 4);\n\n\t\t\t\tfor (int i = 0; i < splitpoint; i++) // logic to a for loop and two if statements\n\t\t\t\t\tnewChild[i] = parent[i];\n\t\t\t\tfor (int i = splitpoint; i < numberofGenes; i++)\n\t\t\t\t\tnewChild[i] = secondParent[i];\n\n\t\t\t\t// for (int i = 0; i < population.rows(); i++) {\n\t\t\t\t// if (Controller.doBattleNoGui(new ReflexAgent(), new\n\t\t\t\t// NeuralAgent(population.row(i))) == -1) {\n\t\t\t\t// population.row(i) = population.newRow();\n\t\t\t\t// numOfWins++;\n\t\t\t\t// } else { }\n\n\t\t\t\t// Test for the best in the given population\n\t\t\t\t// win_Collection.add(numOfWins);\n\t\t\t\t// printWeights(population.row(0));\n\n\t\t\t}\n\t\t\tgenerationNum++;\n\t\t\tfor (int i = 0; i < population.rows(); i++) {\n\t\t\t\tif (Controller.doBattleNoGui(new ReflexAgent(), new NeuralAgent(population.row(i))) == -1) {\n\t\t\t\t\tnumOfWins++;\n\t\t\t\t\t// population.row(i) = population.newRow();\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Number of Winners: \" + numOfWins);\n\t\t\tnumOfWins = 0;\n\n\t\t}\n\t\tprintWeights(population.row(0));\n\t\treturn population.row(0);\n\t}", "public void generateIndividual() {\n // Loop through all our destination cities and add them to our tour\n for (int cityIndex = 0; cityIndex < TourManager.numberOfCities(); cityIndex++) {\n setCity(cityIndex, TourManager.getCity(cityIndex));\n }\n // Randomly reorder the tour\n Collections.shuffle(tour);\n }", "public int getPopulation() {\n int population = 0;\n Iterator<Guppy> it = guppiesInPool.iterator();\n\n while (it.hasNext()) {\n Guppy currentGuppy = it.next();\n if (currentGuppy.getIsAlive()) {\n population++;\n }\n }\n return population;\n }", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public static void main(String[] args) throws IOException {\n\t\tint p = 8;\n\t\t// r is the fraction of the population to be replaced by Crossover at\n\t\t// each step\n//\t\tdouble r = Double.valueOf(8).doubleValue();\n\t\tdouble r = 8;\n\t\t// m is the rate of mutation\n//\t\tdouble m = Double.valueOf(8).doubleValue();\n\t\tdouble m = 8;\n\n\t\t// Write into files...\n\t\tFile outputFile = new File(\"testGA.txt\");\n\t\tFileWriter out = new FileWriter(outputFile);\n\n\t\t////////////////////////\n\t\tp = 33;\n\t\tr = 0.6;\n\t\tm = 0.1;\n\n\t\t// Report the population size, crossover rate and mutation rate\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Learning the 8-queens problem with a Genetic Algorithm\");\n\t\tSystem.out.println(\"Population Size: \" + p);\n\t\tSystem.out.println(\"Crossover Rate: \" + r);\n\t\tSystem.out.println(\"Mutation Rate: \" + m);\n\t\tSystem.out.println();\n\t\tout.write(\"Parameters are p=\" + p + \", \" + \"r=\" + r + \" and m=\" + m + \"\\r\");\n\n\t\t// The genetic algorithm\n\t\tint iterationNum = 0;\n\t\tHypothesis bestIndividual;\n\t\tint bestFitness;\n\t\tdouble aveFitness;\n\t\t// Randomly generate initial population\n\t\tGA algorithm = new GA(p, r, m);\n\t\t// For each individual compute fitness\n\t\talgorithm.computeFitness();\n\t\t// Get the best individual\n\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\tbestFitness = bestIndividual.getFitness();\n\t\taveFitness = algorithm.computeAveFitness();\n\t\t// Iterate till we get the very best individual\n\t\twhile (bestFitness != 0) {\n\t\t\t// Select the very best members of the population to survive\n\t\t\talgorithm.select();\n\t\t\t// Make the best members reproduce themselves\n\t\t\talgorithm.crossover();\n\t\t\t// Add some mutations to new population\n\t\t\talgorithm.mutate();\n\t\t\t// The successor population becomes the current population\n\t\t\talgorithm.setNextGeneration();\n\t\t\t// For each individual compute fitness\n\t\t\talgorithm.computeFitness();\n\t\t\t// Get the best individual\n\t\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\t\tbestFitness = bestIndividual.getFitness();\n\t\t\taveFitness = algorithm.computeAveFitness();\n\t\t\t// Report best results to the user at every five iterations\n\t\t\tif (iterationNum % 5 == 0) {\n\t\t\t\tSystem.out.println(\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness\n\t\t\t\t\t\t+ \" Average Fitness \" + aveFitness);\n\t\t\t\tSystem.out.println(\"Best solution: \" + bestIndividual.toString());\n\t\t\t\tSystem.out.println();\n\t\t\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\t\t}\n\t\t\titerationNum++;\n\t\t}\n\t\tSystem.out.println(\n\t\t\t\t\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness + \" Average Fitness \" + aveFitness);\n\t\tSystem.out.println(\"Solution is \" + bestIndividual.toString());\n\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\tout.close();\n\t}", "protected static List<Critter> getPopulation() {\n\t\t\treturn population;\n\t\t}", "protected static List<Critter> getPopulation() {\n\t\t\treturn population;\n\t\t}", "public EvPopulation<T> apply(EvPopulation<T> population) {\n\n int population_size = population.size();\n\n combine_parent_selector.init(population, 2, population_size);\n\n EvPopulation<T> result = new EvPopulation<T>(population_size + 3);\n\n // Generate children since population is not filled\n while (result.size() < population_size)\n combine(combine_parent_selector.getNextParents(), result);\n\n // Remove overfull\n while (result.size() > population_size)\n result.remove(result.size() - 1);\n\n return result;\n }", "public Tile[] generate() {\n Tile[] tiles = generateTiles();\n calculatePathfindingGrid(tiles);\n return tiles;\n }", "protected static List<Critter> getPopulation() {\n return population;\n }", "public Population InitSinglePopulation\n (int PopulationID, int NumberOfAgents, double MixedStrategy){\n \n MultiPopulation TempPopulation = new MultiPopulation();\n\n TempPopulation.setPopulationID(PopulationID);\n TempPopulation.setInitMixedStrategy(MixedStrategy);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n double TempDraw = rand.nextDouble();\n boolean TempAction = (TempDraw < MixedStrategy) ? true : false;\n MultiPopulationAgent TempAgentM = \n new MultiPopulationAgent(j,PopulationID,TempAction);\n \n TempPopulation.AgentList.add(TempAgentM);\n \n }\n \n TempPopulation.setActionList();\n return TempPopulation;\n }", "private void generate(){\n\n nurses.add(new Nurse(1, \"ZUZANNA\", \"KOWALSKA\", \"normalna\"));\n nurses.add(new Nurse(2, \"ZOFIA\", \"WISNIEWSKA\", \"normalna\"));\n nurses.add(new Nurse(3, \"MAJA\", \"WOJCIK\", \"normalna\"));\n nurses.add(new Nurse(4, \"HANNA\", \"KOWALCZYK\", \"normalna\"));\n nurses.add(new Nurse(5, \"AMELIA\", \"KAMINSKA\", \"normalna\"));\n nurses.add(new Nurse(6, \"ALICJA\", \"LEWANDOWSKA\", \"normalna\"));\n nurses.add(new Nurse(7, \"MARIA\", \"ZIELINSKA\", \"normalna\"));\n nurses.add(new Nurse(8, \"ALEKSANDRA\", \"WOZNIAK\", \"normalna\"));\n nurses.add(new Nurse(9, \"OLIWIA\", \"SZYMANSKA\", \"normalna\"));\n nurses.add(new Nurse(10, \"NATALIA\", \"DABROWSKA\", \"normalna\"));\n nurses.add(new Nurse(11, \"WIKTORIA\", \"KOZLOWSKA\", \"normalna\"));\n nurses.add(new Nurse(12, \"EMILIA\", \"JANKOWSKA\", \"bez_nocnych\"));\n nurses.add(new Nurse(13, \"ANTONINA\", \"WOJCIECHOWSKA\", \"normalna\", 32));\n nurses.add(new Nurse(14, \"LAURA\", \"KWIATKOWSKA\", \"normalna\", 24));\n nurses.add(new Nurse(15, \"POLA\", \"MAZUR\", \"normalna\", 24));\n nurses.add(new Nurse(16, \"IGA\", \"KRAWCZYK\", \"normalna\", 24));\n// nurses.add(new Nurse(17, \"ANNA\", \"KACZMAREK\", \"normalna\"));\n// nurses.add(new Nurse(18, \"LILIANA\", \"PIOTROWSKA\", \"normalna\"));\n// nurses.add(new Nurse(19, \"MARCELINA\", \"GRABOWSKA\", \"normalna\"));\n// nurses.add(new Nurse(20, \"GABRIELA\", \"PAWLOWSKA\", \"normalna\"));\n// nurses.add(new Nurse(21, \"MICHALINA\", \"MICHALSKA\", \"normalna\"));\n// nurses.add(new Nurse(22, \"KORNELIA\", \"ZAJAC\", \"normalna\"));\n// nurses.add(new Nurse(23, \"NIKOLA\", \"KROL\", \"normalna\"));\n// nurses.add(new Nurse(24, \"HELENA\", \"JABLONSKA\", \"normalna\"));\n// nurses.add(new Nurse(25, \"JULIA\", \"WIECZOREK\", \"normalna\"));\n// nurses.add(new Nurse(26, \"JULIA\", \"NOWAKOWSKA\", \"normalna\"));\n// nurses.add(new Nurse(27, \"MILENA\", \"MAJEWSKA\", \"normalna\"));\n// nurses.add(new Nurse(28, \"MARTYNA\", \"WROBEL\", \"normalna\"));\n// nurses.add(new Nurse(29, \"JAGODA\", \"STEPIEN\", \"normalna\"));\n// nurses.add(new Nurse(30, \"MAGDALENA\", \"OLSZEWSKA\", \"normalna\"));\n\n }", "public population(int size, boolean initial) {\n tours = new tour[size];\n for (int i = 0; i < tours.length; i++) {\n\t tour newTour = new tour();\n newTour.path();\n savetour(i, newTour);\n }\n }", "public abstract Case[][] generate();", "private static void extractIpuPopulation(final String propertiesFilePath) throws Exception {\n\t\tProperties populationExtractorProperties = GenstarService.loadPropertyFile(propertiesFilePath);\n\t\t\n\t\t\n\t\t// 1. Generate the population\n\t\tIPopulation extractedPopulation = GenstarService.extractIpuPopulation(populationExtractorProperties);\n\n\t\t\n\t\t// 2. Print population information\n\t\tSystem.out.println(\"Information of the extracted population\");\n\t\tSystem.out.println(\"Group population name: \" + extractedPopulation.getName());\n\t\tSystem.out.println(\"Number of group entities: \" + extractedPopulation.getNbOfEntities());\n\t\tSystem.out.println(\"Extracted percent: \" + populationExtractorProperties.getProperty(PROPERTY_FILES.EXTRACT_IPF_POPULATION_PROPERTIES.PERCENTAGE_PROPERTY));\n\t\t\n\t\tList<AbstractAttribute> attributes = extractedPopulation.getAttributes();\n\t\tSystem.out.println(\"Number of group attributes: \" + attributes.size());\n\t\tfor (AbstractAttribute attr : attributes) { System.out.println(\"\\t\" + attr.toString()); }\n\t\t\n\t\tString componentPopulationName = null;\n\t\tint totalNumberOfExtractedComponentEntities = 0;\n\t\tList<Entity> groupEntities = extractedPopulation.getEntities();\n\t\tfor (Entity gEntity : groupEntities) {\n\t\t\tfor (IPopulation componentPop : gEntity.getComponentPopulations()) { \n\t\t\t\ttotalNumberOfExtractedComponentEntities += componentPop.getNbOfEntities();\n\t\t\t\tif (componentPopulationName == null) { componentPopulationName = componentPop.getName(); }\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Component population name: \" + componentPopulationName);\n\t\tSystem.out.println(\"Total number of component entities: \" + totalNumberOfExtractedComponentEntities + \"\\n\");\n\t}", "public static Double[] generateGenome() {\n\t\tDouble[] genome = new Double[variableNum];\n\t\tfor(int i = 0; i < variableNum; i++) {\n\t\t\tgenome[i] = (Math.random() - 0.5)*(maxValue - minValue);\n\t\t}\n\t\treturn genome;\n\t}", "public Population()\n{\n year = 0;\n fate = new Random();\n eligibleDuas = new ArrayList<Caldean>();\n eligibleDuises = new ArrayList<Caldean>();\n theHouses = new LinkedList<House>();\n}", "public static void breedAll() {\n int a, b; //Pointers to select parents\n\n //While loop to ensure full carrying capacity of population\n while (Population.size() <= maxPop) {\n //Sorts by Fitness level first\n sortByFitlvl();\n\n //Selects Two Random Parents\n a = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n b = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n //System.out.println(a+\"\\t\"+b+\"\\t\"+Population.size());\n\n // Between 1-2 children\n int children = rand.nextInt(2)+1;\n for (int i = 0; i < children; i++) {\n Population.add(Breeder.breed(Population.get(a), Population.get(b), 0.1));\n }\n\n //sortByFitlvl();\n }\n\n if (debug)\n printPopulation(true);\n }", "public Vector run(){\n generationCount = 0;\n solutionList = new Vector();\n bannedList = new Vector();\n solutionCounter = 0;\n whenToHalt.init();\n //INITIALIZE THE POPULATION\n\n population = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n fitnessArray = new double[populationSize];\n //COMPUTE FITNESSES\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) population.get(x);\n fitnessArray[x] = next.getFitness();\n }\n\n Arrays.sort(fitnessArray);\n\n while (! stop()){\n //RUN THROUGH THE GENERATIONS\n population = step();\n }\n\n if (useList){\n return solutionList;\n } else {\n return population;\n }\n }", "public int getEcosystemPopulation() {\n return ecosystem.getGuppyPopulation();\n }", "public int getPopulationSize()\n\t{\n\t\treturn individuals.length;\n\t}", "private MyIntegerList generatedPopulatedList() {\n final MyIntegerList mil = new MyIntegerList();\n\n mil.push(1);\n mil.push(2);\n mil.push(1);\n mil.push(6);\n mil.push(6);\n mil.push(7);\n mil.push(2);\n mil.push(2);\n mil.push(0);\n mil.push(5);\n\n return mil;\n }", "public void generate() {\n\t}", "protected void initializePopulation () {\n\t\tfor (int i = 0; i < this.speciesSize; i++) {\n\t\t\tthis.detectors.add(DetectorFactory.makeDetector(this.featuresLength, this.typeBias, this.generalityBias));\n\t\t}\n\t}", "public abstract Animal[] createGeneration (int count, Animal[] lastGeneration);", "public static void runGeneticAlgorithm(ArrayList<City> cities) throws IOException {\n\n\t\t//select our strategies for our genetic algorithm\n\t\tPopulationInitialiser initialiser = new RandomGeneration();//random generation of initial population as initialisation strategy\n\t\tPopulationCrossover breeder = new TwoPointCrossOver();//two-point crossover as crossover strategy\n\t\tPopulationMutator mutator = new SwapTwoCities();//swap of two elements as mutation strategy\n\t\tPopulationReplacement selector = new ElitistSelection();//elitism as selection strategy\n\n\t\t//create a generation history object to track all generations\n\t\tArrayList<GAPopulationGeneration> generationHistory = new ArrayList<>();\n\n\t\t//create our first generation and randomly generate its initial solutions\n\t\tGAPopulationGeneration generation = new GAPopulationGeneration(initialiser.initialise(cities, 8));\n\n\t\t// create our output table\n\t\tAsciiTable outputTable = new AsciiTable();\n\t\toutputTable.addHeavyRule();\n\n\t\t// create our incumbent and stopping criterion tracker\n\t\tCandidateSolution incumbent = generation.getParentPopulation().getBestSolution();\n\t\tint generationSinceImprovedIncumbent = 0;\n\n\t\t//loop until 10 iterations without improved incumbent\n\t\twhile (generationSinceImprovedIncumbent <= 10) {\n\n\t\t\t//take parents and crossover to create 6 offspring. record the results for displaying later\n\t\t\tgeneration.setOffspringPopulation(breeder.breed(generation.getParentPopulation(), 6));\n\t\t\tgeneration.setFamilyRecords(breeder.getFamilies());\n\n\t\t\t//take offspring and perform mutation. record the results for displaying later\n\t\t\tgeneration.setMutatedPopulation(mutator.mutatePopulation(generation.getOffspringPopulation()));\n\t\t\tgeneration.setMutantRecords(mutator.getMutations());\n\n\t\t\t//take mutated offspring and perform selection.\n\t\t\tgeneration.setNextPopulation(selector.replace(generation.getParentPopulation(), generation.getMutatedPopulation()));\n\n\t\t\t//if this solution is greater than the incumbent reset stopping criterion and we have new incumbent, else increment stopping criterion\n\t\t\tif (generation.getBestSolutionThisGeneration().compareTo(incumbent) < 0) {\n\t\t\t\tgenerationSinceImprovedIncumbent = 0;\n\t\t\t\tincumbent = generation.getBestSolutionThisGeneration();\n\t\t\t} else\n\t\t\t\tgenerationSinceImprovedIncumbent++;\n\n\t\t\t//record the current generation, and create the new generation from the current one\n\t\t\tgeneration.addToTable(outputTable, incumbent);\n\t\t\tgenerationHistory.add(generation);\n\t\t\tgeneration = generation.initialiseNextGeneration();\n\n\t\t}\n\n\t\t//print out the incumbent at the end\n\t\toutputTable.addRow(\"\", \"\", \"TSP final best solution & fitness : \", incumbent + \" (\" + incumbent.getFitness() + \")\", \"\", \"\", \"\", \"\");\n\t\toutputTable.addHeavyRule();\n\n\n\t\t//format the table, and print to console and output.txt\n\t\tTA_Grid grid = TA_Grid.create(\"an ascii compliant grid\")\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_HEAVY, ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#')\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_NORMAL, ' ', '~', ' ', '~', '~', '~', '~', '~', '~', '~', '~', '~')\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_LIGHT, ' ', '-', ' ', '-', '-', '-', '-', '-', '-', '-', '-', '-');\n\t\toutputTable.getContext().setGrid(grid);\n\t\toutputTable.setTextAlignment(TextAlignment.CENTER);\n\t\toutputTable.getRenderer().setCWC(new CWC_LongestLine());\n\t\tFileWriter output = new FileWriter(\"output.txt\", true);\n\t\toutput.append(outputTable.render()).append(\"\\n\\n\").close();\n\t\tSystem.out.println(outputTable.render() + \"\\n\\n\");\n\t}" ]
[ "0.74098724", "0.7264838", "0.7127019", "0.7022696", "0.6880698", "0.6831815", "0.6769527", "0.6757611", "0.66462135", "0.6613327", "0.6564401", "0.6554927", "0.64377934", "0.6401165", "0.63641316", "0.6329438", "0.6324009", "0.6275901", "0.62622046", "0.6245873", "0.62246776", "0.6195649", "0.619446", "0.61370564", "0.61195946", "0.61166555", "0.6116472", "0.61094123", "0.61067766", "0.6103169", "0.61016506", "0.60952175", "0.6079934", "0.60562223", "0.6052134", "0.6047411", "0.6047411", "0.6038788", "0.60270834", "0.6025455", "0.60159576", "0.6006485", "0.5998347", "0.5981802", "0.5980372", "0.59795034", "0.59751487", "0.59729236", "0.59648424", "0.5948974", "0.5940482", "0.5938176", "0.5936748", "0.58962315", "0.58940756", "0.5885195", "0.58837366", "0.58801645", "0.5874186", "0.5872691", "0.5859978", "0.58555526", "0.58492655", "0.5831129", "0.5830967", "0.58221054", "0.5817381", "0.5811984", "0.58041036", "0.5798105", "0.57928693", "0.57852006", "0.57847327", "0.5782893", "0.57769454", "0.5745443", "0.5744118", "0.57439667", "0.5737599", "0.57281107", "0.57281107", "0.57258534", "0.5725461", "0.57221454", "0.5715457", "0.57147527", "0.57146317", "0.5709263", "0.57076", "0.5706901", "0.57031375", "0.5697895", "0.56974", "0.56966645", "0.56943727", "0.5676262", "0.56738335", "0.56724805", "0.56672645", "0.5654155" ]
0.7968573
0
Function to print the final rulebase
public static void printRules(Rule[] rules) { System.out.println("\nRulebase generated\n------------------"); int i =1; for (Rule rule : rules) { String cond = ""; for (int j = 0; j < rule.cond.length; j++) { cond = cond + rule.cond[j]; } String output = rule.output; System.out.println("Rule" + i + " : " + cond + " = " + output); i++; } System.out.println("\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printRule()\n {\n System.out.print(lhs + \" ::= \");\n for( String s : rhsSymbols)\n System.out.print(s + \" \");\n System.out.println();\n }", "public void printRules () {\n \n System.out.println(\"PRINTING RULESET ID : \" + this.id + \" (\" + this.size() + \") entries.\");\n for (int i = 0; i < this.size(); i++) {\n \n System.out.println(\"Rule \" + (i+1) + \" (ID \" + references.get(i) + \") : \" + this.rulelist.getRuleByID(references.get(i)) + \" Prob : \" + this.rulelist.getRuleByID(references.get(i)).getProb() + \" TIMES \" + this.rulelist.getRuleByID(references.get(i)).occurrencies + \" PREC \" + this.rulelist.getRuleByID(references.get(i)).prec_occurrencies);\n }\n System.out.println(\"Total Prob : \" + this.totalProb);\n System.out.println(\"Precedences : \" + this.precedences);\n }", "public void dumpRules()\n\t{\n\t\tif(chain == null)\n\t\t\treturn;\n\t\t\n\t\tIterator it = chain.keySet().iterator();\n\t\tIterator subIt = null;\n\t\t\n\t\tString key = null;\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tkey = (String)it.next();\n\t\t\tSystem.out.print(key + \" --> \");\n\t\t\t\n\t\t\tsubIt = (chain.get(key)).iterator();\n\t\t\t\n\t\t\twhile(subIt.hasNext())\n\t\t\t\tSystem.out.print(subIt.next() + \", \");\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void printRules_RVLR () {\n \n System.out.println(\"PRINTING RULESET ID : \" + this.id + \" (\" + this.size() + \") entries.\");\n for (int i = 0; i < this.size(); i++) {\n \n System.out.println(\"Rule \" + (i+1) + \" (ID \" + references.get(i) + \") : \" + this.rulelist.getRuleByID(references.get(i)) + \" Prob : \" + this.rulelist.getRuleByID(references.get(i)).getProb() + \" TIMES \" + this.rulelist.getRuleByID(references.get(i)).occurrencies + \" PREC \" + this.rulelist.getRuleByID(references.get(i)).prec_occurrencies + \" Value : \" + this.rulelist.getRuleByID(references.get(i)).get_RVRL());\n }\n System.out.println(\"Total Prob : \" + this.totalProb);\n //System.out.println(\"Precedences : \" + this.precedences);\n }", "private static void writeFinalRuleBase (boolean printStdOut) throws IllegalArgumentException, IOException{\n \t\n \tFileSystem fs = FileSystem.get(Mediator.getConfiguration());\n \tPath textPath = new Path(Mediator.getHDFSLocation()+Mediator.getLearnerRuleBasePath()+\"_text.txt\");\n BufferedWriter bwText = new BufferedWriter(new OutputStreamWriter(fs.create(textPath,true)));\n FileStatus[] status = fs.listStatus(new Path(Mediator.getHDFSLocation()+Mediator.getLearnerRuleBasePath()+\"_TMP\"));\n \tWriter writer = SequenceFile.createWriter(Mediator.getConfiguration(), \n \t\t\tWriter.file(new Path(Mediator.getHDFSLocation()+Mediator.getLearnerRuleBasePath())), \n \t\t\tWriter.keyClass(ByteArrayWritable.class), Writer.valueClass(FloatWritable.class));\n Reader reader;\n\t\tByteArrayWritable rule = new ByteArrayWritable();\n\t\tFloatWritable ruleWeight = new FloatWritable();\n\t\tint id = 0;\n \n bwText.write(\"\\nRULE BASE:\\n\\n\");\n if (printStdOut)\n \tSystem.out.println(\"\\nRULE BASE:\\n\");\n \t\n \t// Read all sequence files from stage 2\n \tfor (FileStatus fileStatus:status){\n \t\t\n \t\tif (!fileStatus.getPath().getName().contains(\"_SUCCESS\")){\n \t\t\n\t \t\t// Open sequence file\n\t \t\treader = new Reader(Mediator.getConfiguration(), Reader.file(fileStatus.getPath()));\n\t \n\t // Read all rules\n\t while (reader.next(rule, ruleWeight)) {\n\t \t\n\t \t// Write rule in the output sequence file\n\t \twriter.append(rule, ruleWeight);\n\t \t\n\t \tbwText.write(\"Rule (\"+id+\"): IF \");\n\t \tif (printStdOut)\n\t \t\tSystem.out.print(\"Rule (\"+id+\"): IF \");\n\t \t\n\t \t// Write antecedents\n\t \tfor (int i = 0; i < rule.getBytes().length - 2; i++){\n\t \t\t\n\t \t\tbwText.write(Mediator.getVariables()[i].getName()+\" IS \");\n\t \t\tif (printStdOut)\n\t \t\tSystem.out.print(Mediator.getVariables()[i].getName()+\" IS \");\n\t \t\tif (Mediator.getVariables()[i] instanceof NominalVariable){\n\t \t\t\tbwText.write(((NominalVariable)Mediator.getVariables()[i]).getNominalValue(rule.getBytes()[i])+\" AND \");\n\t \t\t\tif (printStdOut)\n\t \t\tSystem.out.print(((NominalVariable)Mediator.getVariables()[i]).getNominalValue(rule.getBytes()[i])+\" AND \");\n\t \t\t}\n\t \t\t\telse {\n\t \t\t\t\tbwText.write(\"L_\"+rule.getBytes()[i]+\" AND \");\n\t \t\t\t\tif (printStdOut)\n\t \t\tSystem.out.print(\"L_\"+rule.getBytes()[i]+\" AND \");\n\t \t\t\t}\n\t \t\t\n\t \t}\n\t \t\n\t \t// Write the last antecedent\n\t \tbwText.write(Mediator.getVariables()[rule.getBytes().length-2].getName()+\" IS \");\n\t \tif (printStdOut)\n\t \t\tSystem.out.print(Mediator.getVariables()[rule.getBytes().length-2].getName()+\" IS \");\n\t \tif (Mediator.getVariables()[rule.getBytes().length-2] instanceof NominalVariable){\n\t \t\tbwText.write(((NominalVariable)Mediator.getVariables()[rule.getBytes().length-2]).getNominalValue(rule.getBytes()[rule.getBytes().length-2]));\n\t \t\tif (printStdOut)\n\t \t\tSystem.out.print(((NominalVariable)Mediator.getVariables()[rule.getBytes().length-2]).getNominalValue(rule.getBytes()[rule.getBytes().length-2]));\n\t \t}\n\t \t\telse {\n\t \t\t\tbwText.write(\"L_\"+rule.getBytes()[rule.getBytes().length-2]);\n\t \t\t\tif (printStdOut)\n\t \t\tSystem.out.print(\"L_\"+rule.getBytes()[rule.getBytes().length-2]);\n\t \t\t}\n\t \t\n\t \t// Write the class and rule weight\n\t \tbwText.write(\" THEN CLASS = \"+Mediator.getClassLabel(rule.getBytes()[rule.getBytes().length-1]));\n\t \tbwText.write(\" WITH RW = \"+ruleWeight.get()+\"\\n\\n\");\n\t \tif (printStdOut){\n\t \t\tSystem.out.print(\" THEN CLASS = \"+Mediator.getClassLabel(rule.getBytes()[rule.getBytes().length-1]));\n\t \t\tSystem.out.print(\" WITH RW = \"+ruleWeight.get()+\"\\n\\n\");\n\t \t}\n\t\n\t \tid++;\n\t \t\n\t }\n\t \n\t reader.close();\n \n \t\t}\n \t\t\n \t}\n \t\n \tbwText.close();\n writer.close();\n \t\n \t// Remove temporary rule base\n \tfs.delete(new Path(Mediator.getHDFSLocation()+Mediator.getLearnerRuleBasePath()+\"_TMP\"),true);\n \t\n }", "public abstract void printConstraint();", "public String toDebugString(RuleSet rs){\n\t\tString res = \"\";\n\t\tif(body != null)\n\t\t\tfor(Integer e : body){\n\t\t\t\tres = res + (res.equals(\"\") ? \"\" : \" & \") + OWLPrinter.getString(rs.debugLookup(e));\n\t\t\t}\n\n\t\tres += \" -> \";\n\t\tif(head != null) res += OWLPrinter.getString(rs.debugLookup(head));\n\t\telse{\n\t\t\tres += OWLPrinter.getString(rs.debugLookup(axiom));\n\t\t\tif(define != null){\n\t\t\t\tres += \" def \" + OWLPrinter.getString(rs.debugLookup(define));\n\t\t\t}\n\t\t}\n\n\t\t//if(head instanceof OWLAxiom) \tres += \" -> \" + ClassPrinter.printAxiom((OWLAxiom) head);\n\t\t//else \t\t\t\t\t\t\tres += \" -> \" + ClassPrinter.printClass(head);\n\t\treturn res;\n\t}", "public void print() {\n System.out.println(\"Scheme print:\");\n System.out.println(\" Blocks:\");\n for (Block block : this.blocks) {\n // System.out.println(\" \" + block.getName() + \" (\" + block.getID() + \")\");\n for (Integer id : block.getConnections()) {\n System.out.println(\" \" + id);\n }\n //System.out.println(\" \" + block.outputs.getFirst().getDstID());\n }\n /*System.out.println(\" Connections:\");\n for (Con connection : this.connections) {\n System.out.println(\" [\" + connection.src + \"]---[\" + connection.dst + \"]\");\n }*/\n if(this.queue_set){\n System.out.println(\" Queue: \" + this.queue);\n }\n else{\n System.out.println(\" Queue not loaded\");\n }\n }", "public String toString()\n/* */ {\n/* 885 */ StringBuilder result = new StringBuilder();\n/* 886 */ for (int i = 0; i < this.ruleSets.length; i++) {\n/* 887 */ result.append(this.ruleSets[i].toString());\n/* */ }\n/* 889 */ return result.toString();\n/* */ }", "public String toString() {\n return this.grammarRules.keySet() + \"\";\n\t}", "public void printConstraint() {\n\t\tSystem.out.println(this.object + \" \" + this.closeObject + \" \" + this.farObject);\r\n\t}", "public String toString() {\n\n if (m_rules == null) {\n return \"Prism: No model built yet.\";\n }\n return \"Prism rules\\n----------\\n\" + m_rules.toString();\n }", "void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getRuleVariables() != null)\n sb.append(\"RuleVariables: \").append(getRuleVariables());\n sb.append(\"}\");\n return sb.toString();\n }", "@Override\r\n public String toString() {\r\n return this.bnfRuleMap.keySet().toString();\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.ruleController.toString();\n\t}", "public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }", "private void print( org.antlr.v4.tool.Grammar grammar, ParseTree tree, String indentStep, String indent )\n {\n if ( tree != null )\n {\n Object payload = tree.getPayload();\n if ( payload instanceof InterpreterRuleContext )\n {\n String ruleName = grammar.getRule( ((InterpreterRuleContext) payload).getRuleIndex() ).name;\n System.out.println( indent + ruleName );\n }\n else\n {\n System.out.println( indent + \"\\\"\" + tree.getText() + \"\\\"\" );\n }\n for ( int i = 0; i <= tree.getChildCount(); i++ )\n {\n print( grammar, tree.getChild( i ), indentStep, indent + indentStep );\n }\n }\n }", "public String printFormat(){\n return \"The workout: \" + getName() + \" should be done for \" + getSets() + \" sets and in each set should be \"\n + getReps() + \" reps.\";\n }", "public void printStats() {\n\t\tSystem.out.println(\"============= RULEGROWTH - STATS ========\");\n\t\tSystem.out.println(\"Sequential rules count: \" + ruleCount);\n\t\tSystem.out.println(\"Total time: \" + (timeEnd - timeStart) + \" ms\");\n\t\tSystem.out.println(\"Max memory: \" + MemoryLogger.getInstance().getMaxMemory());\n\t\tSystem.out.println(\"==========================================\");\n\t}", "public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "public void printSummary() {\n\t\tSystem.out.println(MessageFormat.format(\"\\nSummary:\\n Name: {0}\\n Range: 1 to {1}\\n\", this.name, this.numSides));\n\t}", "public void printTable() {\n\t\tString s = String.format(\"Routing table (%.3f)\\n\"\n\t\t\t\t+ \"%10s %10s %8s %5s %10s \\t path\\n\", now, \"prefix\", \n\t\t\t\t\"timestamp\", \"cost\",\"link\", \"VLD/INVLD\");\n\t\tfor (Route rte : rteTbl) {\n\t\t\ts += String.format(\"%10s %10.3f %8.3f\",\n\t\t\t\t\trte.pfx.toString(), rte.timestamp, rte.cost);\n\n\t\t\ts += String.format(\" %5d\", rte.outLink);\n\n\t\t\tif (rte.valid == true)\n\t\t\t\ts+= String.format(\" %10s\", \"valid\");\n\t\t\telse\n\t\t\t\ts+= String.format(\" %10s \\t\", \"invalid\");\n\n\t\t\tfor (int r :rte.path)\n\t\t\t\ts += String.format (\" %s\",Util.ip2string(r));\n\n\t\t\tif (lnkVec.get(rte.outLink).helloState == 0)\n\t\t\t\ts += String.format(\"\\t ** disabled link\");\n\t\t\ts += \"\\n\";\n\t\t}\n\t\tSystem.out.println(s);\n\t}", "public void printResults() {\n\t System.out.println(\"BP\\tBR\\tBF\\tWP\\tWR\\tWF\");\n\t System.out.print(NF.format(boundaryPrecision) + \"\\t\" + NF.format(boundaryRecall) + \"\\t\" + NF.format(boundaryF1()) + \"\\t\");\n\t System.out.print(NF.format(chunkPrecision) + \"\\t\" + NF.format(chunkRecall) + \"\\t\" + NF.format(chunkF1()));\n\t System.out.println();\n }", "public void showRules(Application app){\n System.out.println(\"Here are your rules: \\n • GPA >= \" + app.getStand().getReqGPA() + \"\\n • SAT >= \" + app.getStand().getReqSAT() + \"\\n • A valid intended major, either aligned towards STEM or Humanities.\" + \"\\n • Three valid extracurriculars. \\n \\t • A valid extracurricular is defined as a productive use of time and/or a standout accomplishment. \\n \\t • It must align with the student's STEM or Humanities focus. \\n \\t • All three extracurriculars must be valid. \\n • A statement of purpose without spelling errors.\");\n System.out.println(\" • Students admitted to Harvard must have a passion for Humanities. Students admitted to MIT must have a passion for STEM. This can be determined through their intended major and extracurriculars, assuming both are valid.\");\n System.out.println(\" • All students with errors in their applications should be admitted to Greendale Community College.\");\n System.out.println();\n System.out.println(\"Good luck!\");\n }", "public void print()\n/* */ {\n/* 226 */ boolean emptyTarget = true;\n/* 227 */ Iterator it; if ((this.subjects != null) && (this.subjects.size() > 0)) {\n/* 228 */ System.out.println(\"\\nSubjects ---->\");\n/* 229 */ emptyTarget = false;\n/* 230 */ for (it = this.subjects.iterator(); it.hasNext();)\n/* 231 */ ((MatchList)it.next()).print();\n/* */ }\n/* 234 */ if ((this.resources != null) && (this.resources.size() > 0)) {\n/* 235 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Resources ---->\");\n/* 236 */ emptyTarget = false;\n/* 237 */ for (it = this.resources.iterator(); it.hasNext();)\n/* 238 */ ((MatchList)it.next()).print();\n/* */ }\n/* 241 */ if ((this.actions != null) && (this.actions.size() > 0)) {\n/* 242 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Actions ---->\");\n/* 243 */ emptyTarget = false;\n/* 244 */ for (it = this.actions.iterator(); it.hasNext();)\n/* 245 */ ((MatchList)it.next()).print();\n/* */ }\n/* 248 */ if ((this.environments != null) && (this.environments.size() > 0)) {\n/* 249 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Environments ---->\");\n/* 250 */ emptyTarget = false;\n/* 251 */ for (it = this.environments.iterator(); it.hasNext();) {\n/* 252 */ ((MatchList)it.next()).print();\n/* */ }\n/* */ }\n/* 255 */ if (emptyTarget) System.out.print(\"EMPTY\");\n/* */ }", "public void print(){\n System.out.println(\"(\"+a.getAbsis()+\"_a,\"+a.getOrdinat()+\"_a)\");\n System.out.println(\"(\"+b.getAbsis()+\"_b,\"+b.getOrdinat()+\"_b)\");\n System.out.println(\"(\"+c.getAbsis()+\"_b,\"+c.getOrdinat()+\"_c)\");\n }", "public void print() {\n print$$dsl$guidsl$guigs();\n System.out.print( \" eqn =\" + eqn );\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public String printfull(){\r\n\t\tString ans = this.toString() + \" \\n\";\r\n\t\t\r\n\t\tArrayList <String> details = getOpDetails();\r\n\t\tfor(String d: details){\r\n\t\t\tans = ans + d + \" \\n\";\r\n\t\t}\r\n\t\t\r\n\t\tans = ans + \"Input Files:\\n\" ;\r\n\t\tFileInfo fileIndex = (FileInfo)input.getFirstChild();\r\n\t\twhile(fileIndex != null){\r\n\t\t\tans = ans + fileIndex.toString() + \"\\n\";\r\n\t\t\tfileIndex = (FileInfo)fileIndex.getNextSibling();\r\n\t\t}//end input while\r\n\t\t\r\n\t\t\r\n\t\tans = ans + \"Output Files:\\n\";\r\n\t\tfileIndex = (FileInfo)output.getFirstChild();\r\n\t\twhile(fileIndex != null){\r\n\t\t\tans = ans + fileIndex.toString() + \"\\n\";\r\n\t\t\tfileIndex = (FileInfo) fileIndex.getNextSibling();\r\n\t\t}//end output while\r\n\t\treturn ans;\r\n\t}", "public String toString(){\n\t\tStringBuffer buffer = new StringBuffer();\n\t\t\n\t\tbuffer.append(lhs);\n\t\tbuffer.append(\" -> \");\n\t\t\n\t\t// if this is a lexical rule, prefix it with the lexical symbol\n\t\tif( lexical ){\n\t\t\tbuffer.append(LEXICAL_PREFIX);\n\t\t}\n\t\t\n\t\tfor( String s: rhs ){\n\t\t\tbuffer.append(s + \" \");\n\t\t}\n\t\t\n\t\t// delete the trailing whitespace\n\t\tbuffer.deleteCharAt(buffer.length()-1);\n\t\t\n\t\tbuffer.append(\"\\t\\t\" + weight);\n\t\t\n\t\treturn buffer.toString();\n\t}", "void print() {\r\n\t\tOperations.print(lexemes, tokens);\r\n\t}", "public void printOWLModel(){\n\t\tmodel.write(System.out, \"RDF/XML\");\t\t\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(\"Init: \" + initialState.toString() + \"\\n\");\n\t\tbuffer.append(\"Goal: \" + explicitGoal.toString() + \"\\n\");\n\t\tbuffer.append(\"Vars: \");\n\t\tfor (int var = 0; var < variableNames.size(); var++)\n\t\t{\n\t\t\tbuffer.append(var + \":\" + domainSizes.get(var) + \" \");\n\t\t}\n\t\tbuffer.append(\"\\n\");\n\t\tbuffer.append(\"Num ops: \" + getOperators().size() + \"\\n\");\n\t\treturn buffer.toString();\n\t}", "public void printOut() {\n System.out.println(\"\\t\" + result + \" = icmp \" + cond.toLowerCase() + \" \" + type + \" \" + op1 + \", \" + op2 );\n\n // System.out.println(\"\\t\" + result + \" = bitcast i1 \" + temp + \" to i32\");\n }", "@Override\r\n public String dumpOf ()\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n\r\n if (evaluation != null) {\r\n sb.append(String.format(\" evaluation=%s%n\", evaluation));\r\n }\r\n\r\n Shape physical = (getShape() != null) ? getShape().getPhysicalShape() : null;\r\n if (physical != null) {\r\n sb.append(String.format(\" physical=%s%n\", physical));\r\n }\r\n\r\n if (forbiddenShapes != null) {\r\n sb.append(String.format(\" forbiddenShapes=%s%n\", forbiddenShapes));\r\n }\r\n\r\n if (timeRational != null) {\r\n sb.append(String.format(\" rational=%s%n\", timeRational));\r\n }\r\n\r\n return sb.toString();\r\n }", "@Override\n public String toString(){\n return String.format(\"%s%s%s%n%s%s%n \",super.toString(),\"The taxes is \",calcTaxes(),\n \"The total cost is \",calcCost());\n }", "@Override\n\t\tpublic void print() {\n\n\t\t}", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "public void printRecipt(){\n\n }", "public void printRoute() {\n\t\tString route = new String(\"[ROUTE INFO] - Cost: \");\n\t\tif(cost == 0) {\n\t\t\troute += \" Not Yet Calculated, \";\n\t\t}\n\t\telse {\n\t\t\troute += (\"\" + this.cost + \", \");\n\t\t}\n\t\troute += (\"Route Length: \" + solutionLength + \", Route: \");\n\t\troute += \"(\" + solutionRepresentation.get(0).getX() + \",\" + solutionRepresentation.get(0).getY() + \")\";\n\t\tfor(int i = 1; i < solutionLength; i++) {\n\t\t\troute+= \" -> (\" + solutionRepresentation.get(i).getX() + \",\" + solutionRepresentation.get(i).getY() + \")\";\n\t\t}\n\t\tSystem.out.println(route);\n\t}", "public void postOrderPrint() {\n\t\tpostOrderPrint(root);\n\t\tSystem.out.println();\n\t}", "public abstract void printClassifier();", "public void printLDR() {\n if(!empty()) {\n printLDRNodes(root);\n System.out.println();\n }\n }", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(alcohol);\n\t}", "@Override\n public String toString() {\n if (tree != null) {\n\n String s = tree.render();\n\n s += \"\\n\\nNumber of positive rules: \"\n + getMeasure(\"measureNumPositiveRules\") + \"\\n\";\n s += \"Number of conditions in positive rules: \"\n + getMeasure(\"measureNumConditionsInPositiveRules\") + \"\\n\";\n\n return s;\n } else {\n return \"No model built yet!\";\n }\n }", "public void printAll() {\n\t\tfor(int i = 0; i<r.length; i++)\n\t\t\tprintReg(i);\n\t\tprintReg(\"hi\");\n\t\tprintReg(\"lo\");\n\t\tprintReg(\"pc\");\n\t}", "@Override\n public String toString() {\n\tStringBuilder output = new StringBuilder();\n\tif (ontology != null) {\n\t output.append(\"\\nKnowledgebase Metrics\\nInstances: \")\n\t\t .append(countIndividuals()).append(\"\\nTotal Instances: \")\n\t\t .append(countTotalIndividuals())\n\t\t .append(\"\\nClass Richness: \").append(getClassRichness())\n\t\t .append(\"\\nAverage Population: \")\n\t\t .append(getAveragePopulation())\n\t\t .append(\"\\nInstance Coverage: \")\n\t\t .append(getInstanceCoverage()).append(\"\\n\");\n\t}\n\treturn output.toString();\n }", "public static void printRule() {\n int counter = 0;\n\n System.out.print(\" Welcome to Tic Tac Toe Number\");\n\n System.out.println(\n \"\\n\\t -------------\"\n + \"\\n\\t | T | T | T |\"\n + \"\\n\\t -------------\"\n + \"\\n\\t | N | U | M |\"\n + \"\\n\\t -------------\"\n + \"\\n\\t | B | E | R |\"\n + \"\\n\\t -------------\");\n\n System.out.println(\"Rules: \"\n + \"\\n\" + ++counter + \". Enter an amount of players, 1 or 2.\"\n + \"\\n\" + ++counter + \". If you play with the Computer, enter 1 player, it will always play Odd number.\"\n + \"\\n\" + ++counter + \". The players, Odd and Even, take turn filling a cell with their numbers.\"\n + \"\\n\" + ++counter + \". The ODD number player goes FIRST by selecting a row and a column [1, 2, or 3],\"\n + \"\\n\" + \" then an odd number [1, 3, 5, 7, or 9].\"\n + \"\\n\" + ++counter + \". Follow by the EVEN number player doing the same thing,\"\n + \"\\n\" + \" except the set of even numbers is [2, 4, 6, and 8].\"\n + \"\\n\" + ++counter + \". Who reach the sum of \\\"\" + BINGO + \"\\\" in a row,\"\n + \"\\n\" + \" may be Vertical, Horizontal, or Diagonal, first will be a WINNER!\");\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n int startIndex = 0;\n while (startIndex < total - laneSize - 1) {\n startIndex = printOddLane(sb, startIndex);\n startIndex = printEvenLane(sb, startIndex + laneSize);\n }\n\n return sb.toString();\n }", "String diagnosticsOutput();", "String rulesAsText();", "public String toString() {\n\t\tif (hierarchy.equals(\"n\")) {\n\t\t\treturn visability + \" class \" + className + \"{ \\n \";\n\t\t} else if (isFinished == true) {\n\n\t\t\treturn \"}\";\n\t\t} else {\n\t\t\treturn visability + \" \" + hierarchy + \" class \" + className\n\t\t\t\t\t+ \"{ \\n \";\n\t\t}\n\t}", "public void printDLR() {\n if(!empty()) {\n printDLRNodes(root);\n System.out.println();\n }\n }", "public String toString() {\n\t\treturn \"assignToRoot:\"+assignToRoot+\", refRuleRoot:\"+refRuleRoot;\n\t}", "@Override\r\n public String print() {\r\n String attribute = \"Title of resource:\\t\" + getTitle() + \"\\n\" + \"url of resource:\\t\" + url;\r\n System.out.println(attribute);\r\n return attribute;\r\n }", "public String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"Summary for \");\n sb.append(method.toString());\n sb.append(':');\n sb.append(Strings.lineSep);\n// for (Iterator i=nodes.keySet().iterator(); i.hasNext(); ) {\n// Node n = (Node)i.next();\n// sb.append(\"\\t\");\n// sb.append(n.toString_long());\n// sb.append(Strings.lineSep);\n// }\n if(params != null && params.length > 0) {\n sb.append(\"\\tParams: \");\n sb.append(Arrays.asList(params));\n sb.append(Strings.lineSep);\n }\n if (returned != null && !returned.isEmpty()) {\n sb.append(\"\\tReturned: \");\n sb.append(returned);\n sb.append(Strings.lineSep);\n }\n if (thrown != null && !thrown.isEmpty()) {\n sb.append(\"\\tThrown: \");\n sb.append(thrown);\n sb.append(Strings.lineSep);\n }\n if (calls != null && !calls.isEmpty()) {\n sb.append(\"\\tCalls: \");\n sb.append(calls);\n sb.append(Strings.lineSep);\n }\n return sb.toString();\n }", "public String printToList() {\n\t\tif (hierarchy.equals(\"n\")) {\n\t\t\treturn \"<HTML>\" + visability + \" class \" + className\n\t\t\t\t\t+ \"{ <BR> <BR>\";\n\t\t} else if (isFinished == true) {\n\n\t\t\treturn \"}\";\n\t\t} else {\n\t\t\treturn \"<HTML>\" + visability + \" \" + hierarchy + \" class \"\n\t\t\t\t\t+ className + \"{ <BR> <BR>\";\n\t\t}\n\t}", "public String toString ()\n {\n return _refCount == 0 ? _goal.toString()\n : super.toString() + \": (residuation) refs => \" + _refCount\n + \", goal => \" + _goal;\n }", "@Override\n\tpublic String problemOutput() {\n\t\treturn reverseFirstLast();\n\t}", "public void flush() {\n\t\t\n\t\tif (Verbose.DEFAULT.equals(VERBOSE_LEVEL)) {\n\t\t\treturn;\t//no output\n\t\t}\n\t\t\n\t\t/* Verbose.VERBOSE | Verbose.ALL */\n\t\t\t\t\n\t\t/* Each constructor/ method to be crashed = non-private, non-abstract */\n\t\tStringBuffer sb = new StringBuffer(\"*** Methods and constructors under testclasses:\");\n\t\tfor (ClassUnderTest cPlan: plans.values()) {\n\t\t\tsb.append(LS+LS+cPlan.getWrappedClass().getCanonicalName()); //qualified class name\n\t\t\t\n\t\t\tfor (PlanSpaceNode pNode: cPlan.getChildren()) {\n\t\t\t\tFunctionNode fNode = (FunctionNode) pNode;\n\t\t\t\tsb.append(LS+\"\\t\"+fNode.toString());\t//method or constructor under testclasses\n\t\t\t}\t\t\t\t\n \t}\n \t\t\n\t\t\n\t /*\n\t * 2. Each value and public, non-abstract constructing function \n\t * of each needed instance and all of their children.\n\t */\n sb.append(LS+LS+LS+\"*** Rules to create needed values:\");\n\t\tsb.append(flushRules(true));\t\t\n\t\t\n \tif (Verbose.ALL.equals(VERBOSE_LEVEL)) {\n sb.append(LS+LS+LS+\"*** Rules that were not needed:\");\n \t\tsb.append(flushRules(false));\n \t}\n\n sb.append(LS+LS);\n System.out.println(sb);\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "private void summarize() {\n System.out.println();\n System.out.println(totalErrors + \" errors found in \" +\n totalTests + \" tests.\");\n }", "private void summarize() {\n System.out.println();\n System.out.println(totalErrors + \" errors found in \" +\n totalTests + \" tests.\");\n }", "public String toString ()\n\t{\n\t\tString s = \"\";\n for (Production production : productions.values()) s += production + \"\\n\";\n\t\treturn s;\n\t}", "public String toString(){\r\n\t\treturn \"This email passes \"+rulesPassed+\" rules\";\r\n\t}", "public void print() {\n\t\t\n\t\tfor(Solution sol : population) {\n\t\t\tSystem.out.println(sol.getPossibleSolution() + \" \" + sol.getPath());\n\t\t}\n\t}", "public void printResults() {\r\n\t\tif (net.isFlow()) {\r\n\t\t\tSystem.out.println(\"The assignment is a valid flow\");\r\n\t\t\tSystem.out.println(\"A maximum flow has value: \"+net.getValue());\r\n\t\t\tSystem.out.println(\"The flows along the edges are as follows:\");\r\n\t\t\tnet.printFlow();\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"The assignment is not a valid flow\");\r\n\t}", "public void print() {\n\t\tSystem.out.println(word0 + \" \" + word1 + \" \" + similarity);\n\t}", "public String printTree() {\n printSideways();\n return \"\";\n }", "@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(\"ÎÒÊÇÒ»Ö»\"+this.getStrain()+\"È®.\");\n\t}", "public void print() {\n \n for (int i=0 ; i< getNumberOfCases() ; i++) {\n Configuration conf = get(i);\n conf.print();\n System.out.print(\"\\n\");\n }\n}", "@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}", "public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}", "public String print()\n\t{\n\t\tString s = \"\";\n\t\t\n\t\ts = \"<explanation text=\\\"\" + text + \"\\\">\";\n\t\ts = s + commentContainer.printComments();\n\t\tif (expression != null)\n\t\t{\n\t\t\ts = s + expression.print(); \n\t\t}\n\t\ts = s + \"</explanation>\";\n\t\t\n\t\treturn s;\n\t}", "@Override\n public String toString(int depth) {\n if (depth <= 0) return \"\";\n String sEO = \"\" ;\n if (this.subExpressionOf != null) {\n sEO = Strings.indent(2,\n \"\\nsubExpressionOf: \" +\n Strings.indent(2, this.subExpressionOf.toString(1))) ;} ;\n return \"\\n*OpApplNode: \" + operator.getName() + \" \" + super.toString(depth+1)\n + \" errors: \" + (errors != null ? \"non-null\" : \"null\")\n + toStringBody(depth) + sEO ;\n }", "public String toString() {\r\n\t\tStringBuilder s = new StringBuilder(\"\");\r\n\t\tif (objective != null) {\r\n\t\t\ts.append(\"Objective: \").append(objective.getName())\r\n\t\t\t .append('=').append(objective.getDomain())\r\n\t\t\t .append('\\n');\r\n\t\t}\r\n\t\tfor (Variable v : variables) {\r\n\t\t\ts.append(v.getName()).append('=').append(v.getDomain())\r\n\t\t\t .append('\\n');\r\n\t\t}\r\n\t\tfor (Constraint c : constraints) {\r\n\t\t\ts.append(c.toString()).append('\\n');\r\n\t\t}\r\n\t\treturn s.toString();\r\n\t}", "@Override\r\n\tpublic void print() {\n\t\tsuper.print();\r\n\t\tSystem.out.println(\"album=\" + album + \", year=\" + year);\r\n\t}", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }", "public void print() {\n\t\tprint(root);\n\t}", "public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}", "public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "private void printContrib() {\n \t\tSystem.out.println(\"-- Current Contributions --\");\n \t\tfor (int y = 0; y < contrib.length; y++) {\n \t\t\tfor (int x = 0; x < contrib[y].length; x++) {\n \t\t\t\tString s = contrib[y][x] == null ? \"-\" : (\"\" + contrib[y][x].current);\n \t\t\t\twhile (s.length() < 4)\n \t\t\t\t\ts = \" \" + s;\n \t\t\t\tSystem.out.print(s);\n \t\t\t}\n \t\t\tSystem.out.println();\n \t\t}\n \t\tSystem.out.println();\n \t\tSystem.out.println(\"-- Target Contributions --\");\n \t\tfor (int y = 0; y < contrib.length; y++) {\n \t\t\tfor (int x = 0; x < contrib[y].length; x++) {\n \t\t\t\tString s = contrib[y][x] == null ? \"-\" : (\"\" + contrib[y][x].target);\n \t\t\t\twhile (s.length() < 4)\n \t\t\t\t\ts = \" \" + s;\n \t\t\t\tSystem.out.print(s);\n \t\t\t}\n \t\t\tSystem.out.println();\n \t\t}\n \t}", "private String printRoute() {\n String r = String.valueOf(this.route.get(0));\n int index = 1;\n while (index < this.route.size()) {\n r = r + \" - \" + this.route.get(index);\n index++;\n }\n return r;\n }", "public String toString() {\r\n return _toString(overallRoot);\r\n }", "public String toString()\n\t\t{\n\t\t\tsynchronized(ExecutionPolicy.class)\n\t\t\t{\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\ttoStringIndent++;\n\t\t\t\tif (rules == null) sb.append(indent()).append(\"null\\n\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor (ExecutionPolicy ep: rules) sb.append(ep.toString());\n\t\t\t\t}\n\t\t\t\ttoStringIndent--;\n\t\t\t\treturn sb.toString();\n\t\t\t}\n\t\t}", "void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }" ]
[ "0.7323201", "0.716277", "0.6863388", "0.6846885", "0.6590934", "0.65760094", "0.6510751", "0.6488212", "0.64400846", "0.63868046", "0.6331519", "0.6304158", "0.626944", "0.6266897", "0.62473595", "0.6221389", "0.61957866", "0.61789346", "0.61567354", "0.6144256", "0.61441326", "0.61336714", "0.61320895", "0.607456", "0.606842", "0.6056255", "0.6047899", "0.6045005", "0.60305136", "0.60196203", "0.6009538", "0.60046536", "0.5977439", "0.59749407", "0.5961718", "0.59537506", "0.5945524", "0.594097", "0.5939543", "0.5936267", "0.5924775", "0.5920352", "0.5897368", "0.5895792", "0.58945787", "0.58864325", "0.5864856", "0.5850565", "0.5839168", "0.5838418", "0.58337414", "0.5824245", "0.5815599", "0.5812836", "0.58124596", "0.5810553", "0.57971966", "0.57934093", "0.57863367", "0.57719946", "0.57682145", "0.5763", "0.57580286", "0.5756806", "0.575493", "0.57538104", "0.57538104", "0.5751928", "0.57511854", "0.573624", "0.5731771", "0.573065", "0.57284254", "0.5721757", "0.57144606", "0.57068413", "0.5704741", "0.5696624", "0.569143", "0.56906694", "0.5685263", "0.5678519", "0.56773394", "0.5676554", "0.56747866", "0.56730807", "0.566994", "0.5666317", "0.5664526", "0.56643164", "0.56626433", "0.5661859", "0.5660399", "0.5660399", "0.5660399", "0.5660399", "0.5660399", "0.5660399", "0.5660399", "0.5660399" ]
0.73313916
0
Function to calculate the fitness
public static void calculateFitness(Individual[] individuals) { for (Individual individual : individuals) { individual.fitness = 0; for (int i = 0; i < dataSet.size(); i++) { for (Rule rule : individual.rulebase) { boolean match = true; int[] data = dataSet.get(i).getVariables(); for (int j = 0; j < data.length; j++) { String variable = String.valueOf(data[j]); //String variable = "" + data[j]; String[] rulebase = rule.cond; if ((rulebase[j].equals(variable) != true) && (rulebase[j].equals("#") != true)) { match = false; } } if (match) { String output = String.valueOf(dataSet.get(i).getOutput()); if (rule.output.equals(output)) { individual.fitness++; } break; } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }", "public void fitnessFunction()\n\t{\n\t\t\n\t}", "public void calcularFitness() {\n double fit = 0;\r\n for (int x=0; x < this.genotipo.length;x++){\r\n if (x!=this.genotipo.length-1){\r\n fit+=distancias[this.genotipo[x]][this.genotipo[x+1]];\r\n }else{\r\n fit+=distancias[this.genotipo[x]][this.genotipo[0]];\r\n }\r\n }\r\n this.fitness = fit;\r\n }", "void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n fitness = 1d / (d * d);\n }\n }", "public abstract double evaluateFitness();", "public int fitness() {\n\t\t//System.out.println(\"/!\\\\ WARNING: Full fitness() called!\");\n\t\tint fitness = 0;\n\t\tint fitnessCases = (int) Math.pow(2, circuit.order);\n\t\tfor (int i=0; i<fitnessCases; i++) {\n\t\t\tValuation v = new Valuation(i, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = null;\n\t\t\n\t\treturn fitness;\n\t}", "public double calculateFitness(DNA dna);", "@Override\n\tpublic double valuta_figli() {\n\t\treturn simple_fitness();\n\t}", "void ComputeFitness(){\n\t\tint i, pos;\n\t\t// individual t;\n\t\tdouble min, sum = 0, sumSize = 0, tm;\n\t\t// First Compute Raw fitness\n\t\tfor(i = 0; i < poplen; i++)\n\t\t{\n\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t}\n\t\t\t\n\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t}\n\t\t//tim individual co fitness be nhat\n\t\tmin = oldpop[0].fitness;\n\t\tpos = 0;\n\t\tsum = oldpop[0].fitness;\n\t\tsumSize = oldpop[0].size;\n\t\t\n\t\tfor(i = 1; i < poplen; i++) {\n\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\tmin = oldpop[i].fitness;\n\t\t\t\tpos = i;\n\t\t\t}\n\t\t\tsum += oldpop[i].fitness;\n\t\t\tsumSize += oldpop[i].size;\n//\t\t\tpopSize[gen][i]= oldpop[i].size;\n\t\t}\n\t\t// copy the best and average\n\t\tbestcurrent[gen] = new individual();\n\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n\t\taverage[gen] = sum /poplen;\n\t\taverageSize[gen] = sumSize /poplen;\n\t\t// Third Compute Adjusted fitness\n\t\tAdjustFitness();\n\t\t// Finally Compute nomarlized fitness\n \t\tNormalizeFitness();\n\t}", "public double calcFitness(int[] genes) {\n\t\treturn 0;\n\t}", "public abstract double getFitness(Genotype genotype);", "double fitness(int gene) {\r\n \tint sum = 0;\r\n \tint prod= 1;\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tif (oldpop[gene][j]==0) {\r\n \t\t\tsum += (j+1);\r\n \t\t} else {\r\n \t\t\tprod *= (j+1);\r\n \t\t}\r\n \t}\r\n \treturn Math.abs(sum - SUMTARG)/SUMTARG \r\n \t + Math.abs(prod - PRODTARG)/PRODTARG;\r\n }", "private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}", "protected float getFitness()\t\t\t{\treturn fitness;\t\t}", "public Object eval(Individual ind)\r\n {\r\n BinaryIndividual bi = (BinaryIndividual)ind;\r\n int partialFitness = 0;\r\n int distance = 0;\r\n double fitness = 0.0;\r\n\r\n\t for (int i=0; i<100; i++){\r\n\r\n\t distance = 0;\r\n\r\n\t for (int j=0; j<100; j++){\r\n\t if (!((BinaryIndividual)target[i]).getBooleanAllele(j)^bi.getBooleanAllele(j)) { \r\n\t\t distance++;\r\n\t }\r\n \r\n\t if (distance > partialFitness) {\r\n\t partialFitness = distance;\r\n\t }\r\n\t }\r\n }\r\n\r\n fitness = (double)partialFitness/100.0;\r\n return new Double(fitness);\r\n \r\n\r\n }", "public float getFitness()\r\n\t{\r\n\t\treturn fitness;\r\n\t}", "public int getFitness(){\n return fitness;\n }", "double CalculateFitness(double fun) \n\t {\n\t\t double result=0;\n\t\t if(fun>=0)\n\t\t {\n\t\t\t result=1/(fun+1);\n\t\t }\n\t\t else\n\t\t {\n\t\t\t \n\t\t\t result=0;\n\t\t }\n\t\t return result;\n\t }", "private static void calculateFitnessOfPopulation(ArrayList<Chromosome> population) {\n for (Chromosome chromosome : population) {\n // if the fitness of the chromosome has not yet been calculated (i.e. is still -1)\n fitnessFunction(chromosome);\n }\n }", "static double fitness(vmnode[] vms, jobnode[] jobs, int[] assigned, HashMap<Integer, Integer> map, double[][] ect) {\n double libd = LIBD(vms, jobs, assigned);\n double makesp = calcmakespan(map, ect);\n return libd * makesp;\n }", "private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }", "protected float calcFitness(Individual ind) {\n\t\t\tdouble w = (double) ind.getWait();\n\t\t\tdouble g = (double) ind.getMove();\n\t\t\treturn (float) (g/(w+g));\n\t\t}", "public int getFitness()\n {\n return this.fitness;\n }", "public double getFitness() {\n if (fitness == 0) {\n fitness = 1/(double)getDistance();\n }\n return fitness;\n }", "private static double fitness(PMCGenotype gene, int trials)\n\t{\n\t\tController<MOVE> btc = new PacManBTController(decode(gene));\n\t\treturn runExperiment(btc, ghostController, trials);\n\t}", "public void modifyFitness(Population population) {\n // prepare the calculation\n double[][] data = new double[population.size()][];\n for (int i = 0; i < data.length; i++) {\n data[i] = ((AbstractEAIndividual)population.get(i)).getFitness();\n }\n double min = Double.POSITIVE_INFINITY, fitnessSharing;\n double[] result = new double[data.length];\n AbstractEAIndividual tmpIndy;\n\n for (int x = 0; x < data[0].length; x++) {\n for (int i = 0; i < data.length; i++) data[i][x] = -data[i][x];\n for (int i = 0; i < data.length; i++) {\n if (data[i][x] < min) min = data[i][x];\n }\n\n for (int i = 0; i < data.length; i++) {\n // This will cause the worst individual to have no chance of being selected\n // also note that if all individual achieve equal fitness the sum will be zero\n result[i] = data[i][x] -min + 0.1;\n }\n\n for (int i = 0; i < population.size(); i++) {\n tmpIndy = (AbstractEAIndividual)population.get(i);\n fitnessSharing = 0;\n for (int j = 0; j < population.size(); j++) {\n if (this.m_SharingDistance < this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))) {\n fitnessSharing += 1 - (this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))/this.m_SharingDistance);\n }\n }\n result[i] = result[i]/fitnessSharing;\n }\n\n for (int i = 0; i < population.size(); i++) {\n ((AbstractEAIndividual)population.get(i)).SetFitness(x, result[i]);\n }\n }\n }", "public int getFitness(Graph_GA obj)\r\n\t{\r\n\t\tint fitness_score = 0;\r\n\t\tSet<DefaultEdge> edges= obj.graph_inp.edgeSet();\r\n Iterator<DefaultEdge> edges_list = edges.iterator();\r\n \r\n while(edges_list.hasNext())\r\n {\r\n \tDefaultEdge new_edge = edges_list.next();\r\n \tGA_Graph_Node source = obj.graph_inp.getEdgeSource(new_edge);\r\n \tGA_Graph_Node target = obj.graph_inp.getEdgeTarget(new_edge);\r\n \tif(chromosome[source.numID-1] == chromosome[target.numID-1])\r\n \t{\r\n \t\tfitness_score = fitness_score-1;\r\n \t}\r\n }\r\n\t\treturn fitness_score;\r\n\t}", "public abstract double getAestheticFitness();", "public void incrementFitness()\n {\n this.fitness++;\n }", "double getFitnessScore(){\n return fitnessScore;\n }", "void ComputeFitnessBefore(){\n\t\t\t\tint i, pos;\n\t\t\t\t// individual t;\n\t\t\t\tdouble min, sum = 0, tm;\n\t\t\t\t// First Compute Raw fitness\n\t\t\t\tfor(i = 0; i < poplen; i++)\n\t\t\t\t{\n\t\t\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t\t\t}\n\t\t\t\t//tim individual co fitness be nhat\n\t\t\t\tmin = oldpop[0].fitness;\t\t\t\n\t\t\t\tsum = oldpop[0].fitness;\t\t\t\n\t\t\t\t\n\t\t\t\tfor(i = 1; i < poplen; i++) {\n\t\t\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\t\t\tmin = oldpop[i].fitness;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tsum += oldpop[i].fitness;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// copy the best and average\n//\t\t\t\tbestBeforeFitness[gen]=min;\n//\t\t\t\tavgBeforeFitness[gen]=sum/poplen;\n//\t\t\t\tbestcurrent[gen] = new individual();\n//\t\t\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n//\t\t\t\taverage[gen] = sum /poplen;\t\t\t\n\t\t\t\t\n\t\t\t}", "public static double getFitness(List<Double> xValues, List<Double> yValues, Tree tree){\n //tree.str();\n //System.out.println();\n //ystem.out.println();\n double fitness = 0;\n for (int i = 0; i < xValues.size(); i++){\n if (Double.isNaN(tree.getY(xValues.get(i)))) continue;\n double error = tree.getY(xValues.get(i)) - yValues.get(i);\n \n // System.out.println(error);\n fitness += (error * error) ;\n //System.out.println(fitness);\n \n \n }\n //System.out.println(fitness);\n \n return fitness / xValues.size();\n \n }", "public double[] calculatefitnessvalue(String str) {\t\n\t\tint a = Integer.parseInt(str.substring(0, 5), 2); \n\t\tint b = Integer.parseInt(str.substring(6, 11), 2);\n\t\tint c = Integer.parseInt(str.substring(12, 17), 2);\n\t\tint d = Integer.parseInt(str.substring(18, 23), 2);\n\t\tint e = Integer.parseInt(str.substring(24, 29), 2);\n\t\tint f = Integer.parseInt(str.substring(30, 35), 2);\n\t\tint g = Integer.parseInt(str.substring(36, 41), 2);\n\t\tint h = Integer.parseInt(str.substring(42, 47), 2);\n\t\tint i = Integer.parseInt(str.substring(48, 53), 2);\n\t\tint j = Integer.parseInt(str.substring(54, 59), 2);\n\n\t\tdouble x1 = a * (6.0 - 0) / (Math.pow(2, 6) - 1); //gene of x\n\t\tdouble x2 = b * (6.0 - 0) / (Math.pow(2, 6) - 1); //gene of y\n\t\tdouble x3 = c * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x4 = d * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x5 = e * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x6 = f * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x7 = g * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x8 = h * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x9 = i * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x10 = j * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\t\n\t\t//the Objective function\n\t\tdouble fitness = 3 - Math.sin(2 * x1) * Math.sin(2 * x1) \n\t\t\t\t+ Math.sin(2 * x2) * Math.sin(2 * x2)\n\t\t\t\t- Math.sin(2 * x3) * Math.sin(2 * x3)\n\t\t\t\t+ Math.sin(2 * x4) * Math.sin(2 * x4)\n\t\t\t\t- Math.sin(2 * x5) * Math.sin(2 * x5)\n\t\t\t\t+ Math.sin(2 * x6) * Math.sin(2 * x6)\n\t\t\t\t- Math.sin(2 * x7) * Math.sin(2 * x7)\n\t\t\t\t+ Math.sin(2 * x8) * Math.sin(2 * x8)\n\t\t\t\t- Math.sin(2 * x9) * Math.sin(2 * x9)\n\t\t\t\t+ Math.sin(2 * x10) * Math.sin(2 * x10);\n\t\t\n\t\tdouble[] returns = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, fitness };\n\t\treturn returns;\n\t}", "public double getFitness(){\n return averageFitness;\n }", "public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }", "public double bestFitness()\r\n {\r\n\treturn bestFitness;\r\n }", "void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "@Override\n public void evaluate(Solution solution) throws JMException {\n\n int[] tour = new int[numberOfNodes + 1];\n int firstCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[0];\n int lastCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[numberOfNodes - 1];\n\n double fitness1_td = 0.0;\n\n // Calculate fitness 1 - total distance\n for (int i = 0; i < numberOfNodes - 1; i++) {\n int x = ((Permutation) solution.getDecisionVariables()[0]).vector_[i];\n int y = ((Permutation) solution.getDecisionVariables()[0]).vector_[i+1];\n\n tour[i] = x;\n tour[i+1] = y;\n\n fitness1_td += calDistances(x, y);\n }\n // generate tour with same start city and end city\n tour[numberOfNodes] = tour[0];\n\n fitness1_td += calDistances(firstCity, lastCity);\n\n\n // Correctness check: does the tour start and end in the same city\n if(tour[0] != tour[tour.length - 1]) {\n System.err.println(\"ERROR: The last city must be the same as the first city\");\n System.exit(1);\n }\n\n /*for (int i = 0; i < tour.length; i++) {\n System.out.print(tour[i] + \" \");\n }*/\n //System.out.println(\"\\n\" + tour.length);\n\n // Calculate fitness 2 - objective value of a given tour\n ArrayInt z = (ArrayInt) solution.getDecisionVariables()[1];\n //System.out.println(z.getLength());\n\n double fitness2_ob;\n double wc = 0.0;\n double ft = 0.0;\n double fp = 0.0;\n\n //the following is used for a different interpretation of \"packingPlan\"\n int itemsPerCity = z.getLength() / (tour.length - 2);\n //System.out.println(itemsPerCity);\n\n for (int i = 0; i < tour.length - 1; i++) {\n\n int currentCityTEMP = tour[i];\n // what's the current city? --> but the items start at city 2 in the TTP file, so I have to take another 1 off!\n int currentCity = currentCityTEMP - 1;\n\n if (i > 0) {\n\n if (currentCity == -1) {\n // No items in city 1\n wc += 0.0;\n fp += 0.0;\n\n } else {\n\n for (int itemNumber = 0; itemNumber < itemsPerCity; itemNumber++) {\n\n int indexOfPackingPlan = (i-1) * itemsPerCity + itemNumber;\n // what is the next item's index in items-array?\n int itemIndex = currentCity + itemNumber * (numberOfNodes - 1);\n //System.out.println(\"i: \" + i);\n\n if (z.getValue(indexOfPackingPlan) == 1) {\n // pack item\n //System.out.println(itemIndex);\n int currentWC = items[itemIndex][2];\n wc += currentWC;\n\n int currentFP = items[itemIndex][1];\n fp += currentFP;\n }\n }\n\n }\n\n int h = (i+1) % (tour.length-1); //h: next tour city index\n //System.out.println(\"h: \" + h);\n long distance = calDistances(i, h);\n // compute the adjusted (effective) distance\n ft += (distance / (1 - wc * (maxSpeed - minSpeed) / capacityOfKnapsack));\n }\n }\n\n wendUsed = wc;\n wend = capacityOfKnapsack - wc;\n fitness2_ob = fp - ft * rentingRatio;\n\n solution.setObjective(0, fitness1_td);\n solution.setObjective(1, -fitness2_ob); // Convert from maximum objective value to minimum objective value\n }", "public abstract double getConstraintFitness();", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "private Double calculateTotalFitness() {\n double totalFitnessScore = 0;\n\n IgniteCache<Long, Chromosome> cache = ignite.cache(GAGridConstants.POPULATION_CACHE);\n\n SqlFieldsQuery sql = new SqlFieldsQuery(\"select SUM(FITNESSSCORE) from Chromosome\");\n\n // Iterate over the result set.\n try (QueryCursor<List<?>> cursor = cache.query(sql)) {\n for (List<?> row : cursor)\n totalFitnessScore = (Double)row.get(0);\n }\n\n return totalFitnessScore;\n }", "public float AssignFitness() {\n\t\t\n\t\tfitness = 0;\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn fitness;\n\t\t}\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tfitness += ptr.s.weight;\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfitness /= sample_map.size();\n\t\treturn fitness;\n\t}", "String getFitnessFunction();", "public double computeHeuristicGrade();", "public double getAvgPopulationFitness() {\n\t\tdouble sum=0;\n\t\tfor (int i = 0; i < individuals.length; i++) {\n\t\t\tsum+=individuals[i].getFitness();\n\t\t}\n\t\treturn sum/(double)individuals.length;\n\t}", "private void calculateFitness() {\n\t\tint day1=this.getNumberOfHours()*this.getNumberOfClasses();\n\t\tint day2=2*day1;\n\t\tint day3=3*day1;\n\t\tint day4=4*day1;\n\t\tint day5=5*day1;\n\t\tTeacher_lesson temp=null;\n\t\t//day 1//\n\t\tHashSet<Integer> closedSet=new HashSet<Integer>();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<day1;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day1;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\t\n\t\t//day2//\n\t\tclosedSet.clear();;\n\t\t\n\t\tfor(int i=day1;i<day2;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day2;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day3//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day2;i<day3;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day3;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//day4//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day3;i<day4;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day4;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\t\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day5//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day4;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t\t\t\n\t\t}\n\t\t\t/*if(temp.get_td_hour()<0){this.fitness=this.fitness-100;}//adunato na ginei giati o ka8igitis exei parapanw wres apo oti mporei na kanei//\n\t\t\t\telse if (temp.get_td_hour()==0){this.fitness=this.fitness-2;}//meiwnoume giati o ka8igitis 8a epivarin8ei oles tou tis wres thn idia mera//\n\t\t\t\telse{++this.fitness;}//kalh prosegisi*/\n\t\t}\n\t\t//*********************END OF DAILY EVALUATION*****************************//\n\t\t\n\t\t//**********************START OF WEEKLY EVALUATION************************//\n\t\t\n\t\tclosedSet.clear();\n\t\t\n\t int \t_weeklyhours = 1;\n\t \n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tif(!closedSet.contains(this.genes[i])){\n\t\t\t\t\n\t\t\t\n\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\t\t++_weeklyhours; }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t/*if(_weeklyhours>temp.get_tw_hour()){\n\t\t\t\tthis.fitness=this.fitness-100 ; //adunato na kanei parapanw wres ma8hma//\n\t\t\t}else\n\t\t\t\t{++this.fitness;}*/\n\t\t\tif(_weeklyhours<temp.get_tw_hour()){++this.fitness;}\n\t\t\tclosedSet.add(this.genes[i]);}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//*************END OF WEEKLY EVALUATION**********//\n\t\n\t\t//**START OF LESSON EVALUATION***//\n\t\tArraylistLesson set=new ArraylistLesson();\n\t\tclass_lid templ=null;\n\t\tTeacher_lesson tempj=null;\n\t\tint lid=0;\n\t\tString _class;\n\t\tint _classhours=1;\n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tlid=temp.get_lid();\n\t\t\t_class=temp.get_class();\n\t\t\ttempl=new class_lid(lid,_class);\n\t\t\tif(!set.contains(templ)){\n\t\t\t\t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\t\ttempj=getdata(this.genes[j]);{\n\t\t\t\t\t\tif(tempj!=null){\n\t\t\t\t\t\t\tif(temp.get_tid()==tempj.get_tid()){\n\t\t\t\t\t\t\t\tif(temp.get_lid()==tempj.get_lid()&&temp.get_class().equalsIgnoreCase(tempj.get_class())){\n\t\t\t\t\t\t\t\t\t++_classhours;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tint hours;\n\t\t\t\thours=temp.get_lhours();\n\t\t\t\n\t\tif(_classhours==hours){\n\t\t\t++this.fitness;\n\t\t}\n\t\tset.add(templ);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "public int getFitnessValue(int[] solution) {\n\n int fitness = 0;\n \n\n for (int i = 0; i < MATRIX_TAM; i++) {\n for (int j = i ; j < MATRIX_TAM; j++) {\n fitness += loc[i][j] * flow[solution[i]][solution[j]];\n \n }\n }\n\n return fitness;\n }", "public int getFitness(){\n\t\treturn getEnergy()*-1; \n\t}", "private Double fitness(Term $f) {\n\t\t// Using a lambda to transform a formula to a function.\n\t\tFx g = x -> {this.x=x; return (Double)$abs.apply($sub.apply($f,$target)).evaluate();};\n\t\treturn integral(LOWER_BOUND, UPPER_BOUND, Fx.$f.bind(g));\n\t}", "public void setFitness(float fitness)\r\n\t{\r\n\t\tthis.fitness = fitness;\r\n\t}", "public double worstFitness()\r\n {\r\n\treturn worstFitness;\r\n }", "public static double calculateFitness(Allele[] geneticCode) {\n return minMaxNormalization(decodeGeneticCode(geneticCode));\n }", "public double averageFitness()\r\n {\r\n\treturn averageFitness;\r\n }", "public default double getFitness(Cell cell) {\n return getFitness(cell.getGenotype());\n }", "public int fitness(ArrayList<Integer> fitnessCases) {\n\t\tif (this.fitnessCases == fitnessCases) return fitness; // cache hit\n\n\t\tint fitness = 0;\n\t\tfor (int c : fitnessCases) {\n\t\t\tValuation v = new Valuation(c, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t// cache these values:\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = fitnessCases;\n\t\treturn fitness;\n\t}", "protected double evaluate(IChromosome chromosome) {\n\t double score = 0;\n\t \t \n\t List dups = new ArrayList();\n\t int badSolution = 1;\n\n\t for (int i = 0; i < chromosome.size(); i++) {\n\n\t //IntegerGene agene = (IntegerGene) chromosome.getGene(i);\n\t //System.out.println(agene);\n\t int index = (Integer) chromosome.getGene(i).getAllele();\n\t \n\t if (dups.contains(index)) {\n\t badSolution = 0;\n\t } else {\n\t dups.add(index);\n\t }\n\n\t Equipo equipo = (Equipo) equipos.get(index);\n\t double genreScore = getGenreScore(equipo);\n\t if (genreScore == 0) {\n\t badSolution = 0;\n\t }\n\t score = (score+genreScore);\n\n\t }\n\t \n\t return (score * badSolution);\n\t }", "public void findTotalFit() {\n\tfor (int i=0;i<popSize;i++) {\n\t totalFitness+=this.getFitness(i);\n\t}\n }", "public void setFitness(int f){\n this.fitness = f;\n }", "public void evaluatePopulation() {\n // reset the total fitness score\n totalFitness = 0;\n\n for (int i = 0; i < populationSize; i++) {\n population.get(i).setRawFitness(\n FeederCollection.getFeeders().get(i).GetFitness());\n totalFitness += population.get(i).getRawFitness();\n }\n\n // set the normalized fitness for each population member\n for (Genotype g : population) {\n // normalized fitness = raw fitness / total fitness\n g.setNormalizedFitness((g.getRawFitness() / totalFitness));\n }\n\n // sort the popoulation\n Collections.sort(population, Genotype.FitnessOrder);\n\n highFitnesses.add(population.get(0).getRawFitness());\n avgFitnesses.add(totalFitness / population.size());\n\n\n }", "void setFitness(double fitness) throws UnsupportedOperationException;", "static int getFitness(double[][] matrix, Chromosome ch){\n int fitness = 0,\n tmpInd = 0;\n\n for (int i = 0; i < ch.size(); i++) {\n if (ch.getGene(i) == 1){\n fitness += matrix[tmpInd][i];\n tmpInd = i;\n }\n }\n return fitness;\n }", "float getFitnessScore(MapLocation l) {\n\t\ttry{\n\t\t\tif(rc.canSenseLocation(l) && !rc.onTheMap(l)) {\n\t\t\t\t//System.out.println(\"dead square\");\n\t\t\t\treturn -999999.0f;\n\t\t\t}\n\t\t} catch(Exception e){e.printStackTrace();}\n\t\t\n\t\tfloat fitness = 0.0f;\n\t\t\n\t\tfor(RobotInfo ri : allRobots) {\n\t\t\tfitness -= 1f/l.distanceSquaredTo(ri.location);\n\t\t}\n\t\tif(type.equals(RobotType.GARDENER)) {\n\t\t\tfor(TreeInfo ti : allTrees) {\n\t\t\t\tif(ti.team.equals(Team.NEUTRAL)) {\n\t\t\t\t\tfitness -= 1f/l.distanceSquaredTo(ti.location);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfitness -= 10f/l.distanceSquaredTo(lastLocation);\n\t\t\n\t\treturn fitness;\n\t}", "public double[] getFitness() {\n return this.m_Fitness;\n }", "private void runAlgorithm(){\n fitness = new ArrayList<Double>(); \n \n int iter = 0;\n \n // While temperature higher than absolute temperature\n this.temperature = getCurrentTemperature(0);\n while(this.temperature > this.p_absoluteTemperature && iter < 100000){\n //while(!stopCriterionMet()){\n // Select next state\n //for(int i=0;i<20;i++){\n int count = 0;\n boolean selected = false;\n while(!selected){\n Problem.ProblemState next = nextState();\n if(isStateSelected(next)){\n selected = true;\n this.state = next;\n }\n \n count++;\n if(count == 10) break;\n }\n //}\n \n // Sample data\n double fvalue = this.state.getFitnessValue();\n this.fitness.add(new Double(fvalue));\n \n iter = iter + 1;\n \n // Lower temperature\n this.temperature = getCurrentTemperature(iter);\n }\n \n this.n_iter = iter;\n return;\n }", "public static void main(String[] args) throws IOException {\n\t\tint p = 8;\n\t\t// r is the fraction of the population to be replaced by Crossover at\n\t\t// each step\n//\t\tdouble r = Double.valueOf(8).doubleValue();\n\t\tdouble r = 8;\n\t\t// m is the rate of mutation\n//\t\tdouble m = Double.valueOf(8).doubleValue();\n\t\tdouble m = 8;\n\n\t\t// Write into files...\n\t\tFile outputFile = new File(\"testGA.txt\");\n\t\tFileWriter out = new FileWriter(outputFile);\n\n\t\t////////////////////////\n\t\tp = 33;\n\t\tr = 0.6;\n\t\tm = 0.1;\n\n\t\t// Report the population size, crossover rate and mutation rate\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Learning the 8-queens problem with a Genetic Algorithm\");\n\t\tSystem.out.println(\"Population Size: \" + p);\n\t\tSystem.out.println(\"Crossover Rate: \" + r);\n\t\tSystem.out.println(\"Mutation Rate: \" + m);\n\t\tSystem.out.println();\n\t\tout.write(\"Parameters are p=\" + p + \", \" + \"r=\" + r + \" and m=\" + m + \"\\r\");\n\n\t\t// The genetic algorithm\n\t\tint iterationNum = 0;\n\t\tHypothesis bestIndividual;\n\t\tint bestFitness;\n\t\tdouble aveFitness;\n\t\t// Randomly generate initial population\n\t\tGA algorithm = new GA(p, r, m);\n\t\t// For each individual compute fitness\n\t\talgorithm.computeFitness();\n\t\t// Get the best individual\n\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\tbestFitness = bestIndividual.getFitness();\n\t\taveFitness = algorithm.computeAveFitness();\n\t\t// Iterate till we get the very best individual\n\t\twhile (bestFitness != 0) {\n\t\t\t// Select the very best members of the population to survive\n\t\t\talgorithm.select();\n\t\t\t// Make the best members reproduce themselves\n\t\t\talgorithm.crossover();\n\t\t\t// Add some mutations to new population\n\t\t\talgorithm.mutate();\n\t\t\t// The successor population becomes the current population\n\t\t\talgorithm.setNextGeneration();\n\t\t\t// For each individual compute fitness\n\t\t\talgorithm.computeFitness();\n\t\t\t// Get the best individual\n\t\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\t\tbestFitness = bestIndividual.getFitness();\n\t\t\taveFitness = algorithm.computeAveFitness();\n\t\t\t// Report best results to the user at every five iterations\n\t\t\tif (iterationNum % 5 == 0) {\n\t\t\t\tSystem.out.println(\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness\n\t\t\t\t\t\t+ \" Average Fitness \" + aveFitness);\n\t\t\t\tSystem.out.println(\"Best solution: \" + bestIndividual.toString());\n\t\t\t\tSystem.out.println();\n\t\t\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\t\t}\n\t\t\titerationNum++;\n\t\t}\n\t\tSystem.out.println(\n\t\t\t\t\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness + \" Average Fitness \" + aveFitness);\n\t\tSystem.out.println(\"Solution is \" + bestIndividual.toString());\n\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\tout.close();\n\t}", "private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }", "public void run() {\n PopulationFGA<Integer> poblacionActual = new PopulationFGA<>(funcionBorn,\n funcionFitness,\n problema.getDimension(),\n 1);\n poblacionActual.incializa(200);\n while(!condTerminacion.conditionReached(poblacionActual)) {\n System.out.println(\"Generacion Actual: \" + poblacionActual.getGeneracion());\n poblacionActual = iteration(poblacionActual);\n }\n ArrayList<IndividualFGA<Integer>> individuos = poblacionActual.generaIndividuos();\n IndividualFGA<Integer> mejor = individuos.get(0);\n for (IndividualFGA<Integer> e : individuos) {\n if (mejor.getFitness() <= e.getFitness())\n mejor = e;\n }\n System.out.println(\"Mejor solucion \" + '\\n' + mejor.toString());\n //System.out.println(\"Fitness \" + mejor.getFitness());\n int dim = problema.getDimension();\n int costo = 0;\n int obj1;\n int obj2;\n Phenotype<Integer> fenotipo = mejor.getRepActual();\n for (int i = 0; i < (dim - 1); i++) {\n obj1 = fenotipo.getAllele(i).intValue() - 1;\n for (int j = i + 1; j < dim; j++) {\n obj2 =fenotipo.getAllele(j).intValue() - 1; \n costo = costo + problema.getDistanciaEntre(i,j) * problema.getFlujoEntre(obj1,obj2);\n }\n }\n System.out.println(\"Costo de la solucion: \" + costo);\n\n }", "public static void GA(ArrayList<City> cities){\n int pathLength = cities.size();\n // the number of chromosomes which will be generated\n int populationSize = 100;\n // the number of chromosomes that will be generated from crossover as a percentage of the population\n double crossoverRate = 0.8;\n // the number of chromosomes that will be generated from crossover\n int crossoverSize = (int) (populationSize * crossoverRate);\n // the probability that a chromosome can have a random mutation\n double mutationRate = 0.05;\n // the number of generations\n int generations = 5000;\n\n // Initialising the distance matrix using the initialiseDistanceMatrix method\n initialiseDistanceMatrix(cities);\n\n // Generating the Initial Population\n ArrayList<Chromosome> population = generatePopulation(cities, pathLength, populationSize);\n\n // The following is done for each generation of the population\n for (int i = 0; i < generations; i++) {\n // calculating the fitness of every chromosome in the current generation\n calculateFitnessOfPopulation(population);\n // sort the population so that the chromosomes with the highest fitness are at the start of the list\n Collections.sort(population);\n // call the method which performs crossover on the population\n Set<Chromosome> children = crossoverPopulation(population, populationSize, crossoverSize);\n // carry out mutation on the children of the current population\n children.addAll( mutatePopulation(children, mutationRate) );\n\n // evolve the population\n population.addAll(children);\n ArrayList<Chromosome> currentGeneration = new ArrayList<>(population);\n ArrayList<Chromosome> nextGeneration = evolvePopulation(currentGeneration, populationSize, cities, pathLength);\n population = new ArrayList<>(nextGeneration);\n }\n\n // find the fittest chromosome\n Chromosome fittestChromosome = population.get(0);\n double maxFitness = population.get(0).fitness;\n for (Chromosome c : population) {\n if (c.fitness > maxFitness) {\n maxFitness = c.fitness;\n fittestChromosome = c;\n }\n }\n // display the path and distance of the fittest chromosome\n System.out.println(fittestChromosome.getPath());\n System.out.println(\"Total Route Distance: \" + routeDistance(fittestChromosome));\n\n //printPopulation(population);\n }", "public double getBestSolutionEvaluation();", "public void evaluate() {\n for (Chromosome chromo : chromosomes) {\n double chromoGH = chromo.getTotalGH();\n if (chromo.isValid()) {\n this.validChromosomes++;\n if (chromoGH > this.getBestScore()) {\n this.bestScore = chromoGH;\n this.setBestChromo(chromo);\n }\n }\n //Log.debugMsg(chromo.getTotalGH().toString());\n// this.map.put(chromoGH, chromo);\n }\n }", "public int getFitness() {\n\t\treturn getEnergy() * -1;\n\t}", "private double objectiveFunction(final Map<DateTime, Position> position,\n\t\t\tfinal Schedule scheduleOfOtherDevices) {\n\t\tdouble fitness = 0;\n\n\t\tfor (DateTime currentRun : position.keySet()) {\n\t\t\tPosition currentPosition = position.get(currentRun);\n\t\t\tAmount<Power> loadNeededForEverySlotOfRun = currentPosition\n\t\t\t\t\t.getChosenValue();\n\n\t\t\tDateTime currentTime = currentPosition.getPossibleRun()\n\t\t\t\t\t.getEarliestStartTime();\n\t\t\twhile (currentTime.isBefore(currentRun.plus(currentPosition\n\t\t\t\t\t.getPossibleRun().getLengthOfRun()))) {\n\t\t\t\tCostFunction costFunction = pricingService\n\t\t\t\t\t\t.getCostFunction(currentTime);\n\n\t\t\t\tif (costFunction == null) {\n\t\t\t\t\t/*\n\t\t\t\t\t * LOG.error(\n\t\t\t\t\t * \"No cost function for time {} found. Substituting with {}\\navailable cost functions:\\n{}\"\n\t\t\t\t\t * , currentTime, DEFAULT_COSTS, StringUtils.join(\n\t\t\t\t\t * pricingService.getCostFunctions(), '\\n'));\n\t\t\t\t\t */\n\t\t\t\t\t/*\n\t\t\t\t\t * throw new IllegalArgumentException( String.format(\n\t\t\t\t\t * \"No cost function for time %s found\\navailable cost functions:\\n%s\"\n\t\t\t\t\t * , currentTime, StringUtils.join(\n\t\t\t\t\t * pricingService.getCostFunctions(), '\\n')));\n\t\t\t\t\t */\n\t\t\t\t\tfitness += DEFAULT_COSTS;\n\t\t\t\t} else {\n\t\t\t\t\tMap<DateTime, Slot> schedule = scheduleOfOtherDevices\n\t\t\t\t\t\t\t.getSchedule();\n\t\t\t\t\tif (schedule == null || schedule.get(currentTime) == null) {\n\t\t\t\t\t\tfitness += costFunction.getPrice()\n\t\t\t\t\t\t\t\t.getCostAtConsumption(\n\t\t\t\t\t\t\t\t\t\tloadNeededForEverySlotOfRun\n\t\t\t\t\t\t\t\t\t\t\t\t.divide(1000));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfitness += costFunction.getPrice()\n\t\t\t\t\t\t\t\t.getCostAtConsumption(\n\t\t\t\t\t\t\t\t\t\tloadNeededForEverySlotOfRun.plus(\n\t\t\t\t\t\t\t\t\t\t\t\tschedule.get(currentTime)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLoad())\n\t\t\t\t\t\t\t\t\t\t\t\t.divide(1000));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurrentTime = currentTime.plusMinutes(Constants.SLOT_INTERVAL);\n\t\t\t}\n\t\t}\n\t\treturn fitness;\n\t}", "public static void calculateFitness(Individual individual) {\n individual.fitness = 0;\n for (int i = 0; i < dataSet.size(); i++) {\n\n for (Rule rule : individual.rulebase) {\n boolean match = true;\n int[] data = dataSet.get(i).getVariables();\n\n for (int j = 0; j < data.length; j++) {\n\n String variable = String.valueOf(data[j]);\n //String variable = \"\" + data[j];\n String[] rulebase = rule.cond;\n\n if ((rulebase[j].equals(variable) != true) && (rulebase[j].equals(\"#\") != true)) {\n match = false;\n }\n }\n\n if (match) {\n String output = String.valueOf(dataSet.get(i).getOutput());\n if (rule.output.equals(output)) {\n individual.fitness++;\n }\n break;\n }\n }\n }\n }", "void setFitnessScore(double score){\n fitnessScore = score;\n }", "public void calcObjective() {\n double obj;\n double objectives[];\n\n for (int i = 0; i < population.getPopulationSize(); i++) { //300\n objectives = population.getObjectiveValues(i);\n obj = evaluateAll(population.getSingleChromosome(i)); //evaluateAll(chromosome chromosome1)\n objectives[indexOfObjective] = obj;\n population.setObjectiveValue(i, objectives);\n }\n }", "static double[] evolveWeights() throws Exception {\n\t\t// Create a random initial population\n\t\tRandom r = new Random();\n\t\t// Matrix is a two dimensional array, populationSize are rows, Genes are columns\n\t\tMatrix population = new Matrix(populationSize, numberofGenes);\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\t// returns elements(genes) of every row\n\t\t\t// Think of every row as a seperate chromosome of parent\n\t\t\tdouble[] chromosome = population.row(i);\n\t\t\t// create every gene for each chrosome in the population\n\t\t\tfor (int j = 0; j < chromosome.length; j++) {\n\t\t\t\tdouble gene = 0.03 * r.nextGaussian();\n\t\t\t\tchromosome[j] = gene;\n\t\t\t}\n\t\t}\n\n\t\tint generationNum = 0;\n\t\t// do battle with chromosomes until winning condition is found\n\t\t// Controller.doBattleNoGui(new ReflexAgent(), new\n\t\t// NeuralAgent(population.row(0)))\n\t\twhile (Controller.doBattleNoGui(new ReflexAgent(), new NeuralAgent(population.row(0))) != -1) {\n\n\t\t\tSystem.out.println(\"Generation \" + (generationNum));\n\n\t\t\tint mightLive = r.nextInt(100);\n\n\t\t\tif (generationNum == 10)\n\t\t\t\tmutationRate -= 0.01;\n\t\t\tif (generationNum == 20)\n\t\t\t\tmutationRate -= 0.02;\n\t\t\tif (generationNum == 30)\n\t\t\t\tmutationRate -= 0.02;\n\n\t\t\t// Mutate the genes of the current population\n\t\t\tfor (int y = 0; y < populationSize; y++) {\n\t\t\t\tfor (int x = 0; x < numberofGenes; x++) {\n\t\t\t\t\tif (Math.random() <= mutationRate) {\n\t\t\t\t\t\tpopulation.changeGene(x, y, r.nextGaussian());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Make random number of battles\n\t\t\tfor (int i = 0; i < 40; i++) {\n\t\t\t\t// Create two teams with two random chromosomes from the population\n\t\t\t\tint soldier_a = r.nextInt(population.rows());\n\t\t\t\tint soldier_b = r.nextInt(population.rows());\n\n\t\t\t\t// Ensure that both teams don't have the same chromosome\n\t\t\t\tif (soldier_a == soldier_b)\n\t\t\t\t\tsoldier_b = r.nextInt(population.rows());\n\n\t\t\t\t// Do Battle between teams and select winner\n\t\t\t\tif (Controller.doBattleNoGui(new NeuralAgent(population.row(soldier_a)),\n\t\t\t\t\t\tnew NeuralAgent(population.row(soldier_b))) == 1) {\n\t\t\t\t\t// Chooses if the winner survives\n\t\t\t\t\tif (mightLive < winnerSurvivalRate)\n\t\t\t\t\t\tpopulation.removeRow(soldier_b);\n\t\t\t\t\telse\n\t\t\t\t\t\tpopulation.removeRow(soldier_a);\n\t\t\t\t}\n\n\t\t\t\telse if (Controller.doBattleNoGui(new NeuralAgent(population.row(soldier_a)),\n\t\t\t\t\t\tnew NeuralAgent(population.row(soldier_b))) == -1) {\n\t\t\t\t\t// Chooses if the winner survives\n\t\t\t\t\tif (mightLive < winnerSurvivalRate)\n\t\t\t\t\t\tpopulation.removeRow(soldier_a);\n\t\t\t\t\telse\n\t\t\t\t\t\tpopulation.removeRow(soldier_b);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Reproduce for the population (This is where the magic happens)\n\t\t\t// int currentPopulation = population.rows();\n\t\t\twhile (population.rows() < 100) {\n\t\t\t\t// Retrieve random parent\n\t\t\t\tint parentID = r.nextInt(population.rows());\n\t\t\t\tdouble[] parent = population.row(parentID);\n\t\t\t\tint[] potentialPartners = new int[10];\n\t\t\t\tint abs_min_value = Integer.MIN_VALUE;\n\t\t\t\tBoolean foundpartner = false;\n\t\t\t\tint partner = 0;\n\n\t\t\t\tfor (int i = 0; i < potentialPartners.length; i++) {\n\t\t\t\t\tint potentialPartnerID = r.nextInt(population.rows());\n\t\t\t\t\tif (parentID == potentialPartnerID)\n\t\t\t\t\t\tpotentialPartnerID = r.nextInt(population.rows());\n\t\t\t\t\tpotentialPartners[i] = potentialPartnerID;\n\t\t\t\t}\n\n\t\t\t\tfor (int i = 0; i < potentialPartners.length; i++) // Finding most compatiable parent #2.\n\t\t\t\t{\n\t\t\t\t\tint compatiablity = similarities(parent, population.row(potentialPartners[i]));\n\t\t\t\t\tif (compatiablity > abs_min_value) {\n\t\t\t\t\t\tpartner = potentialPartners[i];\n\t\t\t\t\t\tfoundpartner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (foundpartner == false)\n\t\t\t\t\tpartner = r.nextInt(population.rows());\n\n\t\t\t\tdouble[] secondParent = population.row(partner);\n\t\t\t\tdouble[] newChild = population.newRow();\n\t\t\t\tint splitpoint = r.nextInt((int) numberofGenes / 4);\n\n\t\t\t\tfor (int i = 0; i < splitpoint; i++) // logic to a for loop and two if statements\n\t\t\t\t\tnewChild[i] = parent[i];\n\t\t\t\tfor (int i = splitpoint; i < numberofGenes; i++)\n\t\t\t\t\tnewChild[i] = secondParent[i];\n\n\t\t\t\t// for (int i = 0; i < population.rows(); i++) {\n\t\t\t\t// if (Controller.doBattleNoGui(new ReflexAgent(), new\n\t\t\t\t// NeuralAgent(population.row(i))) == -1) {\n\t\t\t\t// population.row(i) = population.newRow();\n\t\t\t\t// numOfWins++;\n\t\t\t\t// } else { }\n\n\t\t\t\t// Test for the best in the given population\n\t\t\t\t// win_Collection.add(numOfWins);\n\t\t\t\t// printWeights(population.row(0));\n\n\t\t\t}\n\t\t\tgenerationNum++;\n\t\t\tfor (int i = 0; i < population.rows(); i++) {\n\t\t\t\tif (Controller.doBattleNoGui(new ReflexAgent(), new NeuralAgent(population.row(i))) == -1) {\n\t\t\t\t\tnumOfWins++;\n\t\t\t\t\t// population.row(i) = population.newRow();\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Number of Winners: \" + numOfWins);\n\t\t\tnumOfWins = 0;\n\n\t\t}\n\t\tprintWeights(population.row(0));\n\t\treturn population.row(0);\n\t}", "public void setFitness(int fit)\n {\n this.fitness=fit;\n }", "@Override\n\tprotected double evaluate(final IChromosome a_subject) {\n\n\t\tdouble s = 0;\n\n\t\t// Get the genes represented by the chromosome\n\t\tGene[] genes = a_subject.getGenes();\n\n\t\t// Iterate through each of those genes\n\t\tfor (int i = 0; i < genes.length - 1; i++) {\n\n\t\t\t// Add all of the edge distances in the chromosome\n\t\t\ts += m_salesman.distance(genes[i], genes[i + 1]);\n\t\t}\n\n\t\t// add cost of coming back:\n\t\ts += m_salesman.distance(genes[genes.length - 1], genes[0]);\n\t\treturn s;\n\t}", "private <T> GeneticResult<T> maxFitness(List<Chromosome<T>> chromosomes, int totalBreedings){\n\t\tChromosome<T> bestFit = fittestChromosome(chromosomes);\n\t\treturn new GeneticResult<T>(bestFit, bestFit.getFitness(), totalBreedings);\n\t}", "public static void main(String[] args) {\n String fileName = \"data1.txt\";\n \n \n //Load the data from the dataset file\n dataSet = getDataSet(fileName);\n \n //Setting up the output file\n String outputFileName = \"\";\n if (fileName.indexOf(\".\") > 0) {\n outputFileName = fileName.substring(0, fileName.lastIndexOf(\".\"));\n }\n \n createFile(outputFileName+\".csv\");\n \n //log the time the algorithm started\n long startTime = System.currentTimeMillis();\n \n //Placeholder of the fittest individual\n fittestIndividual = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n fittestIndividual.generateRulebase(); \n \n //Setup the mating pool\n matingPool = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n \n //used to run the GA multiple times without doing it manually\n //set to 1 because we want to run the GA once\n for (int a = 0; a < 1; a++) {\n currentBest = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n currentBest.generateRulebase();\n\n //Generate a population\n generatePopulation();\n\n //Initial calculation of the fitness\n calculateFitness(population);\n\n for (int i = 0; i < GENERATION; i++) {\n average = 0; //reset the average\n currentBestArray[i] = currentBest.getFitness();\n \n tournamentSelect(population);\n\n //Calculate the fitness of the mating pool\n calculateFitness(matingPool);\n\n //Perfrom crossover on the mating pool\n crossover(matingPool);\n\n //Mutation\n mutation(matingPool);\n\n //Calculate the fitness of the mating pool\n calculateFitness(matingPool);\n\n //Evaluate the current population\n for (Individual individual : matingPool) {\n if (individual.getFitness() > currentBest.getFitness()) {\n currentBest = new Individual(individual);\n }\n average = average + individual.getFitness();\n }\n \n\n //Replace the population with the new generation\n for (int j = 0; j < POP_SIZE; j++) {\n population[j] = new Individual(matingPool[j]);\n }\n \n averageArray[i] = average / POP_SIZE;\n }\n \n //Check whether the current best is fitter than the global fittest individual\n if (currentBest.fitness > fittestIndividual.fitness) {\n fittestIndividual = new Individual(currentBest);\n //copy the fittest individuals performance\n fittestArray = Arrays.copyOf(currentBestArray, currentBestArray.length);\n }\n }\n\n System.out.println(\"Best fitness generated for the dataset: \" + fittestIndividual.fitness);\n \n //output the rules\n printRules(fittestIndividual.getRulebase());\n \n //Save the performance data into the output file\n for (int i = 0; i < fittestArray.length; i++) {\n addToFile(i, fittestArray[i], averageArray[i]);\n }\n \n //close the file\n close();\n \n //Evaluate the fitness agaisnt the dataset\n calculateFitness(fittestIndividual);\n double accuracyPercentage = ((double) 100 / dataSet.size()) * fittestIndividual.fitness;\n System.out.format(\"%.2f%% accuracy on the datase set.\\n\", accuracyPercentage);\n \n //Log the duration it took\n long duration = System.currentTimeMillis() - startTime;\n System.out.println(\"Completed in \" + String.format(\"%02d min, %02d.%02d sec\",\n TimeUnit.MILLISECONDS.toMinutes(duration),\n TimeUnit.MILLISECONDS.toSeconds(duration)\n - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(duration)),\n TimeUnit.MILLISECONDS.toMillis(duration) - TimeUnit.SECONDS.toMillis(TimeUnit.MILLISECONDS.toSeconds(duration))\n ));\n }", "private Vector step(){\n// System.out.println();\n// System.out.println(generationCount);\n// System.out.println(\"The Population is:\");\n// System.out.println(population);\n \n //DETERMINE WHO SURVIVES INTO NEXT GENERATION\n Vector nextGeneration = surviveType.run(population, fitnessArray);\n\n //DO THE CROSSOVER PROCESS\n //WHILE THE NEXT GENERATION ISN'T FULL\n while (nextGeneration.size() < (populationSize - randGenes)){\n //FIND PARENTS\n Gene parentOne, parentTwo;\n do {\n Gene[] parents = selectType.run(population, fitnessArray);\n parentOne = parents[0];\n parentTwo = parents[1];\n } while (selectPairs && (! closeEnough(parentOne, parentTwo)));\n //ADD CHILDREN\n Gene[] kids = crossType.children(parentOne, parentTwo);\n\n nextGeneration.add(kids[0]);\n if (nextGeneration.size() < (populationSize - randGenes)){\n nextGeneration.add(kids[1]);\n }\n }\n //ADD RANDOM GENES TO THE POPULATION\n while (nextGeneration.size() < populationSize){\n nextGeneration.add(initializer.createRandomGene(fitnessFunction, minRadius, maxRadius));\n }\n //MUTATE THE NEXT GENERATION\n for (int j = 0; j < populationSize; j++){\n if (Math.random() < mutationProb){\n nextGeneration.set(j, mutationType.run((Gene) nextGeneration.get(j)));\n }\n }\n\n //COMPUTE FITNESSES AND RELOCATE IF NECESSARY\n Gene bestGene = (Gene) nextGeneration.get(0);\n int bestX = 0;\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n while (relocationType.move(bannedList, next)){\n Gene newGene = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n next = newGene;\n nextGeneration.set(x, next);\n }\n fitnessArray[x] = next.getFitness();\n\n //FOR THE PURPOSES OF UPDATING THE BANNED LIST\n if (next.getFitness() > bestGene.getFitness()){\n bestGene = next;\n bestX = x;\n }\n } //End for (int x = 0;...\n\n Arrays.sort(fitnessArray);\n\n //UPDATE THE BANNED LIST BY ADDING THE BEST GENE IN THE NEXT GENERATION IF IT'S ABOVE minAccepted AND CONTAINS MORE THAN minPoints POINTS\n if (useList){\n if ((generationCount >= firstAdd) &&\n (solutionCounter >= countNum) &&\n (bestGene.getFitness() >= minAccepted) &&\n (bestGene.getCount() >= minPoints)){\n solutionCounter = 0;\n// System.out.println(bestGene);\n Gene bestClone = new Gene (bestGene.getMajorAxisRadius(), //THIS KLUDGE IS DONE B/C .clone() IS\n bestGene.getMinorAxisRadius(), //PROTECTED, AND I CAN'T UNPROTECT IT.\n bestGene.getX(), //I USE A CLONED GENE TO PREVENT A MUTATION\n bestGene.getY(), //IN THE NEXT GENERATION FROM ALTERING bannedList\n bestGene.getOrientation(),\n bestGene.getFunction());\n bannedList = relocationType.updateBannedList(bannedList, bestClone);\n\n\n //IF NECESSARY, UPDATE THE SOLUTION LIST BY ADDING ALL CLUSTERS WITH MORE THAN minPoints POINTS AND A FITNESS OF AT LEAST minAccepted\n if (returnAllSolutions){\n for (int i = 0; i < populationSize; i++){\n Gene next = (Gene) nextGeneration.get(i);\n if ((next.getFitness() >= minAccepted) && (next.getCount() >= minPoints)){\n solutionList.add(next);\n }\n }//End for (int i = 0...\n } else {\n solutionList = bannedList;\n } //End if (returnAllSolutions){...}else{\n } //End if (generationCount > 4...\n } //End if (useList){\n\n generationCount = generationCount + 1;\n solutionCounter = solutionCounter + 1;\n\n //IF AVOIDING CONVERGENCE, AND IT HAS CONVERGED, START OVER WITH RANDOM GENES\n\n double bestFitness = bestGene.getFitness();\n double medianFitness = roundToHundredths((double) fitnessArray[(int) Math.floor(populationSize / 2)]);\n\n// System.out.println(bestFitness);\n// System.out.println(medianFitness);\n\n if ((antiConvergence) &&\n ((bestFitness - medianFitness) < (0.01 * bestFitness)) &&\n (generationCount > firstAdd)){\n nextGeneration = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n// System.out.println(\"EXPLODED CONVERGENCE!\");\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n fitnessArray[x] = next.getFitness();\n }\n Arrays.sort(fitnessArray);\n }\n\n return nextGeneration;\n }", "public interface GAIndividual\r\n{\r\n public void mutate(double rate);\r\n public GAIndividual directReproduce();\r\n public GAIndividual reproduce( GAIndividual i );\r\n \r\n public int getFitness();\r\n public void setFitness ( int fitness );\r\n public void setRoulette (int start, int finish);\r\n public boolean hasRouletteNumber (int winner);\r\n public String toString();\r\n}", "double getSolutionCost();", "public static int createnumOfMutationss(){\n\t\tint totalMut = 0;\n\t\t\n\t\tint[] gen0 = new int[(int) Math.pow(2,0)]; //size of numOfMutations is based on exponential growth by generation number\n\t\t\tmutate(gen0); //function to mutate\n\t\t\ttotalMut = totalMut + totalMutations(gen0);\n\t\tint[] gen1 = new int[(int) Math.pow(2,1)];\n\t\t\tcheckMutations(gen0, gen1); //checks for previous generation mutations\n\t\t\tmutate(gen1);\n\t\t\ttotalMut = totalMut + totalMutations(gen1);\n\t\tint[] gen2 = new int[(int) Math.pow(2,2)];\n\t\t\tcheckMutations(gen1, gen2);\n\t\t\tmutate(gen2);\n\t\t\ttotalMut = totalMut + totalMutations(gen2);\n\t\tint[] gen3 = new int[(int) Math.pow(2,3)];\n\t\t\tcheckMutations(gen2, gen3);\n\t\t\tmutate(gen3);\n\t\t\ttotalMut = totalMut + totalMutations(gen3);\n\t\tint[] gen4 = new int[(int) Math.pow(2,4)];\n\t\t\tcheckMutations(gen3, gen4);\n\t\t\tmutate(gen4);\n\t\t\ttotalMut = totalMut + totalMutations(gen4);\n\t\tint[] gen5 = new int[(int) Math.pow(2,5)];\n\t\t\tcheckMutations(gen4, gen5);\n\t\t\tmutate(gen5);\n\t\t\ttotalMut = totalMut + totalMutations(gen5);\n\t\tint[] gen6 = new int[(int) Math.pow(2,6)];\n\t\t\tcheckMutations(gen5, gen6);\n\t\t\tmutate(gen6);\n\t\t\ttotalMut = totalMut + totalMutations(gen6);\n\t\tint[] gen7 = new int[(int) Math.pow(2,7)];\n\t\t\tcheckMutations(gen6, gen7);\n\t\t\tmutate(gen7);\n\t\t\ttotalMut = totalMut + totalMutations(gen7);\n\t\tint[] gen8 = new int[(int) Math.pow(2,8)];\n\t\t\tcheckMutations(gen7, gen8);\n\t\t\tmutate(gen8);\n\t\t\ttotalMut = totalMut + totalMutations(gen8);\n\t\tint[] gen9 = new int[(int) Math.pow(2,9)];\n\t\t\tcheckMutations(gen8, gen9);\n\t\t\tmutate(gen9);\n\t\t\ttotalMut = totalMut + totalMutations(gen9);\n\t\tint[] gen10 = new int[(int) Math.pow(2,10)];\n\t\t\tcheckMutations(gen9, gen10);\n\t\t\tmutate(gen10);\n\t\t\ttotalMut = totalMut + totalMutations(gen10);\n\t\t\t\n\t\t\treturn totalMut;\n\t\n\t}", "public void updateFitness ( ) {\n\n KozaFitness f = ((KozaFitness)program.fitness);\n\n f.setStandardizedFitness(param.Parameters.STATE, this.fit);\n\n }", "private double getLowerFitness(Individual[] individuals){\n double lower = Double.MAX_VALUE;\n for (int i = 0; i < individuals.length; ++i ){\n \tlower = Math.min(lower, individuals[i].getFitness());\n }\n return lower;\n }", "protected void evolve()\n\t\t{\tif(this_gen < NUMBER_GENERATIONS) {\n\t\t\t\t// Create a new generation.\n\t\t\t\tfloat avg_fit=Float.MIN_VALUE, max_fit=Float.MIN_VALUE, sum_fit=0;\n\t\t\t\tfloat tot_wait=0, avg_wait=0, tot_move=0, avg_move=0;\n\n\t\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++) {\n\t\t\t\t\tfloat fit = calcFitness(inds[i]);\n\t\t\t\t\tinds[i].setFitness(fit);\n\t\t\t\t\tsum_fit\t += fit;\n\t\t\t\t\tmax_fit = fit>max_fit ? fit : max_fit;\n\t\t\t\t\ttot_wait += inds[i].getWait();\n\t\t\t\t\ttot_move += inds[i].getMove();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tavg_wait = tot_wait/NUMBER_INDIVIDUALS;\n\t\t\t\tavg_move = tot_move/NUMBER_INDIVIDUALS;\n\t\t\t\tavg_fit = sum_fit/NUMBER_INDIVIDUALS;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Stats of prev. gen: (a-wait,a-move)=(\"+avg_wait+\",\"+avg_move+\")\"+\" (a-fit,mx-fit)=(\"+avg_fit+\",\"+max_fit+\")\");\n\t\t\t\tSystem.out.println(\"Evolving...\");\n\t\t\t\t\n\t\t\t\t// Sorts the current Individual-array on fitness, descending\n\t\t\t\tinds = sortIndsArr(inds);\n\t\t\t\t\n\t\t\t\tint num_mating = (int) Math.floor(NUMBER_INDIVIDUALS*(1-ELITISM_FACTOR));\n\t\t\t\tint num_elitism = (int) Math.ceil(NUMBER_INDIVIDUALS*ELITISM_FACTOR);\n\t\t\t\tif(num_mating%2!=0) {\n\t\t\t\t\tnum_mating--;\n\t\t\t\t\tnum_elitism++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIndividual[] newInds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\t\t\n\t\t\t\t// Tournament selection\n\t\t\t\tfor(int i=0;i<num_mating;i+=2) {\n\t\t\t\t\tIndividual mamma=null, pappa=null;\n\t\t\t\t\tfloat chn_mum = random.nextFloat();\n\t\t\t\t\tfloat chn_pap = random.nextFloat();\n\t\t\t\t\tfloat fit_mum, sum_fit2=0, sum_fit3=0;\n\t\t\t\t\tint index_mum = -1;\n\t\t\t\t\t\n\t\t\t\t\tfor(int j=0;j<NUMBER_INDIVIDUALS;j++) {\n\t\t\t\t\t\tsum_fit2 += (inds[j].getFitness()/sum_fit);\n\t\t\t\t\t\tif(chn_mum <= sum_fit2) {\n\t\t\t\t\t\t\tmamma = inds[j];\n\t\t\t\t\t\t\tindex_mum = j;\n\t\t\t\t\t\t\tfit_mum = mamma.getFitness();\n\t\t\t\t\t\t\tsum_fit2 = sum_fit-fit_mum;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor(int j=0;j<NUMBER_INDIVIDUALS;j++) {\n\t\t\t\t\t\tif(j!=index_mum) {\n\t\t\t\t\t\t\tsum_fit3 += (inds[j].getFitness()/sum_fit2);\n\t\t\t\t\t\t\tif(chn_pap <= sum_fit3) {\n\t\t\t\t\t\t\t\tpappa = inds[j];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"Mating...: \"+mamma.getFitness()+\",\"+pappa.getFitness());\n\t\t\t\t\tIndividual[] kids = mate(mamma, pappa);\n\t\t\t\t\tnewInds[i]\t= kids[0];\n\t\t\t\t\tnewInds[i+1]= kids[1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Elitism\n\t\t\t\tfor(int i=0;i<num_elitism;i++) {\n\t\t\t\t\tnewInds[i+num_mating] = inds[i];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinds = newInds;\t\t\t\t\t\t\t\t\n\t\t\t\tthis_gen++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Done with evolving\");\n\t\t\t\t// set the best individual as the ruling champ?\n\t\t\t\t// do nothing\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "<T> GeneticResult<T> train(List<Chromosome<T>> chromosomes){\n\t\tGeneticResult<T> bestFit = maxFitness(chromosomes, 0);\n\t\tfor(int i = 0; i < totalBreedings; i++){\n\t\t\tif(bestFit.getFitness() > sufficientFitness){ break ;}\n\t\t\tchromosomes = breedNewGeneration(chromosomes);\n\t\t\tbestFit = maxFitness(chromosomes, i);\n\t\t}\n\t\treturn bestFit;\n\t}", "public void setFitness(double fit) {\n fitness = fit;\n }", "public int fit(List<Vertex> to_eval) {\r\n\t\tif(to_eval.size() != this.vertexGraph.size()) {\r\n\t\t\treturn Integer.MAX_VALUE;\r\n\t\t}\r\n\t\t\r\n\t\tint fitness = 0;\r\n\t\tfor (int position = 0; position < to_eval.size(); position++) {\r\n\t\t\tint weight = Integer.MAX_VALUE;\r\n\t\t\tif (this.isOriented) {\r\n\t\t\t\tfor (Edge e : to_eval.get(position).linkToMe) {\r\n\t\t\t\t\tif (e.getV1().equals(to_eval.get(position)) && e.getSecondVertex(to_eval.get(position))\r\n\t\t\t\t\t\t\t.equals(to_eval.get((position + 1) % (to_eval.size())))) {\r\n\t\t\t\t\t\tweight = e.getWeight();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (Edge e : to_eval.get(position).linkToMe) {\r\n\t\t\t\t\tif (e.getSecondVertex(to_eval.get(position))\r\n\t\t\t\t\t\t\t.equals(to_eval.get((position + 1) % (to_eval.size())))) {\r\n\t\t\t\t\t\tweight = e.getWeight();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (weight == Integer.MAX_VALUE) {\r\n\t\t\t\treturn Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t\tfitness += weight;\r\n\t\t}\r\n\r\n\t\treturn fitness;\r\n\t}", "@Override\n public int compareTo(Individual individual) {\n return individual.getFitness() - this.getFitness() ;\n }", "@Override\n\tpublic FTrend execute(Problem problem, int maxEvaluations) throws Exception\n\t{\n\t\tFTrend FT = new FTrend(); // Create a fitness trend instance\n\t\tint problemDimension = problem.getDimension(); // Store the dimensionality of the problem domain\n\t\tdouble[][] bounds = problem.getBounds(); // Store the bounds of each variable in the problem domain\n\t\t\n\t\tdouble[] best = new double[problemDimension]; // Initialise the best known solution variable\n\t\tdouble fBest = Double.NaN; // Initialise the fitness value, i.e. \"f(x)\", of the best solution known\n\t\tint k = 0; // Initialise the incremental counter variable\n\t\t\n\t\t// Self-Adaptive Differential Evolution (jDE - jitterDE) variables\n\t\tint populationSize \t \t\t\t= getParameter(\"p0\").intValue(); // Initialise the population size \n\t\t//double scalingFactor \t\t\t= getParameter(\"p1\").doubleValue(); // Initialise the scaling factor of the mutation operator\n\t\t//double crossoverRate \t\t\t= getParameter(\"p2\").doubleValue(); // Initialise the crossover rate of the binomial crossover operator\n\t\tdouble scalingFactorLowerBound \t= getParameter(\"p3\").doubleValue(); // Initialise the upper bound value of the scaling factor of the mutation operator\n\t\tdouble scalingFactorUpperBound \t= getParameter(\"p4\").doubleValue(); // Initialise the lower bound value of the scaling factor of the mutation operator\n\t\tdouble tauOne \t\t\t\t\t= getParameter(\"p5\").doubleValue(); // Initialise the first random probability controlling the scaling factor of the mutation operator\n\t\tdouble tauTwo \t\t\t\t\t= getParameter(\"p6\").doubleValue(); // Initialise the second random probability controlling the binomial crossover rate of the crossover operator\n\t\t\n\t\tdouble[] scalingFactor = new double[populationSize]; // Initialise the scaling factor of the mutation operator\n\t\tdouble[] crossoverRate = new double[populationSize]; // Initialise the crossover rate of the binomial crossover operator\n\t\t\n\t\tdouble[][] population = new double[populationSize][problemDimension]; // Initialise the population of individuals (solutions) variable\n\t\tdouble[] solutionFitness = new double[populationSize]; // Initialise the fitness of a solution (individual) variable\n\t\t\n\t\t// Short Distance Exploration (SDE) variables\n\t\tdouble alpha \t\t\t\t= getParameter(\"p7\"); // Initialise the alpha cut value of the length of the problems decision space\n\t\tdouble proceduralIterations = getParameter(\"p8\").intValue(); // Initialise the procedural iteration budget variable\n\t\t\n\t\tdouble fShort = fBest; // Initialise the fitness value, i.e. \"f(x)\", of the trial solution\n\t\tdouble[] xShort = best; // Initialise the trial solution variable\n\t\tdouble[] exploratoryRadius = new double[problemDimension]; // Initialise the exploratory radius variable for the Short Distance Exploration (S) algorithm\n\t\t\n\t\t// Evaluate initial population of individuals\n\t\tfor (int i = 0; i < populationSize; i++) // For the size of the population of individuals (solutions), do the following\n\t\t{\n\t\t\tdouble[] initialSolution = generateRandomSolution(bounds, problemDimension); // Generate the initial solution (guess)\n\t\t\t\n\t\t\tfor (int j = 0; j < problemDimension; j++) // For the dimensionality of the problem, do the following\n\t\t\t{\n\t\t\t\tpopulation[i][j] = initialSolution[j]; // Initialise the iterated solution (individual) that comprises the population, to the initial solution randomly generated \n\t\t\t}\n\t\t\t\n\t\t\tsolutionFitness[i] = problem.f(population[i]); // Calculate and store the fitness (value) of the iterated solution (individual)\n\t\t\tk++; // Increment the counter to near the computational budget\t\t\n\n\t\t\tif (i == 0 || solutionFitness[i] < fBest) // If the solution generated is the first solution in the population or the fitness of the solution is better than the fitness of the best known solution, do the following\n\t\t\t{\n\t\t\t\tfBest = solutionFitness[i]; // Store the iterated solutions (individuals) fitness (value) as the best known solution\n\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < problemDimension; j++) // For the dimensionality of the problem, do the following\n\t\t\t\t{\n\t\t\t\t\tbest[j] = population[i][j]; // Update the best solution to the points comprising the iterated solution (individual) in the population\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (i == 0 || k % 100 == 0) // If the iterated individual in the population is first individual in the population or the current iteration is divisible by '100' and has no remainder, do the following\n\t\t\t{\n\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Main loop\n\t\twhile (k < maxEvaluations) // While the computational budget has not been met, do the following\n\t\t{\n\t\t\tdouble[][] nextGeneration = new double[populationSize][problemDimension]; // Reinitialise the next generation of individuals representing the population variable\n\t\t\t\n\t\t\tfor (int j = 0; j < populationSize && k < maxEvaluations; j++) // For the size of the population of individuals (solutions) and whilst within the computational budget, do the following\n\t\t\t{\n\t\t\t\tint fitnessTrendPopulated = 0; // Initialise the fitness trend populated variable\n\t\t\t\t\n\t\t\t\tdouble[] mutantIndividual \t = new double[problemDimension]; // Reinitialise the mutated individuals variable\n\t\t\t\tdouble[] crossoverIndividual = new double[problemDimension]; // Reinitialise the offspring variable\n\t\t\t\tdouble[] populationIndividual = new double[problemDimension]; // Reinitialise the individual (solution) comprising the population variable \n\t\t\t\t\n\t\t\t\tdouble currentFitness \t= Double.NaN; // Reinitialise the fitness of the current solution (individual)\n\t\t\t\tdouble crossoverFitness = Double.NaN; // Reinitialise the fitness of the offspring solution (individual)\n\t\t\t\t\n\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t{\n\t\t\t\t\tpopulationIndividual[l] = population[j][l]; // Initialise the individual (solution) in the population to the iterated individual in the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentFitness = solutionFitness[j]; // Set the current fitness (value) to the fitness of the current individual (solution)\n\t\t\t\n\t\t\t\t// Update the scaling factor (F)\n\t\t\t\tif (RandUtils.random() < tauOne) // If the randomly generated number is smaller than the probability of controlling the scaling factor of the mutation operator, do the following\n\t\t\t\t{\n\t\t\t\t\tscalingFactor[j] = scalingFactorLowerBound + RandUtils.random() * scalingFactorUpperBound; // Resample the scaling factor for the iterated individual of the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// DE/rand/1 mutation operator\n\t\t\t\tmutantIndividual = originalMutation(population, scalingFactor[j], problemDimension); // Function call, mutate the population of individuals to obtain a new mutated individual\n\t\t\t\t//mutantIndividual = toro(mutantIndividual, bounds); // Correct the mutated individual (solution) that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\n\t\t\t\t// Update the crossover rate (CR)\n\t\t\t\tif (RandUtils.random() < tauTwo) // If the randomly generated number is smaller than the probability of controlling the crossover rate of the binomial crossover operator, do the following\n\t\t\t\t{\n\t\t \tcrossoverRate[j] = RandUtils.random(); // Resample the crossover rate for the iterated individual of the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Binomial crossover operator\n\t\t\t\tcrossoverIndividual = binomialCrossover(populationIndividual, mutantIndividual, crossoverRate[j], problemDimension); // Function call, crossover the current individual and the mutated individual, binomially (recombination)\n\t\t\t\tcrossoverIndividual = toro(crossoverIndividual, bounds); // Correct the offspring individual (solution) that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\n\t\t\t\tcrossoverFitness = problem.f(crossoverIndividual); // Calculate and store the fitness (value) of the offspring solution (individual)\n\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\n\t\t\t\t// Replace the original individual in the population\n\t\t\t\tif (crossoverFitness < currentFitness) // If the offspring individual is fitter than the original individual in the population, do the following\n\t\t\t\t{\n\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t{\n\t\t\t\t\t\t// Survivor selection (1-to-1 spawning)\n\t\t\t\t\t\tnextGeneration[j][l] = crossoverIndividual[l]; // Replace the original individual (solution) in the population with the offspring individual (solution)\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tsolutionFitness[j] = crossoverFitness; // Update the fitness of the individual (solution) to the fitness of the offspring individual (solution)\n\t\t\t\t\t\n\t\t\t\t\t// Update the best known solution\n\t\t\t\t\tif (crossoverFitness < fBest) // If the offspring individual (solution) is fitter than the best known individual (solution), do the following\n\t\t\t\t\t{\n\t\t\t\t\t\tfBest = crossoverFitness; // Update the fitness (value) of the best known solution to the fitness (value) of the offspring individual (solution)\n\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tbest[l] = crossoverIndividual[l]; // Update the best known individual (solution) to the offspring individual (solution)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Reset exploratory radius\n\t\t\t\t\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\texploratoryRadius[i] = alpha * (bounds[i][1] - bounds[i][0]); // Calculate and the exploratory radius for each variable in the problem domain\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Main loop\n\t\t\t\t\t\tfor (int l = 0; l < proceduralIterations && k < maxEvaluations; l++) // For the size of the procedural iteration budget and whilst within the computational budget, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboolean improved = false; // Initialise the improved variable (reinitialise every iteration)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < problemDimension && k < maxEvaluations; i++) // For the dimensionality of the problem and whilst within the computational budget, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\txShort[i] = best[i] - exploratoryRadius[i]; // Perturb the currently iterated variable in the problem domain, negatively, along the corresponding axis (exclusively) \n\t\t\t\t\t\t\t\txShort = toro(xShort, bounds); // Correct the trial solution that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfShort = problem.f(xShort); // Calculate the new fitness value of the trial solution\n\t\t\t\t\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (fShort <= fBest) // If the trial solution is an improvement or equivalent to the best known solution, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tbest[i] = xShort[i]; // Update the best known solution to the current trial solution (one variable perturbed at each iteration)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfBest = fShort; // Store the fitness value of the improved trial solution\n\t\t\t\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\timproved = true; // The trial solution is an improvement or equivalent to the best known solution\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (k < maxEvaluations) // Else if the trial solution is not an improvement to the best solution found and its within the computational budget, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\txShort[i] = best[i] + (exploratoryRadius[i] / 2); // Perturb the currently iterated variable in the problem domain, positively (half-step), along the corresponding axis (exclusively) \n\t\t\t\t\t\t\t\t\txShort = toro(xShort, bounds); // Correct the trial solution that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfShort = problem.f(xShort); // Calculate the new fitness value of the trial solution\n\t\t\t\t\t\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (fShort <= fBest) // If the trial solution is an improvement or equivalent to the best known solution, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbest[i] = xShort[i]; // Update the best known solution to the current trial solution (one variable perturbed at each iteration)\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tfBest = fShort; // Store the fitness value of the improved trial solution\n\t\t\t\t\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\timproved = true; // The trial solution is an improvement or equivalent to the best known solution\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse // Else if the trial solution is not an improvement to the best solution found, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\txShort[i] = best[i]; // Return to the original point after the perturbations, as an improvement could not be recognised\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\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\tif (improved == false) // If the current best solution has never improved from the initial best solution, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (int i = 0; i < exploratoryRadius.length; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\texploratoryRadius[i] = exploratoryRadius[i] / 2; // Store the exploratory radius for each variable in the problem domain to itself, halved (closer search from initial solution in case the initial guess is the optimum)\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 // Else if the current best solution has improved from the initial best solution, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextGeneration[j][i] = best[i]; // Replace the original individual (solution) in the population with the best known solution (individual)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tsolutionFitness[j] = fBest; // Update the fitness of the individual (solution) to the fitness of the best known solution (individual)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // Else if the offspring individual is not fitter than the original individual in the population, do the following\n\t\t\t\t{\n\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t{\n\t\t\t\t\t\tnextGeneration[j][l] = populationIndividual[l]; // Restore the design variables (genes) of the original individual (solution) as the updated individual (solution)\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tsolutionFitness[j] = currentFitness; // Restore the fitness (value) of the solution to the fitness (value) of the iterated individual (solution)\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t{\n\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Survivor selection (1-to-1 spawning)\n\t\t\tpopulation = nextGeneration; // Update the current population of individuals to the next generation of fitter individuals\n\t\t}\n\t\t\n\t\tfinalBest = best; // Store the final iteration of the best known solution\n\t\tFT.add(k, fBest); // Add the final iteration of the best known solution to the fitness trend (saved to a .txt file)\n\n\t\treturn FT; // Return the fitness trend\n\t}", "private int tournament()\r\n {\r\n\tint out = spinTheWheel();\r\n\tdouble max = ff.evaluate(chromos.get(out),generation());\r\n\tdouble temp_fitness = 0;\r\n\tint temp_index = 0;\r\n\r\n\tfor(int i = 0; i < selPara - 1 + tourStep*generation(); i++)\r\n\t {\r\n\t\ttemp_index = spinTheWheel();\r\n\t\ttemp_fitness = ff.evaluate(chromos.get(temp_index),generation());\r\n\t\tif(temp_fitness > max)\r\n\t\t {\r\n\t\t\tmax = temp_fitness;\r\n\t\t\tout = temp_index;\r\n\t\t }\r\n\t }\r\n\treturn out;\r\n }", "public abstract void updateFitness();", "public AIAssign2(){\n \n Scanner console = new Scanner(System.in);\n \n System.out.print(\"Input population size \");\n popsize = console.nextInt();\n \n System.out.print(\"Input tournament size \");\n tournysize = console.nextInt();\n \n System.out.print(\"Input crossover chance (%) \");\n crossprob = console.nextDouble();\n \n System.out.print(\"Input mutation chance (%) \");\n mutaprob = console.nextDouble();\n \n System.out.print(\"Input max generation size \");\n maxgen = console.nextInt();\n \n System.out.print(\"Input problem width \");\n width = console.nextInt();\n \n System.out.print(\"Input problem height \");\n height = console.nextInt();\n \n System.out.print(\"Input start location x-1 \");\n startx = console.nextInt();\n \n System.out.print(\"Input start location y-1 \");\n starty = console.nextInt();\n \n System.out.print(\"Input seed value \");\n seed = console.nextLong();\n \n Random rnd = new Random(seed);\n \n population = new int[popsize][height*width];\n population2 = new int[popsize][height*width];\n popfitness = new int[popsize];\n \n for (int i = 0 ; i<popsize ; i++){\n for (int j = 0 ; j<population[0].length ; j++){\n population[i][j] = (rnd.nextInt(4));\n }\n }\n Print(population);\n \n //the generation loop\n for (int gen = 0 ; gen < maxgen ; gen++){\n \n //fitness of individuals is stored\n int btemp = 0;\n for (int i = 0 ; i < popsize ; i++){\n \n problem = new char[width][height];\n problem[startx][starty] = 'S';\n \n popfitness[i] = Fitness(population[i], problem, startx, starty, 0);\n \n if (popfitness[i] > btemp){ btemp = popfitness[i];}\n }\n bestavg = bestavg + btemp;\n \n String line=\"\";\n int avg=0;\n for (int i = 0 ; i < popsize ; i++){\n line = line + \"[\" + popfitness[i] + \"] \"; \n avg = avg + popfitness[i];\n }\n avg = avg/popsize;\n avgavg = avgavg + avg;\n bestavg = bestavg / (gen+1);\n avgavg = avgavg / (gen+1);\n System.out.println(\"Gen: \"+gen + \" Fitness: \"+ line + \" Avg: \"+ avg + \" BestAvg: \" + bestavg + \" AvgAvg: \" + avgavg);\n bestavg = bestavg * (gen+1);\n avgavg = avgavg * (gen+1);\n \n //Tournament selection\n for (int i = 0 ; i < popsize ; i++){\n int best = 0; \n int rand = (int)(rnd.nextInt(popsize));\n best = rand;\n \n for (int k = 0 ; k < tournysize ; k++){\n if (popfitness[rand] > popfitness[best]){\n best = rand;\n }\n \n rand = (int)(rnd.nextInt(popsize));\n }\n population2[i] = Copy(population[best]); \n }\n \n //single-focus-flip and block exchange mutations\n for (int i = 0 ; i < popsize-1 ; i++){\n if (crossprob > rnd.nextInt(100)){\n int temp; \n for (int a = 0 ; a < 5 ; a++){\n temp = population2[i][a];\n population2[i][a] = population2[i+1][a];\n population2[i+1][a] = temp;\n }\n }\n }\n \n for (int i = 0 ; i < popsize ; i++){\n if (mutaprob > rnd.nextInt(200)){\n int temp = (int) (rnd.nextInt(population2[0].length)); \n population2[i][temp] = (int)(rnd.nextInt(4));\n }\n else if (mutaprob > rnd.nextInt(200)){\n for (int j = 0 ; j < population2[0].length/2 ; j++){\n int temp = population2[i][j];\n population2[i][j] = population2[i][population2[0].length-1-j];\n population2[i][population2[0].length-1-j] = temp;\n }\n }\n }\n \n population = population2;\n population2 = new int[popsize][population[0].length];\n \n }\n \n bestavg = bestavg / maxgen;\n avgavg = avgavg / maxgen;\n Print(population);\n System.out.println(\"Best Avg: \" + bestavg + \" Average of Avg: \" + avgavg);\n }", "public double getBestScore();", "public void calculateProbabilities(){\n\t}", "public static void evaluateFitnesses() {\n for (Polynomial p : Population) {\n p.setRawFitness(getRawFitness(p, data));\n if (debug) {\n printPopulation(true);\n }\n }\n }", "public abstract double getHeuristic(State state);" ]
[ "0.8361821", "0.8167407", "0.79105973", "0.7711532", "0.77038753", "0.7697704", "0.7679615", "0.7672538", "0.75694215", "0.7550145", "0.75392705", "0.74524695", "0.7426556", "0.73430794", "0.73025", "0.728373", "0.72608566", "0.7237468", "0.71930325", "0.71918017", "0.71258336", "0.7092168", "0.70377517", "0.70357853", "0.70169425", "0.6927774", "0.69116294", "0.6910006", "0.68829066", "0.6875169", "0.68222815", "0.68190515", "0.6797561", "0.6789116", "0.6777271", "0.6747052", "0.6737714", "0.67229724", "0.67174566", "0.670658", "0.66808665", "0.66781354", "0.6648051", "0.6642565", "0.66038513", "0.65944624", "0.65924925", "0.65737313", "0.6516023", "0.65152943", "0.6483161", "0.64823365", "0.6464233", "0.643413", "0.6431204", "0.6428526", "0.63818896", "0.6373968", "0.6360034", "0.63571906", "0.629956", "0.6293841", "0.6293529", "0.62565154", "0.6252444", "0.6247588", "0.6242023", "0.62356347", "0.62057275", "0.61800545", "0.6177891", "0.61691594", "0.61006886", "0.609784", "0.6087335", "0.60716045", "0.6068865", "0.60573226", "0.6052582", "0.60443896", "0.6042769", "0.6035432", "0.5986644", "0.5977042", "0.595238", "0.59400487", "0.59269834", "0.5926056", "0.5899882", "0.5884899", "0.5882201", "0.58670783", "0.5866451", "0.5865954", "0.5851485", "0.5848469", "0.5832174", "0.5819134", "0.5780189", "0.57785136" ]
0.6294994
61
Overloading the funtion to evaluate the accuracy
public static void calculateFitness(Individual individual) { individual.fitness = 0; for (int i = 0; i < dataSet.size(); i++) { for (Rule rule : individual.rulebase) { boolean match = true; int[] data = dataSet.get(i).getVariables(); for (int j = 0; j < data.length; j++) { String variable = String.valueOf(data[j]); //String variable = "" + data[j]; String[] rulebase = rule.cond; if ((rulebase[j].equals(variable) != true) && (rulebase[j].equals("#") != true)) { match = false; } } if (match) { String output = String.valueOf(dataSet.get(i).getOutput()); if (rule.output.equals(output)) { individual.fitness++; } break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double findAccuracy(){\n double[] prediciton = this.learner.test(this.VS);\n ClassificationEvaluator CE = new ClassificationEvaluator(prediciton, this.VS);\n double tmp = CE.returnAccuracy(); //find accuracy\n return tmp;\n }", "public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}", "public double calculateAccuracy() {\n final long divisor = truePositive + trueNegative + falsePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return (truePositive + trueNegative) / (double)divisor;\n }\n }", "double getAbsoluteAccuracy();", "@Override\r\n\tpublic double getAccuracy() {\n\t\treturn this.accuracy;\r\n\t}", "public float getAccuracy() {\n return this.accuracy;\n }", "public double getAccuracy(){\n return (numOfHits/numOfGuesses);\n }", "double getRelativeAccuracy();", "public java.lang.Float getAccuracy () {\n\t\treturn accuracy;\n\t}", "public double accuracy() throws RankingException {\n\t\treturn this.accuracy;\n\t}", "public double testAccuracy() {\r\n\t\tdouble accuracy = 0;\r\n\t\tint i = 0;\r\n\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\r\n\t\t//Filling arrays with the correct and predicted results to compare.\r\n\t\tfor (i=(int)split; i<dataEntries.size(); i++) {\r\n\t\t\t\tEntry en = dataEntries.get(i);\r\n\t\t\t\tcorrectArray.add(en.getHasCOVID19());\r\n\t\t\t\tdouble diagnosis = calcProbs(new Entry(en.getTemperature(), en.getAches(), en.getCough(), en.getSoreThroat(), en.getSoreThroat()));\r\n\t\t\t\tif (diagnosis>0.5) { predictArray.add(\"yes\"); }\r\n\t\t\t\telse { predictArray.add(\"no\"); }\r\n\t\t}\r\n\t\t\r\n\t\t//Comparing the results of \"hasCOVID19\" to each other.\r\n\t\tfor(i=0;i<correctArray.size();i++) {\r\n\t\t\tif (correctArray.get(i).equals(predictArray.get(i))) {\r\n\t\t\t\taccuracy++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\taccuracy /= correctArray.size();\r\n\t\treturn accuracy * 100;\r\n\t}", "public String getAccuracy() {\n\t\treturn accuracy;\n\t}", "protected void calculateAccuracyOfTrainFile( double threshold )\n\t{\n\t\tint result = 0, n = this.class_data.attribute_data.size();\n\t\tdouble sum, total = 0;\n\t\tAttribute temp;\n\n\t\tfor ( int i = 0; i < n; i++ )\n\t\t{\n\t\t\tsum = 0;\n\t\t\tfor ( int j = 0; j < this.attribute_list.size(); j++ )\n\t\t\t{\n\t\t\t\ttemp = this.attribute_list.get( j );\n\t\t\t\tsum += temp.attribute_data.get( i ) * temp.getWeigth();\n\t\t\t}\n\n\t\t\tif ( sum < threshold )\n\t\t\t\tresult = 0;\n\t\t\telse\n\t\t\t\tresult = 1;\n\n\t\t\tif ( result == this.class_data.attribute_data.get( i ) )\n\t\t\t\ttotal++;\n\t\t}\n\n\t\tDecimalFormat df = new DecimalFormat( \"#.##\" );\n\t\tSystem.out.println( \"Accuracy of training file ( \" + n + \" instance ) = \" + df.format( (total * 100.00 / n) ) );\n\t}", "public double getSvAccuracy() {\n return svAccuracy;\n }", "protected abstract void calculateAccuracy(List<S> bestPath, List<O> observation);", "float getEvaluationResult();", "public double computeAccuracy(Node node,\n\t\t\tArrayList<ArrayList<String>> dataSet) {\n\t\tdouble accuracy = 0;\n\t\tint positiveExamples = 0;\n\t\tArrayList<String> attributes = dataSet.get(0);\n\n\t\tfor (ArrayList<String> dataRow : dataSet.subList(1, dataSet.size())) {\n\t\t\tboolean verifyData = verifyTreeRow(node, dataRow, attributes);\n\t\t\tif (verifyData) {\n\t\t\t\tpositiveExamples++;\n\t\t\t}\n\t\t}\n\t\taccuracy = (((double) positiveExamples / (double) (dataSet.size() - 1)) * 100.00);\n\t\treturn accuracy;\n\t}", "private double validate(int k) {\n\t\tArrayList<Product> allData = trainData;\n\t\tshuffle(allData);\n\t\tArrayList<Double> accurs = new ArrayList<Double>();\n\t\tif (k < 1 || k > allData.size()) return -1;\n\t\tint foldLength = allData.size() / k;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tArrayList<Product> fold = new ArrayList<Product>();\n\t\t\tArrayList<Product> rest = new ArrayList<Product>();\n\t\t\tfold.addAll(allData.subList(i * foldLength, (i + 1) * foldLength));\n\t\t\trest.addAll(allData.subList(0, i * foldLength));\n\t\t\trest.addAll(allData.subList((i + 1) * foldLength, allData.size()));\n\t\t\tdouble[] predict = classify(fold, rest);\n\t\t\tdouble[] real = getLabels(fold);\n\t\t\taccurs.add(getAccuracyBinary(predict, real));\n\t\t}\n\t\tdouble accur = 0;\n\t\tfor (int i = 0; i < accurs.size(); i++) {\n\t\t\taccur += accurs.get(i);\n\t\t}\n\t\taccur /= accurs.size();\n\t\treturn accur;\n\t}", "protected void calculateAccuracyOfTestFile( double threshold, String test_file_name ) throws FileNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile test_file = new File( test_file_name );\n\t\t\tScanner in;\n\t\t\tString[] tokens;\n\t\t\tint total_tokens = 0, total_matched = 0, n, result;\n\t\t\tdouble sum;\n\t\t\tAttribute temp;\n\n\t\t\tin = new Scanner( test_file );\n\t\t\tin.nextLine();\n\n\t\t\twhile ( in.hasNextLine() )\n\t\t\t{\n\t\t\t\ttokens = in.nextLine().trim().split( \"\\\\s+\" );\n\t\t\t\tn = tokens.length;\n\t\t\t\tif ( n > 1 )\n\t\t\t\t{\n\t\t\t\t\ttemp = this.attribute_list.get( 0 );\n\t\t\t\t\tsum = temp.getWeigth();\n\n\t\t\t\t\tfor ( int i = 1; i < n; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\ttemp = this.attribute_list.get( i );\n\t\t\t\t\t\tsum += Integer.parseInt( tokens[ i - 1 ] ) * temp.getWeigth();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( sum < threshold )\n\t\t\t\t\t\tresult = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tresult = 1;\n\n\t\t\t\t\tif ( Integer.parseInt( tokens[ n - 1 ] ) == result )\n\t\t\t\t\t\ttotal_matched++;\n\n\t\t\t\t\ttotal_tokens++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tDecimalFormat df = new DecimalFormat( \"#.##\" );\n\t\t\tSystem.out.println( \"Accuracy of test data ( \" + total_tokens + \" instances ) = \" + df.format( total_matched * 100.00 / total_tokens ) );\n\n\t\t\tin.close();\n\t\t}\n\t\tcatch ( FileNotFoundException e )\n\t\t{\n\t\t\tSystem.out.println( \"Cannot find test file - \" + test_file_name );\n\t\t\tthrow e;\n\t\t}\n\t}", "@Test\r\n public void test_performLogic_Accuracy2() throws Exception {\r\n instance.performLogic(null);\r\n }", "public static double predictionAccuracy(List<CSVAttribute[]> ulTestData, List<CSVAttribute[]> validationData,\n DecisionTreeNode tree, int labelAttribute){\n\n List<CSVAttribute[]> predictedTestData = TreeModel.predict(ulTestData, tree, labelAttribute);\n\n int correct = 0;\n for (int j = 0; j < predictedTestData.size(); j++) {\n if (predictedTestData.get(j)[labelAttribute].equals(validationData.get(j)[labelAttribute])) correct++;\n }\n\n return (double) correct / (double) predictedTestData.size();\n }", "public void setAccuracy (java.lang.Float accuracy) {\n\t\tthis.accuracy = accuracy;\n\t}", "@Override\n \tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n \t\t\n \t}", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "public double getAccuracy() {\r\n if (location != null) {\r\n accuracy = location.getAccuracy();\r\n }\r\n\r\n return accuracy;\r\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void run() throws Exception {\r\n\r\n\r\n LibSVM svm = new LibSVM();\r\n String svmOptions = \"-S 0 -K 2 -C 8 -G 0\"; //Final result: [1, -7 for saveTrainingDataToFileHybridSampling2 ]\r\n svm.setOptions(weka.core.Utils.splitOptions(svmOptions));\r\n System.out.println(\"SVM Type and Keranl Type= \" + svm.getSVMType() + svm.getKernelType());//1,3 best result 81%\r\n // svm.setNormalize(true);\r\n\r\n\r\n// load training data from .arff file\r\n ConverterUtils.DataSource source = new ConverterUtils.DataSource(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSSMOTE464Random.arff\");\r\n System.out.println(\"\\n\\nLoaded data:\\n\\n\" + source.getDataSet());\r\n Instances dataFiltered = source.getDataSet();\r\n dataFiltered.setClassIndex(0);\r\n\r\n // gridSearch(svm, dataFiltered);\r\n Evaluation evaluation = new Evaluation(dataFiltered);\r\n evaluation.crossValidateModel(svm, dataFiltered, 10, new Random(1));\r\n System.out.println(evaluation.toSummaryString());\r\n System.out.println(evaluation.weightedAreaUnderROC());\r\n double[][] confusionMatrix = evaluation.confusionMatrix();\r\n for (int i = 0; i < 2; i++) {\r\n for (int j = 0; j < 2; j++) {\r\n System.out.print(confusionMatrix[i][j] + \" \");\r\n\r\n }\r\n System.out.println();\r\n }\r\n System.out.println(\"accuracy for crime class= \" + (confusionMatrix[0][0] / (confusionMatrix[0][1] + confusionMatrix[0][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for other class= \" + (confusionMatrix[1][1] / (confusionMatrix[1][1] + confusionMatrix[1][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for crime class= \" + evaluation.truePositiveRate(0) + \"%\");\r\n System.out.println(\"accuracy for other class= \" + evaluation.truePositiveRate(1) + \"%\");\r\n\r\n\r\n }", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n \n }", "public double AccuracyLossTestSet()\n\t{\n\t\tdouble accuracyLoss = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++) \n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++) \n\t\t\t\taccuracyLoss += AccuracyLoss(i, c); \n\t\t}\n\t\treturn accuracyLoss;\n\t}", "@Test\n public void testScoreUpdate() {\n try {\n final BestEvalScore score = new BestEvalScore(\"thjtrfwaw\");\n double expected = 0;\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n final Evaluation eval = new Evaluation(2);\n eval.eval(0,1);\n eval.eval(1,1);\n\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(0,1);\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(1,1);\n eval.eval(1,1);\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to create instance!\", e);\n }\n\n\n }", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\r\n\t}", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "public abstract double evaluateFitness();", "public abstract double test(ClassifierData<U> testData);", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}", "@Override\n \tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n \t}", "@Override\n public void onAccuracyChanged(android.hardware.Sensor sensor, int accuracy) // Changes the accuracy of the system\n {\n }", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\r\n\t}", "@Override\n public void onAccuracyChanged(Sensor arg0, int arg1 )\n {\n\n }", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) \r\n\t{\n\t}", "@Override\n\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\r\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\r\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t}", "@Override\n public void onAccuracyChanged(Sensor arg0, int arg1) {\n\n }", "@Override\r\n\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\r\n\t\t\t}", "public RootFinder(float lower, float upper, float accuracy){\n this.a = lower;\n this.b = upper;\n this.e = accuracy;\n \n }", "@Override\n public final void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public final void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public final void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor arg0, int arg1) \r\n\t{\r\n\t}", "@Override\r\n\t\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t}", "public FormFieldsReport setAccuracy(float accuracy) {\n this.accuracy = accuracy;\n return this;\n }", "@Override\n\tpublic void onAccuracyChanged(android.hardware.Sensor arg0, int arg1) {\n\t\t\n\t}", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) \n\t\t{\n\t\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t}", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n }", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "double getLearningRate();", "@Override\r\n\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\t}", "@Override\r\n public final void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n\t\t\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\n\t\t\t}", "public void onAccuracyChanged(int sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n }", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n\t}", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}" ]
[ "0.8018519", "0.78133976", "0.754653", "0.74311167", "0.73813146", "0.7238109", "0.71904683", "0.7083658", "0.6995713", "0.68065107", "0.6717295", "0.658135", "0.65072036", "0.6504523", "0.6416764", "0.6408064", "0.6284413", "0.6284221", "0.6281203", "0.624441", "0.61785567", "0.6162747", "0.6152289", "0.61279655", "0.6084588", "0.6083907", "0.6080773", "0.6074839", "0.6074839", "0.6074839", "0.6074839", "0.60667104", "0.60437465", "0.6023183", "0.60214937", "0.60188246", "0.6010999", "0.6002219", "0.60008097", "0.5990835", "0.5990835", "0.59891534", "0.59890276", "0.59829", "0.5976434", "0.5972803", "0.5961182", "0.5961182", "0.59593487", "0.59586954", "0.59577787", "0.595277", "0.595277", "0.5932603", "0.59173954", "0.5915156", "0.59074074", "0.5905941", "0.5905941", "0.5905941", "0.5902452", "0.5898813", "0.58931077", "0.58889014", "0.5886076", "0.5883632", "0.5883632", "0.5883632", "0.5883632", "0.5883632", "0.5883632", "0.5883632", "0.5883632", "0.5882264", "0.58789027", "0.58789027", "0.58726215", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5872376", "0.5871157", "0.5869695", "0.5869695", "0.5869529", "0.5866486", "0.5866423", "0.58630955", "0.58620185", "0.5861331", "0.58513" ]
0.0
-1
Function that perform single point crossover
public static void crossover(Individual[] parent) { Individual[] children = new Individual[POP_SIZE]; for (int i = 0; i < POP_SIZE; i += 2) { Individual child1 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN); child1.generateRulebase(); Individual child2 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN); child2.generateRulebase(); int crossOverPoint = new Random().nextInt(GENE_SIZE); for (int j = 0; j < crossOverPoint; j++) { child1.gene[j] = parent[i].gene[j]; child2.gene[j] = parent[i + 1].gene[j]; } for (int j = crossOverPoint; j < GENE_SIZE; j++) { child1.gene[j] = parent[i + 1].gene[j]; child2.gene[j] = parent[i].gene[j]; } child1.generateRulebase(); child2.generateRulebase(); children[i] = new Individual(child1); children[i + 1] = new Individual(child2); } matingPool = Arrays.copyOf(children, parent.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OnePointCrossoverOne(Population p) {\n\t\tdoCrossover(p);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void crossover() {\r\n\t\tfinal double CROSSOVER_PROB = 0.5;\r\n\t\tfor (int i=0; i<this.nChromosomes-(this.nChromosomes%2); i=i+2) {\r\n\t\t\tif (Math.random() < CROSSOVER_PROB) {\r\n\t\t\t\tArrayList<Integer> chr1 = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\t\tArrayList<Integer> chr2 = (ArrayList<Integer>) this.chromosomes.get(i+1);\r\n\t\t\t\t// Uniform crossover\r\n\t\t\t\tif (!chr1.equals(chr2)) {\r\n\t\t\t\t\tfor (int j=0; j<this.nViaPoints; j=j+2) {\r\n\t\t\t\t\t\t// swap via points between 2 chromosomes\r\n\t\t\t\t\t\tInteger tmp = chr2.get(j);\r\n\t\t\t\t\t\tchr2.remove(j);\r\n\t\t\t\t\t\tchr2.add(j, chr1.get(j));\r\n\t\t\t\t\t\tchr1.remove(j);\r\n\t\t\t\t\t\tchr1.add(j, tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.printChromosomes(\"After crossover\");\r\n\t}", "public abstract Individual doCrossover(Individual ind1, Individual ind2, MOEAD init);", "public Population doCrossover(Population p) {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"Performing 1 point crossover for config1's selection population.\");\n\t\tSystem.out.println(\"Selecting bits to crossover.\");\n\t\tSystem.out.println(\"Completed.\");\n\t\treturn p;\n\t }", "public void origCrossover() {\n\n ArrayList<Integer> crossPoints;\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n // Choose random crossover points within the chromosome\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n crossPoints = new ArrayList<Integer>();\n for (int i = 0; i < Defines.crossoverPoints; i++) {\n crossPoints.add(Defines.randNum(0, Defines.chromosomeSize - 1));\n }\n } else {\n // Parents are used without crossover - no crossover points; \n crossPoints = null;\n }\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspring(this.parents, crossPoints)));\n }", "abstract int[] crossOver();", "public int getCrossoverPoints() {\n\t\treturn 1;\r\n\t}", "public void crossoverOX() {\n\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n ArrayList<Integer> crossPoints = getCrossoverPoints(Defines.cpMode);\n\n Collections.sort(crossPoints);\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspringOX(this.parents, crossPoints)));\n\n }", "public Chromosome crossover(Chromosome firstParent, Chromosome secondParent);", "public void MultipointCrossoverCAN (TableVar Variables) {\r\n int i, mom, dad, xpoint1, xpoint2;\r\n \r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n \r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n Des.setCromElem (0, i, Inter.getCromElem(mom,i));\r\n Des.setCromElem (1, i, Inter.getCromElem(dad,i));\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n Des.setCromElem(mom, i, Inter.getCromElem(dad,i));\r\n Des.setCromElem(dad, i, Inter.getCromElem(mom,i));\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n \r\n }", "public void crossover() {\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n this.crossoverOX();\n } else {\n // randomly select one of the parents to copy without crossover\n int idx = Defines.randNum(0, this.parents.size() - 1);\n Chromosome newChild = this.parents.get(idx);\n this.offspring = new ArrayList<Chromosome>();\n this.offspring.add(newChild);\n }\n }", "public void MultipointCrossoverDNF (TableVar Variables) {\r\n int i, j, mom, dad, xpoint1, xpoint2;\r\n\r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n\r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(0, i, j, Inter.getCromElemGene(mom,i, j));\r\n Des.setCromElemGene (1, i, j, Inter.getCromElemGene(dad,i, j));\r\n }\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(mom, i, j, Inter.getCromElemGene(dad,i,j));\r\n Des.setCromElemGene(dad, i, j, Inter.getCromElemGene(mom,i,j));\r\n }\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n\r\n }", "private int[][] crossoverOnePoint(int[] parent1, int[] parent2) {\n\t\tint crossPoint1 = rand.nextInt(parent1.length);\n\n\t\tint[] child = new int[parent1.length];\n\t\tint[] child2 = new int[parent1.length];\n\t\tfor (int i = 0; i < crossPoint1; i++) {\n\t\t\tchild[i] = parent1[i]; //before cross point = p1\n\t\t\tchild2[i] = parent2[i]; //opposite for child2\n\t\t}\n\n\t\tfor (int i = crossPoint1; i < parent1.length; i++) {\n\t\t\tchild[i] = parent2[i]; //after and including crosspoint = p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child2\n\t\t}\n\t\treturn new int[][] { child, child2 };\n\n\t}", "@Test\n\tpublic void testCrossover() {\n\t\tint pivot = 5;\n\t\tint size = g10.getUnits().size();\n\t\tArrayList<GenomeDouble> expectedWeights1;\n\t\tArrayList<GenomeDouble> expectedWeights2;\n\t\t\n\t\texpectedWeights1 = new ArrayList<GenomeDouble>(g10.getUnits().size());\n\t\texpectedWeights2 = new ArrayList<GenomeDouble>(g10_2.getUnits().size());\n\t\t\n\t\texpectedWeights1.addAll(g10.getUnits().subList(0, pivot));\n\t\texpectedWeights1.addAll(g10_2.getUnits().subList(pivot, size));\n\t\texpectedWeights2.addAll(g10_2.getUnits().subList(0, pivot));\n\t\texpectedWeights2.addAll(g10.getUnits().subList(pivot, size));\n\t\t\n\t\tList<Genome<GenomeDouble>> results = Genome.crossover(g10, g10_2, 0.7, 10);\n\t\tassertEquals(expectedWeights1, results.get(0).getUnits());\n\t\tassertEquals(expectedWeights2, results.get(1).getUnits());\n\t}", "public void crossEdge(Edge e) {}", "Tour crossOver(Tour p2, int x1, int x2) {\r\n\t\t// make an empty tour and then fill it in\r\n\t\tTour child = new Tour();\r\n\r\n\t\t// copy the 1st segment of (this) to the child\r\n\t\tfor (int i = 0; i < x1; i++) {\r\n\t\t child.index[i] = this.index[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = x1; i <= x2; i++) {\r\n\t\t child.index[i] = p2.index[i];\r\n\t\t}\r\n\t\t// copy the cross-over portion of p2 to the child\r\n\t\t\r\n for (int i = x2 + 1; i < index.length; i++) {\r\n child.index[i] = this.index[i];\r\n }\t\t\r\n\t\t// copy the last segment of (this) to the child\r\n\r\n\t\t// Now we need to correct the child for any duplicate cities\r\n\t\t\r\n\t\t// First find out the unique elements of the cross-over segment\r\n\t\t// i.e., those elements of the cross-over segment of\r\n\t\t// p1 that are not in p2\r\n\t\tint[] uniq = new int[x2 - x1 + 1];\r\n\t\tint k = 0;\r\n\t\tboolean found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = x1; j <= x2; j++) {\r\n if (this.index[i] == p2.index[j]) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n uniq[k] = this.index[i];\r\n k++;\r\n }\r\n System.out.println();\r\n\t\t// *** TODO ***\r\n \r\n k--;\r\n found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = 0; j < x1; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n found = true;\r\n break;\r\n }\r\n }\r\n \r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n \r\n for (int j = x2 + 1; j < index.length; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n break;\r\n }\r\n }\r\n }\r\n\t\t// scan the two portions of p1 that have been crossed into the\r\n\t\t// the child for any duplicates in the crossed-over \r\n\t\t// segment and if so replace with an element from the uniq list\r\n\t\t\r\n\t\tchild.distance = child.distance();\r\n\t\treturn child;\r\n\t}", "public Evolvable cross(Evolvable parent1, Evolvable parent2, int crossoverPoint)\n\t{\n\t\tif(((SNSAgent)parent1).getBehavior().equals(\"RuleBased\"))\n\t\t{\t\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn ruleZipperCross(parent1, parent2);\n\t\t\telse if(crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, crossoverPoint);\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, crossoverPoint);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn zipperCross(parent1, parent2);\n\t\t\t\n\t\t\telse if (crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn splitCross(parent1, parent2, crossoverPoint);\n\t\t\t\n\t\t\telse if (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\treturn splitCross(parent1, parent2, crossoverPoint);\n\t\t\t}\n\t\t\t\n\t\t\telse if(crossBehavior.equals(\"smartCross\")) {\n\t\t\t\tint split = ((SNSAgent)parent1).getCurrentMove() - R.nextInt(30);\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\n\t\treturn zipperCross(parent1, parent2);\n\t}", "private void crossover() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < pop_size; i++) { // go through population\r\n\r\n int a = new Random().nextInt(this.pop_size);\r\n int b = new Random().nextInt(this.pop_size);\r\n\r\n int split_point = new Random().nextInt(this.gene_size);\r\n\r\n float[] p1_genes = this.parent_population.getPopulation()[a].getGenes();\r\n float[] p2_genes = this.parent_population.getPopulation()[b].getGenes();\r\n\r\n float[] c1_genes = new float[gene_size];\r\n float[] c2_genes = new float[gene_size];\r\n\r\n for (int j = 0; j < gene_size; j++) {\r\n\r\n if (j < split_point) {\r\n c1_genes[j] = p1_genes[j];\r\n c2_genes[j] = p2_genes[j];\r\n } else {\r\n c2_genes[j] = p1_genes[j];\r\n c1_genes[j] = p2_genes[j];\r\n }\r\n }\r\n individual child1 = new individual(c1_genes, solutions, output);\r\n individual child2 = new individual(c2_genes, solutions, output);\r\n\r\n if (child1.getFitness() > child2.getFitness()) {\r\n temp_pop[i] = child1;\r\n } else {\r\n temp_pop[i] = child2;\r\n }\r\n }\r\n this.offspring_population.setPopulation(temp_pop);\r\n this.offspring_population.update_population();\r\n }", "private double cross(Point A, Point B, Point C) {\n\t\tdouble AB_X = B.x - A.x;\n\t\tdouble AB_Y = B.y - A.y;\n\t\tdouble AC_X = C.x - A.x;\n\t\tdouble AC_Y = C.y - A.y;\n\t\tdouble cross = AB_X * AC_Y - AB_Y * AC_X;\n\t\treturn cross;\n\t}", "private int getCrossoverPoint(int mode) {\n int cPoint = 0;\n\n switch (mode) {\n case Defines.CP_PURE_RANDOM:\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n break;\n\n case Defines.CP_NO_BOUNDARY:\n do {\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n } while (cPoint % Defines.GROUP_SIZE == 0 || cPoint % Defines.GROUP_SIZE == 3);\n break;\n }\n\n return cPoint;\n }", "public void crossover(){\n \t\n \t//int cut2 = ((NODELENGTH * 3 + 1) / 3) + cut;\n \tfor (int g = 0; g < (wallpapers.size() - 1); g += 2){\n \t\tint cut = getCutPoint();\n \t\tint[] parent1 = wallpapers.get(g);\n \t\tint[] parent2 = wallpapers.get(g + 1);\n \t\t\n \t\tint[] child1 = new int[parent1.length];\n \t\tint[] child2 = new int[parent2.length];\n \t\tfor (int i = 0; i < (cut); i++){\n \t\t\tchild1[i] = parent1[i];\n \t\t\tchild2[i] = parent2[i];\n \t\t}\n \t\tfor (int j = cut; j < parent1.length; j++){\n \t\t\tchild1[j] = parent2[j];\n \t\t\tchild2[j] = parent1[j];\n \t\t}\n \t\t\n \t\t\n \t\twallpapers.set(g, child1);\n \t\twallpapers.set(g + 1, child2);\n \t}\n \tfor (int d = 0; d < (wallpapers.size() * 2); d++){\n \t\tif (d < wallpapers.size()){\n \t\t\ttemp_wallpapers.add(wallpapers.get(d));\n \t\t}\n \t\telse {\n \t\t\ttemp_wallpapers.add(node());\n \t\t}\n \t}\n \twallpapers.clear();\n \tfor (int u = 0; u < temp_wallpapers.size(); u++){\n\t\t\twallpapers.add(u, temp_wallpapers.get(u));\n\t\t}\n \ttemp_wallpapers.clear();\n }", "public List<Individual> crossover2Point2(Individual parent1, Individual parent2) {\n List <Individual> listOffsprings = new ArrayList<Individual>();\n Individual offspring1 = new Individual(parent1.getChromosomeLength());\n Individual offspring2 = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength() - 1);\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }\n }\n listOffsprings.add(offspring1);\n listOffsprings.add(offspring2);\n return listOffsprings;\n }", "IVec3 cross(IVec3 v);", "static double cross(Vec a, Vec b) {\n return a.x * b.y - a.y * b.x;\n }", "public void crossInto(final WB_Point3d p, final WB_Normal3d result) {\r\n\t\tresult.x = y * p.z - z * p.y;\r\n\t\tresult.y = z * p.x - x * p.z;\r\n\t\tresult.z = x * p.y - y * p.x;\r\n\t}", "public Individual crossover1Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint = Service.rand(0, parent1.getChromosomeLength());\n for (int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n // Use half of parent1's genes and half of parent2's genes\n if (crossoverPoint > geneIndex) {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n }\n }\n return offspring;\n }", "public Individual crossover2Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength());\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }\n }\n return offspring;\n }", "private int[][] crossoverTwoPoint(int[] parent1, int[] parent2) {\n\t\tint crossPoint1 = rand.nextInt(parent1.length);\n\t\tint crossLength = rand.nextInt(parent1.length + 1 - crossPoint1);\n\t\tint crossPoint2 = crossPoint1 + crossLength;\n\n\t\tint[] child = new int[parent1.length];\n\t\tint[] child2 = new int[parent1.length];\n\t\tfor (int i = crossPoint1; i < crossPoint2; i++) {\n\t\t\tchild[i] = parent1[i]; //items between cross points are direct copied from p1\n\t\t\tchild2[i] = parent2[i]; //opposite for child 2\n\t\t}\n\t\tfor (int i = 0; i < crossPoint1; i++) {\n\t\t\tchild[i] = parent2[i]; //items on either side copied direct from p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child 2\n\t\t}\n\t\tfor (int i = crossPoint2; i < parent1.length; i++) {\n\t\t\tchild[i] = parent2[i]; //items on either side copied direct from p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child 2\n\t\t}\n\t\treturn new int[][] { child, child2 };\n\t}", "public static double getCrossoverProbability() { return crossoverProbability; }", "public abstract void crossoverWith(LevelRepresentation levelRepresentation);", "public void cross(vec3 a, vec3 b) {\r\n\t\tx = a.y * b.z - a.z * b.y;\r\n\t\ty = a.z * b.x - a.x * b.z;\r\n\t\tz = a.x * b.y - a.y * b.x;\r\n\t}", "public void setCrossoverMethod(Crossover c){\n crossType = c;\n }", "public Point3D cross(Point3D p) {\n\t\treturn new Point3D(\n\t\t\t\tthis.y*p.z - this.z*p.y, \n\t\t\t\tthis.z*p.x - this.x*p.z, \n\t\t\t\tthis.x*p.y - this.y*p.x);\n\t}", "public MidiIndividual crossover(MidiIndividual that)\r\n\t{\n\t\tassert this.size() == that.size();\r\n\r\n\t\tVector<MidiIndividualTrack> newIndividualTracks = \r\n\t\t\tnew Vector<MidiIndividualTrack>();\r\n\r\n\t\tfor (int i = 0; i < midiIndividualTracks.size(); i++)\r\n\t\t{\r\n\t\t\tMidiIndividualTrack newIndv = \r\n\t\t\t\tthis.getIndividualTrack(i).crossover(that.getIndividualTrack(i));\r\n\t\t\tnewIndividualTracks.add(newIndv);\r\n\t\t}\r\n\r\n\t\treturn new MidiIndividual(newIndividualTracks);\r\n\t}", "public boolean cross(Edge edge) {\n Vector3f P1 = this.getOrigin(), P2 = edge.getOrigin();\n Vector3f u = this.getDirection();\n Vector3f v = edge.getDirection();\n float t2 = (u.x * (P2.y - P1.y) - u.y * (P2.x - P1.x)) / (u.y * v.x - u.x * v.y);\n float t1 = (P2.x - P1.x + v.x * t2) / u.x;\n Vector3f p1 = P1.add(u.mult(t1));\n Vector3f p2 = P2.add(v.mult(t2));\n\n if (p1.distance(p2) <= FastMath.FLT_EPSILON) {\n // the lines cross, check if p1 and p2 are within the edges\n Vector3f p = p1.subtract(P1);\n float cos = p.dot(u) / (p.length() * u.length());\n if (cos > 0 && p.length() <= u.length()) {\n // p1 is inside the first edge, lets check the other edge now\n p = p2.subtract(P2);\n cos = p.dot(v) / (p.length() * v.length());\n return cos > 0 && p.length() <= u.length();\n }\n }\n return false;\n }", "private Vector crossover(Individual mother, Individual father) {\n \n //don't want to do crossover on two chromosomes that are equal\n if(mother.equals(father)) {\n Vector to_return = new Vector();\n to_return.add(mother);\n to_return.add(father);\n return to_return;\n }\n \n println(\"crossover\", 1);\n int[] mom = mother.getChromosome();\n int[] dad = father.getChromosome();\n int[] child1 = new int[num_shipping_points]; \n int[] child2 = new int[num_shipping_points]; \n \n println(\"mother is\", 1);\n displayChromosome(mother, 1);\n println(\"father is\", 1);\n displayChromosome(father, 1);\n \n int breakpoint = (int)(Math.random() * num_shipping_points) + 3;\n println(\"breakpoint = \" + breakpoint, 1);\n \n int comparisons = 0;\n \n for(int i = 0; i < num_shipping_points; i++) {\n if(i < breakpoint) {\n child1[i] = mom[i];\n child2[i] = dad[i];\n }\n else {\n child1[i] = -1;\n child2[i] = -1;\n }\n } \n \n int j = breakpoint; //index on other chromosome\n\n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child2, mom[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n \n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint) //not supposed to happen, but it does\n break;\n }\n child2[i] = mom[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n\n }\n \n j = breakpoint;\n comparisons = 0; \n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child1, dad[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint)\n break;\n }\n child1[i] = dad[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n }\n \n Vector v = new Vector();\n Individual i1 = new Individual(child1, this);\n Individual i2 = new Individual(child2, this);\n //i1.setFitness(evaluateFitness(i1));\n //i2.setFitness(evaluateFitness(i1));\n v.add(i1);\n v.add(i2);\n println(\"kid1:\",1);\n displayChromosome(i1, 1);\n println(\"kid2:\", 1);\n displayChromosome(i2, 1);\n println(\"returning from crossover\",1);\n return v;\n }", "private static double crossProduct(Point2D a, Point2D b) {\r\n return a.getX() * b.getY() - b.getX() * a.getY();\r\n }", "public static void setCrossoverProbability(double value) { crossoverProbability = value; }", "public Point3D crossProduct(Point3D b) {\n\t\tPoint3D copy = new Point3D(this);\n\t\tPoint3D bCopy = new Point3D(b);\n\t\tcopy.homogenize();\n\t\tbCopy.homogenize();\n\n\t\tPoint3D dest = new Point3D(0, 0, 0);\n\t\tdest.x = copy.y * bCopy.z - copy.z * bCopy.y;\n\t\tdest.y = copy.z * bCopy.x - copy.x * bCopy.z;\n\t\tdest.z = copy.x * bCopy.y - copy.y * bCopy.x;\n\t\treturn dest;\n\t}", "public static Data crossover(Data d1, Data d2, int x) {\n try {\n if (d1.numberOfBytes() != d2.numberOfBytes())\n throw new Exception(\"Data crossover is impossible between two Data objects having different byte length\");\n if (x < 0 || x > d1.numberOfBits())\n throw new Exception(\"Pivot point in crossover is out of bounds (0<=\" + x + \"<\" + d1.numberOfBits() + \")\");\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n int bitx = x % 8;\n int bytex = x / 8;\n int n = d1.numberOfBytes();\n int m = d1.numberOfBits();\n\n ArrayList<Object> bytelist = new ArrayList<Object>(n);\n for (int i = 0; i < bytex; i++) bytelist.add(d1.getByte(i));\n int b1 = 0;\n for (int k = 0; k < bitx; k++) b1 = b1 + (1 << (7 - k));\n int b2 = 0;\n for (int k = bitx; k < 8; k++) b2 = b2 + (1 << (7 - k));\n int middle = (b1 & d1.getByte(bytex)) + (b2 & d2.getByte(bytex));\n byte bmiddle = (byte) middle;\n bytelist.add(bmiddle);\n for (int i = bytex + 1; i < n; i++) bytelist.add(d2.getByte(i));\n\n return new Data(bytelist);\n }", "private Evolvable cross(Evolvable parent1, Evolvable parent2)\n\t{\n\t\tif(((SNSAgent)parent1).getBehavior().equals(\"RuleBased\"))\n\t\t{\t\n\t\t\tint split = R.nextInt(7) + 1;\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn ruleZipperCross(parent1, parent2);\n\t\t\telse if(crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, split);\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, split);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint split = R.nextInt(1000) + 100;\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn zipperCross(parent1, parent2);\n\t\t\telse if (crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\telse if (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\treturn splitCross(parent1, parent2, R.nextInt(3000));\n\t\t\t}\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t{\n\t\t\t\tsplit = ((SNSAgent)parent1).getCurrentMove() - R.nextInt(30);\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\n\t\treturn zipperCross(parent1, parent2);\n\t}", "protected TimeInstant findCrossoverTime(TimeInstant t1, double y1, TimeInstant t2, double y2) {\n return t1.add( -y1 * ( t2.subtract(t1).doubleValue() ) / ( (double) (y2 - y1) ) );\n }", "public static int cross(Point a, Point b, Point c) {\n return (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y);\n }", "public static Tour[] partiallyMatchedCrossover(Tour parent1, Tour parent2){\n Tour child1 = new Tour(false);\n child1.getTour().addAll(parent1.getTour());\n // Remove the end city in the cycle\n child1.getTour().remove(child1.getLength()-1);\n // Start with the parent genotypes\n Tour child2 = new Tour(false);\n child2.getTour().addAll(parent2.getTour());\n child2.getTour().remove(child2.getLength()-1);\n // Return the parents unchanged as offspring if crossover rate not met or clones\n if((parent1 == parent2) || Math.random() > RunGA.crossoverRate){\n return new Tour[]{parent1, parent2};\n } else{\n int start = (int)(Math.random()*child1.getLength());\n int end = (int)(Math.random()*child1.getLength());\n if(start > end){\n int temp = start;\n start = end;\n end = temp;\n }\n // Swap the cities between the start and end indeces to the corresponding indeces in other parent\n for(int i=start; i<=end; i++){\n // Find index of the each city to be swapped in the genotype\n int swapIndex1 = child1.getTour().indexOf(parent2.getTour().get(i));\n int swapIndex2 = child2.getTour().indexOf(parent1.getTour().get(i));\n City temp1 = child1.getTour().get(i);\n City temp2 = child2.getTour().get(i);\n child1.getTour().set(i, parent2.getTour().get(i));\n child2.getTour().set(i, parent1.getTour().get(i));\n child1.getTour().set(swapIndex1, temp1);\n child2.getTour().set(swapIndex2, temp2);\n }\n // Reform cycle\n child1.getTour().add(child1.getTour().get(0));\n child2.getTour().add(child2.getTour().get(0));\n }\n Tour[] children = new Tour[]{child1, child2};\n return children;\n }", "private void crossover(Chromosome c1, Chromosome c2){\n int split = (int)(Math.random()*c1.getNumWeights());\n \n double[][] m1 = c1.getGeneData();\n double[][] m2 = c2.getGeneData();\n double store;\n \n //Begin the switch\n for(int r=0; r<m1.length; r++){\n //Stop spliting\n if(split <= 0){\n break;\n }\n for(int c=0; c<m1[r].length;c++){\n store = m1[r][c];\n m1[r][c] = m2[r][c];\n m2[r][c] = store;\n split--;\n //Stop spliting\n if(split <= 0){\n break;\n }\n }\n }\n }", "public boolean isCrossable(int x, int y) {\n\t\treturn g[x][y].isCrossable();\n\t}", "public vec3 cross(vec3 arg) {\r\n\t\tvec3 tmp = new vec3();\r\n\t\ttmp.cross(this, arg);\r\n\t\treturn tmp;\r\n\t}", "public static Double[] crossover(Double[] g1, Double[] g2){\n\t\tRandom random = new Random();\n\t\tint start = random.nextInt(variableNum-1);\n\t\tint end = start + 1 + random.nextInt(variableNum-start);\n\t\t//which one is better, why\n//\t\tfor(int i = start; i < end; i++) g1[i] = g2[i] + Math.random()*(g1[i]-g2[i]);\n//\t\tfor(int i = start; i < end; i++) g1[i] = g2[i];\n\t\tfor(int i = start; i < end; i++) {\n\t\t\tg1[i] = g2[i] + (Math.random()*2-1)*(g1[i]-g2[i]);\n\t\t\tif(g1[i] > maxValue) g1[i] = maxValue;\n\t\t\tif(g1[i] < minValue) g1[i] = minValue;\n\t\t}\n\t\treturn Arrays.copyOf(g1, g1.length);\n\t}", "public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;", "public Individe crossoveri(Individe individe1, Individe individe2) {\n Individe rez = new Individe(pikatEVeturave.length, pikat);\r\n\r\n for (int i = 0; i < pikatEVeturave.length; i++) {\r\n int select = (int) (Math.random() * 2);//zgjedh prej cilit individe mi marr qit veture\r\n if (select == 0) {\r\n rez.pikatEVeturave[i] = (ArrayList<Point>) individe1.pikatEVeturave[i].clone();//clone se dilke ni problem en lidhje me referencat\r\n } else {\r\n rez.pikatEVeturave[i] = (ArrayList<Point>) individe2.pikatEVeturave[i].clone();\r\n }\r\n }\r\n\r\n rez = normalizimi(rez);//duhet mi normalizu individin dmth mi hek pozitat(qytetet) e dyfishta edhe mi shtu pika(qytetet) qe jane mongu\r\n\r\n return rez;\r\n }", "private float crossProduct(Vec2 X, Vec2 Y, Vec2 Z)\n {\n float x1 = Z.x - X.x;\n float y1 = Z.y - X.y;\n float x2 = Y.x - X.x;\n float y2 = Y.y - X.y;\n\n return x1*y2 - x2*y1;\n }", "public Population crossoverPopulation(Population population, List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n Individual queen = population.getFittest(0);\n // Loop over current population by fitness\n for (int dronesIndex = 1; dronesIndex < (numberDrones + 1); dronesIndex++) {\n Individual husband = population.getFittest(dronesIndex);\n\n // Apply crossover to this individual?\n if (this.crossoverRate > Math.random()) {\n // Initialize offspring\n Individual offspring = new Individual(husband.getChromosomeLength());\n\n offspring = crossover2Point(husband, queen);\n\n if(husband.getFitness() <= calcFitness(offspring, fogDevices, cloudletList)\n && !doesPopupationIncludeIndividual(population, offspring)) {\n population.getPopulation().remove(husband);\n population.getPopulation().add(offspring);\n }\n }\n }\n return population;\n }", "public void\n\tcrossProduct( Vector3 other )\n\t{\n\t\tdouble x;\n\t\tdouble y;\n\n\t\tx = ( data[1] * other.data[2] ) - ( data[2] * other.data[1] );\n\t\ty = ( data[2] * other.data[0] ) - ( data[0] * other.data[2] );\n\t\tdata[2] = ( data[0] * other.data[1] ) - ( data[1] * other.data[0] );\n\t\tdata[0] = x;\n\t\tdata[1] = y;\n\t}", "public double cross(Vector2D v)\n\t{\n\t\treturn this.x * v.y - this.y * v.x;\n\t}", "@Override\n\tpublic Tour crossover(Tour parent1, Tour parent2) {\n\t\tTour child = new Tour(parent1.getSize());\n\t\t\n\t\t// Select a parent randomly\n\t\tdouble randomNum = Math.random();\n\t\tTour parent = randomNum > 0.5 ? parent1 : parent2;\n\t\t\n\t\t// Add cities from parent to the child\n\t\tfor (int i=0; i<child.getSize(); i++) {\n\t\t\tchild.setCity(i, parent.getCity(i));\t\t\n\t\t}\n\t\t\n\t\treturn child;\n\t\t\n\t}", "public Point3D getCrossPointWithLine(Line3D l)\r\n\t{\n\t\treturn null;\r\n\t}", "public Vector3 cross(Vector3 other) {\n\t\tdouble resultX = y * other.z - z * other.y;\n\t\tdouble resultY = z * other.x - x * other.z;\n\t\tdouble resultZ = x * other.y - y * other.x;\t\t\n\t\treturn new Vector3(resultX, resultY, resultZ);\n\t}", "@Override\n protected void moveOver(){\n incrementXPos(getWidth()/2);\n if(pointUp){\n incrementYPos(-1*getHeight());\n } else {\n incrementYPos(getHeight());\n }\n incrementCol();\n setPointDirection();\n }", "public abstract void mover(Vector2 direccion);", "public void rollover(){\n\t\tgui.fill(gui.color(255,0,0),75);\n\t\tgui.noStroke();\n\t\tgui.ellipse(getTransformedPosition().x, getTransformedPosition().y, diameter +4, diameter + 4);\n\t}", "public void doMutation(double probability, Solution offsbring) throws JMException {\r\n\t\r\n\t\r\n\t\t \r\n\t\t try {\r\n\t\t \t//System.out.println(offsbring.get);\r\n\t\t int chrmosomesize= offsbring.getCompositionService().size();\r\n\t\t //int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t if (random<probability){\r\n\t\t \t System.out.println(\" classs \"+offsbring.getCompositionService().get(random).getServiceClass());//getSeviceClass();\r\n\t\t\t \r\n\t\t \t String Sclass=(String) offsbring.getCompositionService().get(random).getServiceClass();//getSeviceClass();\r\n\t\t \r\n\t\t for (int i=0; i<z.ServicePool.size();i++){\r\n\t// if (z.ServicePool.get(i).getServiceFunctionality().equalsIgnoreCase(Sclass))\r\n\t\t \t if (z.ServicePool.get(i).getServiceClass().equalsIgnoreCase(Sclass))\r\n\t\t\tRequiredClass.add(z.ServicePool.get(i));\r\n\t\t }\r\n\t\t // z.ServicePool.get(9).\r\n\t\tint random2 = (PseudoRandom.randInt())%(RequiredClass.size());\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\r\n\t\t \t\t\r\n\t\t\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\t\t \t \r\n\t\t \r\n\t\t }\r\n\t\t } catch (ClassCastException e1) {\r\n\t\t Configuration.logger_.severe(\"SinglePointCrossover.doCrossover: Cannot perfom \" +\r\n\t\t \"SinglePointCrossover\");\r\n\t\t Class cls = java.lang.String.class;\r\n\t\t String name = cls.getName();\r\n\t\t throw new JMException(\"Exception in \" + name + \".doCrossover()\");\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t }", "int apply(int x, int y, int origin);", "public EdgeCrosser(S2Point a, S2Point b, S2Point c) {\n this(a, b);\n restartAt(c);\n }", "private void mate(NeuralPlayer org1, NeuralPlayer org2, NeuralPlayer offspring)\n\t{\n\t\tBasicNetwork newGuy = (BasicNetwork)org1.net.clone();\n\t\tRandom g = new Random();\n\t\tdouble[] genome1 = NetworkCODEC.networkToArray(org1.net);\n\t\tdouble[] genome2 = NetworkCODEC.networkToArray(org2.net);\n\t\t\n\t\tint numCrosses = 1;//g.nextInt(20)+2;//g.nextInt(genome1.length/4)+1;\n\t\tfor (int j = 0; j< numCrosses; j++)\n\t\t{\n\t\t\tint crossIndex = g.nextInt(genome1.length);\n\t\t\t//int crossLength = g.nextInt(genome1.length)+1;//g.nextInt(50);\n\t\t\t//int stop = Math.min(crossIndex+crossLength,genome1.length);\n\t\t\tfor (int i = crossIndex; i<genome1.length; i++)\n\t\t\t\tgenome2[i] = genome1[i]; // 1 point crossover\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome2, newGuy);\n\t\toffspring.net = newGuy;\n\t}", "public Vec4 cross(final Vec4 o) {\n expectDirection();\n o.expectDirection();\n return new Vec4(\n y * o.z - z * o.y,\n z * o.x - x * o.z,\n x * o.y - y * o.x,\n 0);\n }", "public abstract boolean mouseOver( int x, int y );", "public void rollover(float px, float py) {\n float d = dist(px, py, x, y);\n if (d < diameter/2) {\n over = true;\n } else {\n over = false;\n }\n }", "private Evolvable zipperCross(Evolvable parent1, Evolvable parent2)\n\t{\n\t\tint[] dnaP1 = ((SNSAgent)parent1).getDna();\n\t\t//dna of second parent\n\t\tint[] dnaP2 = ((SNSAgent)parent2).getDna();\n\t\t\n\t\t//result dna\n\t\tint dnaChild[] = new int[3000];\n\t\t//simple cross\n\t\tfor(int i = 0; i < 3000; i++)\n\t\t{\t\t\n\t\t\tif(i%2 == 0)\n\t\t\t\tdnaChild[i] = dnaP1[i];\n\t\t\telse\n\t\t\t\tdnaChild[i] = dnaP2[i];\n\t\t}\n\t\treturn new SNSAgent(dnaChild, ((SNSAgent)parent1).behavior);\t\n\t}", "private Individual[] crossOver(Individual father, Individual mother){\n\t\tIndividual[] children = problem.makeChild(mother, father);\r\n\t\treturn children;\r\n\t}", "private void hover(GridPoint pt){\n\t\t// if too far away, move back to point\n\t\tif(grid.getDistance(grid.getLocation(this), pt) > 10) {\n\t\t\tmoveTowards(pt, 2);\n\t\t}\n\t\t// otherwise hover randomly\n\t\telse{\n\t\t\tmoveAmount(RandomHelper.nextIntFromTo(-1, 1),\n\t\t\t\t\t RandomHelper.nextIntFromTo(-1,1));\n\t\t}\n\t}", "public Vector cross(Vector other){\n\t\treturn new Vector(\n\t\t\t\ty*other.z - z*other.y,\n\t\t\t\tz*other.x - x*other.z,\n\t\t\t\tx*other.y - y*other.x\n\t\t\t\t);\n\t}", "public List<Chromosome> doCrossover(Chromosome other, String crossoverType){\n int geneSize = this.knapsackSelection.size();\n\n ArrayList<Chromosome> children = new ArrayList<>();\n\n //Allow for multiple crossover attempts to better the chance of a valid crossover.\n //Note that this can be disabled by setting GAConfiguration.CONCEPTION_ATTEMPTS = 1.\n for(int i = 0; i < PopulationConfiguration.CONCEPTION_ATTEMPTS; i++){\n\n //Set first crossover point to 0 if 1PX Crossover.\n int crossPoint1 = crossoverType.equals(\"1PX\") ? 0 : Configuration.RANDOM_GENERATOR.nextInt(geneSize);\n int crossPoint2 = Configuration.RANDOM_GENERATOR.nextInt(geneSize - crossPoint1) + crossPoint1;\n\n ArrayList<Boolean> c1 = new ArrayList<>();\n ArrayList<Boolean> c2 = new ArrayList<>();\n\n c1.addAll(this.knapsackSelection.subList(0, crossPoint1));\n c1.addAll(other.getKnapsackSelection().subList(crossPoint1, crossPoint2));\n c1.addAll(this.knapsackSelection.subList(crossPoint2, geneSize));\n Chromosome child1 = new Chromosome(c1).withFitnessCalculated();\n\n c2.addAll(other.getKnapsackSelection().subList(0, crossPoint1));\n c2.addAll(this.knapsackSelection.subList(crossPoint1, crossPoint2));\n c2.addAll(other.getKnapsackSelection().subList(crossPoint2, geneSize));\n Chromosome child2 = new Chromosome(c2).withFitnessCalculated();\n \n if(child1.isValid() && children.size() < 2){\n children.add(child1);\n }\n if(child2.isValid() && children.size() < 2){\n children.add(child2);\n }\n if(children.size() == 2){\n break;\n }\n }\n //If the crossover failed to generate a valid child, return the parents.\n if(children.size() == 0){\n children.add(other);\n children.add(this);\n }\n else if(children.size() == 1){\n children.add(this);\n }\n return children;\n }", "private int robustCrossingInternal(S2Point d) {\n int result = robustCrossingInternal2(d);\n this.c = d;\n this.acb = -bdaReturn;\n return result;\n }", "@SuppressWarnings({ \"unchecked\", \"deprecation\" })\n\tprivate static NeuralNetwork crossover(NeuralNetwork cross, NeuralNetwork over, Singleton s1) throws IOException, ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {\n\t\tEvolveSingleton s = (EvolveSingleton) s1;\n\t\t//determines which of the two networks was more fit and less fit\n\t\tClass<? extends NeuralNetwork> networkClass = (Class<? extends NeuralNetwork>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Network\");\n\t\tClass<? extends Layer> layerClass = (Class<? extends Layer>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Layer\");\n\t\tClass<? extends Neuron> neuronClass = (Class<? extends Neuron>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Neuron\");\n\t\tNeuralNetwork newnn = null;\n\t\tNeuralNetwork lessfit = null;\n\t\tNeuralNetwork morefit = null;\n\t\tif (cross.getFitness() > over.getFitness()){\n\t\t\tmorefit = cross;\n\t\t\tlessfit = over;\n\t\t}\n\t\telse{\n\t\t\tmorefit = over;\n\t\t\tlessfit = cross;\n\t\t}\n\t\t//creates the structure for the new network\n\t\tLayer[] puts = NetworkCreator.creator(s);\n\t\tClass<?>[] types2 = {Class.forName(\"BackEvolution.Layer\"),Class.forName(\"BackEvolution.Layer\")};\n\t\tConstructor<? extends NeuralNetwork> con2 = networkClass.getConstructor(types2);\n\t\tClass<? extends SpecialCreator> managerClass = (Class<? extends SpecialCreator>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Creator\");\n\t\tSpecialCreator manager = managerClass.newInstance();\n\t\tmanager.InputOutputcreator(puts);\n\t\tnewnn = con2.newInstance(puts[0],puts[1]);\n\t\tNetworkCreator.Neuraltracker(newnn);\n\t\t//pretty sure this is obsolete from when i tried to breed different layered networks but not sure if I can delete.\n\t\tArrayList<Layer> lesslayers = lessfit.getLayers();\n\t\tArrayList<Layer> morelayers = morefit.getLayers();\n\t\tint maxlayers = 1;\n\t\tif (lesslayers.size() > morelayers.size()){\n\t\t\tmaxlayers = lesslayers.size();\n\t\t}\n\t\telse { \n\t\t\tmaxlayers = morelayers.size();\n\t\t}\n\t\t//adds the neuron to each layer based on which network had the most neurons in that layer\n\t\tfor (int i = 1; i < maxlayers-1; i++){\n\t\t\tLayer lesslayer = null;\n\t\t\tLayer morelayer = null;\n\t\t\tint lessnum = 0;\n\t\t\tint morenum = 0;\n\t\t\ttry{\n\t\t\tlesslayer = lesslayers.get(i);\n\t\t\tlessnum = lesslayer.getNeurons().size();\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tmorelayer = morelayers.get(i);\n\t\t\t\tmorenum = morelayer.getNeurons().size();\n\t\t\t}\n\t\t\ttry{\n\t\t\tmorelayer = morelayers.get(i);\n\t\t\tmorenum = morelayer.getNeurons().size();\n\t\t\t}\n\t\t\tcatch (Exception e){\n\t\t\t}\n\t\t\tif (morelayer == null) morenum = 0;\n\t\t\telse if (morelayer.isOutput()){\n\t\t\t\tmorenum = 0;\n\t\t\t}\n\t\t\tif (lesslayer == null) lessnum = 0;\n\t\t\telse if (lesslayer.isOutput()){\n\t\t\t\tlessnum = 0;\n\t\t\t}\n\t\t\tClass<?>[] types = {boolean.class,boolean.class};\n\t\t\tConstructor<? extends Layer> con = layerClass.getConstructor(types);\n\t\t\tLayer newl = con.newInstance(false, false);\n\t\t\tnewnn.addLayer(newl);\n\t\t\tnewl.setNumber(newnn.getLayers().size()-1);\n\t\t\tfor (int j = 0; j < morenum || j < lessnum; j++){\n\t\t\t\tNeuron newn = neuronClass.newInstance();\n\t\t\t\tnewl.addNeuron(newn);\n\t\t\t\tnewn.setLayernumber(newl.getNumber());\n\t\t\t\tnewn.setNumber(newl.getNeurons().size()-1);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <=lesslayers.size(); i++){\n\t\t\tLayer l = lesslayers.get(i-1);\n\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\tn.setLayernumber(i);\n\t\t\t\t\n\t\t\t}\n\t\t\tl.setNumber(i);\n\t\t}\n\t\tfor (int i = 1; i <=morelayers.size(); i++){\n\t\t\tLayer l = lesslayers.get(i-1);\n\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\tn.setLayernumber(i);\n\t\t\t\t\n\t\t\t}\n\t\t\tl.setNumber(i);\t\n\t\t}\n\t\t//adds genes to the structure. if the same conection exists in the more fit network, it gets preference over the less fit network. if one or the other does not have this gene at all it gets added. currently more fit is always selected may add random chance that the less fit networks gene is selected.\n\t\t//gets all the data from the more fit layer.\n\t\tArrayList<double[]> geneIdentities = new ArrayList<double[]>();\n\t\tfor(Layer l : morelayers){\t\t\n\t\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\t\tfor(Gene g : n.getGenes()){\n\t\t\t\t\t\tdouble data[] = new double[5];\n\t\t\t\t\t\tdata[0] = l.getNumber();\n\t\t\t\t\t\tdata[1] = n.getNumber();\n\t\t\t\t\t\tdata[2] = g.getConnection().getNumber();\n\t\t\t\t\t\tif (morelayers.get(g.getConnection().getLayernumber()-1).isOutput()) data[3] = maxlayers;\n\t\t\t\t\t\telse data[3] = g.getConnection().getLayernumber();\n\t\t\t\t\t\tdata[4] = g.getWeight();\n\t\t\t\t\t\tgeneIdentities.add(data);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t}\n\t\t//gets all the gene data from the less fit layer.\n\t\tArrayList<double[]> geneIdentities2 = new ArrayList<double[]>();\n\t\tfor(Layer l : lesslayers){\n\t\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\t\tfor(Gene g : n.getGenes()){\n\t\t\t\t\t\tdouble data[] = new double[5];\n\t\t\t\t\t\tdata[0] = l.getNumber();\n\t\t\t\t\t\tdata[1] = n.getNumber();\n\t\t\t\t\t\tdata[2] = g.getConnection().getNumber();\n\t\t\t\t\t\tif (lesslayers.get(g.getConnection().getLayernumber()-1).isOutput()) data[3] = maxlayers;\n\t\t\t\t\t\telse data[3] = g.getConnection().getLayernumber();\n\t\t\t\t\t\tdata[4] = g.getWeight();\n\t\t\t\t\t\tgeneIdentities2.add(data);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\n\t\t}\n\t\t//if two genes connect the same neuron, it averages the weights of them and removes one leaving the other with the average weight\n\t\tfor (double[] nums : geneIdentities){\n\t\t\tfor (int i = 0; i < geneIdentities2.size(); i++){\n\t\t\t\tdouble[] nums2 = geneIdentities2.get(i);\n\t\t\t\tif (nums[0] == nums2[0] && nums[1] == nums2[1] && nums[2] == nums2[2] && nums[3] == nums2[3]){\n\t\t\t\t\tnums[4] = (nums[4] + nums2[4])/2;\n\t\t\t\t\tgeneIdentities2.remove(nums2);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//adds the new genes to the new neural network based on the gene data.\n\t\tfor(double[] nums : geneIdentities){\t\t\n\t\t\tGene newGene = new Gene(newnn.getLayers().get((int) nums[3]-1).getNeurons().get((int) nums[2]-1), nums[4]);\n\t\t\tNeuron newNeuron = newnn.getLayers().get((int) (nums[0]-1)).getNeurons().get((int) nums[1]-1);\n\t\t\tnewNeuron.AddGenes(newGene);\n\t\t\tnewGene.setInput(newNeuron);\t\t\t\n\t\t}\n\t\tfor(double[] nums : geneIdentities2){\t\t\t\n\t\t\tGene newGene = new Gene(newnn.getLayers().get((int) nums[3]-1).getNeurons().get((int) nums[2]-1), nums[4]);\n\t\t\tNeuron newNeuron = newnn.getLayers().get((int) (nums[0]-1)).getNeurons().get((int) nums[1]-1);\n\t\t\tnewNeuron.AddGenes(newGene);\n\t\t\tnewGene.setInput(newNeuron);\n\t\t}\n\t\t//returns mutated bred network\n\t\treturn mutate(newnn,s);\n\t}", "Point clone ();", "public EdgeCrosser(S2Point a, S2Point b) {\n init(a, b);\n }", "public Vector3 cross(Vector3 other) {\n return new Vector3(\n (y * other.z) - (z * other.y),\n (z * other.x) - (x * other.z),\n (x * other.y) - (y * other.x)\n );\n }", "default void process_crosslinks(MutableBeaconState state) {\n state.getPreviousCrosslinks().replaceAll(state.getCurrentCrosslinks().listCopy());\n\n for (EpochNumber epoch : get_previous_epoch(state).iterateTo(get_current_epoch(state).increment())) {\n for (UInt64 offset : UInt64s.iterate(UInt64.ZERO, get_epoch_committee_count(state, epoch))) {\n ShardNumber shard = get_epoch_start_shard(state, epoch)\n .plusModulo(offset, getConstants().getShardCount());\n List<ValidatorIndex> crosslink_committee = get_crosslink_committee(state, epoch, shard);\n Pair<Crosslink, List<ValidatorIndex>> winner =\n get_winning_crosslink_and_attesting_indices(state, epoch, shard);\n Crosslink winning_crosslink = winner.getValue0();\n List<ValidatorIndex> attesting_indices = winner.getValue1();\n if (get_total_balance(state, attesting_indices).times(3)\n .greaterEqual(get_total_balance(state, crosslink_committee).times(2))) {\n state.getCurrentCrosslinks().set(shard, winning_crosslink);\n }\n };\n }\n }", "public static Tree crossover(double[] distribution, Tree[] trees){\n Tree tree1 = chooseRandTree(distribution, trees);\n Tree tree2 = chooseRandTree(distribution, trees);\n if (tree2 == null) System.out.println(\"Null1\");\n while (tree1.equals(tree2)){\n tree2 = chooseRandTree(distribution,trees);\n if (tree2 == null) System.out.println(\"Null2\");\n }\n return reproduce(tree1, tree2);\n \n }", "public boolean isSelfCrossing(int[] x) {\n for(int i = 0; i <= x.length - 1; i ++){\n // Case 1 where arrow i goes across arrow i - 3\n if(i >= 3 && x[i] >= x[i - 2] && x[i - 1] <= x[i - 3]) return true;\n // Case 2 where arrow i goes across arrow i - 4\n if(i >= 4 && x[i] + x[i - 4] >= x[i - 2] && x[i - 1] == x[i - 3]) return true;\n // Case 3 where arrow goes across arrow i - 5\n if(i >= 5 && x[i - 1] + x[i - 5] >= x[i - 3] && x[i] + x[i - 4] >= x[i - 2]\n && x[i - 2] >= x[i - 4] && x[i - 1] <= x[i - 3]) return true;\n }\n return false;\n }", "private static Set<Chromosome> crossoverPopulation(ArrayList<Chromosome> population, int populationSize, int crossoverSize) {\n\n // declare a set of chromosomes which will store all thr chromosomes generated by the crossover operation\n Set<Chromosome> crossoverChromosomes = new HashSet<>();\n\n while (crossoverChromosomes.size() < crossoverSize) {\n // retrieve a set of chromosomes (of size 2) on which crossover will occur\n // using the Rank-Based Roulette Wheel Selection method\n Set<Chromosome> selectedChromosomes = rankBasedRouletteWheelSelection(population, populationSize);\n\n // store the 2 Chromosomes in parent 1 and parent 2\n Chromosome parent1 = selectedChromosomes.iterator().next();\n selectedChromosomes.remove(parent1);\n Chromosome parent2 = selectedChromosomes.iterator().next();\n\n // perform crossover using the crossoverChromosomes method\n // the method is called twice, switching the order of the parents for the second time, since SCX produces only\n // one child, however produces a different child when the parents are switched\n crossoverChromosomes.add(crossover(parent1, parent2));\n crossoverChromosomes.add(crossover(parent2, parent1));\n }\n\n return crossoverChromosomes;\n }", "public SmoothLine(Point2D[] points){ \n this.points = points; \n }", "public int nMeanCrossover(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.meanCrossover;\n }", "public static Tree reproduce(Tree tree1, Tree tree2){\n Tree tree1Copy = tree1.treeCopy();\n if (tree2 == null) System.out.println(\"know\");\n if (tree1 == null) System.out.println(\"know\");\n Tree tree2Copy = tree2.treeCopy();\n //select tree1 one crossover point\n //select terminal node as crossover with 10 percent probability. o\\w pick function\n \n Node tree1Cross;\n tree1Cross = getCrossType(tree1Copy);\n //select tree2 crossover points\n \n Node tree2Cross;\n tree2Cross = getCrossType(tree2Copy);\n \n tree1Cross.setData(tree2Cross.getData());\n tree1Cross.setLeft(tree2Cross.getLeft());\n tree1Cross.setRight(tree2Cross.getRight());\n return tree1Copy;\n \n \n }", "public ArrayList<Point> getAdjacentLoosePoints(Point p, Set<Point> loose) {\n \tArrayList<Point> points = new ArrayList<Point>();\n \t\n \t// check point directly to the left\n \tif (p.getX() + 1 < width) {\n \t\tPoint possible = new Point((int) p.getX() + 1, (int) p.getY());\n \t\tif (loose.contains(possible)) {\n \t\t\tpoints.add(possible);\n \t\t}\n \t}\n \t//check point directly to the right\n \tif (p.getX() - 1 > 0) {\n \t\tPoint possible = new Point((int) p.getX() - 1, (int) p.getY());\n \t\tif (loose.contains(possible)) {\n \t\t\tpoints.add(possible);\n \t\t}\n \t}\n \t//check point directly above\n \tif (p.getY() + 1 < height) {\n \t\tPoint possible = new Point((int) p.getX(), (int) p.getY() + 1);\n \t\tif (loose.contains(possible)) {\n \t\t\tpoints.add(possible);\n \t\t}\n \t}\n \t//check point directly above\n \tif (p.getY() - 1 > 0) {\n \t\tPoint possible = new Point((int) p.getX(), (int) p.getY() - 1);\n \t\tif (loose.contains(possible)) {\n \t\t\tpoints.add(possible);\n \t\t}\n \t}\n \treturn points;\n }", "public boolean contains2(Point p) {\n int crossings = 0;\n for (int i = 0; i < N; i++) {\n int j = i + 1;\n boolean cond1 = (a[i].y <= p.y) && (p.y < a[j].y);\n boolean cond2 = (a[j].y <= p.y) && (p.y < a[i].y);\n if (cond1 || cond2) {\n // need to cast to double\n if (p.x < (a[j].x - a[i].x) * (p.y - a[i].y) / (a[j].y - a[i].y) + a[i].x)\n crossings++;\n }\n }\n if (crossings % 2 == 1) return true;\n else return false;\n }", "@Override\n protected final void arrow(final SnipeData v) {\n if (this.point == 1) {\n this.firstPoint[0] = this.getTargetBlock().getX();\n this.firstPoint[1] = this.getTargetBlock().getZ();\n this.firstPoint[2] = this.getTargetBlock().getY();\n v.sendMessage(ChatColor.GRAY + \"First point\");\n v.sendMessage(\"X:\" + this.firstPoint[0] + \" Z:\" + this.firstPoint[1] + \" Y:\" + this.firstPoint[2]);\n this.point = 2;\n } else if (this.point == 2) {\n this.secondPoint[0] = this.getTargetBlock().getX();\n this.secondPoint[1] = this.getTargetBlock().getZ();\n this.secondPoint[2] = this.getTargetBlock().getY();\n if ((Math.abs(this.firstPoint[0] - this.secondPoint[0]) * Math.abs(this.firstPoint[1] - this.secondPoint[1]) * Math.abs(this.firstPoint[2] - this.secondPoint[2])) > 5000000) {\n v.sendMessage(ChatColor.DARK_RED + \"Area selected is too large. (Limit is 5,000,000 blocks)\");\n this.point = 1;\n } else {\n v.sendMessage(ChatColor.GRAY + \"Second point\");\n v.sendMessage(\"X:\" + this.secondPoint[0] + \" Z:\" + this.secondPoint[1] + \" Y:\" + this.secondPoint[2]);\n this.point = 3;\n }\n } else if (this.point == 3) {\n this.pastePoint[0] = this.getTargetBlock().getX();\n this.pastePoint[1] = this.getTargetBlock().getZ();\n this.pastePoint[2] = this.getTargetBlock().getY();\n v.sendMessage(ChatColor.GRAY + \"Paste Reference point\");\n v.sendMessage(\"X:\" + this.pastePoint[0] + \" Z:\" + this.pastePoint[1] + \" Y:\" + this.pastePoint[2]);\n this.point = 1;\n\n this.stencilSave(v);\n }\n }", "public static boolean vertexCrossing(S2Point a, S2Point b, S2Point c, S2Point d) {\n // If A == B or C == D there is no intersection. We need to check this\n // case first in case 3 or more input points are identical.\n if (a.equalsPoint(b) || c.equalsPoint(d)) {\n return false;\n }\n\n // If any other pair of vertices is equal, there is a crossing if and only\n // if orderedCCW() indicates that the edge AB is further CCW around the\n // shared vertex than the edge CD.\n if (a.equalsPoint(d)) {\n return orderedCCW(S2.ortho(a), c, b, a);\n }\n if (b.equalsPoint(c)) {\n return orderedCCW(S2.ortho(b), d, a, b);\n }\n if (a.equalsPoint(c)) {\n return orderedCCW(S2.ortho(a), d, b, a);\n }\n if (b.equalsPoint(d)) {\n return orderedCCW(S2.ortho(b), c, a, b);\n }\n\n // assert (false);\n return false;\n }", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(WaysToCross(10, 0));\r\n\t}", "public void simulatedBinaryCrossover(MersenneTwisterFast random, TraceableFloatVectorIndividual other, float eta_c)\n {\n final double EPS = FloatVectorSpecies.SIMULATED_BINARY_CROSSOVER_EPS;\n FloatVectorSpecies s = (FloatVectorSpecies) species;\n TraceableFloat[] parent1 = genome;\n TraceableFloat[] parent2 = other.genome;\n // double[] min_realvar = s.minGenes;\n // double[] max_realvar = s.maxGenes;\n \n \n double y1, y2, yl, yu;\n double c1, c2;\n double alpha, beta, betaq;\n double rand;\n \n for(int i = 0; i < parent1.length; i++)\n {\n if (random.nextBoolean()) // 0.5f\n {\n if (Math.abs(parent1[i].getValue() - parent2[i].getValue()) > EPS)\n {\n if (parent1[i].getValue() < parent2[i].getValue())\n {\n y1 = parent1[i].getValue();\n y2 = parent2[i].getValue();\n }\n else\n {\n y1 = parent2[i].getValue();\n y2 = parent1[i].getValue();\n }\n yl = s.minGene(i); //min_realvar[i];\n yu = s.maxGene(i); //max_realvar[i]; \n rand = random.nextFloat();\n beta = 1.0 + (2.0*(y1-yl)/(y2-y1));\n alpha = 2.0 - Math.pow(beta,-(eta_c+1.0));\n if (rand <= (1.0/alpha))\n {\n betaq = Math.pow((rand*alpha),(1.0/(eta_c+1.0)));\n }\n else\n {\n betaq = Math.pow((1.0/(2.0 - rand*alpha)),(1.0/(eta_c+1.0)));\n }\n c1 = 0.5*((y1+y2)-betaq*(y2-y1));\n beta = 1.0 + (2.0*(yu-y2)/(y2-y1));\n alpha = 2.0 - Math.pow(beta,-(eta_c+1.0));\n if (rand <= (1.0/alpha))\n {\n betaq = Math.pow((rand*alpha),(1.0/(eta_c+1.0)));\n }\n else\n {\n betaq = Math.pow((1.0/(2.0 - rand*alpha)),(1.0/(eta_c+1.0)));\n }\n c2 = 0.5*((y1+y2)+betaq*(y2-y1));\n if (c1<yl)\n c1=yl;\n if (c2<yl)\n c2=yl;\n if (c1>yu)\n c1=yu;\n if (c2>yu)\n c2=yu;\n if (random.nextBoolean())\n {\n parent1[i] = this.recombineGenes(parent1[i], parent2[i], (float) c2);\n parent2[i] = this.recombineGenes(parent2[i], parent1[i], (float) c1);\n }\n else\n {\n parent1[i] = this.recombineGenes(parent1[i], parent2[i], (float) c2);\n parent2[i] = this.recombineGenes(parent2[i], parent1[i], (float) c1);\n }\n }\n else\n {\n // do nothing\n }\n }\n else\n {\n // do nothing\n }\n }\n }", "private static void crossProductMerge(int[][] pointSet, int start, int mid, int end)\n {\n int[][] L = new int[2][mid-start+1];\n int[][] R = new int[2][end-mid];\n for (int i = 0; i<= L[0].length-1; i++)\n {\n L[0][i] = pointSet[0][start+i]; L[1][i] = pointSet[1][start+i];\n }\n for (int j = 0; j<= R[0].length-1; j++)\n {\n R[0][j] = pointSet[0][mid+j+1]; R[1][j] = pointSet[1][mid+j+1];\n }\n int i = 0;\n int j = 0;\n for (int k = start; k <= end; k++) \n {\n if (i == L[0].length || j == R[0].length)\n {\n if (i == L[0].length)\n {\n pointSet[0][k] = R[0][j]; pointSet[1][k] = R[1][j]; j++;\n }\n else\n {\n pointSet[0][k] = L[0][i]; pointSet[1][k] = L[1][i]; i++;\n }\n }\n else\n {\n if (((L[0][i]-pointSet[0][0])*(R[1][j]-pointSet[1][0]))-\n ((R[0][j]-pointSet[0][0])*(L[1][i]-pointSet[1][0])) > 0)\n {\n pointSet[0][k] = L[0][i]; pointSet[1][k] = L[1][i]; i++; \n }\n else\n {\n pointSet[0][k] = R[0][j]; pointSet[1][k] = R[1][j]; j++; \n }\n }\n }\n }", "public boolean isOver(PVector i_mousePosition){\n\t\tPVector mouseLocal = globalToLocal(i_mousePosition);\t\t\n\t\treturn pointInTriangle(mouseLocal, c1, c2, c3);\n\t}", "public Vector cross(Vector v) {\n return new Vector(\n (getY() * v.getZ()) - (getZ() * v.getY()),\n (getZ() * v.getX()) - (getX() * v.getZ()),\n (getX() * v.getY()) - (getY() * v.getX())\n );\n }", "public void getLoosePoints(Set<Point> loose) {\n \tfor (int i = 1; i < width; i++) {\n \t\tfor (int j = 1; j < height; j++) {\n \t\t\tloose.add(new Point(i, j));\n \t\t}\n \t}\n }", "private Point toInnerPoint(Point punto){\r\n \treturn punto.add(-coord.X(), -coord.Y());\r\n// return new Point(punto.getRow() - coord.getRow(), punto.getCol() - coord.getCol());\r\n }", "public static double crossProduct(Point a, Point b, Point reference)\n {\n Point aa = a.subtract(reference);\n Point bb = b.subtract(reference);\n // Calculate the determinant \n double cp = aa.getX() * bb.getY() - bb.getX() * aa.getY();\n return cp;\n }", "public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}", "public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}", "public Point3 getPointMinus(int pointNr);", "public interface MonogamousCrossover {\r\n\r\n\tpublic Embryo mate(Individual mother, Individual father);\r\n}" ]
[ "0.7270447", "0.71998024", "0.7098876", "0.68949467", "0.68752134", "0.6829374", "0.6783194", "0.6751559", "0.65501964", "0.65235925", "0.6507475", "0.64728266", "0.63798356", "0.624039", "0.62220716", "0.6182991", "0.613784", "0.61244595", "0.61023015", "0.60851264", "0.60825217", "0.6074051", "0.6052196", "0.60360897", "0.6004244", "0.5957168", "0.59036124", "0.5891124", "0.58038586", "0.5745629", "0.57281077", "0.57250756", "0.5723397", "0.57180274", "0.5708783", "0.5701775", "0.5698381", "0.5695795", "0.5677557", "0.56572974", "0.5623948", "0.5604375", "0.5603605", "0.5590093", "0.5569177", "0.55529547", "0.5545597", "0.5527184", "0.5518814", "0.54865575", "0.5468132", "0.5465269", "0.54619825", "0.5449638", "0.54259866", "0.54043186", "0.53955895", "0.5389486", "0.5384703", "0.5382851", "0.5370663", "0.5365828", "0.5364061", "0.53623897", "0.53615695", "0.5357641", "0.53509307", "0.5340242", "0.53069746", "0.52905786", "0.5289621", "0.527352", "0.5252859", "0.5252691", "0.5249123", "0.5248848", "0.52436197", "0.5239911", "0.52354264", "0.52213395", "0.51938224", "0.5193364", "0.519291", "0.5167503", "0.5166318", "0.51397556", "0.5133916", "0.5123181", "0.5108737", "0.5096225", "0.50956535", "0.50745493", "0.5063126", "0.506206", "0.50615877", "0.5061155", "0.50447273", "0.50321937", "0.5028942", "0.5028662" ]
0.56435853
40
Funtion to perfrom mutation on the individuals depending on the mutation rate set
public static void mutation(Individual[] individuals) { for (int i = 0; i < POP_SIZE; i++) { for (int j = 0; j < GENE_SIZE; j++) { double randomNum = Math.random(); if (randomNum < MUTATION_RATE) { randomNum = Math.random(); ArrayList<String> bitsList = (ArrayList<String>) bits.clone(); for (int g = 0; g < bitsList.size(); g++) { if (individuals[i].gene[j].equals(bitsList.get(g))) { String bit = bitsList.get(g); bitsList.remove(g); int index; if (randomNum < 0.5) { index = 0; } else { index = 1; } individuals[i].gene[j] = bitsList.get(new Random().nextInt(2)); bitsList.add(bit); } } } } individuals[i].generateRulebase(); } matingPool = Arrays.copyOf(individuals, individuals.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void mutation() {\r\n\t\tfinal double MUTATION_PROB = 0.1;\r\n\t\tfor (int i=0; i<this.nChromosomes; i++) {\r\n\t\t\tArrayList<Integer> chr = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\tfor (int j=0; j<this.nViaPoints; j++) {\r\n\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\tif (rand < MUTATION_PROB) {\r\n\t\t\t\t\t// change the sign\r\n\t\t\t\t\tInteger vPoint = chr.get(j);\r\n\t\t\t\t\tchr.remove(j);\r\n\t\t\t\t\tchr.add(j, new Integer(- (vPoint.intValue()%100)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.printChromosomes(\"After Mutation\");\r\n\t}", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "private static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }", "private void mutate(Chromosome c){\n for(double[] gene:c.getGeneData()){\n for(int i=0; i<gene.length; i++){\n if(Math.random()<mutationRate){\n //Mutate the data\n gene[i] += (Math.random()-Math.random())*maxPerturbation;\n }\n }\n }\n }", "public void mutate(NeuralPlayer p)\n\t{\n\t\tdouble[] genome = NetworkCODEC.networkToArray(p.net);\n\t\tRandom g = new Random();\n\t\tfor (int i = 0; i< genome.length; i++)\n\t\t{\n\t\t\tif (g.nextDouble() <= mutationPer)\n\t\t\t\tgenome[i] = randomNum(g) + genome[i];\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome, p.net);\n\t}", "public static void setMutationProbability(double value) { mutationProbability = value; }", "private void mutation() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint num = (int) (Math.random() * GENE * ChrNum + 1);\n\t\t\tint chromosomeNum = (int) (num / GENE) + 1;\n\n\t\t\tint mutationNum = num - (chromosomeNum - 1) * GENE; \n\t\t\tif (mutationNum == 0) \n\t\t\t\tmutationNum = 1;\n\t\t\tchromosomeNum = chromosomeNum - 1;\n\t\t\tif (chromosomeNum >= ChrNum)\n\t\t\t\tchromosomeNum = 9;\n\t\t\tString temp;\n\t\t\tString a; \n\t\t\tif (ipop[chromosomeNum].charAt(mutationNum - 1) == '0') { \n a = \"1\";\n\t\t\t} else { \n\t\t\t\ta = \"0\";\n\t\t\t}\n\t\t\t\n\t\t\tif (mutationNum == 1) {\n\t\t\t\ttemp = a + ipop[chromosomeNum].substring(mutationNum);\n\t\t\t} else {\n\t\t\t\tif (mutationNum != GENE) {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum -1) + a \n\t\t\t\t\t\t\t+ ipop[chromosomeNum].substring(mutationNum);\n\t\t\t\t} else {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum - 1) + a;\n\t\t\t\t}\n\t\t\t}\n \tipop[chromosomeNum] = temp;\n\t\t}\n\t}", "private static Set<Chromosome> mutatePopulation(Set<Chromosome> population, double mutationRate) {\n Set<Chromosome> mutatedChromosomes = new HashSet<>(population);\n\n for (Chromosome path : mutatedChromosomes) {\n double mutationProbability = ThreadLocalRandom.current().nextDouble();\n if (mutationProbability > (1-mutationRate)) {\n // mutate the path using the RSM mutation operator\n mutateRoute(path);\n // indicate that the fitness of this path needs to be recalculated\n path.fitness = -1;\n }\n }\n\n // The set will most probably include certain chromosomes which are already present in the set of children\n // however, given that both are sets, any duplicates will be discarded\n return mutatedChromosomes;\n }", "public static double getMutationProbability() { return mutationProbability; }", "public void setMutationRate(double rate) { this.exec = this.exec.withProperty(\"svum.rate\", rate); }", "private static void mating() {\n\t\tint getRand = 0;\n\t\tint parentA = 0;\n\t\tint parentB = 0;\n\t\tint newIndex1 = 0;\n\t\tint newIndex2 = 0;\n\t\tChromosome newChromo1 = null;\n\t\tChromosome newChromo2 = null;\n\n\t\tfor (int i = 0; i < OFFSPRING_PER_GENERATION; i++) {\n\t\t\tparentA = chooseParent();\n\t\t\t// Test probability of mating.\n\t\t\tgetRand = getRandomNumber(0, 100);\n\t\t\tif (getRand <= MATING_PROBABILITY * 100) {\n\t\t\t\tparentB = chooseParent(parentA);\n\t\t\t\tnewChromo1 = new Chromosome();\n\t\t\t\tnewChromo2 = new Chromosome();\n\t\t\t\tpopulation.add(newChromo1);\n\t\t\t\tnewIndex1 = population.indexOf(newChromo1);\n\t\t\t\tpopulation.add(newChromo2);\n\t\t\t\tnewIndex2 = population.indexOf(newChromo2);\n\n\t\t\t\t// Choose either, or both of these:\n\t\t\t\tpartiallyMappedCrossover(parentA, parentB, newIndex1, newIndex2);\n\t\t\t\t// positionBasedCrossover(parentA, parentB, newIndex1, newIndex2);\n\n\t\t\t\tif (childCount - 1 == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex1, 1);\n\t\t\t\t} else if (childCount == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex2, 1);\n\t\t\t\t}\n\n\t\t\t\tpopulation.get(newIndex1).computeConflicts();\n\t\t\t\tpopulation.get(newIndex2).computeConflicts();\n\n\t\t\t\tchildCount += 2;\n\n\t\t\t\t// Schedule next mutation.\n\t\t\t\tif (childCount % (int) Math.round(1.0 / MUTATION_RATE) == 0) {\n\t\t\t\t\tnextMutation = childCount + getRandomNumber(0, (int) Math.round(1.0 / MUTATION_RATE));\n\t\t\t\t}\n\t\t\t}\n\t\t} // i\n\t\treturn;\n\t}", "public static int createnumOfMutationss(){\n\t\tint totalMut = 0;\n\t\t\n\t\tint[] gen0 = new int[(int) Math.pow(2,0)]; //size of numOfMutations is based on exponential growth by generation number\n\t\t\tmutate(gen0); //function to mutate\n\t\t\ttotalMut = totalMut + totalMutations(gen0);\n\t\tint[] gen1 = new int[(int) Math.pow(2,1)];\n\t\t\tcheckMutations(gen0, gen1); //checks for previous generation mutations\n\t\t\tmutate(gen1);\n\t\t\ttotalMut = totalMut + totalMutations(gen1);\n\t\tint[] gen2 = new int[(int) Math.pow(2,2)];\n\t\t\tcheckMutations(gen1, gen2);\n\t\t\tmutate(gen2);\n\t\t\ttotalMut = totalMut + totalMutations(gen2);\n\t\tint[] gen3 = new int[(int) Math.pow(2,3)];\n\t\t\tcheckMutations(gen2, gen3);\n\t\t\tmutate(gen3);\n\t\t\ttotalMut = totalMut + totalMutations(gen3);\n\t\tint[] gen4 = new int[(int) Math.pow(2,4)];\n\t\t\tcheckMutations(gen3, gen4);\n\t\t\tmutate(gen4);\n\t\t\ttotalMut = totalMut + totalMutations(gen4);\n\t\tint[] gen5 = new int[(int) Math.pow(2,5)];\n\t\t\tcheckMutations(gen4, gen5);\n\t\t\tmutate(gen5);\n\t\t\ttotalMut = totalMut + totalMutations(gen5);\n\t\tint[] gen6 = new int[(int) Math.pow(2,6)];\n\t\t\tcheckMutations(gen5, gen6);\n\t\t\tmutate(gen6);\n\t\t\ttotalMut = totalMut + totalMutations(gen6);\n\t\tint[] gen7 = new int[(int) Math.pow(2,7)];\n\t\t\tcheckMutations(gen6, gen7);\n\t\t\tmutate(gen7);\n\t\t\ttotalMut = totalMut + totalMutations(gen7);\n\t\tint[] gen8 = new int[(int) Math.pow(2,8)];\n\t\t\tcheckMutations(gen7, gen8);\n\t\t\tmutate(gen8);\n\t\t\ttotalMut = totalMut + totalMutations(gen8);\n\t\tint[] gen9 = new int[(int) Math.pow(2,9)];\n\t\t\tcheckMutations(gen8, gen9);\n\t\t\tmutate(gen9);\n\t\t\ttotalMut = totalMut + totalMutations(gen9);\n\t\tint[] gen10 = new int[(int) Math.pow(2,10)];\n\t\t\tcheckMutations(gen9, gen10);\n\t\t\tmutate(gen10);\n\t\t\ttotalMut = totalMut + totalMutations(gen10);\n\t\t\t\n\t\t\treturn totalMut;\n\t\n\t}", "public Chromosome doDisplacementMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n\n int leftAllele = Math.min(allele1, allele2);\n int rightAllele = Math.max(allele1, allele2);\n\n var selectionSublist = new ArrayList<Boolean>(newSelection.subList(leftAllele, rightAllele));\n for(int j = leftAllele; j < rightAllele + 1; j++){\n newSelection.remove(leftAllele);\n }\n\n int index = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()+1);\n newSelection.addAll(index, selectionSublist);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public Chromosome doInsertionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n boolean value = newSelection.get(allele2);\n\n newSelection.remove(allele2);\n try{\n newSelection.add(allele1 + 1, value);\n }\n catch(IndexOutOfBoundsException e){\n newSelection.add(value);\n }\n \n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "private Object mutation(Individual child){\n\t\treturn problem.improve(child.getId());\r\n\t}", "public Chromosome doExchangeMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.swap(newSelection, allele1, allele2);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "@Override\n\tpublic void applyMutation(int index, double a_percentage) {\n\n\t}", "public void setUniformMutationRatio(double delta){\n this.delta = delta;\n }", "public void modifyFitness(Population population) {\n // prepare the calculation\n double[][] data = new double[population.size()][];\n for (int i = 0; i < data.length; i++) {\n data[i] = ((AbstractEAIndividual)population.get(i)).getFitness();\n }\n double min = Double.POSITIVE_INFINITY, fitnessSharing;\n double[] result = new double[data.length];\n AbstractEAIndividual tmpIndy;\n\n for (int x = 0; x < data[0].length; x++) {\n for (int i = 0; i < data.length; i++) data[i][x] = -data[i][x];\n for (int i = 0; i < data.length; i++) {\n if (data[i][x] < min) min = data[i][x];\n }\n\n for (int i = 0; i < data.length; i++) {\n // This will cause the worst individual to have no chance of being selected\n // also note that if all individual achieve equal fitness the sum will be zero\n result[i] = data[i][x] -min + 0.1;\n }\n\n for (int i = 0; i < population.size(); i++) {\n tmpIndy = (AbstractEAIndividual)population.get(i);\n fitnessSharing = 0;\n for (int j = 0; j < population.size(); j++) {\n if (this.m_SharingDistance < this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))) {\n fitnessSharing += 1 - (this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))/this.m_SharingDistance);\n }\n }\n result[i] = result[i]/fitnessSharing;\n }\n\n for (int i = 0; i < population.size(); i++) {\n ((AbstractEAIndividual)population.get(i)).SetFitness(x, result[i]);\n }\n }\n }", "public Chromosome doInversionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.reverse(newSelection.subList(Math.min(allele1, allele2), Math.max(allele1, allele2)));\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public void mutate(float p)\n {\n int regCount = this.registers.size();\n\n /**\n * Parameter mutation replace parameters by random terminals\n */\n for (int i = 0; i < registers.size(); i++)\n {\n LinearRegister reg = this.registers.get(i);\n \n if (1 - GPRunner.RANDOM.nextFloat() <= p)\n {\n if (reg.parameters.length == 0)\n {\n /**\n * Mutate whole register\n */\n this.registers.set(i, randomRegister());\n }\n else\n {\n int parameter = GPRunner.RANDOM\n .nextInt(reg.parameters.length + 1);\n \n if (parameter >= reg.parameters.length)\n {\n /**\n * Mutate whole register\n */\n this.registers.set(i, randomRegister());\n }\n else\n {\n /**\n * Mutate parameter\n */\n reg.parameters[parameter] = randomTerminal();\n }\n }\n }\n }\n\n /**\n * Mutate output register\n */\n\t\t// if(1 - Register.RANDOM.nextFloat() <= p)\n // {\n // this.outputRegister = Register.RANDOM.nextInt(registers.size());\n // }\n }", "public void mutate(float mutationProbability, float connectionMutationProbability, float mutationFactor) {\r\n for (int i = 1; i < neurons.length; i++) // layers (skip input layer)\r\n {\r\n for (int j = 0; j < neurons[i].length; j++) // neurons per layer\r\n {\r\n if (Math.random() <= mutationProbability) {\r\n neurons[i][j].setWeights(neurons[i][j].getMutatedWeights(connectionMutationProbability, mutationFactor));\r\n }\r\n }\r\n }\r\n }", "public void mutate() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutate = rand.nextInt(4);\n\t\t\twhile (mutate == 0) {\n\t\t\t\tmutateHelper();\n\t\t\t\tmutate = rand.nextInt(4);\n\t\t\t}\n\t\t}\n\t}", "private int[] mutationPairwiseExchange(int[] mutant) {\n\t\tint pairPoint1 = rand.nextInt(mutant.length);\n\t\tint pairPoint2 = pairPoint1;\n\t\twhile (mutant[pairPoint2] == mutant[pairPoint1]) {\n\t\t\tpairPoint2 = rand.nextInt(mutant.length); //find element in different bucket\n\t\t}\n\t\tint temp = mutant[pairPoint1];\n\t\tmutant[pairPoint1] = mutant[pairPoint2];\n\t\tmutant[pairPoint2] = temp;\n\t\treturn mutant;\n\t}", "private void mutateHelper() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutateType = rand.nextInt(5);\n\t\t\tif (rules.size() >= 14) {\n\t\t\t\tmutateType = rand.nextInt(6);\n\t\t\t}\n\t\t\tint index = rand.nextInt(rules.size());\n\t\t\tMutation m = null;\n\t\t\tswitch (mutateType) {\n\t\t\tcase 0:\n\t\t\t\tm = MutationFactory.getDuplicate();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tm = MutationFactory.getInsert();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tm = MutationFactory.getRemove();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tm = MutationFactory.getReplace();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tm = MutationFactory.getSwap();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tm = MutationFactory.getTransform();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void mutation(){\n \n \tfor (int[] temp : wallpapers) {\n \t\tint e = random.nextInt(20);\n \t\tfor (int y = 0; y < e; y++){\n \t\t\tint h = random.nextInt(temp.length);\n \t\t\t//Log.d(\"MUT\", \"selected index \" + h);\n \t\t\tif (h == temp.length - 1 || h == temp.length - 2 || h == temp.length - 3){\n \t\t\t\tint newrgb = random.nextInt(NODELENGTH) + 2;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new node \" + newrgb);\n \t\t\t\ttemp[h] = newrgb;\n \t\t\t} else if (((h + 1) % 3) == 0){\n \t\t\t\tint newfunction = random.nextInt(NUM_FUNCTIONS);\n \t\t\t\t//Log.d(\"MUT\", \"Picking new function \" + newfunction);\n \t\t\t\ttemp[h] = newfunction;\n \t\t\t} else {\n \t\t\t\tint newinput = random.nextInt(h / 3 +1);\n \t\t\t\ttemp[h] = newinput;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new input \" + newinput);\n \t\t\t}\n \t\t}\n \t}\n }", "public double getUniformMutationRatio(){\n return delta;\n }", "public void setSmartMutationRate(double rate) { this.exec = this.exec.withProperty(\"sm.rate\", rate); }", "protected void mutateWeights() {\n\t\t// TODO: Change the way weight mutation works\n\t\tif (Braincraft.gatherStats) {\n\t\t\tArrayList<Integer> mutatedgenes = new ArrayList<Integer>();\n\t\t\tfor (Gene g : genes.values()) {\n\t\t\t\tif (Braincraft.randomChance(population.perWeightMutationRate)) {\n\t\t\t\t\tg.weight = Braincraft.randomWeight();\n\t\t\t\t\tmutatedgenes.add(g.innovation);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString output = \"weight mutation \" + ID;\n\t\t\tfor (Integer i : mutatedgenes) {\n\t\t\t\toutput += \" \" + i;\n\t\t\t}\n\t\t\tBraincraft.genetics.add(output);\n\t\t} else {\n\t\t\tfor (Gene g : genes.values()) {\n\t\t\t\tif (Braincraft.randomChance(population.perWeightMutationRate))\n\t\t\t\t\tg.weight = Braincraft.randomWeight();\n\t\t\t}\n\t\t}\n\t\t// TODO: Report weight mutations to stats\n\t}", "private int[] mutationSingleMove(int[] mutant) {\n\t\tint pairPoint1 = rand.nextInt(mutant.length);\n\t\tint newBin = mutant[pairPoint1];\n\t\twhile (newBin == mutant[pairPoint1]) {\n\t\t\tnewBin = rand.nextInt(binCount);\n\t\t}\n\t\tmutant[pairPoint1] = newBin; //swap to a different bucket\n\t\treturn mutant;\n\t}", "public void MutatePlayer(int PercentOfMutation) {\n\t\tint NoOfMutations = CalculateGeneModifications(PercentOfMutation);\n\t\tRandom mutate = new Random();\n\t\tfor (int i = 0; i < NoOfMutations; i++) {\n\t\t\tmoveOrder[mutate.nextInt(moveOrder.length)] = r.nextInt(3);\n\t\t}\n\t\tthis.ResetPlayer();\n\t}", "public static void permute()\n\t{\n\t\t/* INITIALIZE FOR PERMUTATION TESTING */\n\t\t//int l, r, s, T, K;\n\t\t//Random random = new Random();\n\t\tRandom random = new Random(13);\n\n\t\tclade = clad[k];\n\t\tclade.chiPvalue = 0;\n\n\t\tfor(int l = 0; l < 2; l++)\n\t\t{\n\t\t\tclade.ITcPvalue[l] = 0;\n\t\t\tclade.ITnPvalue[l] = 0;\n\t\t\tclade.corrDcWPvalue[l] = 0;\n\t\t\tclade.corrDnWPvalue[l] = 0;\n\t\t \n\t\t for(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\tclade.DcPvalue[i][l] = 0;\n\t\t\t\tclade.DnPvalue[i][l] = 0;\n\t\t\t}\n\t\t}\n\n\n\t/*\n\t\tfprintf(stderr, \"\\n\\n\"); \n\t\tfor (i=0; i<numSubClades; i++)\n\t\tfprintf(stderr,\" rowTotal(%d):%d \", i, rowTotal[i]);\n\t\tfprintf(stderr, \"\\n\"); \n\t\tfor (j=0; j<numCladeLocations; j++)\n\t\tfprintf(stderr,\" columnTotal(%d):%d \", j, columnTotal[j]);\n\t\tfprintf(stderr, \"\\n\\n\");\n\t\t\n\t\tfprintf(stderr,\"\\n\\n Permuting %s\", title);\n\t\tfprintf(stderr,\"\\n 0 %d permutations\\n \",numPermutations);\n*/\t\t\n\t\tfor (int K = 0; K < GeoDis.numPermutations; K++)\n\t\t{\t\n\t\t\t\t\n\t\t\tprogress++;\n\t\t\tpercentage = ((double)progress * 100)/((double)numPermutations*(double)numClades); \n\t\n\t\t\trandObsChi = 0;\n\n\t\t\tfor(int l = 0; l < clade.totaNumObs; l++)\n\t\t\t\tclade.RBMatrix[l][0] = random.nextInt(); /* 0 - 32767\t*/\t\n\t\t\t \n\t\t\tclade.cumColTotal = 0; /* cumColTotal is the cumulative column total */\n\n\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t{\t\n\t\t\t\tif (j == 0)\n\t\t\t\t\tclade.cumColTotal = 0;\n\t\t\t\telse\t\t\t\t\n\t\t\t\tclade.cumColTotal = clade.cumColTotal + clade.columnTotal[j-1];\n\t\t\t\t\n\t\t\t\tfor (int s = 0; s < clade.columnTotal[j]; s++)\n\t\t\t\t{\n\t\t\t\t\tint l = s + clade.cumColTotal;\n\t\t\t\t\tclade.RBMatrix[l][1] = j+1;\n\t\t\t\t}\n\t\t\t}\n\t\t/*for (l=0; l<totaNumObs; l++)\n\t\t\t\tfprintf(stderr,\"\\nB: %6d %d\", RBMatrix[l][0], RBMatrix[l][1]);*/\n\n\n\n\t\t\t/* * * ORDER BY RANDOM NUMBERS * * */\n\t\t\tfor(int l = 0; l < (clade.totaNumObs - 1); l++)\n\t\t\t{\t\n\t\t\t\tfor(int r = l +1; r < clade.totaNumObs; r++)\n\t\t\t \t{\t\t\t\n\t\t\t\t\tif(clade.RBMatrix[r][0] < clade.RBMatrix[l][0])\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t//else\n\t\t\t\t\t{\t\n\t\t\t\t\t\tint T = clade.RBMatrix[r][0];\n\t\t\t\t\t\tclade.RBMatrix[r][0] = clade.RBMatrix[l][0];\n\t\t\t\t\t\tclade.RBMatrix[l][0] = T;\n\t\t\t\t\t\tT = clade.RBMatrix[r][1];\n\t\t\t\t\t\tclade.RBMatrix[r][1] = clade.RBMatrix[l][1];\n\t\t\t\t\t\tclade.RBMatrix[l][1] = T;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t \t}\n\t/*for (l=0; l<totaNumObs; l++)\n\t\t\tfprintf(stderr,\"\\nAfter: %6d %d\", RBMatrix[l][0], RBMatrix[l][1]);*/\n\n\n\t\t\t/* * * CALCULATE RANDOM OBSERVATIONS * * */\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\tclade.randMatrix[i][j] = 0;\n\n\t\t\t \n\t\t\tclade.cumRowTotal = 0; /* cumulative row totals */\n\t\t\t\t\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\tif (i == 0)\n\t\t\t\tclade.cumRowTotal = 0;\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\tclade.cumRowTotal += clade.rowTotal[i-1];\t\n\t\t\t\t\n\t\t\t\t/*fprintf(stderr, \"\\n\\nRow %d: rowTotal[i]:%d\",i, rowTotal[i]); */\n\t\t\t\t\n\t\t\t\tfor(int s = 0; s < clade.rowTotal[i]; s++)\n\t\t\t\t{\n\t\t\t\t\tint l = s + clade.cumRowTotal;\n\t\t\t\t\tindex = clade.RBMatrix[l][1]-1;\n\t\t\t\t\t/*fprintf(stderr, \"rowTotal= %d index=%d s=%d \",rowTotal[i], index, s); */\n\t\t\t\t\tclade.randMatrix[i][index]++;\n\t\t\t\t}\n\t\t\t}\n\n\n\n\n\t\t/* prints the randomized table of contingency\n\t\t\t\tfor(i = 0; i < numSubClades; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfprintf(stderr, \"\\n\");\n\t\t\t\t\t\tfor(j = 0; j < numCladeLocations; j++)\n\t\t\t\t\t\t\tfprintf(stderr, \"%d \", randMatrix[i][j]);\n\t\t\t\t\t}\n\t\t*/\t\t\n\n\n\t\t\t/* * CALCULATE RANDOM CHI - SQUARE STATISTIC * */\n\t\t\trandObsChi = 0;\n\t\t\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\trandObsChi += Math.pow( (double) clade.randMatrix[i][j] - clade.expObsMatrix[i][j], 2) / clade.expObsMatrix[i][j];\n\t\t\t\t\t\n\t\t\t/*fprintf(fpout,\"\\n%f \", randObsChi);\t\t*/\n\t\t\t\t\t\n\t\t\tif(randObsChi - clade.obsChi >= ROUNDING_ERROR)\n\t\t\t\tclade.chiPvalue++;\n\n\n\t\t\tif (doingDistances)\n\t\t\t{\n\t\t\t\tfor(c=0; c<clade.numSubClades; c++)\n\t\t\t\t{\n\t\t\t\t\tclade.randDc[c]=0.0;\n\t\t\t\t\tclade.randDn[c]=0.0;\n\t\t\t\t\t//clade.varDc[c]=0;\n\t\t\t\t\t//clade.varDn[c]=0;\n\t\t\t\t\tsum1 = sum2 = sum3 = 0.0;\n\t\t\t\t\tsumc1 = sumc2 = sumc3 = 0.0;\n\n\t\t\t\t\tfor(i=0; i<clade.numCladeLocations; i++) \t\n\t\t\t\t\t{\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum2 += clade.randMatrix[c][i] * (clade.randMatrix[c][i]-1) / 2 ;\n\t\t\t\t\t\tsumc2 += (clade.randMatrix[c][i] * (clade.randMatrix[c][i]-1) / 2) + \n\t\t\t\t\t (clade.randMatrix[c][i] * (clade.columnTotal[i] - clade.randMatrix[c][i]));\t\n\t\t\t\t\t\n\t\t\t\t\t\tfor (j=0; j<clade.numCladeLocations; j++)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tpopA = clade.cladeLocIndex[i];\n\t\t\t\t\t\t\tpopB = clade.cladeLocIndex[j];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (j != i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tsum1 += (double) clade.randMatrix[c][i] * clade.randMatrix[c][j] * distance[popA-1][popB-1];\n\t\t\t\t\t\t\t\tsum3 += clade.randMatrix[c][i] * clade.randMatrix[c][j];\t\t\t\n\t\t\t\t\t\t\t\tsumc1 += (double) clade.randMatrix[c][i] * clade.columnTotal[j] * distance[popA-1][popB-1];\t\n\t\t\t\t\t\t\t\tsumc3 += clade.randMatrix[c][i] * clade.columnTotal[j];\n\t\t\t\t\t\t\t\t//System.err.println(\"\\npopA = \" + popA + \" popB = \" + popB + \" dist= \" + distance[popA-1][popB-1]);\n\t\t\t\t\t\t\t\t//System.err.println(\"sumc1: \" + clade.randMatrix[c][i] + \" * \" + clade.columnTotal[j] +\" * \" + distance[popA-1][popB-1] + \" = \" + sumc1); \n\t\t\t\t\t\t\t\t//System.err.println(\"\\nROBS[\" + c +\"][\" + i+ \"]= \" + clade.randMatrix[c][i]); \n\t\t\t\t\t\t\t\t//System.err.println(\"\\nCT[\" + j +\"]= \" + clade.columnTotal[j]); \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\n\t\t\t\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (sum3 == 0)\n\t\t\t\t\t\tclade.randDc[c] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tclade.randDc[c] = sum1 / (sum2 + sum3);\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\tif (sumc3 == 0)\n\t\t\t\t\t\tclade.randDn[c] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tclade.randDn[c] = sumc1 / (sumc2 + sumc3);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t//System.err.println(\"\\nClade \" + clade.cladeName + \" subclade \" + c + \n\t // \" Dc= \" + clade.Dc[c] + \" Dn= \" + clade.Dn[c]); \t\t\n\t\t\n\t\t\t\t\t//System.err.println(\"sum1= \" + sum1 + \" sum2= \" + sum2 + \" sum3= \" + sum3); \n\t\t\t\t\t//System.err.println(\"sumc1= \" + sumc1 + \" sumc2= \" + sumc2 + \" sumc3= \" + sumc3); \n\n\n\t\t\t\t\tif(clade.Dc[c] - clade.randDc[c] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DcPvalue[c][0]++;\n\n\t\t\t\t\tif(clade.randDc[c] - clade.Dc[c] >= ROUNDING_ERROR )\n\t\t\t\t\t\tclade.DcPvalue[c][1]++;\n\n\t\t\t\t\tif(clade.Dn[c] - clade.randDn[c] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DnPvalue[c][0]++;\n\n\t\t\t\t\tif(clade.randDn[c] - clade.Dn[c] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DnPvalue[c][1]++;\n\n\n\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* * CALCULATE DISTANCE TEST STATISTIC * */\n\n\t\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\t{\n\t\t\t\t\tclade.randMeanLatitude[i] = 0;\n\t\t\t\t\tclade.randMeanLongitude[i] = 0;\n\t\t\t\t\tclade.randDc[i] = 0;\n\t\t\t\t\tclade.randDn[i] = 0;\n\t\t\t\t\tclade.subCladeSum[i] = 0;\n\t\t\t\t\n\t\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = clade.cladeLocIndex[j] - 1;\n\t\t\t\t\t\tclade.absFreq[i][j] = (double) clade.randMatrix[i][j] / (double) sampleSize[index];\t\t\n\t\t\t\t\t\tclade.subCladeSum[i] = clade.subCladeSum[i] + clade.absFreq[i][j];\n\t\t\t\t\t}\t\n\n\t\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\t\tclade.relFreq[i][j] = clade.absFreq[i][j]/clade.subCladeSum[i];\n\t\t\t\t}\n\t\t/*\t\t\n\t\t\t\tfor(i = 0; i < numSubClades; i++)\n\t\t\t\t{\n\t\t\t\t\tfprintf(stderr,\"\\n\");\n\t\t\t\t\tfor(j = 0; j < numCladeLocations; j++)\n\t\t\t\t\t\tfprintf(stderr,\"Asim: %f \", relFreq[i][j]);\n\t\t\t\t}\n\t\t*/\n\t\t\t\t\n\t\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\t{\t\n\t\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = clade.cladeLocIndex[j]-1;\n\t\t\t\t\t\tclade.randMeanLatitude[i] = clade.randMeanLatitude[i] + clade.relFreq[i][j] * Latitude[index];\n\t\t\t\t\t\tclade.randMeanLongitude[i] = clade.randMeanLongitude[i] + clade.relFreq[i][j] * Longitude[index];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (clade.relFreq[i][j] == 0)\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\tindex = clade.cladeLocIndex[j] - 1;\n\t\t\t\t\t\tif (Latitude[index] == clade.randMeanLatitude[i] && Longitude[index] == clade.randMeanLongitude[i]) \n\t\t\t\t\t\t\tZ = 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tZ = Math.sin(Latitude[index]) * Math.sin(clade.randMeanLatitude[i]) + Math.cos(Latitude[index]) * \n\t\t\t\t\t\t\tMath.cos(clade.randMeanLatitude[i]) * Math.cos(clade.randMeanLongitude[i] - Longitude[index]);\n\t\t\t\t\t\n\t\t\t\t\t\tif (Math.abs(Z) < 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRVZ = RADIUS * Math.acos (Z); \n\t\t\t\t\t\t\tclade.randDc[i] += clade.relFreq[i][j] * RVZ;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Latitude[index] == clade.meanLatNest && Longitude[index] == clade.meanLonNest) \n\t\t\t\t\t\t\tZB = 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tZB = Math.sin(Latitude[index]) * Math.sin(clade.meanLatNest) + Math.cos(Latitude[index]) * \n\t\t\t\t\t\t\tMath.cos(clade.meanLatNest) * Math.cos(clade.meanLonNest - Longitude[index]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Math.abs(ZB) < 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRVZ = RADIUS * Math.acos (ZB);\n\t\t\t\t\t\t\tclade.randDn[i] += clade.relFreq[i][j] * RVZ;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(clade.Dc[i] - clade.randDc[i] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DcPvalue[i][0]++;\n\n\t\t\t\t\tif(clade.randDc[i] - clade.Dc[i] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DcPvalue[i][1]++;\n\n\t\t\t\t\tif(clade.Dn[i] - clade.randDn[i] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DnPvalue[i][0]++;\n\n\t\t\t\t\tif(clade.randDn[i] - clade.Dn[i] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DnPvalue[i][1]++;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t/* * TEST STATISTICS FOR POSITION VS. INTERIOR * */\n\n\t\t\trandTipDistance = 0;\n\t\t\trandIntDistance = 0;\n\t\t\trandTipDisNested = 0;\n\t\t\trandIntDisNested = 0;\n\t\t\t\n\t\t\tif(clade.check != (double) clade.numSubClades && clade.check != 0)\n\t\t\t{\t\n\t\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\t{\n\t\t\t\t\trandTipDistance += clade.Position[i] * clade.randDc[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\t\trandTipDisNested += clade.Position[i] * clade.randDn[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\t\trandIntDistance += (1 - clade.Position[i]) * clade.randDc[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\n\t\t\t\t\trandIntDisNested += (1 - clade.Position[i]) * clade.randDn[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(clade.tipIntDistance - (randIntDistance - randTipDistance) >= ROUNDING_ERROR)\n\t\t\t\t\tclade.ITcPvalue[0]++;\n\n\t\t\t\tif((randIntDistance - randTipDistance) - clade.tipIntDistance >= ROUNDING_ERROR)\n\t\t\t\t \tclade.ITcPvalue[1]++;\n\n\t\t\t\tif(clade.tipIntDisNested - (randIntDisNested - randTipDisNested) >= ROUNDING_ERROR)\n\t\t\t\t\tclade.ITnPvalue[0]++;\n\t\t\t\t\n\t\t\t\tif((randIntDisNested - randTipDisNested) - clade.tipIntDisNested >= ROUNDING_ERROR)\n\t\t\t\t\tclade.ITnPvalue[1]++;\n\t\t\t\t\n\t\t\t}\n\n\t\t\tif(!weights){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//{\n\t\t\t\t/* * CORRELATION TESTS OF DISTANCE WITH OUTGROUP WEIGHTS * */\n\n\t\t\t\t //double c, n, w;\n\t\t\t\t \n\t\t\t\t clade.meanDc = 0;\n\t\t\t\t clade.meanDn = 0;\n\t\t\t\t clade.sumDcxWeight = 0;\n\t\t\t\t clade.sumDnxWeight = 0;\n\t\t\t\t clade.sumDcSq = 0;\n\t\t\t\t clade.sumDnSq = 0;\n\n\t\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\t\t{\n\t\t\t\t \tclade.meanDc += clade.randDc[i] / (double) clade.numSubClades;\n\t\t\t\t \tclade.meanDn += clade.randDn[i] / (double) clade.numSubClades;\n\t\t\t\t \tclade.sumDcxWeight += clade.randDc[i] * clade.weight[i];\n\t\t\t\t \tclade.sumDnxWeight += clade.randDn[i] * clade.weight[i];\n\t\t\t\t \tclade.sumDcSq += Math.pow(clade.randDc[i],2); \n\t\t\t\t \tclade.sumDnSq += Math.pow(clade.randDn[i],2);\n\t\t\t\t\t}\n\t\t\t\t\n\t \t\tdouble c = clade.sumDcSq - (double) clade.numSubClades * Math.pow(clade.meanDc,2);\n\t \t\tdouble n = clade.sumDnSq - (double) clade.numSubClades * Math.pow(clade.meanDn,2);\n\t \t\t\tdouble w = clade.sumWeightSq - (double) clade.numSubClades * Math.pow(clade.meanWeight,2); \n\n\t\t\t\tif (clade.corrDcWeights != NA && c > 0 && w > 0)\n\t\t\t\t\t//;\n\t\t\t\t//else\n\t\t\t\t \t{\n\t\t\t\t \tclade.randCorrDcWeights = (clade.sumDcxWeight - (double) clade.numSubClades * clade.meanDc * clade.meanWeight)/ \n\t\t\t\t \t(Math.sqrt(c*w));\n\n\t\t\t\t\tif(clade.randCorrDcWeights > 1)\n\t\t\t\t\t\t\tclade.randCorrDnWeights = 1;\n\t\t\t\t\t\n\t\t\t\t\tif(clade.randCorrDcWeights < -1)\n\t\t\t \t\tclade.randCorrDcWeights = -1;\n\t\t\t\t\n\t\t\t\t\tif(clade.corrDcWeights - clade.randCorrDcWeights >= ROUNDING_ERROR)\n\t\t\t\t \t\tclade.corrDcWPvalue[0]++;\n\t\t\t\t\t \n\t\t\t\t\tif(clade.randCorrDcWeights - clade.corrDcWeights >= ROUNDING_ERROR)\n\t\t\t\t \tclade.corrDcWPvalue[1]++;\n\t\t\t\t\t}\n\n\n\t\t\t\tif (clade.corrDnWeights == NA || n <= 0 || w <= 0)\n\t\t\t\t\tcontinue;\t\t\n\t\t\t\t//else\n\t\t\t\t\t//{\n\t\t\t\t \tclade.randCorrDnWeights = (clade.sumDnxWeight - (double) clade.numSubClades * clade.meanDn * clade.meanWeight)/ \n\t\t\t\t \t(Math.sqrt(n*w));\n\t\t\t\t\n\t\t\t\t\tif(clade.randCorrDnWeights > 1)\n\t\t\t\t\t\tclade.randCorrDnWeights = 1;\n\n\t\t\t\t\tif(clade.randCorrDnWeights < -1)\n\t\t\t\t\t\tclade.randCorrDnWeights = -1;\n\n\t\t\t\t\tif(clade.corrDnWeights - clade.randCorrDnWeights >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.corrDnWPvalue[0]++;\n\n\t\t\t\t\tif(clade.randCorrDnWeights - clade.corrDnWeights >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.corrDnWPvalue[1]++;\n\t\t\t\t\t//}\n\t\t\t\t//}\n\t} // end of 1 replicate\n\n\n\t\tclade.chiPvalue /= (double) GeoDis.numPermutations;\n\n\t\tfor(int l = 0; l < 2; l++)\n\t\t{\n\t\t\tclade.ITcPvalue[l] /= (double) GeoDis.numPermutations;\n\t\t\tclade.ITnPvalue[l] /= (double) GeoDis.numPermutations;\n\t\t\tclade.corrDcWPvalue[l] /= (double) GeoDis.numPermutations;\n\t\t\tclade.corrDnWPvalue[l] /= (double) GeoDis.numPermutations;\n\n\t\t\tfor (i =0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t clade.DcPvalue[i][l] /= (double) GeoDis.numPermutations;\n\t\t\t clade.DnPvalue[i][l] /= (double) GeoDis.numPermutations;\n\t\t\t}\n\t\t}\n\n\t}", "private void introduceMutations() {\n }", "public void setProbMut(double d){\n if ((d < 0) || (d > 1)){\n throw new IllegalArgumentException(\"Mutation probability cannot be less than 0 or greater than 1.\");\n }\n mutationProb = d;\n }", "public void MutationDNF (TableVar Variables) {\r\n\r\n int posiciones, interv, i, j, l, h, eliminar;\r\n float m;\r\n \r\n posiciones = Variables.getNVars()*long_poblacion;\r\n \r\n if (mut_prob > 0)\r\n while (Mu_next < posiciones) {\r\n // Determine the chromosome and gene to be muted\r\n i = Mu_next/Variables.getNVars();\r\n j = Mu_next%Variables.getNVars();\r\n \r\n // Copy the chromosome\r\n for (h=0; h<Variables.getNVars(); h++) {\r\n for (l=0; l<=Variables.getNLabelVar(h); l++)\r\n Des.setCromElemGene(descendientes, h, l, Inter.getCromElemGene(i,h,l));\r\n }\r\n \r\n // Make the mutation\r\n // Half the mutations eliminates the variable from the rule\r\n // The others sets a random value (including the elimination)\r\n eliminar = Randomize.Randint (0,10);\r\n if (eliminar <=5){\r\n for (l=0; l<=Variables.getNLabelVar(j); l++)\r\n Des.setCromElemGene(descendientes, j, l, 0);\r\n }\r\n else {\r\n interv = 0;\r\n for (l=0; l<Variables.getNLabelVar(j); l++) {\r\n Des.setCromElemGene(descendientes, j, l, Randomize.Randint(0,1));\r\n if (Des.getCromElemGene(descendientes, j, l)==1)\r\n interv ++;\r\n }\r\n // si no interviene ningún valor o intervienen todos, la variable no interviene\r\n if (interv==0 || interv==Variables.getNLabelVar(j))\r\n Des.setCromElemGene(descendientes, j, Variables.getNLabelVar(j), 0);\r\n else\r\n Des.setCromElemGene(descendientes, j, Variables.getNLabelVar(j), 1);\r\n }\r\n descendientes++;\r\n\r\n // Marks the chromosome as no evaluated\r\n Des.setIndivEvaluated(i,false);\r\n\r\n // Compute next position to be muted\r\n if (mut_prob<1) {\r\n m = (float) Randomize.Rand();\r\n Mu_next += Math.ceil (Math.log(m) / Math.log(1.0 - mut_prob));\r\n }\r\n else\r\n Mu_next += 1;\r\n\r\n }\r\n Mu_next -= posiciones;\r\n \r\n }", "public Specimen mutate(Specimen specimen) {\n\t\tMap<String, Double> weights = WeightUtil.extractWeights(specimen.getWeights());\n\n\t\t// Now, with a certain probabiliy mutate each weight.\n\t\tfor (Map.Entry<String, Double> entry : weights.entrySet()) {\n\t\t\tif (random.nextDouble() <= mutateProbability) {\n\t\t\t\tentry.setValue(mutate(entry.getValue()));\n\t\t\t}\n\t\t}\n\n\t\t// Create a new specimen.\n\t\treturn new Specimen(specimen.getName(), generation, WeightUtil.createWeights(weights));\n\t}", "private static void mutate(Tour tour) {\n // Loop through tour cities\n for(int tourPos1=0; tourPos1 < tour.tourSize(); tourPos1++){\n // Apply mutation rate\n if(Math.random() < mutationRate){\n // Get a second random position in the tour\n int tourPos2 = (int) (tour.tourSize() * Math.random());\n\n // Get the cities at target position in tour\n City city1 = tour.getCity(tourPos1);\n City city2 = tour.getCity(tourPos2);\n\n // Swap them around\n tour.setCity(tourPos2, city1);\n tour.setCity(tourPos1, city2);\n }\n }\n }", "public NAryTree apply(NAryTree tree, Random rng) {\n\t\tif (rng.nextDouble() > chanceOfRandomMutation) {\n\t\t\t//DO A SMART MUTATION\n\t\t\tNAryTree mutatedTree;\n\t\t\tboolean changed = false;\n\t\t\tint nrTries = 0;\n\t\t\tTreeMutationAbstract mutator;\n\t\t\tdo {\n\t\t\t\tmutator = getSmartMutatorForChance(rng.nextDouble() * totalChanceSmart);\n\n\t\t\t\tmutatedTree = mutator.mutate(tree);\n\n\t\t\t\tchanged = mutator.changedAtLastCall();\n\t\t\t\tnrTries++;\n\n\t\t\t\tthis.locationOfLastChange = mutator.locationOfLastChange;\n\t\t\t\tthis.typeOfChange = mutator.typeOfChange;\n\n\t\t\t\t//FIXME problem with the smart mutator, it always says that the individual changed, even when it didn't.\n\t\t\t\tif (nrTries > 2 && changed == false) {\n\t\t\t\t\t//Going dumb... We tried to be smart long enough\n\t\t\t\t\treturn applyDumb(tree, rng);\n\t\t\t\t}\n\t\t\t} while (!changed);\n\n\t\t\tassert mutatedTree.isConsistent();\n\t\t\treturn mutatedTree;\n\t\t} else {\n\t\t\t//DELEGATE TO DUMB COORDINATOR\n\t\t\treturn applyDumb(tree, rng);\n\t\t}\n\t}", "public void MutationCAN (TableVar Variables) {\r\n\r\n int posiciones, i, j, h, eliminar;\r\n float m;\r\n\r\n posiciones = Variables.getNVars()*long_poblacion;\r\n\r\n if (mut_prob > 0)\r\n while (Mu_next < posiciones) {\r\n // Determine the chromosome and gene to be muted\r\n i = Mu_next/Variables.getNVars();\r\n j = Mu_next%Variables.getNVars();\r\n\r\n // Copy the chromosome\r\n for (h=0; h<Variables.getNVars(); h++) {\r\n Des.setCromElem(descendientes, h, Inter.getCromElem(i,h));\r\n }\r\n\r\n // Make the mutation\r\n // Half the mutations eliminates the variable from the rule\r\n // The others sets a random value (including the elimination)\r\n eliminar = Randomize.Randint (0,10);\r\n if (eliminar <=5){\r\n if (!Variables.getContinuous(j))\r\n Des.setCromElem(descendientes, j, (int)Variables.getMax(j)+1);\r\n else\r\n Des.setCromElem(descendientes, j, Variables.getNLabelVar(j));\r\n }\r\n else {\r\n if (!Variables.getContinuous(j))\r\n Des.setCromElem(descendientes, j, Randomize.Randint((int)Variables.getMin(j), (int)Variables.getMax(j)));\r\n else\r\n Des.setCromElem(descendientes, j, Randomize.Randint(0,(Variables.getNLabelVar(j)-1)));\r\n }\r\n descendientes++;\r\n\r\n // Marks the chromosome as no evaluated\r\n Des.setIndivEvaluated(i,false);\r\n\r\n // Compute next position to be muted\r\n if (mut_prob<1) {\r\n m = (float) Randomize.Rand();\r\n Mu_next += Math.ceil (Math.log(m) / Math.log(1.0 - mut_prob));\r\n }\r\n else\r\n Mu_next += 1;\r\n\r\n }\r\n Mu_next -= posiciones;\r\n\r\n }", "private void mutate() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tpopulationArray.set(i, populationArray.get(i).generateNeighbor());\n\t\t}\n\t}", "public static void mutate(Chromosome chrome) {\n \n // Loop through tour cities\n for(int rosterNursePos1=0; rosterNursePos1 < chrome.ChromosomeRowSize(); rosterNursePos1++){\n for (int rosterDayPos1=0; rosterDayPos1<chrome.chromosomeColumnCount();rosterDayPos1++){\n if(RosterManager.isPreviousShift(chrome.getShift(rosterNursePos1, rosterDayPos1))==false || RosterManager.isNextShift(chrome.getShift(rosterNursePos1, rosterDayPos1))==false || chrome.getShift(rosterNursePos1, rosterDayPos1).getHours()!=0 ){\n if(Math.random() < mutationRate){\n // Get a second random position in the tour\n int rosterNursePos2= rosterNursePos1;\n int rosterDayPos2 = returnValidPos(rosterNursePos2, randomizeShiftGeneration(chrome), chrome );\n\n // Get the cities at target position in tour\n Gene gene1 = chrome.retrieveGene(rosterNursePos1, rosterDayPos1);\n Gene gene2 = chrome.retrieveGene(rosterNursePos2, rosterDayPos2);\n\n // Swap them around\n chrome.saveGene(rosterNursePos1, rosterDayPos1, gene2);\n chrome.saveGene(rosterNursePos2, rosterDayPos2, gene1);\n \n }\n \n \n } \n // Apply mutation rate\n \n }\n \n }\n \n \n }", "public Lambda_phage(double prob_surface, double prob_enzymes) {\n\t\t\n\t\tcurrent_ba = null;\n\t\t\n\t\t/* check for mutation probability */\n\t\tif (mutate_prob >= Sim.randy.nextDouble()) { \n\t\t\tdouble new_prob_surface, new_prob_enzymes;\n\t\t\t\n\t\t\t/* check for helpful mutation probability */\n\t\t\tif (Sim.randy.nextDouble() > mutate_helps) {\n\t\t\t\tnew_prob_surface = prob_surface + Sim.randy.nextDouble()\n\t\t\t\t\t\t* mutate_amount * (1 - prob_surface);\n\t\t\t\tnew_prob_enzymes = prob_enzymes + Sim.randy.nextDouble()\n\t\t\t\t\t\t* mutate_amount * (prob_surface);\n\t\t\t\n\t\t\t/* check for harmful mutation probability */\n\t\t\t} else { // If mutation hurts\n\t\t\t\tnew_prob_surface = prob_surface - Sim.randy.nextDouble()\n\t\t\t\t\t\t* mutate_amount * (1 - prob_enzymes);\n\t\t\t\tnew_prob_enzymes = prob_enzymes - Sim.randy.nextDouble()\n\t\t\t\t\t\t* mutate_amount * (prob_enzymes);\n\t\t\t}\n\t\t\tthis.prob_surface = new_prob_surface;\n\t\t\tthis.prob_enzymes = new_prob_enzymes;\n\t\t\t\n\t\t/* mutation does not occur */\n\t\t} else { \n\t\t\tthis.prob_surface = prob_surface;\n\t\t\tthis.prob_enzymes = prob_enzymes;\n\t\t}\n\n\t\t/* add events */\n\t\tSim.events.add(new Event(this, rate_denature, EVENT_TYPE.DENATURE)); \n\t\tSim.events.add(new Event(this, rate_infection,EVENT_TYPE.INFECT)); \n\n\t\t/* update simulation counters */\n\t\tSim.lps_sum_sr += this.prob_surface;\n\t\tSim.lps_sum_enz += this.prob_enzymes;\n\t}", "public Individual mutate(Config config)\r\n\t{\r\n\t\tIndividual ind;\r\n\r\n\t\tif (isBinaryEncoding())\r\n\t\t{\r\n\t\t\t// Create a new binary individual\r\n\t\t\tind = new Individual(intSize, intCount, signedInt);\r\n\r\n\t\t\t// Copy our genes to other individual\r\n\t\t\tfor (int i = 0; i < binary.length; i++)\r\n\t\t\t\tind.binary[i] = binary[i];\r\n\r\n\t\t\t// Mutate\r\n\t\t\tint mutatedBits = (int) (Math.random() * config.mutationStrength) + 1;\r\n\t\t\tfor (int i = 0; i < mutatedBits; i++)\r\n\t\t\t{\r\n\t\t\t\tint bitIndex = (int) (Math.random() * binary.length);\r\n\t\t\t\tind.binary[bitIndex] = !ind.binary[bitIndex];\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Create a new float individual\r\n\t\t\tind = new Individual();\r\n\r\n\t\t\t// Copy our genes\r\n\t\t\tind.realValue = realValue;\r\n\r\n\t\t\t// Mutate\r\n\t\t\tind.realValue += (Math.random() * 2f - 1f) * config.mutationStrength;\r\n\t\t}\r\n\r\n\t\treturn ind;\r\n\t}", "public void mutation(Graph_GA obj, float mutation_index)\r\n\t{\r\n\t\t\r\n\t\tList<Integer> list_num = new ArrayList<Integer>();\r\n\t\tInteger[] shuffled_list = null;\r\n\t\tList<Integer> mutation_vertex = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tlist_num.add(i+1);\r\n\t\t}\r\n\t\tjava.util.Collections.shuffle(list_num);\r\n\t\tshuffled_list = list_num.toArray(new Integer[list_num.size()]);\r\n\t\t\r\n\t\tfor(int i=0;i<(chromosome_size*mutation_index);i++)\r\n\t\t{\r\n\t\t\tmutation_vertex.add(shuffled_list[i]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tGA_Graph_Node vertex_container[] = obj.getNodes();\r\n\t\t\r\n\t\tfor(int i=0;i<obj.num_vertex;i++)\r\n\t\t{\r\n\t\t\tInteger[] valid_colors = null;\r\n\t\t\tList<Integer> adjacent_vertex_color = new LinkedList<Integer>();\r\n\t\t\tSet<DefaultEdge> adjacent_edges = obj.graph_inp.edgesOf(vertex_container[i]);\r\n\t\t\tIterator<DefaultEdge> adj_edge_list = adjacent_edges.iterator();\r\n\t\t\t\r\n\t\t\twhile(adj_edge_list.hasNext())\r\n\t\t\t{\r\n\t\t\t\tDefaultEdge adj_edge = adj_edge_list.next();\r\n\t\t\t\tGA_Graph_Node adj_node = null;\r\n\t\t\t\tadj_node = obj.graph_inp.getEdgeSource(adj_edge);\r\n\t\t\t\tif(adj_node==null||adj_node==vertex_container[i])\r\n\t\t\t\t{\r\n\t\t\t\t\tadj_node = obj.graph_inp.getEdgeTarget(adj_edge);\r\n\t\t\t\t}\r\n\t\t\t\tadjacent_vertex_color.add(chromosome[adj_node.numID-1]);\r\n\t\t\t}\r\n\t\t\tif(adjacent_vertex_color.contains(chromosome[i])&&mutation_vertex.contains(i+1))\r\n \t{\r\n\t\t\t\tList<Integer> valid_color_list = new LinkedList<Integer>();\r\n \t\tfor(int j=0;j<num_colors;j++)\r\n \t\t{\r\n \t\t\tif(adjacent_vertex_color.contains(j+1) == false)\r\n \t\t\t\tvalid_color_list.add(j+1);\t\r\n \t}\r\n \t\t\r\n \t\tvalid_colors = valid_color_list.toArray(new Integer[valid_color_list.size()]);\r\n \t\t\r\n// \t\tSystem.out.println(valid_colors.toString());\r\n \t\tif(valid_colors.length> 0)\r\n \t\t{\r\n\t \t\tint rand_num = random_generator.nextInt(valid_colors.length);\r\n\t \t\t\tint new_color = valid_colors[rand_num];\r\n\t \t\t\t\r\n\t \t\t\tchromosome[i] = new_color;\r\n \t\t}\r\n \t}\r\n\t\t\t\r\n }\r\n\t}", "public void mutate() {\n if (this.offspring != null) {\n for (int i = 0; i < this.offspring.size(); i++) {\n\n if (Defines.probMutate > Math.random()) {\n // OK, choose two genes to switch\n int nGene1 = Defines.randNum(0, Defines.chromosomeSize - 1);\n int nGene2 = nGene1;\n // Make sure gene2 is not the same gene as gene1\n while (nGene2 == nGene1) {\n nGene2 = Defines.randNum(0, Defines.chromosomeSize - 1);\n }\n\n // Switch two genes\n String temp = this.offspring.get(i).getGene(nGene1);\n\n this.offspring.get(i).setGene(nGene1, this.offspring.get(i).getGene(nGene2));\n this.offspring.get(i).setGene(nGene2, temp);\n }\n // Regenerate the chromosome\n ChromosomeGenerator chromoGen = new ChromosomeGenerator();\n chromoGen.update(this.offspring.get(i));\n }\n\n }\n\n }", "public abstract Chromosome mutation(Chromosome child);", "void mutate() {\r\n\t\tif (Math.random() < TSP.p_mutate) {\r\n\t\t\t// randomly flip two cities\r\n\t\t\trndSwapTwo();\r\n\t\t\tthis.distance = distance();\r\n\t\t}\r\n\t}", "public void polynomialMutate(EvolutionState state, MersenneTwisterFast random, float eta_m, boolean alternativePolynomialVersion, boolean mutationIsBounded)\n {\n FloatVectorSpecies s = (FloatVectorSpecies) species;\n TraceableFloat[] ind = genome;\n // double[] min_realvar = s.minGenes;\n // double[] max_realvar = s.maxGenes;\n\n double rnd, delta1, delta2, mut_pow, deltaq;\n double y, yl, yu, val, xy;\n double y1;\n for (int j=0; j < ind.length; j++)\n {\n if (random.nextBoolean(s.mutationProbability[j]))\n {\n y1 = y = ind[j].getValue();\n yl = s.minGene(j); //min_realvar[j];\n yu = s.maxGene(j); //max_realvar[j];\n delta1 = (y-yl)/(yu-yl);\n delta2 = (yu-y)/(yu-yl);\n\n int totalTries = s.outOfBoundsRetries;\n int tries = 0;\n for(tries = 0; tries < totalTries || totalTries == 0; tries++) // keep trying until totalTries is reached if it's not zero. If it's zero, go on forever.\n {\n rnd = (random.nextFloat());\n mut_pow = 1.0/(eta_m+1.0);\n if (rnd <= 0.5)\n {\n xy = 1.0-delta1;\n val = 2.0*rnd + (alternativePolynomialVersion ? (1.0-2.0*rnd)*(Math.pow(xy,(eta_m+1.0))) : 0.0);\n deltaq = Math.pow(val,mut_pow) - 1.0;\n }\n else\n {\n xy = 1.0-delta2;\n val = 2.0*(1.0-rnd) + (alternativePolynomialVersion ? 2.0*(rnd-0.5)*(Math.pow(xy,(eta_m+1.0))) : 0.0);\n deltaq = 1.0 - (Math.pow(val,mut_pow));\n }\n y1 = y + deltaq*(yu-yl);\n if (!mutationIsBounded || (y1 >= yl && y1 <= yu)) break; // yay, found one\n }\n\n // at this point, if tries is totalTries, we failed\n if (totalTries != 0 && tries == totalTries)\n {\n // just randomize\n // y1 = (float)(min_realvar[j] + random.nextFloat(true, true) * (max_realvar[j] - min_realvar[j]));\n y1 = (float)(s.minGene(j) + random.nextFloat(true, true) * (s.maxGene(j) - s.minGene(j)));\n s.outOfRangeRetryLimitReached(state);// it better get inlined\n }\n\n ind[j] = this.mutateGene(ind[j], (float)y1, state);\n state.incrementMutationCount();\n }\n }\n }", "public void defaultMutate() {\n int mutationIndex = RNG.randomInt(0, this.m_GenotypeLength);\n //if (mutationIndex > 28) System.out.println(\"Mutate: \" + this.getSolutionRepresentationFor());\n if (this.m_Genotype.get(mutationIndex)) this.m_Genotype.clear(mutationIndex);\n else this.m_Genotype.set(mutationIndex);\n //if (mutationIndex > 28) System.out.println(this.getSolutionRepresentationFor());\n }", "@Override\n\t public Node apply(Node gen) {\n\t\t gen = gen.clone(null);\n\t\t int n = gen.weight();\n\t\t int m = (int)(Math.random()*n);\n\t\t Node mutate_node = gen.get(m);\n\t\t int x = (int)(Math.random()*codes.length);\n\t\t mutate_node.oper = codes[x];\n\t\t return gen;\n\t }", "private int[] mutateScramble(int[] child) {\n println(\"Doing a scramble mutation\", 4);\n displayChromosome(child, 4);\n for(int r = 0; r < 3; r++) {\n child = mutateSwapChild(child);\n child = mutateInversionChild(child);\n }\n displayChromosome(child, 4);\n return child;\n }", "NeuralNetwork mutate(float rate);", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "public Population mutatePopulation(Population population, List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n\n // Loop over current population by fitness\n for (int populationIndex = 1; populationIndex < population.size(); populationIndex++) {\n // if the current individual is selected to mutation phase\n if (this.mutationRate > Math.random()) {\n Individual individual = population.getFittest(populationIndex);\n individual = this.mutateIndividual(individual);\n }\n }\n // Return mutated population\n return population;\n }", "public double getPercentMutants() {\n\t\tdouble count = (double) getNumMutants();\n\t\tdouble pSize = (double) this.getPopSize();\n\n\t\treturn count*100.0 / pSize;\n\t}", "public float getProbMut () {\r\n return mut_prob;\r\n }", "public static boolean solve(Problem inputProblem, int popLimit, double mutChance, int iterLimit) {\n\n // Check All the Input Parameter\n // popLimit: Make as Even\n int evenBase = 2;\n if (popLimit % evenBase != 0){\n popLimit = popLimit + 1;\n }\n // mutChance: in the Range of 0% and 100%\n if (mutChance < 0 || mutChance > 1){\n System.out.println(\"Invalid Mutation Chance: \" + mutChance);\n return false;\n }\n\n // Initialization\n Solution[] currentPop = initPopulation(inputProblem, popLimit);\n Solution[] generatedPop, nextPop;\n\n System.out.println(0 + \"\\t\" +0+ \"\\t\" +currentPop[0].distance);\n long time = System.nanoTime();\n\n // Loop For Counting Iteration\n for (int turn = 0; turn < iterLimit; turn++) {\n //System.out.println(currentPop[0].distance);\n // Initialization Next Generation\n generatedPop = new Solution[popLimit];\n\n // Loop for Generating Next Population\n Solution[] parent, offspring;\n for (int leftChild = popLimit; leftChild > 0; leftChild = leftChild - 2) {\n // Selection\n parent = rankSelection(currentPop);\n // CrossOver\n offspring = CrossOver_mapping(currentProblem, parent[0], parent[1]);\n // Prevent Duplicated Offspring\n if (haveDuplicated(generatedPop, offspring[0]) || haveDuplicated(generatedPop, offspring[1])) {\n leftChild = leftChild + 2;\n continue;\n }\n // Add Child into generatedPop\n generatedPop[leftChild - 1] = offspring[0];\n generatedPop[leftChild - 2] = offspring[1];\n }\n\n // Mutation For Each Solution\n Solution newElement;\n for (int index = 0; index < popLimit; index++){\n if(Math.random() < mutChance){\n // Use Local Search to Finish Mutation\n newElement = HillClimbing.solve_invoke(inputProblem, generatedPop[index]);\n // Prevent Duplicated Offspring\n if (!haveDuplicated(generatedPop, newElement)) {\n generatedPop[index] = newElement;\n }\n }\n }\n\n // Sort the Generated Array\n Arrays.sort(generatedPop);\n // Produce Next Generation\n nextPop = getTopSolutions(currentPop, generatedPop, popLimit);\n\n // Switch nextPop to currentPop\n currentPop = nextPop;\n System.out.println((System.nanoTime() - time) + \"\\t\" + (turn+1) + \"\\t\" + currentPop[0].distance);\n }\n // Store into the Static Variable\n optimalSolution = currentPop[0];\n return true;\n }", "@Override\n public double proposal() {\n Tree tree = treeInput.get();\n\n Node node;\n if (useNodeNumbers) {\n int leafNodeCount = tree.getLeafNodeCount();\n int i = Randomizer.nextInt(leafNodeCount);\n node = tree.getNode(i);\n } else {\n int i = Randomizer.nextInt(taxonIndices.length);\n node = tree.getNode(taxonIndices[i]);\n }\n\n double value = node.getHeight();\n\n if (value == 0.0) {\n return Double.NEGATIVE_INFINITY;\n }\n double newValue = value;\n\n boolean drawFromDistribution = samplingDateTaxonNames.contains(node.getID());\n if (drawFromDistribution) {\n SamplingDate taxonSamplingDate = samplingDatesInput.get().get(samplingDateTaxonNames.indexOf(node.getID()));\n double range = taxonSamplingDate.getUpper() - taxonSamplingDate.getLower();\n newValue = taxonSamplingDate.getLower() + Randomizer.nextDouble() * range;\n } else {\n if (useGaussian) {\n newValue += Randomizer.nextGaussian() * windowSize;\n } else {\n newValue += Randomizer.nextDouble() * 2 * windowSize - windowSize;\n }\n }\n\n\n Node fake = null;\n double lower, upper;\n\n if (((ZeroBranchSANode)node).isDirectAncestor()) {\n fake = node.getParent();\n lower = getOtherChild(fake, node).getHeight();\n if (fake.getParent() != null) {\n upper = fake.getParent().getHeight();\n } else upper = Double.POSITIVE_INFINITY;\n } else {\n //lower = Double.NEGATIVE_INFINITY;\n lower = 0.0;\n upper = node.getParent().getHeight();\n }\n\n if (newValue < lower || newValue > upper) {\n return Double.NEGATIVE_INFINITY;\n }\n\n if (newValue == value) {\n // this saves calculating the posterior\n return Double.NEGATIVE_INFINITY;\n }\n\n if (fake != null) {\n fake.setHeight(newValue);\n }\n node.setHeight(newValue);\n\n if (newValue < 0) {\n for (int i=0; i<tree.getNodeCount(); i++){\n double oldHeight = tree.getNode(i).getHeight();\n tree.getNode(i).setHeight(oldHeight-newValue);\n }\n } else {\n boolean dateShiftDown = true;\n for (int i=0; i< tree.getLeafNodeCount(); i++){\n if (tree.getNode(i).getHeight() == 0){\n dateShiftDown = false;\n break;\n }\n }\n if (dateShiftDown) {\n ArrayList<Double> tipNodeHeights= new ArrayList<Double>();\n for (int i=0; i<tree.getLeafNodeCount(); i++){\n tipNodeHeights.add(tree.getNode(i).getHeight());\n }\n Collections.sort(tipNodeHeights);\n double shiftDown = tipNodeHeights.get(0);\n for (int i=0; i<tree.getNodeCount(); i++){\n double oldHeight = tree.getNode(i).getHeight();\n tree.getNode(i).setHeight(oldHeight-shiftDown);\n }\n }\n }\n\n boolean check = true;\n for (int i=0; i<tree.getNodeCount(); i++){\n if (tree.getNode(i).getHeight() < 0) {\n System.out.println(\"Negative height found\");\n System.exit(0);\n }\n if (tree.getNode(i).getHeight() == 0) {\n check = false;\n }\n }\n if (check) {\n System.out.println(\"There is no 0 height node\");\n System.exit(0);\n }\n\n //tree.setEverythingDirty(true);\n\n return 0.0;\n }", "public void setProbMut (float value) {\r\n mut_prob= value;\r\n }", "public static void main(String args[]) {\n\t\t\n\t\tint populationSize = 5;\n\t\tint crossCount = (int)(populationSize * 0.9);\n\t\tint mutCount = (int)(populationSize * 0.05);\n\t\tint copyCount = populationSize - crossCount - mutCount;\n\n\t\t//90% through crossover\n\t\tfor(int i = 0; i < crossCount; i++) \n\t\t\tSystem.out.println(\"Cross: \" + i);\n\t\t\n\t\t//5% by copying\n\t\tfor(int i = crossCount; i < crossCount + copyCount; i++) \n\t\t\tSystem.out.println(\"Copy: \" + i);\n\t\t\n\t\t\n\t\t//5% by mutation\n\t\tfor(int i = crossCount + copyCount; i < populationSize; i++) \n\t\t\tSystem.out.println(\"Mut: \" + i);\n\t\t\n\t\tfor(int i = 0; i < 60; i++) {\n\t\t\t\n\t\t\tPoint p1 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //bot's point\n\t\t\tPoint p2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //enemy point\n\t\t\twhile(p2.equals(p1))\n\t\t\t\tp2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600));\n\t\t\t\n\t\t\tfloat angle = (float) Math.atan2(p2.y - p1.y, p2.x - p1.x);\n\t\t\tDecimalFormat df = new DecimalFormat(\"0.0000\");\n\t\t\tSystem.out.println(p1.x + \" \" + p1.y + \" \" + p2.x + \" \" + p2.y + \" \" + df.format(angle));\n\t\t\t\n\t\t}\n\t\t\n\t}", "public int mutateGene(int gene);", "void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }", "public void assignMatingProportions() {\n\t\tdouble totalAverageSpeciesFitness = 0.0;\r\n\r\n\t\t// hold the proportion of offspring each species should generate\r\n\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ttotalAverageSpeciesFitness += s.getAverageAdjustedFitness();\r\n\t\t}\r\n\r\n\t\t// set map values to be a proportion of the total adjusted\r\n\t\t// fitness\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ts.assignProp(totalAverageSpeciesFitness);\r\n\t\t}\r\n\t}", "void permutateObjects()\n {\n for (int i = 0; i < sampleObjects.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleStrings[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleNumbers[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n specialValues[r.nextInt(2)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleArrays[r.nextInt(5)]);\n }\n }\n }", "public SO_Mutation(HashMap<String, Object> parameters) {\n super(parameters);\n if (parameters.get(\"probability\") != null)\n mutationProbability_ = (Double) parameters.get(\"probability\");\n }", "public Chromosome doBitFlipMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n int itemToMutate = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n newSelection.set(itemToMutate, !newSelection.get(itemToMutate));\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public void defaultMutate(EvolutionState state, int thread)\n {\n FloatVectorSpecies s = (FloatVectorSpecies) species;\n\n MersenneTwisterFast rng = state.random[thread];\n for(int x = 0; x < genome.length; x++)\n if (rng.nextBoolean(s.mutationProbability(x)))\n {\n float old = genome[x].getValue();\n for(int retries = 0; retries < s.duplicateRetries(x) + 1; retries++)\n {\n switch(s.mutationType(x))\n {\n case FloatVectorSpecies.C_GAUSS_MUTATION:\n gaussianMutation(state, rng, s, x);\n break;\n case FloatVectorSpecies.C_POLYNOMIAL_MUTATION:\n polynomialMutation(state, rng, s, x);\n break;\n case FloatVectorSpecies.C_RESET_MUTATION:\n floatResetMutation(state, rng, s, x);\n break;\n case FloatVectorSpecies.C_INTEGER_RESET_MUTATION:\n integerResetMutation(state, rng, s, x);\n break;\n case FloatVectorSpecies.C_INTEGER_RANDOM_WALK_MUTATION:\n integerRandomWalkMutation(state, rng, s, x);\n break;\n default:\n state.output.fatal(\"In FloatVectorIndividual.defaultMutate, default case occurred when it shouldn't have\");\n break;\n }\n if (genome[x].getValue() != old) break;\n // else genome[x] = old; // try again\n }\n }\n }", "public static void randomArrayAndPermutate(){\n List<Integer> originalArray = new ArrayList<Integer>();\n for(int i = 1; i <= 10; i++){\n originalArray.add(i);\n }\n List<Integer> permutatedArray = new ArrayList<Integer>();\n int randomPos = 0;\n for(int i = 1; i <= 10; i++){\n randomPos = (int)(Math.random() * originalArray.size() + 0);\n permutatedArray.add(originalArray.remove(randomPos));\n }\n int sum = permutatedArray.get(0)+permutatedArray.get(permutatedArray.size()-1);\n System.out.println(permutatedArray + \" Sum of first and last: \" + sum);\n }", "public abstract List<Double> updatePopulations();", "public void findMutual(){\n\n }", "public static Double[] mutate(Double[] genotype) {\n\t\tRandom random = new Random();\n\t\tint position = random.nextInt(variableNum);\n\t\tgenotype[position]+=((Math.random()-0.5)*mutateVal);\n\t\tif(genotype[position] > maxValue) genotype[position] = maxValue;\n\t\tif(genotype[position] < minValue) genotype[position] = minValue;\n\t\treturn genotype;\n\t}", "public void perder() {\n // TODO implement here\n }", "private Vector step(){\n// System.out.println();\n// System.out.println(generationCount);\n// System.out.println(\"The Population is:\");\n// System.out.println(population);\n \n //DETERMINE WHO SURVIVES INTO NEXT GENERATION\n Vector nextGeneration = surviveType.run(population, fitnessArray);\n\n //DO THE CROSSOVER PROCESS\n //WHILE THE NEXT GENERATION ISN'T FULL\n while (nextGeneration.size() < (populationSize - randGenes)){\n //FIND PARENTS\n Gene parentOne, parentTwo;\n do {\n Gene[] parents = selectType.run(population, fitnessArray);\n parentOne = parents[0];\n parentTwo = parents[1];\n } while (selectPairs && (! closeEnough(parentOne, parentTwo)));\n //ADD CHILDREN\n Gene[] kids = crossType.children(parentOne, parentTwo);\n\n nextGeneration.add(kids[0]);\n if (nextGeneration.size() < (populationSize - randGenes)){\n nextGeneration.add(kids[1]);\n }\n }\n //ADD RANDOM GENES TO THE POPULATION\n while (nextGeneration.size() < populationSize){\n nextGeneration.add(initializer.createRandomGene(fitnessFunction, minRadius, maxRadius));\n }\n //MUTATE THE NEXT GENERATION\n for (int j = 0; j < populationSize; j++){\n if (Math.random() < mutationProb){\n nextGeneration.set(j, mutationType.run((Gene) nextGeneration.get(j)));\n }\n }\n\n //COMPUTE FITNESSES AND RELOCATE IF NECESSARY\n Gene bestGene = (Gene) nextGeneration.get(0);\n int bestX = 0;\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n while (relocationType.move(bannedList, next)){\n Gene newGene = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n next = newGene;\n nextGeneration.set(x, next);\n }\n fitnessArray[x] = next.getFitness();\n\n //FOR THE PURPOSES OF UPDATING THE BANNED LIST\n if (next.getFitness() > bestGene.getFitness()){\n bestGene = next;\n bestX = x;\n }\n } //End for (int x = 0;...\n\n Arrays.sort(fitnessArray);\n\n //UPDATE THE BANNED LIST BY ADDING THE BEST GENE IN THE NEXT GENERATION IF IT'S ABOVE minAccepted AND CONTAINS MORE THAN minPoints POINTS\n if (useList){\n if ((generationCount >= firstAdd) &&\n (solutionCounter >= countNum) &&\n (bestGene.getFitness() >= minAccepted) &&\n (bestGene.getCount() >= minPoints)){\n solutionCounter = 0;\n// System.out.println(bestGene);\n Gene bestClone = new Gene (bestGene.getMajorAxisRadius(), //THIS KLUDGE IS DONE B/C .clone() IS\n bestGene.getMinorAxisRadius(), //PROTECTED, AND I CAN'T UNPROTECT IT.\n bestGene.getX(), //I USE A CLONED GENE TO PREVENT A MUTATION\n bestGene.getY(), //IN THE NEXT GENERATION FROM ALTERING bannedList\n bestGene.getOrientation(),\n bestGene.getFunction());\n bannedList = relocationType.updateBannedList(bannedList, bestClone);\n\n\n //IF NECESSARY, UPDATE THE SOLUTION LIST BY ADDING ALL CLUSTERS WITH MORE THAN minPoints POINTS AND A FITNESS OF AT LEAST minAccepted\n if (returnAllSolutions){\n for (int i = 0; i < populationSize; i++){\n Gene next = (Gene) nextGeneration.get(i);\n if ((next.getFitness() >= minAccepted) && (next.getCount() >= minPoints)){\n solutionList.add(next);\n }\n }//End for (int i = 0...\n } else {\n solutionList = bannedList;\n } //End if (returnAllSolutions){...}else{\n } //End if (generationCount > 4...\n } //End if (useList){\n\n generationCount = generationCount + 1;\n solutionCounter = solutionCounter + 1;\n\n //IF AVOIDING CONVERGENCE, AND IT HAS CONVERGED, START OVER WITH RANDOM GENES\n\n double bestFitness = bestGene.getFitness();\n double medianFitness = roundToHundredths((double) fitnessArray[(int) Math.floor(populationSize / 2)]);\n\n// System.out.println(bestFitness);\n// System.out.println(medianFitness);\n\n if ((antiConvergence) &&\n ((bestFitness - medianFitness) < (0.01 * bestFitness)) &&\n (generationCount > firstAdd)){\n nextGeneration = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n// System.out.println(\"EXPLODED CONVERGENCE!\");\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n fitnessArray[x] = next.getFitness();\n }\n Arrays.sort(fitnessArray);\n }\n\n return nextGeneration;\n }", "private TraceableFloat mutateGene(TraceableFloat a, float new_a_value, EvolutionState state){\n\n if(a.getValue() == new_a_value)//return the original gene if the value was not altered\n return a;\n\n double influence_factor_mut = Math.abs(a.getValue() - new_a_value) / (Math.abs(a.getValue()) + Math.abs(a.getValue() - new_a_value));\n double influence_factor_old = 1 - influence_factor_mut;\n\n List<TraceTuple> a_traceVector = new ArrayList<TraceTuple>();\n\n int i = 0; //index for this traceVector\n\n //check if we accumulate and the first element is already the mutation\n if(state.getAccumulateMutatioImpact() && a.getTraceVector().get(0).getTraceID() == state.getMutationCounter()){//if we accumulate mutation and the gene is influenced by mutation, accumulate that\n double oldScaledMutImpact = a.getTraceVector().get(0).getImpact() * influence_factor_old;\n a_traceVector.add(new TraceTuple(state.getMutationCounter(), influence_factor_mut + oldScaledMutImpact));\n i++; //increment i, as the first element of the traceList from a is already added\n } else { //add the new mutation ID if we don't accumulate or there is no mutation present bevore\n a_traceVector.add(new TraceTuple(state.getMutationCounter(), influence_factor_mut));\n }\n\n while(i < a.getTraceVector().size()){ //this iterates over the traceVector of this individual\n int currentAID = a.getTraceVector().get(i).getTraceID();\n double currentAImpact = a.getTraceVector().get(i).getImpact();\n\n a_traceVector.add(new TraceTuple(currentAID, influence_factor_old * currentAImpact));\n i++;\n }\n\n return new TraceableFloat(new_a_value, a_traceVector);\n }", "public int produce(int min, int max, int start, int subpopulation, Individual[] inds, ec.EvolutionState state, int thread)\n/* */ {\n/* 27 */ int n = this.sources[0].produce(min, max, start, subpopulation, inds, state, thread);\n/* */ \n/* */ \n/* */ \n/* 31 */ if (!state.random[thread].nextBoolean(this.likelihood)) {\n/* 32 */ return reproduce(n, start, subpopulation, inds, state, thread, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 38 */ if (!(this.sources[0] instanceof ec.BreedingPipeline)) {\n/* 39 */ for (int q = start; q < n + start; q++) {\n/* 40 */ inds[q] = ((Individual)inds[q].clone());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 48 */ if (!(inds[start] instanceof TestCaseCandidate))\n/* 49 */ state.output.fatal(\"OurMutatorPipeline didn't get an Chromosome.The offending individual is in subpopulation \" + \n/* 50 */ subpopulation + \" and it's:\" + inds[start]);\n/* 51 */ ChromosomeSpecies species = (ChromosomeSpecies)inds[start].species;\n/* */ \n/* */ \n/* */ \n/* 55 */ for (int q = start; q < n + start; q++)\n/* */ {\n/* 57 */ TestCaseCandidate i = (TestCaseCandidate)inds[q];\n/* 58 */ double mutp = 1.0D / i.getGenes().size();\n/* */ \n/* 60 */ double[] propa = new double[i.getGenes().size()];\n/* 61 */ for (int x = 0; x < i.getGenes().size(); x++)\n/* 62 */ propa[x] = mutp;\n/* 63 */ for (int x = 0; x < i.getGenes().size(); x++) {\n/* 64 */ if (state.random[thread].nextBoolean(propa[x]))\n/* */ {\n/* */ \n/* 67 */ ((csbst.generators.AbsractGenerator)i.getGenes().get(x)).mutate();\n/* */ }\n/* */ }\n/* */ \n/* 71 */ i.evaluated = false;\n/* */ }\n/* */ \n/* 74 */ return n;\n/* */ }", "public void doRawFitness(Chromo[] member, int index)\n {\n\n member[index].rawFitness = 0;\n int numGames = Parameters.numGames;\n Strategy player1, player2;\n IteratedPD ipd;\n \n for (int i = 0; i < Parameters.popSize; i++)\n {\n player1 = followStrategy(member[index].chromo);\n player2 = followStrategy(member[i].chromo);\n ipd = new IteratedPD(player1, player2);\n\n ipd.runSteps(numGames);\n \n member[index].rawFitness += ipd.player1Score();\n }\n }", "public void calculateProbabilities(){\n\t}", "public void permutate(double[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public void calcP() {\r\n\t\tthis.setP(sick/people.size());\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"deprecation\" })\n\tprivate static NeuralNetwork mutate(NeuralNetwork newnn, Singleton s1) throws NoSuchMethodException, SecurityException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {\n\t\tEvolveSingleton s = (EvolveSingleton) s1;\n\t\tNeuralNetManager.Neuraltracker(newnn);\n\t\t//determines type of mutation\n\t\tdouble selector = Math.random();\n\t\t//creates an arraylist of all genes\n\t\tArrayList<Gene> genes = new ArrayList<Gene>();\n\t\tfor (Layer l : newnn.getLayers()){\n\t\t\t\tfor (Neuron n : l.getNeurons()){\t\t\t\t\t\t\n\t\t\t\t\tfor (Gene g : n.getGenes())genes.add(g);\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\t\t// gene mutation\n\t\tif (selector < s.getDisableProbability()&& genes.size() > 0){\t\t\t\t\n\t\t\tGene gene= genes.get(0);\n\t\t\tif(genes.size() > 1) gene= genes.get(rand.nextInt(genes.size()-1));\n\t\t\tif(selector < s.getAdjustProbability()) {\n\t\t\t\t//adjust weight\n\t\t\t\tgene.setWeight(gene.getWeight()*(1+(Math.random()*.1)));\n\t\t\t}\n\t\t\telse if (selector < s.getRandomProbability()){\n\t\t\t\t// new random weight\n\t\t\t\tgene.setWeight(Math.random()*2 - 1);\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//disable/enable gene\n\t\t\t\tgene.toggle();\t\n\t\t\t}\n\t\t\n\t\t}\n\t\telse if (selector < s.getNewGeneProbability() || genes.size() == 0){\n\t\t\t// new gene\n\t\t\tint layer = 0;\n\t\t\tif (newnn.getLayers().size() > 2) layer = rand.nextInt(newnn.getLayers().size()-2);\n\t\t\tint neuron = 0;\n\t\t\tif (newnn.getLayers().get(layer).getNeurons().size() > 1){\n\t\t\t\t\tneuron = rand.nextInt(newnn.getLayers().get(layer).getNeurons().size()-1);\n\t\t\t}\n\t\t\tint layer2 = newnn.getLayers().size()-1;\n\t\t\tif (newnn.getLayers().size()-2-layer > 0) layer2 = layer + 1 + rand.nextInt(newnn.getLayers().size()-2-layer);\n\t\t\tint neuron2 = 0;\n\t\t\tif (newnn.getLayers().get(layer2).getNeurons().size() > 1){\n\t\t\t\t\tneuron2 = rand.nextInt(newnn.getLayers().get(layer2).getNeurons().size()-1);\n\t\t\t}\n \t\t\tdouble weight = Math.random()*2 - 1;\n \t\t\tNeuron in = newnn.getLayers().get(layer).getNeurons().get(neuron);\n \t\t\tGene g = new Gene(newnn.getLayers().get(layer2).getNeurons().get(neuron2), weight);\n \t\t\tnewnn.getLayers().get(layer2).getNeurons().get(neuron2).addInput(g);\n \t\t\tfor(int i = 0; i < in.getGenes().size();i++){\n \t \t\t\tif (newnn.getLayers().get(layer).getNeurons().get(neuron).getGenes().get(i).getConnection().getLayernumber() == layer2 &&newnn.getLayers().get(layer).getNeurons().get(neuron).getGenes().get(i).getConnection().getNumber() == neuron2){\n \t \t\t\t\tin.RemoveGenes(in.getGenes().get(i));\n \t \t\t\t\ti--;\n \t \t\t\t}\n \t \t\t}\n \t\t\tin.AddGenes(g);\n\t\t}\n\t\telse{\n\t\t\tClass<? extends Layer> layerClass = (Class<? extends Layer>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Layer\");\n\t\t\tClass<? extends Neuron> neuronClass = (Class<? extends Neuron>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Neuron\");\n\t\t\tif (newnn.getLayers().size() == 2 || selector > s.getExistingLayerProbability()){\n\t\t\t\t//new neuron in new layer\n\t\t\t\tClass<?>[] types = {boolean.class,boolean.class};\n\t\t\t\tConstructor<? extends Layer> con = layerClass.getConstructor(types);\n\t\t\t\tLayer l = con.newInstance(false,false);\n\n\t\t\t\tnewnn.addLayer(l);\n\t\t\t\tl.setNumber(newnn.getLayers().size()-1);\n\t\t\t\tNeuron n = neuronClass.newInstance();\n\t\t\t\tl.addNeuron(n);\n\t\t\t\tn.setNumber(1);\n\t\t\t\tn.setLayernumber(newnn.getLayers().size()-1);\n\t\t\t\tLayer outputlayer = newnn.getLayers().get(newnn.getLayers().size()-1);\n\t\t\t\toutputlayer.setNumber(newnn.getLayers().size());\n\n\t\t\t\t\n\t\t\t\tArrayList<Gene> genes2 = new ArrayList<Gene>();\n\t\t\t\tfor (Gene g : genes){\n\t\t\t\t\tif (newnn.getLayers().get(g.getConnection().getLayernumber()-1).isOutput()) genes2.add(g);\n\t\t\t\t}\n\t\t\t\tif (genes2.size() > 0){\n\t\t\t\t\tGene gene= genes2.get((int) ((genes2.size()-1)*Math.random()));\n\t\t\t\t\tNeuron out = gene.getConnection();\n\t\t\t\t\tgene.setConnection(n);\n\t\t\t\t\tn.AddGenes(new Gene(out, Math.random()*2 -1));\n\t\t\t\t\tgene.setInput(n);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<Neuron> ns = new ArrayList<Neuron>();\n\t\t\t\t\tfor (Gene g : genes){\n\t\t\t\t\t\tns.add(g.getConnection());\n\t\t\t\t\t}\n\t\t\t\t\tGene gene = new Gene(n, Math.random()*2-1);\n\t\t\t\t\tn.addInput(gene);\n\t\t\t\t\tGene gene2 = new Gene(outputlayer.getNeurons().get(0), Math.random()*2-1);\n\t\t\t\t\tif(outputlayer.getNeurons().size()-1 > 0) gene2 = new Gene(outputlayer.getNeurons().get(rand.nextInt(outputlayer.getNeurons().size()-1)), Math.random()*2-1);\n\t\t\t\t\ttry{\n\t\t\t\t\t\tNeuron in = ns.get(rand.nextInt(ns.size()-1));\n\t\t\t\t\t\tin.AddGenes(gene);\n\t\t\t\t\t\tgene.setInput(in);\n\t\t\t\t\t\tgene.getConnection().addInput(gene);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\tns.get(0).AddGenes(gene);\n\t\t\t\t\t\tgene.setInput(ns.get(0));\n\t\t\t\t\t\tgene.getConnection().addInput(gene);\n\t\t\t\t\t}\n\t\t\t\t\tn.AddGenes(gene2);\n\t\t\t\t\tgene2.setInput(n);\n\t\t\t\t\tgene2.getConnection().addInput(gene2);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\telse{\n\t\t\t\t//new node in existing layer\n\t\t\t\tArrayList<Layer> layers = new ArrayList<Layer>();\n\t\t\t\tfor (Layer l : newnn.getLayers()){\n\t\t\t\t\tif (!l.isInput()&&!l.isOutput()){\n\t\t\t\t\t\tlayers.add(l);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tLayer selected = null;\n\t\t\t\ttry{\n\t\t\t\t\tselected = layers.get(rand.nextInt(layers.size()-1));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tselected = layers.get(0);\n\t\t\t\t}\n\t\t\t\tArrayList<Gene> genes2 = new ArrayList<Gene>();\n\t\t\t\tfor (int i = 0 ; i < selected.getNumber()-1; i++){\n\t\t\t\t\tLayer l = newnn.getLayers().get(i);\t\n\t\t\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\t\t\tfor(Gene g : n.getGenes()){\n\t\t\t\t\t\t\tif (g.getConnection().getLayernumber() > selected.getNumber() && n.getLayernumber() < selected.getNumber())genes2.add(g);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tGene gene = null;\n\t\t\t\t\ttry{\n\t\t\t\t\t\tgene = genes2.get(rand.nextInt(genes2.size()-1));\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\tgene = genes2.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tNeuron n = neuronClass.newInstance();\n\t\t\t\t\t\n\t\t\t\t\tn.setLayernumber(selected.getNumber());\t\t\t\t\n\t\t\t\t\tselected.addNeuron(n);\n\t\t\t\t\tn.setNumber(selected.getNeurons().size());\n\t\t\t\t\tNeuron out = gene.getConnection();\n\t\t\t\t\tgene.setConnection(n);\n\t\t\t\t\tGene gene2 = new Gene(out, Math.random()*2-1);\n\t\t\t\t\tn.AddGenes(gene2);\n\t\t\t\t\tgene2.setInput(n);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tArrayList<Neuron> ns = newnn.getLayers().get(0).getNeurons();\n\t\t\t\t\tNeuron in = null;\n\t\t\t\t\ttry{\n\t\t\t\t\t\tin = ns.get(rand.nextInt(ns.size()-1));\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception f){\n\t\t\t\t\t\tin = ns.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tArrayList<Neuron> ns2 = ((Layer) newnn.getLayers().get(newnn.getLayers().size()-1)).getNeurons();\n\t\t\t\t\tNeuron on = null;\n\t\t\t\t\ttry{\n\t\t\t\t\t\ton = ns2.get(rand.nextInt(ns2.size()-1));\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception f){\n\t\t\t\t\t\ton = ns2.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tNeuron n = neuronClass.newInstance();\n\t\t\t\t\tGene gene1 = new Gene(n, Math.random()*2-1);\n\t\t\t\t\tin.AddGenes(gene1);\n\t\t\t\t\tgene1.setInput(in);\n\t\t\t\t\tGene gene2 =new Gene(on,Math.random()*2-1);\n\t\t\t\t\tgene2.setInput(n);\n\t\t\t\t\tn.AddGenes(gene2);\n\t\t\t\t\tselected.addNeuron(n);\n\t\t\t\t\tn.setNumber(selected.getNeurons().size());\n\t\t\t\t\tn.setLayernumber(selected.getNumber());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newnn;\n\t}", "private Denominators run(Denominators object,float change)\n {\n\n do {\n if ((change - object.getTwoHunderdRand().getValue()) >= 0) {\n object.getTwoHunderdRand().setQuantity(object.getTwoHunderdRand().getQuantity() + 1);\n change -= object.getTwoHunderdRand().getValue();\n continue;\n } else if ((change - object.getOneHunderdRand().getValue()) >= 0) {\n object.getOneHunderdRand().setQuantity(object.getOneHunderdRand().getQuantity()+1);\n change -= object.getOneHunderdRand().getValue();\n continue;\n } else if ((change - object.getFiftyRand().getValue()) >= 0) {\n object.getFiftyRand().setQuantity(object.getFiftyRand().getQuantity()+1);\n change -= object.getFiftyRand().getValue();\n continue;\n } else if ((change - object.getTwentyRand().getValue()) >= 0) {\n object.getTwentyRand().setQuantity(object.getTwentyRand().getQuantity()+1);\n change -= object.getTwentyRand().getValue();\n continue;\n } else if ((change - object.getTenRand().getValue()) >= 0) {\n object.getTenRand().setQuantity(object.getTenRand().getQuantity()+1);\n change -= object.getTenRand().getValue();\n continue;\n } else if ((change - object.getFiveRand().getValue()) >= 0) {\n object.getFiveRand().setQuantity(object.getFiveRand().getQuantity()+1);\n change -= object.getFiveRand().getValue();\n continue;\n } else if ((change - object.getTwoRand().getValue()) >= 0) {\n object.getTwoRand().setQuantity(object.getTwoRand().getQuantity()+1);\n change -= object.getTwoRand().getValue();\n continue;\n } else if ((change - object.getOneRand().getValue()) >= 0) {\n object.getOneRand().setQuantity(object.getOneRand().getQuantity()+1);\n change -= object.getOneRand().getValue();\n continue;\n } else if ((change - object.getFifthCent().getValue()) >= 0) {\n object.getFifthCent().setQuantity(object.getFifthCent().getQuantity()+1);\n change -= object.getFifthCent().getValue();\n continue;\n } else if ((change - object.getTwentyCent().getValue()) >= 0) {\n object.getTwentyCent().setQuantity(object.getTwentyCent().getQuantity()+1);\n change -= object.getTwentyCent().getValue();\n continue;\n } else if ((change - object.getTenCent().getValue()) >= 0) {\n object.getTenCent().setQuantity(object.getTenCent().getQuantity()+1);\n change -= object.getTenCent().getValue();\n continue;\n } else {\n break;\n }\n }while(true);\n\n return object;\n }", "public void doMutation(double probability, Solution offsbring) throws JMException {\r\n\t\r\n\t\r\n\t\t \r\n\t\t try {\r\n\t\t \t//System.out.println(offsbring.get);\r\n\t\t int chrmosomesize= offsbring.getCompositionService().size();\r\n\t\t //int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t if (random<probability){\r\n\t\t \t System.out.println(\" classs \"+offsbring.getCompositionService().get(random).getServiceClass());//getSeviceClass();\r\n\t\t\t \r\n\t\t \t String Sclass=(String) offsbring.getCompositionService().get(random).getServiceClass();//getSeviceClass();\r\n\t\t \r\n\t\t for (int i=0; i<z.ServicePool.size();i++){\r\n\t// if (z.ServicePool.get(i).getServiceFunctionality().equalsIgnoreCase(Sclass))\r\n\t\t \t if (z.ServicePool.get(i).getServiceClass().equalsIgnoreCase(Sclass))\r\n\t\t\tRequiredClass.add(z.ServicePool.get(i));\r\n\t\t }\r\n\t\t // z.ServicePool.get(9).\r\n\t\tint random2 = (PseudoRandom.randInt())%(RequiredClass.size());\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\r\n\t\t \t\t\r\n\t\t\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\t\t \t \r\n\t\t \r\n\t\t }\r\n\t\t } catch (ClassCastException e1) {\r\n\t\t Configuration.logger_.severe(\"SinglePointCrossover.doCrossover: Cannot perfom \" +\r\n\t\t \"SinglePointCrossover\");\r\n\t\t Class cls = java.lang.String.class;\r\n\t\t String name = cls.getName();\r\n\t\t throw new JMException(\"Exception in \" + name + \".doCrossover()\");\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t }", "public void incrementFitness()\n {\n this.fitness++;\n }", "public static void updateMutationRate(KNode oldBest, KNode gBest)\r\n {\r\n if(oldBest.fitness() == gBest.fitness())\r\n {\r\n if(Constants.MUTATION_PROBABILITY < Constants.MAX_MUTATION_PROBABILITY)\r\n {\r\n Constants.MUTATION_PROBABILITY+=Constants.MUTATION_INCREMENT;\r\n }\r\n }\r\n else\r\n {\r\n Constants.MUTATION_PROBABILITY = Constants.MUTATION_INCREMENT;\r\n }\r\n }", "public abstract void mutate();", "private void modifyIndividuals(){\n for(AbstractBehaviour behaviour: entityBehaviours){\n JSONObject jsonPop = null;\n GeneticInterface gi = interfaceMap.get(behaviour);\n try {\n jsonPop = gi.receiveNewPopulation();\n } catch (IOException e) {\n e.printStackTrace();\n }\n for(String key: jsonPop.keySet()){\n JSONArray funArray = jsonPop.getJSONObject(key).getJSONArray(\"functions\");\n List<Function> functions = new LinkedList<>();\n for(int a = 0; a <funArray.length(); a++){\n String tree = funArray.getString(a);\n Function functionTree = Node.treeFromString(tree, behaviour.getNumberOfInputs());\n functions.add(functionTree);\n }\n behaviour.setEntityByName(key, functions);\n }\n behaviour.resetEntities();\n }\n }", "@Override\r\n\tpublic void compute() {\r\n\r\n\t\t// compute s1, s2 secret shares for all the parties\r\n\t\t// s1s2[i] - pair(s1 SecretShare, s2 SecretShare) for party i\r\n\t\tArrayList<ArrayList<SecretShare>> s1s2 = new ArrayList<ArrayList<SecretShare>>();\r\n\t\tfor (GateIO in : this.input) {\r\n\t\t\tArrayList<SecretShare> theShares = new ArrayList<SecretShare>();\r\n\t\t\ttheShares.add(0, in.getValue().get(0)); // s1\r\n\t\t\ttheShares.add(1, in.getValue().get(1)); // s2\r\n\t\t\ts1s2.add(in.getIndex(), theShares);\r\n\t\t\t// System.out.println(\"party \" + in.getIndex());\r\n\t\t\t// System.out.println(\"s1 = \" + in.getValue().get(0));\r\n\t\t\t// System.out.println(\"s2 = \" + in.getValue().get(1));\r\n\r\n\t\t}\r\n\r\n\t\t// compute locally - s1*s2\r\n\t\tArrayList<SecretShare> localMults = new ArrayList<SecretShare>();\r\n\t\tfor (int i = 0; i < s1s2.size(); i++) {\r\n\t\t\tlocalMults.add(i, new SecretShare(s1s2.get(i).get(0).x,\r\n\t\t\t\t\tmodField(s1s2.get(i).get(0).y * s1s2.get(i).get(1).y)));\r\n\t\t\t// System.out.println(new SecretShare(s1s2.get(i).get(0).x,\r\n\t\t\t// modField(s1s2.get(i).get(0).y * s1s2.get(i).get(1).y)));\r\n\t\t}\r\n\r\n\t\t// share the local multiplications between the parties\r\n\t\t// localMultShare[i] - the secrets shares of party i new secret(mult)\r\n\t\tArrayList<ArrayList<SecretShare>> localMultsShare = new ArrayList<ArrayList<SecretShare>>();\r\n\t\tfor (int i = 0; i < localMults.size(); i++) {\r\n\t\t\tlocalMultsShare.add(i, new ArrayList<SecretShare>());\r\n\t\t}\r\n\r\n\t\tfor (SecretShare mult : localMults) {\r\n\t\t\tArrayList<SecretShare> yiShares = Polynomial\r\n\t\t\t\t\t.createShareSecret(mult.y);\r\n\t\t\t// for (int i = 0; i < yiShares.size(); i++) {\r\n\t\t\t// System.out.println(\"i = \" + i + \" y = \" + yiShares.get(i));\r\n\t\t\t// }\r\n\t\t\tfor (int i = 0; i < yiShares.size(); i++) {\r\n\t\t\t\tArrayList<SecretShare> tmp = localMultsShare.get(i);\r\n\t\t\t\ttmp.add(yiShares.get(i));\r\n\t\t\t\tlocalMultsShare.set(i, tmp);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// System.out.println(\"start\");\r\n\t\t// for (int i = 0; i < localMultsShare.size(); i++) {\r\n\t\t// for (int j = 0; j < localMultsShare.get(i).size(); j++) {\r\n\t\t// System.out.println((localMultsShare.get(i)).get(j));\r\n\t\t// }\r\n\t\t// }\r\n\t\t// System.out.println(\"end\");\r\n\r\n\t\t// compute the outPut = Yi * Zi\r\n\t\tthis.result = new ArrayList<GateIO>();\r\n\t\tfor (int i = 0; i < localMultsShare.size(); i++) {\r\n\t\t\tGateIO out = new GateIO(i);\r\n\r\n\t\t\tint outYValue = 0;\r\n\t\t\tfor (int j = 0; j < localMultsShare.get(i).size(); j++) {\r\n\t\t\t\toutYValue += computeZi(j + 1)\r\n\t\t\t\t\t\t* ((localMultsShare.get(i)).get(j)).y;\r\n\t\t\t}\r\n\t\t\tout.value.add(new SecretShare(i + 1, modField(outYValue)));\r\n\t\t\tthis.result.add(out);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < this.result.size(); i++) {\r\n\t\t\t// System.out.println(this.result.get(i).value.get(0));\r\n\t\t}\r\n\r\n\t}", "public void createSelectedPopulation(Population previousPopulation, int populationSize, double perc) {\n\t\t\n\t\tint intendedSize = (int)(populationSize * perc/100);\n\t\tSystem.out.println(\"intended size: \" + intendedSize ) ;\n\t\tint currentSize = 0;\n\t\tint randomPopulationSize;\n\t\tSolution mutant;\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\n\t\t\n\t\t//copy solutions from the previous population until the cloning factor is bigger than 1\n\t\tfor(Solution solution : previousPopulation.getPopulation()) {\n\t\t\tif(solution.getCloningFactor() < 1.0) break;\n\t\t\t\n\t\t\t//add as many clones of the current solution\n\t\t\t//as indicates the cloning factor\n\t\t\t//eg. if cloning factor is 2 -> 3 copies of this solution will go to the next population\n\t\t\tfor(int i = 0; i <= (int) solution.getCloningFactor(); i++) {\n\t\t\t\t//if we get a complete population by cloning the solution from the previous population\n\t\t\t\t//leave the method\n\t\t\t\tif(currentSize == intendedSize) break;\n\t\t\t\t\n\t\t\t\t//we create a mutation of each clone\n\t\t\t\t//if mutation is less efficient or already exists in the population we discard it\n\t\t\t\tmutant = new Solution(solution.getFrequencyRelations(), solution.getCabinets());\n\t\t\t\tArrayList<String> mutantSol = solution.mutate();\n\t\t\t\tmutant.setPossibleSolution(mutantSol);\n\t\t\t\tmutant.setPath(mutant.countPath(mutant.getPossibleSolution()));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"M: \" + mutantSol + \" \" + mutant.getPath() );\n\t\t\t//\tSystem.out.println(\"S: \" + solution.getPossibleSolution() + \" \" + solution.getPath() );\n\n\n\t\t\t\tif(mutant.getPath() >= solution.getPath() || added.contains(mutant.getPossibleSolution()) ) {\n\t\t\t\t\tpopulation.add(solution);\n\t\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"original\");\n\t\t\t\t}else {\n\t\t\t\t\tpopulation.add(mutant);\n\t\t\t\t\tadded.add(mutant.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"mutant\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcurrentSize++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//count the number of random solutions that should be added\n\t\tif(currentSize <= populationSize) {\n\t\t\t randomPopulationSize = populationSize - currentSize;\n\t\t}else return;\n\t\t\n\t\t//create random solutions and add them to the population \n\t\t//until the wished size is reached\n\t\tcreateRandomPopulation(previousPopulation.getCabinetArrangement(), randomPopulationSize);\n\t\t\t\n\t}", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\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\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "protected Individual[] mate(Individual ma, Individual pa) \n\t\t{\tfloat[] ch1 = getNewGenes(ma,pa);\n\t\t\tfloat[] ch2 = getNewGenes(pa,ma);\n\t\t\t\n\t\t\tIndividual[] kids = {new Individual(ch1),new Individual(ch2)};\n\t\t\treturn kids;\n\t\t}", "private void disturbPermut(int[] permutation) {\r\n\t\tpermutation = Arrays.copyOf(permutation, nCities);\r\n\r\n\t\tint i1 = 0, i2 = 0;\r\n\t\twhile (i1 == i2) {\r\n\t\t\ti1 = (int) MathLib.Rand.uniform(0, nCities);\r\n\t\t\ti2 = (int) MathLib.Rand.uniform(0, nCities);\r\n\t\t}\r\n\r\n\t\tpermutation[i1] = permutation[i2];\r\n\t\tpermutation[i2] = permutation[i1];\r\n\t}", "@Override\n public void mutate(Chromosome c) {\n if (c.getFitness() == 0) return;\n\n boolean[] genes = c.getGenes();\n int weight = c.getWeight();\n\n for (int i = 0; i < genes.length; i++) {\n if (weight == Config.CAPACITY) break;\n\n if (!genes[i]) {\n if (weight + Config.ITEMS[i].getWeight() <= Config.CAPACITY) {\n c.flipGene(i);\n }\n }\n }\n \n }", "void increaseStarsBy(final int amount);", "public void permutate(float[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public void permutate(int[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "void updatePercepts() {\n clearPercepts();\n\n Location r1Loc = model.getAgPos(0);\n Location r2Loc = model.getAgPos(1);\n\t\tLocation r3Loc = model.getAgPos(2);\n\t\tLocation r4Loc = model.getAgPos(3);\n\t\t\n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\t\tLiteral pos3 = Literal.parseLiteral(\"pos(r3,\" + r3Loc.x + \",\" + r3Loc.y + \")\");\n\t\tLiteral pos4 = Literal.parseLiteral(\"pos(r4,\" + r4Loc.x + \",\" + r4Loc.y + \")\");\n\n addPercept(pos1);\n addPercept(pos2);\n\t\taddPercept(pos3);\n\t\taddPercept(pos4);\n\n if (model.hasObject(GARB, r1Loc)) {\n addPercept(g1);\n }\n if (model.hasObject(GARB, r2Loc)) {\n addPercept(g2);\n }\n\t\tif (model.hasObject(COAL, r4Loc)) {\n\t\t\taddPercept(c4);\t\n\t\t}\n }", "void genPermute() {\n\t\tpermute = new ArrayList<Integer>();\n\t\tfor(int idx = 0; idx < dim(); idx++)\n\t\t\tpermute.add(idx);\n\t\tjava.util.Collections.shuffle(permute);\n\t}", "private static void calculateFitnessOfPopulation(ArrayList<Chromosome> population) {\n for (Chromosome chromosome : population) {\n // if the fitness of the chromosome has not yet been calculated (i.e. is still -1)\n fitnessFunction(chromosome);\n }\n }", "private Mutater createMutater(int mutationpoint) {\n final Mutater m = new Mutater(mutationpoint);\n m.setIgnoredMethods(mExcludeMethods);\n m.setMutateIncrements(mIncrements);\n m.setMutateInlineConstants(mInlineConstants);\n m.setMutateReturnValues(mReturnVals);\n return m;\n }" ]
[ "0.6906571", "0.6693045", "0.66277283", "0.6625278", "0.65804744", "0.6504858", "0.64911", "0.64629227", "0.6453081", "0.6371416", "0.628132", "0.618818", "0.6131652", "0.60709447", "0.6065904", "0.6057649", "0.6051788", "0.60459137", "0.60324514", "0.60068625", "0.5959208", "0.59258676", "0.59141165", "0.5893918", "0.583551", "0.5826179", "0.5817934", "0.5813843", "0.57735914", "0.57731736", "0.57650834", "0.57010186", "0.5674184", "0.56597304", "0.56548905", "0.56522274", "0.56249666", "0.56104684", "0.5561257", "0.55376333", "0.55191094", "0.55167", "0.5512632", "0.5502511", "0.54830366", "0.54798925", "0.54791284", "0.5367529", "0.5364889", "0.535592", "0.5340426", "0.53359914", "0.5331934", "0.5326617", "0.531541", "0.53075653", "0.52968085", "0.52934694", "0.52472603", "0.52447176", "0.5237859", "0.5232037", "0.5215488", "0.5214195", "0.52136594", "0.52133745", "0.52051514", "0.5201944", "0.519647", "0.5194036", "0.5192085", "0.5188671", "0.5182687", "0.5141656", "0.51371205", "0.50978553", "0.5089387", "0.50818473", "0.5064494", "0.50591534", "0.5058534", "0.5052817", "0.5048256", "0.5039447", "0.50230014", "0.50020295", "0.49978703", "0.49878818", "0.49868947", "0.49831402", "0.49809197", "0.49795163", "0.49773273", "0.4972707", "0.49708256", "0.49531615", "0.4922162", "0.49144638", "0.49105978", "0.49080056" ]
0.6673644
2
Function that performs selection from the mating pool
public static void tournamentSelect(Individual[] individulas) { int length = individulas.length; int p1, p2; Individual[] array = setupArray(length, NUM_RULES, GENE_SIZE, COND_LEN); for (int i = 0; i < individulas.length; i++) { p1 = new Random().nextInt(length); p2 = new Random().nextInt(length); if (individulas[p1].getFitness() >= individulas[p2].getFitness()) { array[i] = new Individual(individulas[p1]); } else { array[i] = new Individual(individulas[p2]); } } matingPool = Arrays.copyOf(array, length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void select() {}", "public void select();", "void select();", "public void select ();", "private void select() {\n\t\tif (selected.equals(mealSelect) && !eating) {\n\t\t\tmakeMeal();\n\t\t} else if (selected.equals(snackSelect) && !eating) {\n\t\t\tmakeSnack();\n\t\t} else if (selected.equals(medicineSelect) && !eating){\n\t\t\tmakeMedicine();\n\t\t} else if (selected.equals(playSelect) && !eating){\n\t\t\tmakePlay();\n\t\t}\n\t\t\n\t}", "protected abstract void select();", "private List<Individual<T>> selectIndividuals(Deme<T> deme) {\n return IntStream.range(0, tournamentSize).mapToObj(i -> selRandomOp.select(deme.getIndividuals()))\n .collect(Collectors.toList());\n }", "Optional<Pairof<X, MultiSet<X>>> choose();", "private static void DoSelection()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tString selection = \"o_orderdate > Str (\\\"1996-12-19\\\") && o_custkey < Int (100)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"o_orderkey\");\n\t\texprs.put(\"att2\", \"(o_totalprice * Float (1.5)) + Int (1)\");\n\t\texprs.put(\"att3\", \"o_orderdate + Str (\\\" this is my string\\\")\");\n\t\texprs.put(\"att4\", \"o_custkey\");\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Selection(inAtts, outAtts, selection, exprs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "Select(){\n }", "public void beginSelecting() {\r\n selecting = true;\r\n minX = 0;\r\n maxX = 0;\r\n }", "@Override\n\tpublic void select() {\n\t}", "@Override\n public Individual selectIndividual(Population population, Individual individual, MersenneTwister rnd, ExperimentalData expData, Statistics stats) {\n List<Integer> indexIndividuals = new ArrayList<>();\n Integer bigger = -1;\n double[] outputs = expData.getDataset(Utils.DatasetType.TRAINING).getOutputs();\n int index = identifyCloserIndividual(population, individual, outputs, indexIndividuals, bigger, rnd);\n getStatisticsDim(individual, population.get(index), stats, outputs);\n return population.get(index);\n }", "public abstract void select(boolean select);", "MCTS.State select(MCTS.State node);", "protected abstract void doSelection() throws IOException;", "Range selectAssignment(IntervalSet availableRanges, IntervalSet neededRanges, long blockSize);", "public void select(List<Object> objs, boolean selectionFlag) throws Exception;", "@Override\n\t\t\t\tprotected void operationSelectRange(PlaneXY planeXY) {\n\t\t\t\t\t\n\t\t\t\t}", "protected void createSelection() {\r\n\t\tsel = new GraphSelection();\r\n\t}", "public void setSelection(Pair selection);", "public void select(Object obj, boolean selectionFlag);", "public void testSelect_4()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n selector.setDoubletteChromosomesAllowed(true);\n // the following original rate controls that only 30% of the chromosomes\n // will be considered for selection as given with BestChromosomesSelector.\n // The last 70% will be added as doublettes in this case.\n selector.setOriginalRate(0.3d);\n // add first chromosome\n // --------------------\n Gene gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(true));\n Chromosome thirdBestChrom = new Chromosome(conf, gene, 7);\n thirdBestChrom.setFitnessValue(10);\n selector.add(thirdBestChrom);\n // add second chromosome\n // ---------------------\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n // add third chromosome\n // ---------------------\n gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n // receive top 1 (= best) chromosome\n // ---------------------------------\n Population pop = new Population(conf);\n selector.select(1, null, pop);\n IChromosome[] bestChroms = pop.toChromosomes();\n assertEquals(1, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n // receive top 4 chromosomes with original rate = 0.3\n // --------------------------------------------------\n pop.getChromosomes().clear();\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(bestChrom, bestChroms[1]); //because of originalRate = 0.3\n assertEquals(secondBestChrom, bestChroms[2]);\n assertEquals(thirdBestChrom, bestChroms[3]);\n // Non-unique chromosomes should have been returned, although not the same\n // but a cloned instance!\n assertEquals(bestChroms[0], bestChroms[1]);\n // receive top 4 chromosomes with original rate = 1\n // ------------------------------------------------\n pop.getChromosomes().clear();\n selector.setOriginalRate(1.0d);\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(secondBestChrom, bestChroms[1]);\n assertEquals(thirdBestChrom, bestChroms[2]);\n assertEquals(bestChrom, bestChroms[3]);\n }", "void setSelection(int from, int to);", "public K select(int k);", "public void candidateSelection(int n, int k, int m) //method that gives political selectors the amount of people (nodes) to go\n {\n Node forward; //node that represents the selector going clockwise \n Node backward; //node that represents the selector going counter-clockwise\n forward = Head; //clockwise selector starts at the first node\n backward = Tail; //counter-clockwise selector starts at the last node\n writer.println(\" \");\n writer.println(\"N = \" + n + \", \" + \"k = \" + k + \", \" + \"m = \" + m);\n writer.println(\" \");\n writer.println(\"Output\");\n writer.println(\"------\");\n if (m > n) //if so that the counter-clockwise selector doesn't waste time circling\n { \n m = m % n;\n }\n if (k > n) //if so that the clockwise selector doesn't waste time circling\n { \n k = k % n;\n }\n while (cand > 0) //as long as the candidates in the circle are > 0\n {\n for (int x = n - 1; x > (n - m); x--) //iterates until backward is on the person m away\n {\n backward = backward.getPrev();\n }\n for (int x = 1; x < k; x++) //iterates until forward is on the the person k away\n {\n forward = forward.getNext();\n }\n if (forward.getData() == backward.getData()) //if the selectors end\n { //on the same person\n writer.println(forward.getData()); //only print once, for\n delete(forward.getData()); //they are worthy\n backward = backward.getPrev(); //but still remove them\n forward = forward.getNext(); //from the circle and set\n } //the selectors on the next candidates\n else \n {\n writer.println(forward.getData() + \" \" + backward.getData());\n delete(backward.getData()); //if the selectors aren't on the\n delete(forward.getData()); //same candidate, remove both\n forward = forward.getNext(); //for they are not worthy,\n backward = backward.getPrev(); //then move the selectors to the\n if (cand == 2) //next candidates\n {\n backward = backward.getPrev(); //resloves an error that I was suffering\n } //with the last 2 lines of output\n }\n }\n }", "private void tournament_selection() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n // pick 2 random ints to for indices of parents\r\n int parent1 = new Random().nextInt(this.pop_size);\r\n int parent2 = new Random().nextInt(this.pop_size);\r\n\r\n individual p1 = new individual(main_population.getPopulation()[parent1].getGenes(), solutions, output);\r\n individual p2 = new individual(main_population.getPopulation()[parent2].getGenes(), solutions, output);\r\n\r\n if (p1.getFitness() >= p2.getFitness()) {\r\n temp_pop[i] = p1;\r\n } else {\r\n temp_pop[i] = p2;\r\n }\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public void updateSelection() {\n\t\t\n\t}", "boolean selectAt(double x, double y);", "List<MockHolder> select(T selection, List<MockHolder> mocks);", "public interface NextGenSelector {\n public List<Individual> getNextGenPopulation(List<Individual> parentGen, List<Individual> childGen);\n}", "public Genotype rouletteSelection() {\n // get a number between 0 and 1 to compare against\n double slice = rnd.nextDouble();\n // keep track of the cumulative fitness\n double cumulativeFitness = 0;\n\n // loop through the population to pick a mate\n for (Genotype g : population) {\n // increment the cumulative fitness with the member's normalized fitness\n cumulativeFitness += g.getNormalizedFitness();\n // if the cumulative fitness is greater than the random number,\n if (cumulativeFitness > slice) {\n // select the member for mating\n return g;\n }\n }\n\n // if no members are chosen, pick the one with the highest fitness score\n return population.get(0);\n }", "private void processSelection(int selection) {\n\t\tswitch (selection) {\n\t\tcase 1:\n\t\t\tcoach.displayAvailableSeats();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tbookSeats();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\trefundSeats();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tcoach.salesReport();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"Bye\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Invalid selection\");\n\t\t}\n\n\t}", "@Override\n protected void processSelect() {\n \n }", "public void chooseFortifyGivers(){\n gameState = GameState.FORTIFYGIVER;\n currentTerritoriesOfInterest = Player.getTerritoryStringArray(currentPlayer.getFortifyGivers());\n notifyObservers();\n }", "protected abstract LabelNode[] pickNodes(Estimate predictions, int maxPicks);", "public void selectB() { }", "public static Set<AssessorDetails> selectionToSet(List<AssessorDetails> pool, List<AssessorDetails> selection) {\n Set<AssessorDetails> result = new HashSet<AssessorDetails>();\n for (AssessorDetails assessorDetail : pool) {\n for (AssessorDetails preselectedAssessorDetail : selection) {\n if (preselectedAssessorDetail.getId().equals(assessorDetail.getId())) {\n result.add(assessorDetail);\n }\n }\n }\n return result;\n\n }", "public NCRPNode select() {\n\t\t\t\n\t\t\t//dim number of children + 1 (unallocated mass) \n\t\t\tdouble[] weights = new double[children.size() + 1];\n\t \n\t\t\t//weight of unallocated probability mass\n\t\t\tweights[0] = gamma / (gamma + customers);\n\t\t\t\n\t\t\t//calc weight for each child based on the number of customers on them\n\t\t\tint i = 1;\n\t\t\tfor (NCRPNode child: children) {\n\t\t\t\tweights[i] = (double) child.customers / (gamma + customers);\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\t//sample a child with higher weight\n\t\t\tint choice = random.nextDiscrete(weights);\n\t\t\t//if unallocated mass is sampled, create a new child\n\t\t\tif (choice == 0) {\n\t\t\t\treturn(addChild());\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn children.get(choice - 1);\n\t\t\t}\n\t\t}", "void selectpos()\n {\n \n }", "private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}", "public void run() {\n List<Node> selNodes = new ArrayList<Node>(selectedPaths.size());\n\n for (Object path : selectedPaths) {\n selNodes.add(findPath(root, (String[]) path));\n }\n\n // set the selection\n Node[] newSelection = selNodes.toArray(new Node[selNodes.size()]);\n\n if (exploredCtx != null) {\n setExploredContext(findPath(root, exploredCtx), newSelection);\n } else {\n setSelectedNodes0(newSelection);\n }\n }", "void mapChosen(int map);", "boolean selectTo(double x, double y);", "private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }", "private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }", "public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }", "void mosaic(int seeds);", "@Override\n\t// Select individuals for crossover\n\tprotected Individual tournamentSelection(Population pop) {\n\t\tSortingIndividual baseIndiv = (SortingIndividual) pop.individuals[0];\n\t\tPopulation tournament = new SortingPopulation(tournamentSize, baseIndiv.getBase(), false);\n\t\t// For each place in the tournament get a random individual\n\t\tfor (int i = 0; i < tournamentSize; i++) {\n\t\t\tint randomId = (int) (Math.random() * pop.size());\n\t\t\ttournament.saveIndividual(i, pop.getIndividual(randomId));\n\t\t}\n\t\t// Get the fittest\n\t\tIndividual fittest = tournament.getFittest();\n\t\treturn fittest;\n\t}", "Object getSelection();", "@Override\n public Component select(int x, int y) { \n\t m_selected = super.select(x, y);\n\t return m_selected;\n }", "public void mutation(){\n \n \tfor (int[] temp : wallpapers) {\n \t\tint e = random.nextInt(20);\n \t\tfor (int y = 0; y < e; y++){\n \t\t\tint h = random.nextInt(temp.length);\n \t\t\t//Log.d(\"MUT\", \"selected index \" + h);\n \t\t\tif (h == temp.length - 1 || h == temp.length - 2 || h == temp.length - 3){\n \t\t\t\tint newrgb = random.nextInt(NODELENGTH) + 2;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new node \" + newrgb);\n \t\t\t\ttemp[h] = newrgb;\n \t\t\t} else if (((h + 1) % 3) == 0){\n \t\t\t\tint newfunction = random.nextInt(NUM_FUNCTIONS);\n \t\t\t\t//Log.d(\"MUT\", \"Picking new function \" + newfunction);\n \t\t\t\ttemp[h] = newfunction;\n \t\t\t} else {\n \t\t\t\tint newinput = random.nextInt(h / 3 +1);\n \t\t\t\ttemp[h] = newinput;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new input \" + newinput);\n \t\t\t}\n \t\t}\n \t}\n }", "public void run() {\n for (List<Boolean> include : includeConstituents) {\r\n // now select an alternative for each constituent\r\n selectConstituent(0, include);\r\n }\r\n }", "public void select(int x, int y)\n\t{\n\t\tif(!this.used[x][y])\n\t\t{\n\t\t\tthis.cur.move(x, y);\n\t\t\tthis.moved = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.selected = true;\n\t\t\tthis.cur = piece[x][y];\n\t\t}\n\t\t//drawState();\n\t}", "public void chooseForMe() {\n }", "public void selectAllAccessibleSelection() {\n // To be fully implemented in a future release\n }", "private ActorProfile selectRandomActorProfile(List<ActorProfile> list,\n ActorProfile actorSender)\n throws CannotSelectARandomActorException {\n if(randomSelectorIndex>=MAX_LOOPS_ON_RANDOM_ACTORS){\n throw new CannotSelectARandomActorException(\"The number of tries, \"+randomSelectorIndex+\" is upper than the limit\");\n }\n int randomIndex = (int) (((double)list.size())*Math.random());\n ActorProfile actorSelected = list.get(randomIndex);\n if(actorSelected.getIdentityPublicKey().equals(actorSender.getIdentityPublicKey())){\n randomSelectorIndex++;\n actorSelected = selectRandomActorProfile(list, actorSender);\n }\n /*if(actorSelected.getNsIdentityPublicKey().equals(actorSender.getNsIdentityPublicKey())){\n randomSelectorIndex++;\n actorSelected = selectRandomActorProfile(list, actorSender);\n }*/\n return actorSelected;\n }", "@Override\n public void selectObject (GL2 gl, GLU glu, GLUT glut, int numSelected, int[] selectInfo) {\n // guaranteed at least one was selected\n int minZ = selectInfo[1];\n int r = selectInfo[3];\n int c = selectInfo[4];\n // for each hit, find closest object\n int idx = 5;\n for (int k = 1; k < numSelected; k++, idx += 5) {\n if (selectInfo[idx + 1] < minZ) {\n minZ = selectInfo[idx + 1];\n r = selectInfo[idx + 3];\n c = selectInfo[idx + 4];\n }\n }\n // update color of selected object\n myColors[r][c][2] -= 0.1;\n myColors[r][c][0] += 0.1;\n System.out.println(numSelected + \": chose [\" + r + \", \" + c + \"]\");\n }", "public void selectSlot() {\n\t\t\r\n\t}", "@Test\n \tpublic void testTargetRandomSelection() {\n \tComputerPlayer player = new ComputerPlayer();\n \t// Pick a location with no rooms in target, just three targets\n \tboard.calcTargets(23, 7, 2);\n \tint loc_24_8Tot = 0;\n \tint loc_22_8Tot = 0;\n \tint loc_21_7Tot = 0;\n \t// Run the test 100 times\n \tfor (int i=0; i<100; i++) {\n \t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\tif (selected == board.getRoomCellAt(24, 8))\n \t\t\tloc_24_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(22, 8))\n \t\t\tloc_22_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(21, 7))\n \t\t\tloc_21_7Tot++;\n \t\telse\n \t\t\tfail(\"Invalid target selected\");\n \t}\n \t// Ensure we have 100 total selections (fail should also ensure)\n \tassertEquals(100, loc_24_8Tot + loc_22_8Tot + loc_21_7Tot);\n \t// Ensure each target was selected more than once\n \tassertTrue(loc_24_8Tot > 10);\n \tassertTrue(loc_22_8Tot > 10);\n \tassertTrue(loc_21_7Tot > 10);\t\t\t\t\t\t\t\n }", "@Override\n protected Action selectAction(State state, Set<Action> actions){\n //Call the preSelectAction method from the DefaultProtocol so that, if necessary,\n //unwanted processes are killed and SUT is put into foreground.\n Action retAction = preSelectAction(state, actions);\n if (retAction == null)\n //if no preSelected actions are needed, then implement your own strategy\n retAction = RandomActionSelector.selectAction(actions);\n return retAction;\n }", "public void updateSelection()\n {\n \trectForSelection.setRect(rettangoloX,rettangoloY,larghezza,altezza);\n \trectSelTopLeft.setRect(rettangoloX-3,rettangoloY-3,6,6);\n \trectSelBottomLeft.setRect(rettangoloX-3,rettangoloY+altezza-3,6,6);\n \trectSelTopRight.setRect(rettangoloX+larghezza-3,rettangoloY-3,6,6);\n \trectSelBottomRight.setRect(rettangoloX+larghezza-3,rettangoloY+altezza-3,6,6);\n }", "abstract protected Dataset getNewCandidates();", "@Override\n public void runOpMode() {\n int selectedstate = 0;\n //set variable selecting to true for the selecting while loop\n boolean selecting = true;\n\n askState(states.colorRed, states.colorBlue);\n if (ask(\"Default Starting Position\", \"Alternate Starting Position\")) {\n if (ask(\"First Beacon\", \"Second Beacon which has now been broken so don't run it\")) {\n askState(states.arcTowardsBeacon);\n askState(states.scanForLine);\n askState(states.driveTowardsBeacon);\n askState(states.pushBeaconButton, states.sleep0);\n askState(states.backAwayFromBeacon);\n askState(states.shootballTwoBalls, states.shootballOnce, states.noscope);\n askState(states.correctStrafe);\n askState(states.slideToTheRight);\n askState(states.scanForLine);\n askState(states.driveTowardsBeacon);\n askState(states.pushBeaconButton, states.sleep0);\n if (ask(\"Corner Vortex\", \"Center Vortex\")) {\n askState(states.pivotbeacon);\n askState(states.rotate60);\n askState(states.backup84);\n } else {\n askState(states.pivotbeacon, states.pivotbeaconless);\n askState(states.backuptovortex, states.backuptovortexIncreased, states.backuptovortexReduced);\n }\n } else {\n// askState(states.driveFoward36);\n askState(states.arcTowardsBeacon24);\n askState(states.scanForLine);\n askState(states.driveTowardsBeacon);\n askState(states.pushBeaconButton, states.sleep0);\n askState(states.backAwayFromBeacon5);\n askState(states.slideToTheLeft);\n askState(states.scanForLineInverted);\n askState(states.driveTowardsBeacon);\n askState(states.pushBeaconButton, states.sleep0);\n askState(states.backAwayFromBeacon);\n askState(states.shootballTwoBalls, states.shootballOnce, states.noscope);\n askState(states.rotate110);\n askState(states.backup30);\n }\n } else {\n askState(states.sleep0, states.sleep2000, states.sleep4000, states.sleep10000);\n askState(states.backup42);\n askState(states.shootballTwoBalls, states.shootballOnce, states.noscope);\n askState(states.sleep0, states.sleep2000, states.sleep4000, states.sleep10000);\n if (ask(\"Corner Vortex\", \"Center Vortex\")) {\n askState(states.arc2);\n askState(states.driveFoward48);\n } else {\n askState(states.rotate40);\n askState(states.backup24);\n }\n }\n\n askState(states.sleep0);\n\n if (ask(\"Ready to init?\", \"Ready to init? asked again so I don't need to make a new method\")) {\n\n }\n\n // send whole LinearOpMode object and context to robotconfig init method\n robot.init(this);\n //add telementry to report that init completed\n robotconfig.addlog(dl, \"autonomous\", \"Done with robot.init --- waiting for start in \" + this.getClass().getSimpleName());\n\n //convert list of states to be run to array for theoretical performance reasons\n runlist = list.toArray(new state[list.size()]);\n //run each state multiple times until the state increases the currentState variable by 1\n currentState = 0;\n //default current color to purple, first state will either redefine it as red or blue\n states.color = 0;\n //add telementry data to display if debug mode is active, debug mode is used to test to make sure objects are oriented correctly without having actual hardware attached\n telemetry.addData(\"Say\", \"Hello Driver - debug mode is \" + robotconfig.debugMode);\n displayStates();\n //display telementry data\n telemetry.update();\n waitForStart();\n //add log to log file\n robotconfig.addlog(dl, \"autonomous\", \"Started\");\n //loop while match is running\n while (opModeIsActive()) {\n\n robotconfig.addlog(dl, \"Mainline\", \"Beginning state machine pass \" + String.format(Locale.ENGLISH, \"%d\", currentState));\n\n //check if the currentState is more than the last index of the runlist\n if (currentState + 1 < runlist.length) {\n telemetry.addData(\"state\", runlist[currentState].name);\n telemetry.update();\n //run the state from the runlist of the currentState index\n runlist[currentState].run();\n //add log of name of state that ran for debugging\n robotconfig.addlog(dl, \"Mainline\", \"Ending state machine pass of \" + runlist[currentState].name);\n } else {\n //if completed last state, stop\n robot.move(0, 0, 0);\n //add log to tell us that the program finished all selected states before stopping\n robotconfig.addlog(dl, \"StateMachine\", \"stop requested\");\n requestOpModeStop();\n }\n\n }\n\n robot.move(0, 0, 0);\n robot.pushButton(0);\n //add log to tell us that the program stopped smoothly\n robotconfig.addlog(dl, \"autonomous\", \"Done with opmode, exited based on OpmodeIsActive false\");\n\n }", "private void setGridOnCollectibleSelected() {\n showCardInfo(getNameFromID(selectedCollectibleID));\n setGridColor(Color.GOLD);\n for (int row = 0; row < Map.NUMBER_OF_ROWS; row++) {\n for (int column = 0; column < Map.NUMBER_OF_COLUMNS; column++) {\n ImageView interactor = getInteractor(row, column);\n int finalRow = row, finalColumn = column;\n interactor.setOnMouseClicked(e -> handleUseCollectible(finalRow, finalColumn, false));\n\n }\n }\n }", "private void plantMotifCollection(DNASequenceDataset targetDNADataset, RegionDataset targetSitesDataset, MotifCollection motifcollection, SequenceCollection sequenceCollection, OperationTask task) throws Exception {\n MotifSampler sampler=new MotifSampler();\n boolean useSamePattern=(Boolean)task.getParameter(\"Use same pattern\");\n double reverseProbability=(Double)task.getParameter(\"Reverse probability\");\n double minMatch=(Double)task.getParameter(\"Min match\");\n double maxMatch=(Double)task.getParameter(\"Max match\");\n double probability=(Double)task.getParameter(\"Plant probability\");\n NumericDataset prior=(NumericDataset)task.getParameter(\"Positional prior\");\n if (prior==null) prior=createDefaultPrior(sequenceCollection);\n String useforprior=(String)task.getParameter(\"Use for prior\");\n Boolean forceplant=(Boolean)task.getParameter(\"Force plant\");\n if (forceplant==null) forceplant=Boolean.FALSE;\n if (useforprior==null || useforprior.isEmpty()) useforprior=\"sum\";\n HashMap<String,char[]> samepatternMap=null;\n if (useSamePattern) {\n samepatternMap=new HashMap<String, char[]>(motifcollection.size());\n for (Motif motif:motifcollection.getAllMotifs(engine)) {\n char[] motifpattern=sampler.sample(motif, minMatch, maxMatch);\n samepatternMap.put(motif.getName(), motifpattern);\n }\n }\n // sort the motifs by size from shorter to longer. This order will be used later on\n // when shorter motifs are planted before longer motifs (this is done so that the last N-1 positions\n // which are set to 0 in the priors track can 'grown' and reused.\n ArrayList<String> motifnames=getMotifsNamesSortedByMotifLength(motifcollection);\n \n for (int i=0;i<sequenceCollection.size();i++) {\n String sequenceName=sequenceCollection.getSequenceNameByIndex(i);\n NumericSequenceData priorsequence=(NumericSequenceData)prior.getSequenceByName(sequenceName);\n RegionSequenceData targetSitesSequence=(RegionSequenceData)targetSitesDataset.getSequenceByName(sequenceName);\n DNASequenceData targetSequence=(DNASequenceData)targetDNADataset.getSequenceByName(sequenceName); \n if (priorsGotNegativeValues(priorsequence)) throw new ExecutionError(\"The positional priors track '\"+prior.getName()+\"' contains negative values\");\n if (useforprior.equals(\"every positive\") && prior!=null) { // plant motifs at every position with positive prior\n for (int position=0;position<targetSequence.getSize();position++) {\n if (priorsequence.getValueAtRelativePosition(position)>0 && Math.random()<probability) {\n int randomMotifIndex=(int)(Math.random()*motifcollection.size());\n Motif motif=motifcollection.getMotifByIndex(randomMotifIndex, engine);\n char[] pattern=(useSamePattern)?samepatternMap.get(motif.getName()):sampler.sample(motif, minMatch, maxMatch);\n String bindingSequence=new String(pattern);\n double score=getMatchScore(pattern, motif);\n int orientation=(Math.random()<reverseProbability)?Region.REVERSE:Region.DIRECT; \n int plantposition=position;\n if (targetSequence.getStrandOrientation()==Sequence.REVERSE) {\n if (orientation==Region.DIRECT) orientation=Region.REVERSE;\n else if (orientation==Region.REVERSE) orientation=Region.DIRECT;\n plantposition=plantposition-motif.getLength()+1; // plant at the other end to the motifs that extend downstream\n } \n if (orientation==Region.REVERSE) pattern=MotifLabEngine.reverseSequence(pattern);\n if (plantposition+motif.getLength()>=targetSequence.getSize()) continue; // motif did not fit at the end\n plantMotifSite(motif, pattern, bindingSequence, plantposition, score, orientation, targetSitesSequence, targetSequence);\n }\n } \n } else { //\n for (String motifname:motifnames) { // go through every motif name and plant it once\n if (Math.random()<probability) {\n Motif motif=motifcollection.getMotifByName(motifname, engine);\n char[] pattern=(useSamePattern)?samepatternMap.get(motifname):sampler.sample(motif, minMatch, maxMatch);\n String bindingSequence=new String(pattern);\n double score=getMatchScore(pattern, motif); // how well does the randomly chosen binding pattern match the motif PWM\n int orientation=(Math.random()<reverseProbability)?Region.REVERSE:Region.DIRECT;\n if (targetSequence.getStrandOrientation()==Sequence.REVERSE) {\n if (orientation==Region.DIRECT) orientation=Region.REVERSE;\n else if (orientation==Region.REVERSE) orientation=Region.DIRECT;\n }\n if (orientation==Region.REVERSE) pattern=MotifLabEngine.reverseSequence(pattern);\n // choose a random position for the motif either by sampling from a priors-distribution or by just selecting a random eligible position\n setupPriorForSingleMotif(priorsequence, motif.getLength(), useforprior); // set the last N-1 positions in the priorstrack to 0 and normalize\n int position=-1;\n // find eligible position which does not overlap existing sites\n for (int t=0;t<50;t++) { // try up to 50 times to sample a new position before we give up\n position=sampleSitePosition(priorsequence,motif.getLength(),useforprior);\n if (position==-2) break; // priors track is just zeros so wo cannot sample from it\n if (siteOverlapsPrevious(targetSitesSequence, position, motif.getLength())) position=-1;\n if (position>=0) break;\n }\n if (position<0 && forceplant) { // found no good positions when sampling so try again with random positions\n for (int t=0;t<50;t++) { // try up to 50 times to sample a new position before we give up\n position=(int)(Math.random()*(targetSequence.getSize()-motif.getLength()+1));\n if (siteOverlapsPrevious(targetSitesSequence, position, motif.getLength())) position=-1;\n if (position>=0) break;\n }\n }\n if (position>=0) { // found eligible position\n // insert DNA sequence into target at selected position\n for (int j=0;j<pattern.length;j++) {\n targetSequence.setValueAtRelativePosition(position+j, pattern[j]);\n priorsequence.setValueAtRelativePosition(position+j, 0); // set priors values to 0 within the planted site so that subsequent sites will not be planted at the same place\n }\n // create new region for the TFBS and add it to targetSitesSequence\n Region bindingsite=new Region(targetSitesSequence, position, position+motif.getLength()-1, motif.getName(), score, orientation);\n bindingsite.setProperty(\"sequence\", bindingSequence);\n targetSitesSequence.addRegion(bindingsite);\n }\n }\n } // end for each motif\n } // end plant every motif once\n task.checkExecutionLock(); // checks to see if this task should suspend execution\n if (Thread.interrupted() || task.getStatus().equals(ExecutableTask.ABORTED)) throw new InterruptedException();\n task.setStatusMessage(\"Executing operation: \"+task.getOperationName()+\" (\"+(i+1)+\"/\"+sequenceCollection.size()+\")\");\n task.setProgress(i+1, sequenceCollection.size());\n if (i%10==0) Thread.yield();\n }\n }", "int[] getSelection();", "private HashMap<String, ElectricalMeasurement> currentMeasurementSelection(HashMap<String, ElectricalMeasurement> currentMeasurement, DistrictModel districtAgentModel) {\r\n\t\tHashMap<String, ElectricalMeasurement> selectedMeasurement = new HashMap<>();\r\n\t\tVector<NetworkComponent> sensors = this.findSensors(districtAgentModel.getvNetworkComponents());\r\n\t\t\r\n\t\tfor(int i=0; i<sensors.size();i++) {\r\n\t\t\tString sensorKey = sensors.get(i).getId();\r\n\t\t\tElectricalMeasurement electricalMeasurement = currentMeasurement.get(sensorKey);\r\n\t\t\tselectedMeasurement.put(sensorKey, electricalMeasurement);\r\n\t\t}\r\n\t\t\r\n\t\treturn selectedMeasurement;\r\n\t}", "public void setSelection(int molIndex) {}", "ManageableHistoricalTimeSeriesInfo select(Collection<ManageableHistoricalTimeSeriesInfo> candidates, String selectionKey);", "public interface GrainSelection {\n\n List<Cell> selectEdgeGrains(Growth growth, Grid grid, int numberOfGrains);\n}", "private void optionsSelect() {\n switch (currentQueNum) {\n case 1:\n ans1Option();\n break;\n case 2:\n ans2Option();\n break;\n case 3:\n ans3Option();\n break;\n case 4:\n ans4Option();\n break;\n case 5:\n ans5Option();\n break;\n case 6:\n ans6Option();\n break;\n case 7:\n ans7Option();\n break;\n case 8:\n ans8Option();\n break;\n case 9:\n ans9Option();\n break;\n case 10:\n ans10Option();\n break;\n }\n }", "@VisibleForTesting\n protected void applyProvisionalSelection() {\n mSelection.addAll(mProvisionalSelection);\n mProvisionalSelection.clear();\n }", "public Individu selection() {\n\t\t// Pioche au hasard deux individus differents\n\t\tRandom rand = new Random();\n\t\tint index1 = 0, index2 = 0;\n\t\tindex1 = rand.nextInt(this.individus.size());\n\t\twhile(index1 == index2) {\n\t\t\tindex2 = rand.nextInt(this.individus.size());\n\t\t}\n\n\t\t//double fitness1 =\n\t\tdouble fitness1 = this.individus.get(index1).fitness();\n\t\tdouble fitness2 = this.individus.get(index2).fitness();\n\n\t\t// Determine le meilleur du moins bon\n\t\tIndividu better, worse;\n\t\tif(fitness1 > fitness2) {\n\t\t\tbetter = this.individus.get(index1);\n\t\t\tworse = this.individus.get(index2);\n\t\t} else {\n\t\t\tworse = this.individus.get(index1);\n\t\t\tbetter = this.individus.get(index2);\n\t\t}\n\n\t\t// Dans 75% des cas, onp rend le meilleur des deux\n\t\tif(rand.nextDouble() <= 0.75) {\n\t\t\treturn better;\n\t\t} else {\n\t\t\treturn worse;\n\t\t}\n\t}", "void selectFeatures(MapMouseEvent ev) {\n\n System.out.println(\"Mouse click at: \" + ev.getWorldPos()); //mostramos las coordenadas por consola\n \n /*\n * construimos un rectangulo de 5x5 pixeles centrado en la posicion donde se hizo click \n */\n \n Point screenPos = ev.getPoint();\n Rectangle screenRect = new Rectangle(screenPos.x - 2, screenPos.y - 2, 5, 5); \n \n /*\n * Transformamos el rectangulo de pantalla en una caja de coordenadas en el sistema de referencia de nuestro mapa\n */\n AffineTransform screenToWorld = mapFrame.getMapPane().getScreenToWorldTransform();\n Rectangle2D worldRect = screenToWorld.createTransformedShape(screenRect).getBounds2D();\n ReferencedEnvelope bbox =\n new ReferencedEnvelope(\n worldRect, mapFrame.getMapContent().getCoordinateReferenceSystem());\n\n /*\n * Creamos un filtro para seleccionar las caraceristicas que intersecten con nuestra caja\n */\n Filter filter = ff.intersects(ff.property(geometryAttributeName), ff.literal(bbox));\n\n /*\n * Usamos el filtro para identificar la caracteristica seleccionada\n */\n try {\n SimpleFeatureCollection selectedFeatures = featureSource.getFeatures(filter);\n\n Set<FeatureId> IDs = new HashSet<>();\n try (SimpleFeatureIterator iter = selectedFeatures.features()) {\n while (iter.hasNext()) {\n SimpleFeature feature = iter.next();\n IDs.add(feature.getIdentifier());\n\n System.out.println(\" \" + feature.getIdentifier());\n }\n }\n\n if (IDs.isEmpty()) {\n System.out.println(\" no feature selected\");\n }\n\n displaySelectedFeatures(IDs); //mostramos lo seleccionado\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n}", "public void select(int x, int y) {\n\t\tPiece occupyingPiece = pieceAt(x, y);\n\t\tif (hasSelected) {\n\t\t\tif (occupyingPiece == null) {\n\t\t\t\tprevSelected.move(x, y);\n\t\t\t\thasSelected = false;\n\t\t\t\thasMoved = true;\n\n\t\t\t\tif (prevSelected.hasCaptured()) {\n\t\t\t\t\thasCaptured = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprevSelectedX = x;\n\t\tprevSelectedY = y;\n\t\tprevSelected = pieceAt(prevSelectedX, prevSelectedY);\n\t\thasSelected = true;\n\t}", "public static InstanceSelection select ( Instances data, int items[] ) {\n\t\t/*Instances data2 = new Instances ( data, 0 );\n\t\tInstances data3 = new Instances(data,0);\n\t\tInstances[] result = {data3, data2};*/\n\t\tInstanceSelection result = new InstanceSelection(data);\n\t\t\n\t\tboolean isCovered = false;\n\t\t\n\t\tfor ( int i = 0; i < data.numInstances (); ++i ) {\n\t\t\tisCovered = false;\n\t\t\tfor ( int j = 0; j < items.length; ++j ) {\n\t\t\t\tif ( data.instance ( i ).value ( items[j] ) == 0 ) {\n\t\t\t\t\tisCovered = false;\n\t\t\t\t\t// one item is missing, add immediately\n\t\t\t\t\t//result.add ( data.instance ( i ) );\n\t\t\t\t\tresult.addNotSelected(data.instance(i));\n\t\t\t\t\tresult.addIndicesNotSelected(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\tisCovered = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (isCovered) {\n\t\t\t\t//data3.add(data.instance(i));\n\t\t\t\tresult.addSelected(data.instance(i));\n\t\t\t\tresult.addIndicesSelected(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static void identifyFeaturesSelectedForCID()\n {\n MSRun run = (MSRun) ApplicationContext.getProperty(SharedProperties.MS_RUN);\n FeatureSet runMs2Features = run.getTandemFeatureSet(2);\n runMs2Features.setSourceFile(new File(run.getFile().getPath() + \".ms2.tsv\"));\n// runMs2Features.setSourceFile(new File(\"generated_features_for_cid\"));\n ClusteringFeatureSetMatcher cFSM =\n new ClusteringFeatureSetMatcher(.1f, FeatureSetMatcher.DELTA_MASS_TYPE_ABSOLUTE, 5);\n cFSM.setElutionMode(ClusteringFeatureSetMatcher.ELUTION_MODE_SCAN);\n cFSM.setUseMassInsteadOfMz(false);\n cFSM.setElutionBucketIncrement(1);\n cFSM.setMassBucketIncrement(.025);\n\n List<FeatureSet> featureSets =\n (List<FeatureSet>) ApplicationContext.getProperty(SharedProperties.FEATURE_SETS);\n FeatureSet ms1Features = null;\n\n boolean noFeatureSetToMine = false;\n if (featureSets == null)\n noFeatureSetToMine = true;\n if (!noFeatureSetToMine)\n for (FeatureSet fs : featureSets)\n {\n if (fs.isDisplayed())\n ms1Features = fs;\n }\n if (ms1Features == null)\n noFeatureSetToMine = true;\n\n if (noFeatureSetToMine)\n {\n //make this translatable\n //not really necessary since we make this inaccessible if no features are displayed\n ApplicationContext.infoMessage(\"You must select and display a set of features in order to find the ones selected for CID\");\n return;\n }\n\n\n FeatureSetMatcher.FeatureMatchingResult featureMatchingResult =\n cFSM.matchFeatures(ms1Features, runMs2Features);\n\n Feature[] ms1FeaturesSelectedForCID = new Feature[featureMatchingResult.size()];\n\n\n //first set CID scan of all ms1 features to not-found\n for (Feature feature : ms1Features.getFeatures())\n {\n feature.setProperty(\"cidscan\",-1);\n }\n //set CID scan of all matched ms1 features to the MS2 feature's scan number\n int i=0;\n for (Feature ms1Feature : featureMatchingResult.getMasterSetFeatures())\n {\n ms1Feature.setProperty(\"cidscan\",featureMatchingResult.getBestMatch(ms1Feature));\n ms1FeaturesSelectedForCID[i++] = ms1Feature;\n }\n\n FeatureSet ms1FeatureSetForCID = new FeatureSet(ms1FeaturesSelectedForCID,\n FeatureSelectionFrame.FeatureSelectionDialog.nextColor());\n// ms1FeatureSetForCID.setSourceFile(new File(\"generated_features_for_cid\"));\n\n //copy the feature set list because otherwise the main panel doesn't update\n ArrayList<FeatureSet> featureSetListCopy = new ArrayList<FeatureSet>(featureSets.size());\n featureSetListCopy.addAll(featureSets);\n featureSetListCopy.add(ms1FeatureSetForCID);\n featureSetListCopy.add(runMs2Features);\n\n ApplicationContext.setProperty(SharedProperties.FEATURE_SETS, featureSetListCopy);\n ApplicationContext.setProperty(SharedProperties.FEATURE_RANGES, featureSetListCopy);\n\n ResultsDialog resultsDialog =\n new ResultsDialog(ms1Features, ms1FeatureSetForCID, runMs2Features, featureMatchingResult);\n resultsDialog.setVisible(true);\n }", "@Override\n protected int selectNextClusterIndex(\n final double[] minDistances,\n final boolean[] selected)\n {\n double maxMinDistance = Double.MAX_VALUE;\n int maxIndex = 0;\n\n final int elementCount = minDistances.length;\n for (int i = 0; i < elementCount; i++)\n {\n if (selected[i])\n {\n // Skip clusters we've already selected.\n continue;\n }\n\n // Get the current minimum distance for the element.\n double minDistance = minDistances[i];\n\n if (maxIndex == 0 || minDistance > maxMinDistance)\n {\n // This is the minium seen so far, so keep track of\n // it.\n maxIndex = i;\n maxMinDistance = minDistance;\n }\n }\n\n if (maxMinDistance <= 0.0)\n {\n // There are not enough points to prevent selecting two\n // that are on top of each other.\n return -1;\n }\n else\n {\n return maxIndex;\n }\n }", "public void selectAt(MouseEvent e) {\r\n \t\tactivateSelect();\r\n \t\tmouseListner.mousePressed(e);\r\n \t}", "public int[] pick() {\n int key = map.ceilingKey(random.nextInt(areaSum) + 1);\n int[] rectangle = map.get(key);\n\n int length = rectangle[2] - rectangle[0] + 1;\n int breadth = rectangle[3] - rectangle[1] + 1;\n\n //length denotes the no of x coordinates we can have.\n //breadth denotes the no of y coordinates we can have\n\n //random.nextInt gives a random value from x1 - x2-1 which we can add to the current x and we can have a valid x .\n //random.nextInt gives a random value from y1 - y2-1 which we can add to the current y and we can have a valid y .\n\n int x = rectangle[0] + random.nextInt(length);\n int y = rectangle[1] + random.nextInt(breadth);\n\n return new int[]{x, y};\n }", "private void selectingNewSel(int x) {\r\n\t\t// S*ystem.out.println(\"SelectingNewSel(\"+x+\")\");\r\n\t\tint newStart, newEnd;\r\n\t\t// int sampleX=-1;\r\n\t\tint move = 0;\r\n\t\tint newSectionStart = 0;\r\n\t\t// if mouse is far right / far left, move the window\r\n\t\tmove = getSelectingScrollAmount(x);\r\n\t\tif (move != 0) {\r\n\t\t\tnewSectionStart = minMax(section.getStart() + move, 0,\r\n\t\t\t\t\t(int) (getSampleCount() - section.getLength()));\r\n\t\t\tmove = newSectionStart - section.getStart(); // move in samples\r\n\t\t}\r\n\r\n\t\tif (move < 0) {\r\n\t\t\t// mouse moves to left\r\n\t\t\tif (selStartSample < newSectionStart) {\r\n\t\t\t\tnewStart = selStartSample;\r\n\t\t\t\tnewEnd = newSectionStart - 1;\r\n\t\t\t} else {\r\n\t\t\t\tnewStart = newSectionStart;\r\n\t\t\t\tnewEnd = selStartSample - 1;\r\n\t\t\t}\r\n\t\t} else if (move > 0) {\r\n\t\t\tint sampleX = newSectionStart + section.getLength() - 1; // extend\r\n\t\t\t// to\r\n\t\t\t// right\r\n\t\t\tif (selStartSample < sampleX) {\r\n\t\t\t\tnewStart = selStartSample;\r\n\t\t\t\tnewEnd = sampleX + 1;\r\n\t\t\t} else {\r\n\t\t\t\tnewStart = sampleX;\r\n\t\t\t\tnewEnd = selStartSample;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tint sampleX;\r\n\t\t\tif (pv.pixelOneSample >= 1)\r\n\t\t\t\tsampleX = (int) (toSamplesXF(x) + 0.5);\r\n\t\t\telse\r\n\t\t\t\tsampleX = toSamplesX(x);\r\n\t\t\tif (selStartSample < sampleX) {\r\n\t\t\t\tnewStart = selStartSample;\r\n\t\t\t\tif (pv.pixelOneSample < 1)\r\n\t\t\t\t\tsampleX = toSamplesEndX(x);\r\n\t\t\t\telse\r\n\t\t\t\t\tsampleX--;\r\n\t\t\t\tnewEnd = minMax(sampleX, section.getStart(), section.getEnd());\r\n\t\t\t} else {\r\n\t\t\t\tnewStart = minMax(sampleX, section.getStart(), section.getEnd());\r\n\t\t\t\tnewEnd = selStartSample - 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tint newLength = newEnd - newStart + 1;\r\n\t\t// check whether we hit one point->sel.onePoint !\r\n\t\tif ((pv.pixelOneSample < 1 && toPixelX(newStart) == toPixelX(newEnd))) {\r\n\t\t\t// || (pv.pixelOneSample>=1 && newLength<0.5*pv.samplesOnePixelF))\r\n\t\t\t// {\r\n\t\t\t// yes: make'em both the same point\r\n\t\t\tnewStart = selStartSample;\r\n\t\t\tnewLength = 0;\r\n\t\t}\r\n\r\n\t\tif (move != 0) {\r\n\t\t\tsel.setSelection(newStart, newLength);\r\n\t\t\t/*\r\n\t\t\t * if (moveRedrawAdd>0) { //S*ystem.out.println(\"need to redraw from\r\n\t\t\t * old sel \"+moveRedrawAdd+\" samples\"); }\r\n\t\t\t */\r\n\t\t\t// scroll(section.getStart()+move, moveRedrawAdd);\r\n\t\t\tsection.setSection(section.getStart() + move, section.getLength());\r\n\t\t} else\r\n\t\t\tsel.setSelection(newStart, newLength);\r\n\t}", "public void select(int action) {\n\t\tselected = true;\n\t\tthis.action = action;\n\t}", "public static void userSelection(){\n\t\tint selection;\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Which program would you like to run?\");\n\t\tselection=input.nextInt();\n\n\t\tif(selection == 1)\n\t\t\tmazeUnion();\n\t\tif(selection == 2)\n\t\t\tunionPathCompression();\n\t\tif(selection == 3)\n\t\t\tmazeHeight();\n\t\tif(selection == 4)\n\t\t\tmazeSize();\n\t\tif(selection == 5)\n\t\t\tsizePathCompression();\n\t}", "public static List<Double> selection(PolyPopulation pop, double cutoff) {\n\t\tint lastGenerationNum = pop.getGroupCapacity();\n\t\tList<PolyIndividual> nextGeneration = new ArrayList<>();\n\t\tList<Double> fitList = new ArrayList<>();\n\t\tList<Double> valueList = new ArrayList<>();\n\t\tList<Double> actValueList = new ArrayList<>();\n\t\tdouble max = 0.0;\n\t\tdouble totalFit = 0.0;\n\t\t//calculate the value of each individual in the population\n\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\tdouble val = f(pop.getIndis().get(i).getGenotype());\n\t\t\tvalueList.add(val);\n\t\t\t//get the Max value, use it\n\t\t\tif(i == 0) max = val;\n\t\t\telse if(val > max) max = val;\n\t\t}\n\t\t//based on the value insists now, calculate the fitness of each individual and their total fitness\n\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\tdouble fit = 1/(max - valueList.get(i) + 10);\n\t\t\tfitList.add(fit);\n\t\t\ttotalFit+=fit;\n\t\t}\n\t\t\n\t\twhile(nextGeneration.size() < lastGenerationNum*cutoff) {\t\t\t\n\t\t\tdouble selectionVal = Math.random();\n\t\t\tdouble accumulateVal = 0.0;\n\t\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\t\tif(selectionVal >= accumulateVal && selectionVal < (accumulateVal+fitList.get(i)/totalFit)) {\n\t\t\t\t\tnextGeneration.add(pop.getIndis().get(i));\n\t\t\t\t\tactValueList.add(valueList.get(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\taccumulateVal+=(fitList.get(i)/totalFit);\n\t\t\t}\n\t\t}\n\t\tpop.setIndis(nextGeneration);\n\t\tpop.setGroupCapacity(nextGeneration.size());\n\t\treturn actValueList;\n\t}", "protected abstract void paintSelection(Graphics2D g);", "public void selected(String action);", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "public void selectAgent(int selected) {\n this.selected = selected;\n }", "abstract public void cabMultiselectPrimaryAction();", "public void selectDeal() {\n\t}", "private void updateSelectedInteractions() {\n\t\tfor ( InteractionObject interaction : selectionInteractions ) invalidate(interaction);\n\n\t\tArrayList<InteractionObject> newSelectedInteractions = new ArrayList<InteractionObject>();\n\t\tfor ( Element element : selectedElements ) {\n\t\t\telement.computeInteractionObjects(newSelectedInteractions, HIT_SELECTION, DiagramController.this);\n\t\t}\n\t\t\n\t\tinteractionObjects.removeAll(selectionInteractions);\n\t\tselectionInteractions = newSelectedInteractions;\n\t\tinteractionObjects.addAll(selectionInteractions);\n\t\t\n\t\t// invalidate new ones\n\t\tfor ( InteractionObject interaction : selectionInteractions ) invalidate(interaction);\n\t}", "@Override\n\tpublic Teatask selectByMore(Teatask ta)\n\t{\n\t\treturn teataskMapper.selectByMore(ta);\n\t}", "List<RepStuLearning> selectByExample(RepStuLearningExample example);", "@Override\n /**\n * Selects a move based on the current game state\n */\n public Move selectMove() {\n Game game = this.game.copy();\n List<Move> moves = game.getValidMoves(this.player);\n Collections.shuffle(moves);\n\n // Create a thread pool\n Executor executor = Executors.newFixedThreadPool(this.threadCount);\n CompletionService<MinimaxEngineWorker> service = new ExecutorCompletionService<MinimaxEngineWorker>(executor);\n\n // Determine the value of each move using the thread pool\n for (Move move : moves) {\n service.submit(new MinimaxEngineWorker(game, move, this.hashMap));\n }\n\n Move bestMove = null;\n double bestMoveValue = Double.NEGATIVE_INFINITY;\n int movesSize = moves.size();\n long moveCount = 0;\n long hashMapHits = 0;\n for (int i = 0; i < movesSize; i++) {\n try {\n // Block until a worker thread finishes\n MinimaxEngineWorker worker = service.take().get();\n\n // Report progress\n moveCount += worker.moveCount;\n hashMapHits += worker.hashMapHits;\n this.setProgress((double) i / movesSize, moveCount, hashMapHits);\n\n // Update the best move\n if (bestMove == null || worker.moveValue >= bestMoveValue) {\n bestMove = worker.move;\n bestMoveValue = worker.moveValue;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n }\n \n // Clear the hashmap\n this.hashMap.clear();\n Runtime.getRuntime().gc();\n\n return bestMove;\n }", "public void chooseAttackStarter(){\n gameState = GameState.ATTACKERSELECTION;\n currentTerritoriesOfInterest = Player.getTerritoryStringArray(currentPlayer.getAttackStarters());\n notifyObservers();\n }", "void pickUp();", "private TupleList DirectSelect(String[] p){\n TupleList tpl = new TupleList();\n int attrnumber = Integer.parseInt(p[1]);\n String[] attrname = new String[attrnumber];\n int[] attrid = new int[attrnumber];\n String[] attrtype= new String[attrnumber];\n String classname = p[2+4*attrnumber];\n int classid = 0;\n for(int i = 0;i < attrnumber;i++){\n for (ClassTableItem item:classt.classTable) {\n if (item.classname.equals(classname) && item.attrname.equals(p[2+4*i])) {\n classid = item.classid;\n attrid[i] = item.attrid;\n attrtype[i] = item.attrtype;\n attrname[i] = p[5+4*i];\n //重命名\n\n break;\n }\n }\n }\n\n\n int sattrid = 0;\n String sattrtype = null;\n for (ClassTableItem item:classt.classTable) {\n if (item.classid == classid && item.attrname.equals(p[3+4*attrnumber])) {\n sattrid = item.attrid;\n sattrtype = item.attrtype;\n break;\n }\n }\n\n\n for(ObjectTableItem item : topt.objectTable){\n if(item.classid == classid){\n Tuple tuple = GetTuple(item.blockid,item.offset);\n if(Condition(sattrtype,tuple,sattrid,p[4*attrnumber+5])){\n //Switch\n\n for(int j = 0;j<attrnumber;j++){\n if(Integer.parseInt(p[3+4*j])==1){\n int value = Integer.parseInt(p[4+4*j]);\n int orivalue = Integer.parseInt((String)tuple.tuple[attrid[j]]);\n Object ob = value+orivalue;\n tuple.tuple[attrid[j]] = ob;\n }\n\n }\n\n\n\n tpl.addTuple(tuple);\n }\n }\n }\n for(int i =0;i<attrnumber;i++){\n attrid[i]=i;\n }\n PrintSelectResult(tpl,attrname,attrid,attrtype);\n return tpl;\n\n }", "public void pickModels(GLAutoDrawable drawable, Igra igra, IntBuffer selectBuffer, int xCursor, int yCursor, GLU glu) {\n GL2 gl = drawable.getGL().getGL2();\n\n igra.startPicking(drawable, selectBuffer);\n igra.palettePicking(drawable, glu, xCursor, yCursor);\n\n gl.glPushName(Promenljive.SPHERE_ID);\n p.paletteSphere(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CUBOID_ID);\n p.paletteCuboid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CYLINDER_ID);\n p.paletteCylinder(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TETRAHEDRON_ID);\n p.paletteTetrahedron(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CUBE_ID);\n p.paletteCube(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CONE_ID);\n p.paletteCone(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.RECTANGULAR_PYRAMID_ID);\n p.paletteRectangularPyramid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.PENTAGON_PYRAMID_ID);\n p.palettePentagonPyramid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.HEXAGON_PYRAMID_ID);\n p.paletteHexagonPyramid(drawable);\n gl.glPopName();\n\n gl.glPushMatrix();\n\n\n\n gl.glRotated(pr.currentAngleOfRotationX, 1, 0, 0);\n gl.glRotated(pr.currentAngleOfRotationY, 0, 1, 0);\n\n gl.glPushName(Promenljive.LEFT_ID);\n drawLeft(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.LEFT_TWO_ID);\n drawLeftTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.RIGHT_ID);\n drawRight(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TOP_ID);\n drawTop(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TOP_TWO_ID);\n drawTopTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BOTTOM_ID);\n drawBottom(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BOTTOM_TWO_ID);\n drawBottomTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.FRONT_ID);\n drawFront(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BACK_ID);\n drawBack(drawable);\n gl.glPopName();\n\n\n gl.glPopMatrix();\n gl.glPopMatrix();\n igra.endPicking(drawable, selectBuffer);\n }", "@Override\n\tpublic Cell selectCell(List<Cell> selectable) {\n JSONObject message = new JSONObject();\n message.put(\"function\", \"select\");\n message.put(\"type\", \"cell\");\n\t\tJSONArray jArray = createJSONCoordinateList(selectable);\n\t\tmessage.put(\"list\", jArray);\n this.sendInstruction(message);\n JSONObject selected = (JSONObject) JSONValue.parse(this.getResponse());\n\n if (selected.get(\"x\").equals(\"none\")) return null;\n\n return selectable.stream().filter(c->c.getCoordX() == Integer.parseInt(selected.get(\"x\").toString()) &&\n c.getCoordY() == Integer.parseInt(selected.get(\"y\").toString()))\n .collect(Collectors.toList()).get(0);\n\t}", "@Override\n\tprotected String pieceSelectionAlgorithm() {\n\t\treturn pieceSelectionAlgorithm(this.quartoBoard);\n\t}" ]
[ "0.62904", "0.6211202", "0.6094996", "0.6067151", "0.59301347", "0.5922139", "0.58332294", "0.56624424", "0.5650778", "0.55514956", "0.5511871", "0.5395395", "0.5394183", "0.5386361", "0.5362664", "0.53411573", "0.53305584", "0.5319776", "0.52918947", "0.52898395", "0.524069", "0.5239689", "0.52337575", "0.52083516", "0.5207307", "0.51975304", "0.5190167", "0.5179009", "0.5153267", "0.5149374", "0.5148237", "0.51458347", "0.514521", "0.5143051", "0.5129021", "0.5127168", "0.5120357", "0.5106745", "0.51006824", "0.5099962", "0.50983423", "0.5095048", "0.50934446", "0.50895745", "0.5080748", "0.5080748", "0.50604665", "0.50572044", "0.5056508", "0.50476915", "0.5046277", "0.5041846", "0.5039245", "0.5034025", "0.50336593", "0.5027995", "0.50171393", "0.5014158", "0.5004292", "0.500182", "0.49928862", "0.49862581", "0.49830353", "0.49797806", "0.49784967", "0.49772757", "0.4975877", "0.4971293", "0.4956553", "0.495515", "0.49467778", "0.49412355", "0.49396747", "0.49371895", "0.49343088", "0.49272695", "0.49270773", "0.49141994", "0.49138924", "0.49125418", "0.491053", "0.49076235", "0.49011168", "0.49007007", "0.48940054", "0.4891763", "0.4883311", "0.48815998", "0.48714504", "0.4871318", "0.48612526", "0.4860452", "0.48604086", "0.4850687", "0.48459876", "0.48445737", "0.48384854", "0.48369697", "0.4832232", "0.48315975", "0.4828514" ]
0.0
-1
Function to set up the population and mating pools
public static Individual[] setupArray(int popSize, int numRules, int geneSize, int conditionLength) { Individual[] array = new Individual[popSize]; for (int i = 0; i < array.length; i++) { array[i] = new Individual(geneSize, numRules, conditionLength); array[i].generateRulebase(); } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialisePools() {\r\n Integer[] bigPoolInts = {25, 50, 75, 100};\r\n Integer[] smallPoolInts = {1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10};\r\n bigPool = new ArrayList<Integer>( Arrays.asList(bigPoolInts) );\r\n smallPool = new ArrayList<Integer>(Arrays.asList(smallPoolInts));\r\n //mix them up\r\n Collections.shuffle( bigPool );\r\n Collections.shuffle( smallPool );\r\n }", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "private static Pool setUpPool(String name, double volume, double temp,\n double pH, double nutrientCoefficient, GuppySet startingGuppies) {\n Pool pool = new Pool(name, volume, temp, pH, nutrientCoefficient);\n\n pool.addFish(startingGuppies.generateGuppies());\n\n return pool;\n }", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "public void initPopulation() throws JMException, ClassNotFoundException {\n population_ = new SolutionSet[problemSet_.size()];\n for (int i = 0; i < problemSet_.size(); i++){\n population_[i] = new SolutionSet(populationSize_);\n }\n\n for (int j = 0; j < problemSet_.size(); j++){\n for (int i = 0; i < populationSize_; i++) {\n Solution newSolution = new Solution(problemSet_);\n problemSet_.get(j).evaluate(newSolution);\n problemSet_.get(j).evaluateConstraints(newSolution);\n population_[j].add(newSolution);\n } // for\n }\n\n }", "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "private Pool setUpSkookumchuk() {\n final int skookumchukVolume = 1000;\n final int skookumchukTemperature = 42;\n final double skookumchukPH = 7.9;\n final double skookumchukNutrientCoefficient = 0.9;\n final int skookumchukNumberOfGuppies = 100;\n final int skookumchukMinAge = 10;\n final int skookumchukMaxAge = 25;\n final double skookumchukMinHealthCoefficient = 0.5;\n final double skookumchukMaxHealthCoefficient = 0.8;\n\n GuppySet skookumchukGuppies = new GuppySet(skookumchukNumberOfGuppies,\n skookumchukMinAge, skookumchukMaxAge,\n skookumchukMinHealthCoefficient,\n skookumchukMaxHealthCoefficient);\n\n Pool skookumchuk = setUpPool(\"Skookumchuk\", skookumchukVolume,\n skookumchukTemperature, skookumchukPH,\n skookumchukNutrientCoefficient, skookumchukGuppies);\n\n return skookumchuk;\n }", "public void setPoputlation (double population) { n.setPopulation(population); }", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public static void makeGrid (Species map[][], int numSheepStart, int numWolfStart, int numPlantStart, int sheepHealth, int plantHealth, int wolfHealth, int plantSpawnRate) {\n \n // Declare coordinates to randomly spawn species\n int y = 0;\n int x = 0;\n \n // Initialise plants\n Plant plant;\n \n // Spawn plants\n for (int i = 0; i < numPlantStart; i++) {\n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Choose a random plant (50% chance healthy, 25% poisonous or energizing)\n int plantChoice = (int) Math.ceil(Math.random() * 100);\n \n // Create the new plants\n if ((plantChoice <= 100) && (plantChoice >= 50)) {\n plant = new HealthyPlant(plantHealth, x, y, plantSpawnRate);\n } else if ((plantChoice < 50) && (plantChoice >= 25)) {\n plant = new EnergizingPlant(plantHealth, x, y, plantSpawnRate);\n } else {\n plant = new PoisonousPlant(plantHealth, x, y, plantSpawnRate);\n }\n \n // Set plant coordinates\n plant.setX(x);\n plant.setY(y);\n map[y][x] = plant;\n \n // No space\n } else { \n i -= 1;\n }\n \n }\n \n // Spawn sheep\n for (int i = 0; i < numSheepStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) {\n \n // Create new sheep\n Sheep sheep = new Sheep(sheepHealth, x, y, 5); \n \n // Set sheep coordinates\n sheep.setX(x);\n sheep.setY(y);\n map[y][x] = sheep;\n \n // No space\n } else { \n i -= 1; \n }\n \n }\n \n // Spawn wolves\n for (int i = 0; i < numWolfStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Create new wolf\n Wolf wolf = new Wolf(wolfHealth, x, y, 5); \n \n // Set wolf coordinates\n wolf.setX(x);\n wolf.setY(y);\n map[y][x] = wolf; \n \n // No space\n } else { \n i -= 1; \n }\n }\n \n }", "public void setup() {\n\t\tsize(1300, 800);\n\t\tint seed = 4346;\n\t\tran = new Random(seed);\n\t\trandompolys = randomPolygons(210);// prepare the input polygons\n\n\t\tDouble segment_len = useAbey ? null : segment_max_length;\n\t\tPack pack = new Pack(randompolys, margin, segment_len, rotSteps, WID, HEI, preferX);\n\t\tpack.packOneSheet(useAbey);\n\t\tpacks.add(pack);\n\n\t\tfor (int i = 0; i < 100; i++) { // packing one sheet after another, 100 is estimated\n\t\t\tint size = packs.size();\n\t\t\tif (packs.get(size - 1).isEmpty()) {\n\t\t\t\tprintln(size + \" sheets\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpack = packs.get(size - 1).clone();\n\t\t\tpack.packOneSheet(useAbey);\n\t\t\tpacks.add(pack);\n\t\t}\n\t\treport();\n\t}", "protected void initializePopulation () {\n\t\tfor (int i = 0; i < this.speciesSize; i++) {\n\t\t\tthis.detectors.add(DetectorFactory.makeDetector(this.featuresLength, this.typeBias, this.generalityBias));\n\t\t}\n\t}", "public void setUpEcosystem() {\n Pool skookumchuk = setUpSkookumchuk();\n Pool rutherford = setUpRutherford();\n Pool gamelin = setUpGamelin();\n\n ecosystem.addPool(skookumchuk);\n ecosystem.addPool(rutherford);\n ecosystem.addPool(gamelin);\n\n ecosystem.addStream(new Stream(skookumchuk, rutherford));\n ecosystem.addStream(new Stream(rutherford, gamelin));\n }", "public void setup() {\r\n\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tthis.bag.add(new Gem(1));\r\n\t\t}\r\n\t\tthis.bag.add(new Crash());\r\n\t}", "public void setPopulation(int population) {\n this.population = population;\n }", "public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}", "public void setup() {\n space = null;\n rabbitList = new ArrayList<>();\n schedule = new Schedule(1);\n\n //recreate main window\n if (displaySurf != null) {\n displaySurf.dispose();\n }\n displaySurf = null;\n displaySurf = new DisplaySurface(this, \"Rabbits Grass Simulation 1\");\n registerDisplaySurface(\"Rabbits Grass Simulation 1\", displaySurf);\n\n //recreate population plot\n if (populationPlot != null) {\n populationPlot.dispose();\n }\n populationPlot = null;\n populationPlot = new OpenSequenceGraph(\"Population Plot\", this);\n populationPlot.setYAutoExpand(false);\n populationPlot.setYRange(0, 200);\n this.registerMediaProducer(\"Plot\", populationPlot);\n }", "public void setPopulation(int population) {\n\n this.population = population;\n }", "private Pool setUpGamelin() {\n final int gamelinVolume = 4300;\n final int gamelinTemperature = 37;\n final double gamelinPH = 7.5;\n final double gamelinNutrientCoefficient = 1.0;\n final int gamelinNumberOfGuppies = 30;\n final int gamelinMinAge = 15;\n final int gamelinMaxAge = 49;\n final double gamelinMinHealthCoefficient = 0.0;\n final double gamelinMaxHealthCoefficient = 1.0;\n\n GuppySet gamelinGuppies = new GuppySet(gamelinNumberOfGuppies,\n gamelinMinAge, gamelinMaxAge, gamelinMinHealthCoefficient,\n gamelinMaxHealthCoefficient);\n\n Pool gamelin = setUpPool(\"Gamelin\", gamelinVolume, gamelinTemperature,\n gamelinPH, gamelinNutrientCoefficient, gamelinGuppies);\n\n return gamelin;\n }", "public GameConfigure()\n {\n trackItems = new Stack<String>();\n random = new Random();\n visits = new Stack<Room>();\n items = new ArrayList<Item>(); \n rooms = new ArrayList<Room>(); \n characters = new ArrayList<Person>();\n\n // Creates all the items, people, rooms and the player.\n resetGame();\n }", "protected abstract void createPool();", "public MapGen()//Collect images, create Platform list, create grassy array and generate a random integer as the map wideness\n\t{\n\t\tblocksWide= ThreadLocalRandom.current().nextInt(32, 64 + 1);\n\t\tclouds=kit.getImage(\"Resources/SkyBackground.jpg\");\n\t\tdirt=kit.getImage(\"Resources/Dirt.png\");\n\t\tgrass[0]=kit.getImage(\"Resources/Grass.png\");\n\t\tgrass[1]=kit.getImage(\"Resources/Grass1.png\");\n\t\tgrass[2]=kit.getImage(\"Resources/Grass2.png\");\n\t\tplatforms=new ArrayList<Platform>();\n\t\tgrassy=new int[blocksWide];\n\t\tgrassT=new int[blocksWide];\n\t\tgenerateTerrain();\n\t\t\n\t\t\n\t\t\n\t}", "public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){\n \n ArrayList<Population> PopulationsList = new ArrayList();\n \n if(NumberOfPopulations == 1){\n \n PopulationsList.add(InitSinglePopulation(NumberOfAgents));\n \n }else{\n \n for(int i = 0; i < NumberOfPopulations; i++){ \n double temp = rand.nextDouble();\n PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp));\n }\n \n }\n \n \n return PopulationsList;\n }", "public void setpopulation(int population) {\n this.population = population;\n }", "private void initList() {\n\n\t\tfor (int i = 0; i < lstPool.size(); i++) {\n\t\t\tpoolList.add(createPool(\"nomPool\", lstPool.get(i).getNomPool()));\n\t\t}\n\t}", "public Population InitSinglePopulation\n (int PopulationID, int NumberOfAgents, double MixedStrategy){\n \n MultiPopulation TempPopulation = new MultiPopulation();\n\n TempPopulation.setPopulationID(PopulationID);\n TempPopulation.setInitMixedStrategy(MixedStrategy);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n double TempDraw = rand.nextDouble();\n boolean TempAction = (TempDraw < MixedStrategy) ? true : false;\n MultiPopulationAgent TempAgentM = \n new MultiPopulationAgent(j,PopulationID,TempAction);\n \n TempPopulation.AgentList.add(TempAgentM);\n \n }\n \n TempPopulation.setActionList();\n return TempPopulation;\n }", "private void saveInitialPoolLocation() {\n\n\t\tPOOL_LIST = new ArrayList<poolLocation>();\n\n\t\tfor (int i = 0; i < NumPool; i++) {\n\t\t\taddNewPool(getPoolLocation(i));\n\t\t}\n\n\t\tfor (int i = 0; i < NumCoupon; i++) {\n\t\t\taddNewPool(getCouponLocation(i));\n\t\t}\n\t}", "public void setup(){\r\n\r\n\t\t\tlogger.info(\"begin setting up the patches\");\r\n\r\n\t\t\t//Initialize the patches in the world.\r\n\t\t\tpatches = new Patch[numOfPathes][numOfPathes];\r\n\t\t\tfor(int i = 0; i < patches.length; i ++){\r\n\t\t\t\tfor(int j = 0; j < patches[i].length; j ++){\r\n\t\t\t\t\tpatches[i][j] = new Patch(i,j);\r\n\t\t\t\t\t//logger.info(\"generated x = \" + i + \"y = \" + j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"begin setting up the agents\");\r\n\r\n\t\t\t//Generate agents and cops.\r\n\t\t\tagents = new Agent[numOfAgents];\r\n\t\t\tfor(int k = 0; k < numOfAgents; k ++){\r\n\t\t\t\tagents[k] = generateAgent();\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"finished setting up the agents\");\r\n\r\n\t\t\tlogger.info(\"begin setting up the cops\");\r\n\t\t\tcops = new Cop[numOfCops];\r\n\t\t\tfor(int k = 0; k < numOfCops; k ++){\r\n\t\t\t\tcops[k] = generateCop();\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"finished setting up the cops\");\r\n\r\n\t\t}", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "public void updateVillagePools(){\r\n\t\tCollections.shuffle(this.marketPool);\r\n\t\tfor(int i = 0; i < this.getnVillages(); i++){\r\n\t\t\tVillage curr = this.vVillages[i];\r\n\t\t\tcurr.setMarketPool(this.marketPool);\r\n\t\t}\r\n\t}", "void setPoolNumber(int poolNumber);", "public Population InitSinglePopulation(int NumberOfAgents) {\n \n SinglePopulation TempPopulation = new SinglePopulation();\n \n TempPopulation.setPopulationID(0);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble());\n boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false;\n TempAgentS.setAction(InitAction);\n \n TempPopulation.AgentList.add(TempAgentS);\n }\n \n TempPopulation.setStrategyList();\n TempPopulation.setActionList();\n return TempPopulation;\n }", "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "private Pool setUpRutherford() {\n final int rutherfordVolume = 5000;\n final int rutherfordTemperature = 39;\n final double rutherfordPH = 7.7;\n final double rutherfordNutrientCoefficient = 0.85;\n final int rutherfordNumberOfGuppies = 100;\n final int rutherfordMinAge = 10;\n final int rutherfordMaxAge = 15;\n final double rutherfordMinHealthCoefficient = 0.8;\n final double rutherfordMaxHealthCoefficient = 1.0;\n\n GuppySet rutherfordGuppies = new GuppySet(rutherfordNumberOfGuppies,\n rutherfordMinAge, rutherfordMaxAge,\n rutherfordMinHealthCoefficient, rutherfordMaxHealthCoefficient);\n\n Pool rutherford = setUpPool(\"Rutherford\", rutherfordVolume,\n rutherfordTemperature, rutherfordPH,\n rutherfordNutrientCoefficient, rutherfordGuppies);\n\n return rutherford;\n }", "SolutionPopulation initialise(ArrayList<City> cities, int populationSize);", "@Test\n public void genomeInitialises() {\n int inputCount = rng.nextInt(20) + 1;\n int outputCount = rng.nextInt(20) + 1;\n\n Population population = new Population(0, inputCount, outputCount, new BlankState());\n\n Genome genome = new Genome(inputCount, outputCount, blankState, population);\n\n int connectionGeneLength = inputCount * outputCount;\n\n for (int i = 0; i < connectionGeneLength; i++) {\n Connection connection = genome.getConnection(i);\n NodeType in = genome.getNode(connection.getIn());\n NodeType out = genome.getNode(connection.getOut());\n\n assertNotNull(connection);\n assertNotNull(in);\n assertNotNull(out);\n assertEquals(NodeType.INPUT, in);\n assertEquals(NodeType.OUTPUT, out);\n assertTrue(genome.containsNode(in, connection.getIn()));\n assertTrue(genome.containsNode(out, connection.getOut()));\n }\n }", "public void setup() {\n statsTable();\n spawnsTable();\n }", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "public void baiscSetting(){\n generations_ = 0;\n maxGenerations_ = ((Integer) this.getInputParameter(\"maxGenerations\")).intValue();\n populationSize_ = ((Integer) this.getInputParameter(\"populationSize\")).intValue();\n mutation_ = operators_.get(\"mutation\");\n crossover_ = operators_.get(\"crossover\");\n selection_ = operators_.get(\"selection\");\n learning_ = operators_.get(\"learning\");\n\n }", "@PostConstruct\n public void initPool() {\n SpringHelper.setApplicationContext(applicationContext);\n if (!initialized) {\n try {\n final File configDirectory = ConfigDirectory.setupTestEnvironement(\"OGCRestTest\");\n final File dataDirectory2 = new File(configDirectory, \"dataCsw2\");\n dataDirectory2.mkdir();\n\n try {\n serviceBusiness.delete(\"csw\", \"default\");\n serviceBusiness.delete(\"csw\", \"intern\");\n } catch (ConfigurationException ex) {}\n\n final Automatic config2 = new Automatic(\"filesystem\", dataDirectory2.getPath());\n config2.putParameter(\"shiroAccessible\", \"false\");\n serviceBusiness.create(\"csw\", \"default\", config2, null);\n\n writeProvider(\"meta1.xml\", \"42292_5p_19900609195600\");\n\n Automatic configuration = new Automatic(\"internal\", (String)null);\n configuration.putParameter(\"shiroAccessible\", \"false\");\n serviceBusiness.create(\"csw\", \"intern\", configuration, null);\n\n initServer(null, null, \"api\");\n pool = GenericDatabaseMarshallerPool.getInstance();\n initialized = true;\n } catch (Exception ex) {\n Logger.getLogger(OGCRestTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public static void main(String[] args) {\n\n int gridWidth, gridHeight, humanNumber, goblinNumber, positionX, positionY, strength;\n ArrayList<Player> humanList = new ArrayList<>();\n ArrayList<Player> goblinList = new ArrayList<>();\n Scanner input = new Scanner(System.in);\n\n System.out.println(\" Welcome to Human vs. Goblin\");\n System.out.println();\n\n // Get the size of the grid\n System.out.print(\"Width of the grid (1-500): \");\n gridWidth = input.nextInt();\n if (gridWidth<1 || gridWidth>500) {\n gridWidth = 10; // In case input is wrong, set 10 as default;\n }\n\n System.out.print(\"Height of the grid (1-500): \");\n gridHeight = input.nextInt();\n if (gridHeight<1 || gridHeight>500)\n gridHeight = 10; // In case input is wrong, set 10 as default;\n\n // Init Grid\n World grid = new World(gridWidth, gridHeight);\n System.out.println();\n\n // Get the number of Players\n System.out.print(\"Number of human (0-\"+grid.getArea()+\"): \");\n humanNumber = input.nextInt();\n\n if (humanNumber<0 || humanNumber>grid.getArea()){\n humanNumber = grid.getArea()/3; // In case input is wrong, set one third as default;\n }\n\n System.out.print(\"Number of goblin (0-\"+(grid.getArea())+\"): \");\n goblinNumber = input.nextInt();\n if (goblinNumber<0 || goblinNumber>grid.getArea()){\n goblinNumber = grid.getArea()/3; // In case input is wrong, set one third as default;\n }\n\n Coordinates coordinates = new Coordinates(ThreadLocalRandom.current().nextInt(grid.getArea() -1,grid.getArea()), ThreadLocalRandom.current().nextInt(grid.getArea() -1,grid.getArea()));\n // Fill Grid with creatures\n for(int i=0;i<humanNumber;i++){\n do {\n positionX = ThreadLocalRandom.current().nextInt(0,grid.getWidth()-1);\n positionY = ThreadLocalRandom.current().nextInt(0,grid.getHeight()-1);\n strength = ThreadLocalRandom.current().nextInt(1,10);\n Human human = new Human(\"human\",strength,1, coordinates);\n humanList.add(human);\n\n } while (grid.addPlayer(positionX, positionY, humanList.get(i)));\n }\n for(int i=0;i<goblinNumber;i++){\n do {\n positionX = ThreadLocalRandom.current().nextInt(0,grid.getWidth()-1);\n positionY = ThreadLocalRandom.current().nextInt(0,grid.getHeight()-1);\n strength = ThreadLocalRandom.current().nextInt(1,10);\n Goblin goblin = new Goblin(\"goblin\",strength,1, coordinates);\n goblinList.add(goblin);\n\n } while (grid.addPlayer(positionX, positionY, goblinList.get(i)));\n }\n\n System.out.println();\n System.out.print(\"You have just created Human vs Goblin grid size of \"+grid.getSizeString()+\" \");\n System.out.println(\"with \"+humanNumber+\" humans and \"+goblinNumber+\" Goblins!\");\n System.out.println();\n Timer timer = new Timer();\n timer.schedule(new PlayGame(grid, timer),0,500);\n }", "public interface PopulationInitialiser {\n\t/**\n\t * this generates an initial solution population from which to start optimisation\n\t *\n\t * @param cities the set of cities which are part of each solution\n\t * @param populationSize the number of solutions to be included in a population\n\t */\n\tSolutionPopulation initialise(ArrayList<City> cities, int populationSize);\n}", "public void setPopulation(Integer population) {\n this.population = population;\n }", "private void initialize() {\n\n\t\tint totalSets, iSet;\n\t\tInformationSet infoSet = null;\n\t\tTreeNode treeNode = null;\n\n\t\tArrayList informationSetList = efg.getInformationSets(iPlayer);\n\n\t\ttotalSets = informationSetList.size();\n\n\t\tmovesLists = new ArrayList[totalSets];\n\t\tprobsLists = new ArrayList[totalSets];\n\n\t\tfor (iSet = 0; iSet < totalSets; iSet++) {\n\t\t\tmovesLists[iSet] = new ArrayList();\n\t\t\tprobsLists[iSet] = new ArrayList();\n\t\t}\n\n\t\tfor (iSet = 0; iSet < totalSets; iSet++) {\n\t\t\tinfoSet = (InformationSet) informationSetList.get(iSet);\n\t\t\ttreeNode = infoSet.getTreeNode(0);\n\t\t\tmovesLists[iSet] = treeNode.getMovesList();\n\t\t}\n\t}", "GuppySet(int numberOfGuppies, int minAge, int maxAge,\n double minHealthCoefficient, double maxHealthCoefficient) {\n this.numberOfGuppies = numberOfGuppies;\n this.minAge = minAge;\n this.maxAge = maxAge;\n this.minHealthCoefficient = minHealthCoefficient;\n this.maxHealthCoefficient = maxHealthCoefficient;\n }", "public void createRandomPopulation(List<String> cabinetArrangement, int populationSize){\n\t\t\n\t\tint size = 0;\n\t\t\n\t\t//list to check if the current solution\n\t\t//has been already added to the population \n\t\t\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\t\t\n\t\t//create a new solution object\n\t\tSolution solution = new Solution(relations, cabinetArrangement);\n\t\t//assign a cabinet arrangement to it, which is a possible solution\n\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\n\t\twhile(size < populationSize) {\n\t\t\t\t\n\t\t\t\t//continue, if the solution is already in the population\n\t\t\t\tif(added.contains(solution.getPossibleSolution())) {\n\t\t\t\t\tsolution = new Solution(relations, cabinetArrangement);\n\t\t\t\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsize++;\n\t\t\t\n\t\t\t\t//add solution to the population\n\t\t\t\tpopulation.add(solution);\n\t\t\t\t//and to the control list\n\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\n\t\t\t\tsolution = new Solution(relations, cabinetArrangement);\n\t\t\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\n\t\t}\n\t\t\n\t\tif(size == populationSize) {\n\t\t\t//count the average path when the population is already created\n\t\t\tcountAveragePath();\n\t\t\t\n\t\t\t//count and assign a cloning factor for all the solutions\n\t\t\tcloningFactor();\n\t\t}\n\t}", "private Pools() {\n super();\n }", "private void initialiseBags() {\r\n\t\t//Player one bag\r\n\t\taddToBag1(GridSquare.Type.a, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.b, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.c, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.d, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.e, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.f, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.g, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.h, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.i, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.j, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.k, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.l, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.m, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.n, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.o, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.p, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.r, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.s, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.t, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.u, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.v, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.w, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.x, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\t\r\n\t\t//Player two bag\r\n\t\taddToBag2(GridSquare.Type.A, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.B, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.C, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.D, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.E, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.F, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.G, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.H, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.I, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.J, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.K, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.L, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.M, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.N, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.O, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.P, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.Q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.R, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.S, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.T, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.U, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.V, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.W, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.X, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t}", "public void generateOffspringPopulation() throws JMException{\n\n offspringPopulation_ = new SolutionSet[problemSet_.size()];\n\n for (int task = 0; task < problemSet_.size(); task++){\n offspringPopulation_[task] = new SolutionSet(populationSize_);\n if (crossover_.getClass() == SBXCrossover.class){\n Solution[] parents = new Solution[2];\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n parents = (Solution[]) selection_.execute(population_[task]);\n\n Solution[] offSpring = (Solution[]) crossover_\n .execute(parents);\n mutation_.execute(offSpring[0]);\n problemSet_.get(task).evaluate(offSpring[0]);\n problemSet_.get(task).evaluateConstraints(offSpring[0]);\n offspringPopulation_[task].add(offSpring[0]);\n } // for\n }\n else if (crossover_.getClass() == EGG.class){\n\n int[] permutation = new int[populationSize_];\n Utils.randomPermutation(permutation, populationSize_);\n etmo.util.Ranking ranking = new etmo.util.Ranking(population_[task]);\n SolutionSet front = ranking.getSubfront(0);\n\n front.Suppress();\n SolutionSet KP = null;\n if(front.size()> problemSet_.get(task).getNumberOfObjectives())\n KP = findingKneePoint(front, task);\n if(KP == null){\n KP = population_[task];\n }\n\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n int n = permutation[i];\n // STEP 2.1. Mating selection\n int r1,r2;\n r1 = PseudoRandom.randInt(0, KP.size() - 1);\n do {\n r2 = PseudoRandom.randInt(0, KP.size() - 1);\n } while (r2==r1);\n // STEP 2.2. Reproduction\n Solution child;\n Solution[] parents = new Solution[3];\n\n// 加入迁移:\n double tranRand = PseudoRandom.randDouble();\n if (tranRand <= 0.1){\n parents[1] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[2] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n\n else {\n parents[1] = KP.get(r1);\n parents[2] = KP.get(r2);\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n } // for\n }\n\n }\n\n\n\n\n }", "private void configureForBoot (Map<String, Collection<?>> beans)\n {\n customerAttributeList = new ArrayList<String>();\n population = minCount + generator.nextInt(Math.abs(maxCount - minCount));\n log.info(\"Configuring \" + population + \" customers for class \"\n + this.getName());\n\n // Prepare for the joins\n ArrayList<SocialGroup> groupList =\n new ArrayList<SocialGroup>(groups.values());\n double cgProbability = 0.0;\n for (SocialGroup group : groupList) {\n cgProbability += classGroups.get(group.getId()).getProbability();\n }\n ArrayList<CarType> carList = new ArrayList<CarType>(carTypes.values());\n double ccProbability = 0.0;\n for (CarType car : carList) {\n ClassCar cc = classCars.get(car.getName());\n if (null != cc) {\n ccProbability += cc.getProbability();\n }\n else {\n log.info(\"Car type {} not configured for {}\",\n car.getName(), this.getName());\n }\n }\n\n for (int i = 0; i < population; i++) {\n // pick a random social group\n SocialGroup thisGroup = pickGroup(groupList, cgProbability);\n ClassGroup groupDetails = classGroups.get(thisGroup.getId());\n // pick a gender\n String gender = \"female\";\n if (generator.nextDouble() < groupDetails.getMaleProbability()) {\n gender = \"male\";\n }\n // pick a random car\n CarType car = pickCar(carList, ccProbability);\n // name format is class.groupId.gender.carName.index\n String customerName = this.name + \"_\" + i;\n // The extra character at the end of the attribute string is padding,\n // due to the fact that XStream seems to drop the last character\n // of the last attribute.\n String attributes = thisGroup.getId() + \".\" + gender\n + \".\" + car.getName() + \".x\";\n customerAttributeList.add(attributes);\n instantiateCustomer(beans, thisGroup, gender, car, customerName);\n }\n }", "private static List<Cell> initiatePopulation(int required_population_size)\n {\n List<Cell> population = new ArrayList<Cell>(); //Define an arraylist to hold the initial population of cells\n int[][][] diploid_genome = newEmptyDeploidGenome();\n int cell_generation = newest_generation + 1, last_div = -1;\n \n //Set the label status of all DNA strands in the genome to unlabelled\n for(int chromosome_count = 0; chromosome_count < diploid_genome.length; chromosome_count++)\n {\n for(int homologous_pair_count= 0; homologous_pair_count < diploid_genome[chromosome_count].length; homologous_pair_count++)\n {\n for(int dna_strand_count = 0; dna_strand_count < diploid_genome[chromosome_count][homologous_pair_count].length; dna_strand_count++)\n {\n diploid_genome[chromosome_count][homologous_pair_count][dna_strand_count] = STRAND_UNLABELLED; //Set each DNA strand to unlabelled\n }\n }\n }\n \n // !****!Create the starting population of cells, all as generation 0!****!\n for (int counter = 0; counter < required_population_size; counter++)\n {\n int cell_id = counter;\n population.add(new Cell(cell_id, cell_generation, last_div, CAN_DIVIDE, diploid_genome)); // Create a new Cell object with the following values.\n id_of_last_created_cell = cell_id; // Track the id of the last created cell\n }// for\n newest_generation++;\n return population;\n }", "public void runGenerational() {\n\n\t\tSystem.out.println(\"Runing pure generational demo.\");\n\t\tFunction<BitSet, Double> knapsackFitnessFunction = new KnapsackFitness(capacity, parseElements());\n\t\tSpace<BitSet> space = new BitSetSpace(weights.length);\n\n\t\tGeneticSelector<BitSet, Double> rouletteSelector = new RouletteGeneticSelector<>(POP_SIZE);\n\t\tGeneticCrossover<BitSet, Double> crossover = new BinaryCrossover<>(0.9);\n\t\tGeneticOperator<BitSet, Double> geneticOperator = new CustomGeneticOperator<>(crossover);\n\t\tGeneticReplacement<BitSet, Double> replacement = new GenerationalReplacement<>();\n\t\tTracer.add(Population.class);\n\t\tTracer.start();\n\n\t\tSearch<BitSet, Double> search = new GeneticAlgorithm<>(POP_SIZE, NUM_ITER, rouletteSelector, geneticOperator,\n\t\t\t\treplacement);\n\t\tOptimizationProblem<BitSet, Double> problem = new OptimizationProblem<>(space, knapsackFitnessFunction,\n\t\t\t\tComparator.reverseOrder());\n\t\tSolution<BitSet, Double> foundSolution = search.solve(problem);\n\n\t\tSystem.out.println(String.format(\"Best found solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(foundSolution.getSolution()), foundSolution.getSolution()));\n\n\t\tBitSet optimalBitSet = parseOptimalBitSet();\n\t\tSystem.out.println(String.format(\"Optimal solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(optimalBitSet), optimalBitSet));\n\t\tKnapsackMetric metric = new KnapsackMetric();\n\t\tmetric.putDataOfBestInFile(1);\n\t}", "private static void init() throws AggregatorException {Populator Configuration\n\n// //ASIN Populator\n// PopulatorData asinPopulator = new PopulatorData(ASINPopulator.class.getName(),\n// new ArrayList<String>());\n// configuration.put(\"ASINPopulator\", asinPopulator);\n//\n// //Title Populator\n// ArrayList<String> titlePopulatorDependencies = new ArrayList<String>();\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// PopulatorData titlePopulator = new PopulatorData(TitlePopulator.class.getName(),\n// titlePopulatorDependencies);\n// configuration.put(\"TitlePopulator\", titlePopulator);\n//\n// \n }", "private int[][] generateInitialPopulation(int binCt, int binSize, int pkgCt, int populationSize) {\n\t\tint[][] population = new int[populationSize][pkgCt];\n\t\tfor (int i = 0; i < populationSize; i++) {\n\t\t\tfor (int j = 0; j < pkgCt; j++) {\n\t\t\t\tpopulation[i][j] = rand.nextInt(binCt);\n\t\t\t}\n\t\t}\n\t\treturn population;\n\t}", "public void setup() {\n //our playing field size\n int theGroundWidth = 800;\n int theGroundHeight = 800;\n\n //our pouplation of rabbits\n entitiesOfRabbits = new Entities();\n //our grass population\n entitiesOfGrass = new Entities();\n //array of dead rabbits\n entitiesOfDeadRabbits = new Entities();\n //Array of foxes\n entitiesOfFoxes = new Entities();\n\n //creating an interactive object that is able to open the graph by the push of a button\n openGraph = new InteractiveObject();\n openGraph.createInteractiveObject(this, 875, 100, 50, 50, \"Square\",true);\n\n //Instantiating the object that allow us to start the program\n startTheProgram = new InteractiveObject();\n startTheProgram.createInteractiveObject(this,400,400,50,50,\"Square\", true);\n\n //instatiating the environment, with the sizes from above\n theEnvironment = new Environment(this, theGroundWidth, theGroundHeight);\n\n //createPopulation comes from the entities (population) class, and holds all the rabbits in an arraylist\n entitiesOfRabbits.createEntities(this, 20, Rabbit.class);\n entitiesOfGrass.createEntities(this, 35, Grass.class);\n entitiesOfFoxes.createEntities(this,3,Fox.class);\n\n //AllEntities list, which holds all the different population lists\n allEntities = new ArrayList<>();\n allDeadEntities = new ArrayList<>();\n\n //putting all the rabbits into the AllEntities list, in the main class\n //keeps all the moving parts together, making it easier to compare objects fx rabbits finding food or other rabbits\n allEntities.add(0,entitiesOfRabbits);\n allEntities.add(1,entitiesOfGrass);\n allEntities.add(2,entitiesOfFoxes);\n allDeadEntities.add(entitiesOfDeadRabbits);\n }", "public void setup() {\n doors = new ArrayList<>();\n doors.add(new Door(Contains.GOAT));\n doors.add(new Door(Contains.GOAT));\n doors.add(new Door(Contains.CAR));\n Collections.shuffle(doors);\n stage = Stage.BEGINNING;\n }", "public GraphPool() {\n\t\tmMetadataPool = new PoolNodeMetadata();\n\t\tmIdentifierPool = new PoolNodeIdentifier(mMetadataPool);\n\t\tmLinkPool = new PoolExpandedLink(mIdentifierPool, mMetadataPool);\n\t}", "protected void putMonsters() {\n\t\tRandom rand = new Random();\n\t\tfor (int monsterCount = 0; monsterCount < 4; monsterCount++){\n\t\t\tint x, y;\n\t\t\tdo {\n\t\t\t\tx = rand.nextInt(xSize);\n\t\t\t\ty = rand.nextInt(ySize);\n\t\t\t} while((levelSetup[x][y] instanceof SimpleRoom) && (x == 0 & y == 0) && !levelSetup[x][y].hasItem());\n\t\t\tlevelSetup[x][y].putMonster(new BasicMonster());\n\t\t}\n\t}", "void init() {\r\n \tfor (int i=0; i<SIZE; i++) {\r\n \t\tfor (int j=0; j<LEN; j++) {\r\n \t\t\tif (rnd.nextDouble() < 0.5)\r\n \t\t\t\toldpop[i][j] = 0;\r\n \t\t\telse\r\n \t\t\t\toldpop[i][j] = 1;\r\n \t\t}\r\n \t}\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tcbest[j] = oldpop[0][j];\r\n \t}\r\n\t\tbest = fitness(0);\r\n }", "public void createGrid() {\r\n generator.generate();\r\n }", "public PoolNYCH() {\n\t\tinicializarDataSource();\n\t}", "public void initialiseNewRandomPopulation(Random rnd) {\n\t\tthis.population = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < this.popSize; i++) {\t\t\t\t\t//FOR ALL DESIRED POPULATION SIZE\n\t\t\tdouble[] randomValues = new double[DIMENSIONS];\t\t\t//INITIATE RANDOM X ARRAY WITH CORRECT DIMENSIONS\n\t\t\tfor (int j = 0; j < DIMENSIONS; j++) {\t\t\t\t\t//CREATE RANDOM X VALUES\n\t\t\t\trandomValues[j] = -5 + rnd.nextDouble() * 10;\t\t//ASSIGN VALUES TO EACH POSITION IN ARRAY\n\t\t\t}\n\t\t\tIndividual newInd = new Individual(randomValues);\t\t//CREATE NEW INDIVIDUAL WITH RANDOM X VALUES\n\t\t\tthis.population.add(newInd);\t\t\t\t\t\t\t//ADD INDIVIDUAL TO POPULATION\n\t\t}\n\t}", "public void initialize() {\n if (factory == null || poolName == null)\n throw new IllegalStateException(\"Factory and Name must be set before pool initialization!\");\n if (initialized)\n throw new IllegalStateException(\"Cannot initialize more than once!\");\n initialized = true;\n permits = new FIFOSemaphore(maxSize);\n factory.poolStarted(this);\n lastGC = System.currentTimeMillis();\n //fill pool to min size\n fillToMin();\n /*\n int max = maxSize <= 0 ? minSize : Math.min(minSize, maxSize);\n Collection cs = new LinkedList();\n for(int i=0; i<max; i++)\n {\n cs.add(getObject(null));\n }\n while (Iterator i = cs.iterator(); i.hasNext();)\n {\n releaseObject(i.next());\n } // end of while ()\n */\n collector.addPool(this);\n }", "public void setUp() {\r\n\t\tsynchronized(phys) {\r\n\t\t\r\n\t\tReactionSystem reactions = new ReactionSystem();\r\n\t\tphys.getParticles().clear();\r\n\t\tphys.compounds.clear();\r\n\t\tphys.particlecount.clear();\r\n\t\t\r\n\t\t//Add new compounds\r\n\t\t\r\n\t\tfor (Compound c: rm.compounds) {\r\n\t\t\tphys.addCompound(c);\r\n\t\t}\r\n\t\t\r\n\t\t//Add new reactions\r\n\t\t\r\n\t\tfor (CompoundReaction rx: rm.reactions) {\r\n\t\t\trx.convertToReactions(reactions.getReactions());\r\n\t\t}\r\n\t\t\r\n\t\tphys.reactions = reactions;\r\n\t\tphys.calculateAvgMass();\r\n\t\tphys.calculateAvgRadius();\r\n\t\r\n\t\t\r\n\t\tfor (Reaction r: phys.reactions.getReactions()) {\r\n\r\n\t\t\tSystem.out.println(r);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Add graphs\r\n\t\tscale.reset();\r\n\t\tphys.graphs.clear();\r\n\t\tfor (Compound c: phys.compounds) {\r\n\t\t\tphys.graphs.add(new ConcentrationDataCollector(300, c, scale));\t\r\n\t\t}\r\n\t\t\r\n\t\tphys.time = 0;\r\n\t\tphys.nextcollection = phys.collectioninterval;\r\n\t\tphys.bondenergy = 0;\r\n\t\t}\r\n\t}", "public void setup_connections()\n {\n setup_servers();\n setup_clients();\n }", "private static void populationsMain() {\n Printing.wraptitle( POPULATIONS );\n Printing.makeOptions( GOUP );\n\n msg( \"This portion of the project is not interactive. See Discussion.pdf for population predictions.\" );\n msg( \"You can evaluate the functions used in this portion through selection (4) on the main menu.\" );\n\n int option = requestOption( 0 );\n if ( option == 0 ) {\n main();\n }\n\n }", "protected void loadPopulationIntoDatabase(IPopulation<? extends ADemoEntity, Attribute<? extends IValue>> pop) {\n\t\tassert this.connection != null;\n\t\tassert pop != null;\n\t\t\n\t\t// create the attributes \n\t\t// we don't know the entity type for this population\n\t\tString entityType = DEFAULT_ENTITY_TYPE;\n\t\tthis.entityType2attributes.put(entityType, new HashSet<>(pop.getPopulationAttributes()));\n\t\t\n\t\t// create internal structure\n\t\ttry {\n\t\t\tcreateInitialTables();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\"error creating the tables to store the population in database: \"+e.getMessage(), e);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tstoreEntities(entityType, pop);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\"error while inserting the population in database: \"+e.getMessage(), e);\n\t\t\t\n\t\t}\n\t}", "public Pool() {\n\t\t// inicializaDataSource();\n\t}", "public void updatePopulation() {\r\n this.usedPopulation = Integer.parseInt(data.driver.findElement(By.id(\"pop_current_label\")).getText());\r\n this.maxPopulation = Integer.parseInt(data.driver.findElement(By.id(\"pop_max_label\")).getText());\r\n }", "public void initWorld()\n\t{\n\t\tgrid = new Creature[numRows][numColumns];\n\t\t\n\t\t//place a Species1 object in the top half of the grid\n\t\tint topRowInit = (int)(Math.random()*(numRows/2));\n\t\tint topColInit = (int)(Math.random()*(numColumns));\n\t\tgrid[topRowInit][topColInit] = new Species1(this, topRowInit, topColInit);\n\t\tgrid[topRowInit][topColInit].live();\n\t\t\n\t\t//place a Species2 object in the bottom half of the grid\n\t\tint bottomRowInit = (int)(Math.random()*(numRows/2))+(numRows/2);\t\t\n\t\tint bottomColInit = (int)(Math.random()*(numColumns));\t\t\t\t\n\t\tgrid[bottomRowInit][bottomColInit] = new Species2(this, bottomRowInit, bottomColInit);\n\t\tgrid[bottomRowInit][bottomColInit].live();\n\t\t\n\t}", "ManagePool(List DefaultList,List AllocList)\r\n\t{\r\n\t\tthis.DefaultList = DefaultList;\r\n\t\tthis.AllocList = AllocList;\r\n\t}", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "protected void onChange_InitPopulation() {\n onChange_InitPopulation_xjal( InitPopulation );\n }", "public void runGeneticAlgo() {\n\t\tint offspringLimit = (int)(OFFSPRING_POOL_LIMIT * geneNumber);\n\t\tint factor = (int) Math.pow(10, String.valueOf(offspringLimit).length() - 1);\n\t\twhile(offspringPool.size() < offspringLimit) {\n\t\t\trunTournament();\n\t\t\tif(offspringPool.size() % factor == 0) {\n\t\t\t\tSystem.out.println(\"Finished \" + offspringPool.size() + \" tournaments\");\n\t\t\t}\n\t\t}\n\t\tsortPool();\n\t\tArrayList<Gene> newGenepool = new ArrayList<Gene>(genepool.subList(0, geneNumber - offspringLimit));\n\t\tnewGenepool.addAll(offspringPool);\n\t\tgenepool = newGenepool;\n\t\toffspringPool = new ArrayList<Gene>();\n\t}", "private void InitializeApp() {\n\n for (int y = 0; y < 11; y++) {\n for (int x = 0; x < 11; x++) {\n defendingGrid[x][y] = new GameCell();\n attackingGrid[x][y] = new GameCell();\n }\n }\n\n// attackingGrid[5][5].setMiss(true);\n// attackingGrid[5][6].setHit(true);\n// attackingGrid[5][7].setWaiting(true);\n// attackingGrid[5][7].setHasShip(true);\n\n }", "private void showPool() {\n if (!(myPool==null)) {\n\n // disable buttons\n\n\n // show each genom in species\n Species s;\n Genom gnom;\n Gene gn;\n // Properties of genom\n int actLayers = -1;\n int allNeurons = 0;\n LinkedList <Neuron> [] layerList;\n\n // Loop Species\n for (int i = 0; i< myPool.size();i++) {\n s = myPool.getSpecie(i);\n\n // - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n // Loop Genom\n for (int j = 0; j < s.size(); j++) {\n\n if ( !(i==0) ){\n // wait until showing next\n try {\n for (int p = 0; p < sliNextAI.getValue()*1000+1; p=p+10) {\n Thread.sleep(10);\n }\n } catch (Exception e) {\n System.out.println(\"Menue - showPool - ThreadSleep - Fail\");\n }\n }\n\n gnom = s.getGenome(j);\n actLayers = gnom.getlayerDepth();\n lblLayerAIs.setText(\"Nodes : \" + actLayers);\n\n // LayerList shall contain all nodes in one layer\n layerList = new LinkedList[actLayers+1];\n\n // Loop Genes\n for (int k = 0; k < gnom.size(); k++) {\n // Get gene\n gn = gnom.getGene(k);\n // Sum size\n allNeurons = allNeurons + gn.getMySize();\n\n for (int layer = 0; layer < gn.getlayerDepth(); layer++) {\n // Create layers\n if (layerList[layer] == null) {\n layerList[layer] = gn.getNeuronsOnLayer(layer);\n } else {\n layerList[layer].addAll(gn.getNeuronsOnLayer(layer));\n }\n }\n layerList[actLayers] = gn.getOutgoing();\n }\n lblNodesAI.setText(\"Nodes : \" + allNeurons);\n // fitness\n lblFitnessAI.setText(\"Fitness : \" + \" - not filled in -\");\n\n gui.pntAIArea(game, layerList, myPool);\n\n // - - - - - - - - - - - -\n frame.revalidate();\n frame.repaint();\n // - - - - - - - - - - - -\n // j = s.size()+1;\n }\n // i = myPool.size()+1;\n // - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n }\n\n }\n\n }", "public static void main(String[] args) {\n\n List<Mine> mines = new ArrayList<>();\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new UraniumMine(100));\n mines.add(new MoonMine(10));\n mines.add(new MoonMine(10));\n mines.add(new HadronCollider(1));\n\n List<EnergyPlant> energyPlants = new ArrayList<>();\n energyPlants.add(new CoalPlant(7));\n energyPlants.add(new CoalPlant(7));\n energyPlants.add(new SolarPlant(2));\n energyPlants.add(new SolarPlant(2));\n energyPlants.add(new NuclearPlant(10000));\n energyPlants.add(new NuclearPlant(10000));\n energyPlants.add(new FusionPlant(20000));\n energyPlants.add(new FusionPlant(20000));\n energyPlants.add(new AnnihilationPlant(25000));\n energyPlants.add(new AnnihilationPlant(25000));\n\n\n var simulation = new Simulation(null, mines, energyPlants);\n simulation.run();\n\n }", "private void initMushrooms() {\n\t\tRandom r = new Random();\n\t\tint numMushrooms = 600;\n\t\tint topDist = 48;\n\t\tint leftDist = 80;\n\t\tint xCoord = 0;\n\t\tint yCoord = 0;\n\n\t\tfor (int i = 0; i < 14; i++) {//goes through each row 1-15\n\n\t\t\tint numShrooms = r.nextInt(6);\n\t\t\tfor (int j = 0; j < numShrooms; j++) {//goes through each column 1 - 15\n\t\t\t\tyCoord = i * 32 + topDist;\n\t\t\t\t//int k = 0;\n\t\t\t\tdo {\n\t\t\t\t\t//finds a new point and checks for good placement via a HashMap\n\t\t\t\t\txCoord = r.nextInt(15) * 32 + leftDist;\n\t\t\t\t\t//System.out.printf(\"%d x and %d y for %d line %d\\n\", xCoord, yCoord, k++, i);\n\t\t\t\t} while (!checkValidMushroom(xCoord, yCoord));\n\t\t\t\tmushrooms.add(new Mushroom(xCoord, yCoord));\n\t\t\t\tif (--numMushrooms == 0) {//breaks when max number of mushrooms has been reached\n\t\t\t\t\ti = 15;\n\t\t\t\t\tj = 6;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void SetUp() {\n numbers.add(0);\n numbers.add(1);\n numbers.add(2);\n numbers.add(3);\n numbers.add(4);\n numbers.add(5);\n numbers.add(6);\n numbers.add(7);\n numbers.add(8);\n numbers.add(9);\n\n PuzzleSolve(10, empty, numbers);\n }", "private void createCommunalPlaces(int populationSize) {\n int nHospitals = populationSize / PopulationParameters.get().buildingDistribution.populationToHospitalsRatio;\n int nSchools = populationSize / PopulationParameters.get().buildingDistribution.populationToSchoolsRatio;\n int nShops = populationSize / PopulationParameters.get().buildingDistribution.populationToShopsRatio;\n int nOffices = populationSize / PopulationParameters.get().buildingDistribution.populationToOfficesRatio;\n int nConstructionSites = populationSize / PopulationParameters.get().buildingDistribution.populationToConstructionSitesRatio;\n int nNurseries = populationSize / PopulationParameters.get().buildingDistribution.populationToNurseriesRatio;\n int nRestaurants = populationSize / PopulationParameters.get().buildingDistribution.populationToRestaurantsRatio;\n int nCareHomes = populationSize / PopulationParameters.get().buildingDistribution.populationToCareHomesRatio;\n\n createNHospitals(nHospitals);\n createNSchools(nSchools);\n createNShops(nShops);\n createNOffices(nOffices);\n createNConstructionSites(nConstructionSites);\n createNNurseries(nNurseries);\n createNRestaurants(nRestaurants);\n createNCareHomes(nCareHomes);\n\n LOGGER.info(\"Total number of communal places = {}\", getCommunalPlaces().size());\n }", "private void initGP() {\n log.info(\"Initializing GP\");\n geneticProgram.addPopulationObserver(this);\n geneticProgram.initialize();\n frontRunner = geneticProgram.getProgram(0); // A safe default\n }", "public void setPopulationSize(int m){\n\t\tsetParameters(m, type1Size, sampleSize);\n\t}", "private static void setupLocations() {\n\t\tcatanWorld = Bukkit.createWorld(new WorldCreator(\"catan\"));\n\t\tspawnWorld = Bukkit.createWorld(new WorldCreator(\"world\"));\n\t\tgameLobby = new Location(catanWorld, -84, 239, -647);\n\t\tgameSpawn = new Location(catanWorld, -83, 192, -643);\n\t\thubSpawn = new Location(spawnWorld, 8, 20, 8);\n\t\twaitingRoom = new Location(catanWorld, -159, 160, -344);\n\t}", "public void setup() \n { \n \tsize(400,400);\n \tbac = new Bacteria[15];\n \tfor (int i = 0; i<bac.length; i++)\n \t{\n \t\tbac[i]= new Bacteria(200,200);\n \t\tbac[i].c();\n \t} //initialize bacteria variables here \n }", "private void setPersonsInPool(ArrayList<Person> personsInPool) {\n this.personsInPool = personsInPool;\n }", "@MemoryAnnotations.Initialisation\n public void pumpListInitialisation() {\n for (int i = 0; i < this.configuration.getNumberOfPumps(); i++) {\n this.onOffPumps.add(false);\n }\n for (int i = 0; i < this.configuration.getNumberOfPumps(); i++) {\n this.middlePoints.add(null);\n }\n }", "public void initializeGame() {\n speed = 75;\n ticks = 0;\n ticksTubes = 0;\n best = null;\n score = 0;\n\n //Make a new pool of birds based on the parameters set in the species'\n //genomes\n birds.clear();\n for (final Species species : Pool.species)\n for (final Genome genome : species.genomes) {\n genome.generateNetwork();\n birds.add(new Bird(species, genome));\n }\n tubes.clear();\n }", "void fillPool(List<RocketInterface> rockets);", "private void initializePlayers()\n\t{\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\t// Distribute personality cards\n\t\t\tplayer.setPersonalityCard(board.getPersonalityCardDeck().pickTopCard());\n\t\t\t\n\t\t\t// Distribute money\n\t\t\tboard.getBankAccount().transfertAmountTo(player, nbGoldStartPerPlayer, false);\n\t\t\t\n\t\t\t// Distribute minions\n\t\t\tfor(int i = 0; i < nbMinionsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addMinion(new Minion());\n\t\t\t}\n\t\t\t\n\t\t\t// Distribute buildings\n\t\t\tfor(int i = 0; i < nbBuildingsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addBuilding(new Building());\n\t\t\t}\n\t\t}\n\n\t\t// Distribute player cards\n\t\tfor(int i = 0; i < nbInitCards; i++)\n\t\t{\n\t\t\tfor(Player player : playerList)\n\t\t\t{\n\t\t\t\tplayer.getPlayerCardDeck().addCard(board.getPlayerCardDeck().pickTopCard());\n\t\t\t}\n\t\t}\n\t}", "public void setup()\n {\n // we use a separate ArrayList to keep track of each animal. \n // our room is 50 x 50.\n creatures = new ArrayList<Creature>();\n for (int i = 0; i < 55; i++) {\n if (i < 5) {\n creatures.add(new Fox((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1)); \n } else {\n creatures.add(new Tux((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1));\n }\n }\n \n env.setRoom(new Room());\n \n // Add all the animals into to the environment for display\n for (Creature c : creatures) {\n env.addObject(c);\n }\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(-63);\n \n // Turn off the default controls\n env.setDefaultControl(false);\n env.setShowController(false);\n \n }", "public PopulationGrowth() {\n initComponents();\n }", "public static void runAGeneration() {\n //Breeds Population until max population size for genetic drift\n breedAll();\n\n //Genocides Population by fitness\n genocide();\n\n System.out.println(\"\\nPopulation: \");\n\n //prints population\n printPopulation();\n }", "public void initialize(){\n\n //load Settings\n settings = new Settings(settingsFile);\n if (settings.isExcludeCupboard()){\n cupboardCheckBox.setSelected(true);\n }\n\n //The first pane to see when the program starts is the meals Browse pane\n mealsBtnClicked();\n\n //set up focus and out of focus styling for all the Panes\n styleIngredientBrowsePane();\n styleIngredientAddPane();\n styleMealAddPane();\n styleMealBrowsePane();\n stylePlanShoppingListPane();\n stylePlanWeeklyPlanner();\n stylePlanCupboard();\n\n //setup the Ingredients Browse Pane\n setupBrowseIngredientsPane();\n\n //setup up the main menu hoover button effects\n setupHoverMainMenuButtons();\n\n //setup the meal Add Pane\n MealAddPaneSetUp();\n\n //setup the meal Browse Pane\n mealBrowsePaneSetup();\n\n //setup up the meal planner weekly pane\n weeklyPlannerSetup();\n\n //setup the planner shopping list pane\n plannerShoppingListSetup();\n\n //setup the planner cupboard pane\n plannerCupboardSetup();\n\n //Load the meals from the database\n loadMeals();\n\n //set up the focus styling for the minimise and exit buttons\n setupWindowButtons();\n\n //when the program loads, load the shopping list and meal planner from previous usage\n loadShoppingList();\n loadMealPlanner();\n\n //Set up the information boxes instance for ingredient pane, meal pane and planner pane\n plannerBox = new InformationBox(PlannerPlanPane, plannerColor, plannerColorDark,\n \"images/icons8_planner_96px_Black.png\");\n mealBox = new InformationBox(MealsBrowsePane, mealColor, mealColorDark,\n \"images/icons8_cutlery_96px_Black.png\");\n ingredientBox = new InformationBox(IngredientsBrowsePane, ingredientColor, ingredientColorDark,\n \"images/icons8_apple_96px_Black.png\");\n\n }", "public void initialize() {\n\t\tnumRows = gridConfig.getNumRows();\n\t\tnumCols = gridConfig.getNumCols();\n\t\tgridCellCount = numRows * numCols;\n\t\tcreateMaps();\n\t\tsetCurrSimulationMap();\n\t\tcellWidth = SIZE / numCols;\n\t\tcellHeight = SIZE / numRows;\n\t\tcurrentGrid = new Cell[numRows][numCols];\n\t\tnewGrid = new Cell[numRows][numCols];\n\t\tempty(currentGrid);\n\t\tempty(newGrid);\n\t\tsetShapes();\n\t\tsetInitialStates();\n\t}", "public Scenario() {\n Room ninjaRoom, weaponroom, meetingRoom, zenTemple, stealthRoom, restRoom, masterRoom, ninjaTransporter;\n\n // create the rooms\n ninjaRoom = new Room(\"in the main enterence to the camp. You'll need to walk 10000 steps to get to the next room.\");\n weaponroom = new Room(\"in the Weapon's room. Normally this is where you go to grab your Nunchaku, but not today.\");\n meetingRoom = new Room(\"in the Meeting room. This is where classes are normally held. We will be here tomorrow to be sure\");\n zenTemple = new Room(\"in the Meditation room. When done for the day, this is where you clear your head.\");\n stealthRoom = new Room(\"in the Stealth training room. Ninja are made here, slow but steady will keep you alive.\");\n restRoom = new Room(\"in the Barracks. When I am done for th day, I will come back here for some rest.\");\n masterRoom = new Room(\"in the Master's room. Master is current meditating right now. Better leave him alone.\");\n ninjaTransporter = new TransporterRoom(\"in the secret Shumpo room...with this I can teleport anywhere\", this);\n\n weaponroom.addItem(new Item(\"Katana\", 3));\n weaponroom.addItem(new Item(\"Nunchaku\", 1));\n weaponroom.addItem(new Item(\"Bo\", 2));\n weaponroom.addItem(new Item(\"Sai\", 2));\n ninjaRoom.addItem(new Item(\"Master's Keys\", 1));\n meetingRoom.addItem(new Item(\"Secret Plans\", 1));\n zenTemple.addItem(new Item(\"Prayer beads\", 1));\n stealthRoom.addItem(new Item(\"Throwing Star\", 2));\n restRoom.addItem(new Item(\"Risque magazines\", 1));\n masterRoom.addItem(new Item(\"Ancient Shinobi Scroll\", 5));\n\n // initialise room exits\n ninjaRoom.setExits(\"north\", ninjaTransporter);\n\n ninjaTransporter.setExits(\"north\", weaponroom);\n ninjaTransporter.setExits(\"south\", ninjaRoom);\n\n weaponroom.setExits(\"north\", meetingRoom);\n weaponroom.setExits(\"south\", ninjaTransporter);\n\n meetingRoom.setExits(\"north\", stealthRoom);\n meetingRoom.setExits(\"east\", restRoom);\n meetingRoom.setExits(\"south\", weaponroom);\n meetingRoom.setExits(\"west\", zenTemple);\n\n zenTemple.setExits(\"east\", meetingRoom);\n\n stealthRoom.setExits(\"south\", meetingRoom);\n\n restRoom.setExits(\"east\", masterRoom);\n restRoom.setExits(\"west\", meetingRoom);\n\n masterRoom.setExits(\"west\", restRoom);\n\n // Set the start room\n startRoom = ninjaRoom; // start game @ ninjaRoom\n\n rooms = new ArrayList();\n rooms.add(ninjaRoom);\n rooms.add(weaponroom);\n rooms.add(meetingRoom);\n rooms.add(zenTemple);\n rooms.add(stealthRoom);\n rooms.add(restRoom);\n rooms.add(masterRoom);\n rooms.add(ninjaTransporter);\n\n random = new Random();\n }", "@Override\n protected void populate()\n {\n for (int i = 0; i < getHeight(); i++)\n {\n add(new Tile(), 1, i);\n add(new Block(), 2, i);\n add(new Tile(), 3, i);\n }\n for (int i = 2; i < 5; i++)\n {\n add(new LightableTile(), 4, i);\n }\n }", "public Genepool(int numGenes) {\n\t\tgeneNumber = numGenes;\n\t\tgenepool = new ArrayList<Gene>();\n\t\toffspringPool = new ArrayList<Gene>();\n\t\tgenerateGenes();\n\t}", "private void init() {\n\n\t\tinitializeLists();\n\t\tcreateTiles();\n\t\tcreateTileViews();\n\t\tshuffleTiles();\n\n\t}", "private void initialize()\n {\n for(int i=0;i<4;i++)\n {\n foundationPile[i]= new Pile(Rank.ACE);\n foundationPile[i].setRules(true, false, false, false, true,false, true);\n } \n for(int i=0;i<7;i++)\n {\n tableauHidden[i] = new Pile();\n tableauVisible[i] = new Pile(Rank.KING);\n tableauVisible[i].setRules(false, true, false, false, false,false, true);\n } \n deck.shuffle();\n deck.shuffle();\n dealGame();\n }", "private void configureWorlds(){\n switch (gameWorld){\n case NORMAL:\n world.setPVP(true);\n world.setKeepSpawnInMemory(false);\n world.setAutoSave(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n case NETHER:\n world.setPVP(true);\n world.setAutoSave(false);\n world.setKeepSpawnInMemory(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n }\n }" ]
[ "0.67860323", "0.6652782", "0.6584597", "0.65770096", "0.63856214", "0.63224804", "0.6102853", "0.6101659", "0.60077924", "0.59900695", "0.5963743", "0.59405535", "0.58872783", "0.58709353", "0.58621573", "0.584265", "0.58205277", "0.58203566", "0.58122694", "0.5797052", "0.57890785", "0.5780149", "0.5752007", "0.57357955", "0.5732888", "0.5732149", "0.5717161", "0.5716495", "0.57132965", "0.5708143", "0.5707495", "0.56863886", "0.56684667", "0.56628144", "0.5658815", "0.56402475", "0.5638008", "0.5632906", "0.5627167", "0.56237906", "0.55837196", "0.5566684", "0.55488837", "0.552498", "0.5523744", "0.5517206", "0.5514098", "0.5511183", "0.5502474", "0.54973423", "0.5496411", "0.54830843", "0.5472926", "0.54656565", "0.54562324", "0.5436991", "0.54335725", "0.5418739", "0.5417113", "0.54142696", "0.53990215", "0.5387814", "0.5374852", "0.5371934", "0.5357594", "0.5355457", "0.5350584", "0.53461057", "0.5345095", "0.53439504", "0.53436553", "0.5336364", "0.5333591", "0.53309995", "0.53213155", "0.531879", "0.53002304", "0.5289727", "0.52881545", "0.5287814", "0.5285406", "0.5277587", "0.527156", "0.52539736", "0.5251633", "0.5250052", "0.52491814", "0.5243102", "0.52315575", "0.52278566", "0.52262664", "0.5221191", "0.52205825", "0.5214245", "0.5211472", "0.52111", "0.52101994", "0.5208982", "0.5207972", "0.52064294", "0.5203584" ]
0.0
-1
Functions that handle the output file
public static void createFile(String name) { file = new File(name); try { if(file.exists()) { file.delete(); file.createNewFile(); }else file.createNewFile(); fileWriter = new FileWriter(file); fileWriter.append("Generation, "); fileWriter.append("Fitness, "); fileWriter.append("Average\n"); }catch (IOException e) { System.out.println(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String FileOutput();", "public void outputToFile(String filemame)\n {\n }", "String getFileOutput();", "private static void textFilesOutput() {\n\n // make output directory if it doesn't already exist\n new File(\"output\").mkdirs();\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n try {\n airportFlightCounter.toTextFile();\n flightInventory.toTextFile();\n flightPassengerCounter.toTextFile();\n mileageCounter.toTextFile();\n } catch (FileNotFoundException e) {\n logger.error(\"Could not write to one or more text files - please close any open instances of that file\");\n e.printStackTrace();\n }\n\n logger.info(\"Output to text files completed\");\n }", "protected abstract void writeFile();", "@Override\r\n\tpublic void handleFile(String inFilename, String outFilename) \r\n\t{\n\r\n\r\n\t\tString s = slurpFile(inFilename);\r\n\t\tDocument teiDocument = parsePlainText(s);\r\n\t\ttry \r\n\t\t{\r\n\t\t\tPrintStream pout = new PrintStream(new FileOutputStream(outFilename));\r\n\t\t\tpout.print(XML.documentToString(teiDocument));\r\n\t\t\tpout.close();\r\n\t\t} catch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace\r\n\t\t\t();\r\n\r\n\t\t}\t\r\n\t}", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private static void writeToOutput() {\r\n FileWriter salida = null;\r\n String archivo;\r\n JFileChooser jFC = new JFileChooser();\r\n jFC.setDialogTitle(\"KWIC - Seleccione el archivo de salida\");\r\n jFC.setCurrentDirectory(new File(\"src\"));\r\n int res = jFC.showSaveDialog(null);\r\n if (res == JFileChooser.APPROVE_OPTION) {\r\n archivo = jFC.getSelectedFile().getPath();\r\n } else {\r\n archivo = \"src/output.txt\";\r\n }\r\n try {\r\n salida = new FileWriter(archivo);\r\n PrintWriter bfw = new PrintWriter(salida);\r\n System.out.println(\"Índice-KWIC:\");\r\n for (String sentence : kwicIndex) {\r\n bfw.println(sentence);\r\n System.out.println(sentence);\r\n }\r\n bfw.close();\r\n System.out.println(\"Se ha creado satisfactoriamente el archivo de texto\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void writeOutput() {\n\n textMergeScript.setCurrentDirectoryFromFile (chosenOutputFile);\n tabFileOutput = new TabDelimFile (chosenOutputFile);\n tabFileOutput.setLog (log);\n tabFileOutput.setDataLogging (false);\n boolean outputOK = true;\n try {\n tabFileOutput.openForOutput (list.getRecDef());\n } catch (IOException e) {\n outputOK = false;\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem opening Output File\",\n false);\n }\n if (outputOK) {\n list.openForInput();\n DataRecord inRec;\n int count = 0;\n do {\n inRec = list.nextRecordIn ();\n if (inRec != null) {\n try {\n tabFileOutput.nextRecordOut (inRec);\n count++;\n } catch (IOException e) {\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem writing to Output File\",\n true);\n }\n } // end if in rec not null\n } while (list.hasMoreRecords());\n\n list.close();\n\n try {\n tabFileOutput.close();\n } catch (IOException e) {\n }\n\n log.recordEvent(LogEvent.NORMAL,\n String.valueOf(count) + \" records output\",\n false);\n\n tabNameOutput = chosenOutputFile.getName();\n openOutputDataName.setText (tabNameOutput);\n if (usingDictionary) {\n tabFileName =\n new FileName (chosenOutputFile.getAbsolutePath());\n dictFile =\n new TabDelimFile (textMergeScript.getCurrentDirectory(),\n tabFileName.replaceExt(DICTIONARY_EXT));\n dictFile.setLog (log);\n try {\n dataDict.store (dictFile);\n } catch (IOException e) {\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem writing Output Dictionary\",\n true);\n }\n } // end if using dictionary\n\n textMergeScript.recordScriptAction (\n ScriptConstants.OUTPUT_MODULE,\n ScriptConstants.OPEN_ACTION,\n ScriptConstants.NO_MODIFIER,\n ScriptConstants.NO_OBJECT,\n chosenOutputFile.getAbsolutePath());\n\n } // end if output ok\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 }", "public abstract boolean isFileOutput();", "private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}", "public abstract void writeToFile( );", "private void doFileOut(HashMap<String, String> file_out_list, HashMap<String, String> file_charset_list) throws DPFTRuntimeException {\n\t\tfor(String filename: file_out_list.keySet()){\n\t\t\ttry{\n\t\t\t\tFile fdir = new File(getOutFileLocalDir());\n\t\t\t\tif(!fdir.exists()){\n\t\t\t\t\tfdir.mkdirs();\n\t\t\t\t}\n\t\t\t\tFile f = new File(getOutFileLocalDir() + File.separator + filename);\n\t\t\t\tString datastring = file_out_list.get(filename);\n\t\t\t\tString charset = file_charset_list.get(filename);\n\t\t\t\tFileUtils.writeStringToFile(f, datastring, charset);\n\t\t\t}catch(Exception e){\n\t\t\t\tObject[] params = {filename};\n\t\t\t\tthrow new DPFTDataFormatException(\"SYSTEM\", \"DPFT0015E\", params);\n\t\t\t}\n\t\t}\n\t}", "private void writeToFiles(Context resultContext) throws IOException {\n\t\tMap<String, Map<Object, ArrayList<Object>>> keyValMappingByBaseOutputPath = resultContext.getKeyValMappingsByBaseOutputPath(); \n\t\t//Write key & value to each baseOutputPath's \n\t\tPath targetOutputDir = null;\n\t\tMap<Object, ArrayList<Object>> keyValMapping = null;\n\t\tPath finalOutputBaseDir = this.config.getFinalOutputDir();\n\t\tfor (String baseOutputPath: keyValMappingByBaseOutputPath.keySet()) {\n\t\t\tif (baseOutputPath.equals(\"\")) {\n\t\t\t\t//Regular output goes into the mapper output buffer directory.\n\t\t\t\ttargetOutputDir = this.config.getMapOutputBufferDir();\n\t\t\t}else {\n\t\t\t\t//Multiple output to a particular outputPath which was \n\t\t\t\t//specified by user goes into the final output directory. \n\t\t\t\ttargetOutputDir = Paths.get(finalOutputBaseDir.toString(), baseOutputPath);\n\t\t\t}\n\t\t\tkeyValMapping = keyValMappingByBaseOutputPath.get(baseOutputPath);\n\t\t\tthis.writeEachMapping(targetOutputDir, keyValMapping);\n\t\t};\n\t}", "private void toFile(OutputData data) {\n if(data == null) {\r\n JOptionPane.showMessageDialog(this, \"Dane wynikowe nie zostały jeszcze umieszczone w pamieci\");\r\n return;\r\n }\r\n\r\n // Sprawdzenie sciezki zapisu\r\n String filePath = this.outputFileSelector.getPath();\r\n if(filePath.length() <= 5) {\r\n JOptionPane.showMessageDialog(this, \"Nie można zapisać wyniku w wybranej lokacji!\");\r\n return;\r\n }\r\n\r\n // Zapisujemy plik na dysk\r\n try{\r\n PrintWriter writer = new PrintWriter(filePath, \"UTF-8\");\r\n OutputDataFormatter odf = new OutputDataFormatter(this.outputData);\r\n\r\n String userPattern = this.outputFormatPanel.getPattern();\r\n writer.write(odf.getParsedString(userPattern.length() < 2 ? defaultFormatting : userPattern));\r\n\r\n writer.close();\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(this, \"Wystąpił błąd IO podczas zapisu.\");\r\n }\r\n\r\n }", "String prepareFile();", "@Override\n\tpublic void writeFile(String file_out) {\n\t\tthis.writeFile(Mode.POINT_ONLY, 0, DEFAULT_AND_LOAD_FACTOR, file_out);\n\t}", "public void processOutput() {\n\n\t}", "public void generate() throws FileNotFoundException, UnsupportedEncodingException {\n\t\twriter = new PrintWriter(outputFile, \"UTF-8\");\n\t\tFile file = new File(inputFile);\n\t\treader = new Scanner(file);\n\t\tinitializeFile();\n\t\t\n\t\tString line = readLine();\n\t\twhile (line != null) {\n\t\t\tprocess(line);\n\t\t\tline = readLine();\n\t\t}\n\t\t\n\t\tfinishFile();\n\t\twriter.close();\n\t}", "public abstract void saveToFile(PrintWriter out);", "private void convertFile() throws Exception {\n\t\t// Inform the user that we're working\n\t\tmainframe.isLoading();\n\t\toutputMessage = \"Starting conversion...\";\n\n\t\t// ---------- Setting the output\n\t\t// *** Creating the dir\n\n\t\t// if the outputfiletextfield is empty, output file folder is same as input file's\n\t\tif(mainframe.getOutputTextfieldText().trim().equals(\"\")) {\n\t\t\tString[] temporarypath = null;\n\t\t\ttemporarypath = curFile.getAbsolutePath().split(\".xml\");\n\t\t\tdir = temporarypath[0];\n\n\t\t\toutputMessage += '\\n' + \"No output filled, same directory as input will be used\";\n\t\t}\n\t\telse{\n\t\t\ttry {\n\t\t\t\tFile f = new File(mainframe.getOutputTextfieldText());\n\n\t\t\t\t// if the selected is a directory\n\t\t\t\tif(f.isDirectory())\n\t\t\t\t{\n\t\t\t\t\t// split the file name\n\t\t\t\t\tString[] temporarypath = curFile.getName().split(\".xml\");\n\n\t\t\t\t\tdir = f.getAbsolutePath() + File.separator + temporarypath[0];\n \n\t\t\t\t}\n\t\t\t\telse if(f.getAbsolutePath().endsWith(\"sif\"))\n\t\t\t\t{\n\t\t\t\t\tString[] temporarypath = f.getAbsolutePath().split(\".sif\");\n\t\t\t\t\tdir = temporarypath[0];\n\t\t\t\t}\n\t\t\t\telse if(f.getAbsolutePath().endsWith(\"csv\"))\n\t\t\t\t{\n\t\t\t\t\tString[] temporarypath = f.getAbsolutePath().split(\".csv\");\n\t\t\t\t\tdir = temporarypath[0];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthrow new Exception(\"Invalid output : directory, SIF file or CSV file expected\");\n\t\t\t\t}\n\t\t\t} catch (NullPointerException nullExp){\n\t\t\t\toutputMessage += '\\n' + \"No output fuilled, same directory as input will be used\";\n\t\t\t}\n\t\t}\n\n\n\n\t\t// *** Setting the targets\n\t\tsetTargetSIFpath(dir.concat(\".sif\"));\n\t\tsetTargetCSVpath(dir.concat(\".csv\"));\n\t\t// set the target node type NA path\n\t\tsetTargetNODE_TYPEpath(dir.concat(\".NODE_TYPE.NA\"));\n\t\t// set the UNIPROT NA path\n\t\tsetTargetUNIPROTpath(dir.concat(\".UNIPROT.NA\"));\n\t\t// set the MODIFICATIONS NA path\n\t\tsetTargetMODIFICATIONSpath(dir.concat(\".MODIFICATIONS.NA\"));\n\t\t// set the PREFERRED_SYMBOL NA path\n\t\tsetTargetPREFERRED_SYMBOLpath(dir.concat(\".PREFERRED_SYMBOL.NA\"));\n\t\t// set the PREFERRED_SYMBOL_EXT NA path\n\t\tsetTargetPREFERRED_SYMBOL_EXTpath(dir.concat(\".PREFERRED_SYMBOL_EXT.NA\"));\n\t\t// set the PID NA path\n\t\tsetTargetPIDpath(dir.concat(\".PID.NA\"));\n\t\t// set the ID_PREF NA path\n\t\tsetTargetID_PREFpath(dir.concat(\".ID_PREF.NA\"));\n\t\t// set the IDCytoUniProtFile path\n\t\tsetTargetIDCytoUniProtFilepath(dir.concat(\".IDCytoToUniProt.NA\"));\n\t\t// set the UniqueUniProtFile path\n\t\tsetTargetUniqueUniProtFilepath(dir.concat(\".UNIQUEUNIPROT.NA\"));\n\t\t// set the UniProt to GeneID map file path\n\t\tsetTargetUniProtToGeneIDMapFilepath(dir.concat(\".UPToGeneIDMap.NA\"));\n\t\t// set the GeneID to Affymetrix map file path\n\t\tsetTargetGeneIDtoAffymetrixMapFilepath(dir.concat(\".GeneIDToAffyMap.NA\"));\n\n\t\t// For the user\n\t\toutputMessage += '\\n' + \"Target for conversion : \" + dir;\n\t\tmainframe.setTextToOutputText(dir);\n\n\t\t// ----------------- Converting\n\t\tif(inputfilepath.endsWith(\"xml\"))\n\t\t{\n\t\t\tNodeManagerImpl manager = NodeManagerImpl.getInstance();\n\t\t\tFileReader reader = PidFileReader.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\treader.read(inputfilepath);\n\t\t\t}\n\t\t\tcatch (NoValidManagerSetException e1) {\n\t\t\t\tthrow e1;\n\t\t\t}\n\t\t\tcatch (FileParsingException e1) {\n\t\t\t\tthrow e1;\n\t\t\t}\n\n\t\t\tFileWriter writer = SifFileWriter.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\twriter.write(getTargetSIFpath(), manager);\n\t\t\t\tif (mainframe.isExpandChecked())\n\t\t\t\t{\n\t\t\t\t\twriter = SifFileExpandMolWriter.getInstance();\n\t\t\t\t\twriter.write(getTargetSIFpath(), manager);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\tthrow e;\n\t\t\t}\n\n\t\t\tFileWriter nWriter = NodeTypeAttributeForUniprotWithModWriter.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tnWriter.write(getTargetNODE_TYPEpath(), manager);\n\t\t\t}\n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tFileWriter uWriter = UniprotIdForUniprotWithModWriter.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tuWriter.write(getTargetUNIPROTpath(), manager);\n\t\t\t}\n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tFileWriter modiWriter = ModificationsWriter.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tmodiWriter.write(getTargetMODIFICATIONSpath(), manager);\n\t\t\t}\n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tFileWriter pWriter = PreferredSymbolForUniprotWithModWriter.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tpWriter.write(getTargetPREFERRED_SYMBOLpath(), manager);\n\t\t\t}\n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tpWriter = ExtPreferredSymbolWriter.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tpWriter.write(getTargetPREFERRED_SYMBOL_EXTpath(), manager);\n\t\t\t}\n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tFileWriter pidWriter = PidForUniprotWithModWriter.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tpidWriter.write(getTargetPIDpath(), manager);\n\t\t\t}\n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tFileWriter prefIdWriter = IdWithPreferredSymbolWriter.getInstance();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tprefIdWriter.write(getTargetID_PREFpath(), manager);\n\t\t\t}\n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t// Parsing NA to CSV\n\t\t\ttry {\n\t\t\t\tparserTask = new ParserTask(getTargetCSVpath(),getTargetPIDpath(), getTargetNODE_TYPEpath(), getTargetUNIPROTpath(), getTargetMODIFICATIONSpath(),\n\t\t\t\t\t\tgetTargetPREFERRED_SYMBOLpath(), getTargetPREFERRED_SYMBOL_EXTpath(), getTargetPREFERRED_SYMBOL_EXTpath(), getTargetID_PREFpath());\n\n\t\t\t\tFile SIFFile = new File(getTargetSIFpath());\n\t\t\t\tMyTaskObserver myTaskObserver = new MyTaskObserver(mainframe, tm, ldt, parserTask);\n\n\t\t\t\titr = ldn.createTaskIterator(SIFFile);\n\t\t\t\titr.append(parserTask);\n\t\t\t\ttm.execute(itr, myTaskObserver);\n\t\t\t} catch (Exception exp) {\n\t\t\t\tthrow new Exception(\"Problem when trying to parse the NA files or loading the graph : \\n\" + exp.toString());\n\t\t\t}\n\n\t\t}\n\t\telse // not an xml\n\t\t{\n\t\t\tthrow new Exception(\"Invalid input : .xml expected\");\n\t\t}\n \n\t}", "@Override\r\n\tpublic String getOutputFile() {\n\t\t\r\n\t\treturn fileOutputPath;\r\n\t}", "public void writeOutput() {\n // Create json object to be written\n Map<String, Object> jsonOutput = new LinkedHashMap<>();\n // Get array of json output objects for consumers\n List<Map<String, Object>> jsonConsumers = writeConsumers();\n // Add array for consumers to output object\n jsonOutput.put(Constants.CONSUMERS, jsonConsumers);\n // Get array of json output objects for distributors\n List<Map<String, Object>> jsonDistributors = writeDistributors();\n // Add array for distributors to output objects\n jsonOutput.put(Constants.DISTRIBUTORS, jsonDistributors);\n // Get array of json output objects for producers\n List<Map<String, Object>> jsonProducers = writeProducers();\n // Add array for producers to output objects\n jsonOutput.put(Constants.ENERGYPRODUCERS, jsonProducers);\n // Write to output file and close\n try {\n ObjectMapper mapper = new ObjectMapper();\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(Paths.get(outFile).toFile(), jsonOutput);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void output2File(String outputName, ArrayList<Integer> source){\n this.outputContent = new StringBuilder();\n Iterator<Integer> itr = source.iterator();\n\n while(itr.hasNext()){\n this.outputContent.append((itr.next().intValue()));\n this.outputContent.append(\" \");\n }\n\n try {\n FileWriter fileWriter = new FileWriter(outputName, true);\n fileWriter.write(this.outputContent.toString());\n fileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private void actionSaveOutput ()\r\n\t{\r\n\t\ttry\r\n\t\t{\t\t\t\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tJFileChooser saveFileChooser = new JFileChooser();\r\n\r\n\t\t\t\tFileNameExtensionFilter typeCSV = new FileNameExtensionFilter(\"CSV\", \"csv\", \"CSV\");\r\n\t\t\t\tsaveFileChooser.addChoosableFileFilter(typeCSV);\r\n\r\n\t\t\t\tFileNameExtensionFilter typeTXT = new FileNameExtensionFilter(\"TXT\", \"txt\", \"TXT\");\r\n\t\t\t\tsaveFileChooser.addChoosableFileFilter(typeTXT);\r\n\r\n\t\t\t\tsaveFileChooser.setAcceptAllFileFilterUsed(false);\r\n\t\t\t\tsaveFileChooser.setFileFilter(typeCSV);\r\n\r\n\t\t\t\tint isOpen = saveFileChooser.showOpenDialog(saveFileChooser);\r\n\r\n\t\t\t\tif (isOpen == JFileChooser.APPROVE_OPTION) \r\n\t\t\t\t{\r\n\t\t\t\t\tString filePath = saveFileChooser.getSelectedFile().getPath();\r\n\r\n\t\t\t\t\tint indexImage = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\t\t/*!*/DebugLogger.logMessage(\"Saving output of a single image \" + indexImage + \" to file \" + filePath, LOG_MESSAGE_TYPE.INFO);\r\n\r\n\t\t\t\t\tif (indexImage >= 0 && indexImage < tableSize)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (saveFileChooser.getFileFilter().equals(typeCSV))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (!filePath.substring(filePath.length() - 4).equals(\".csv\")) { filePath += \".csv\"; }\r\n\r\n\t\t\t\t\t\t\t//---- Save file in a CSV format\r\n\t\t\t\t\t\t\tOutputController.saveFile(filePath, DataController.getTable(), indexImage, OutputController.OUTPUT_FORMAT.CSV);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (!filePath.substring(filePath.length() - 4).equals(\".txt\")) { filePath += \".txt\"; }\r\n\r\n\t\t\t\t\t\t\t//---- Save file in a txt format\r\n\t\t\t\t\t\t\tOutputController.saveFile(filePath, DataController.getTable(), indexImage, OutputController.OUTPUT_FORMAT.TXT);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}", "private boolean exportResult(){\n System.out.println(\"Writing to \" + \"out_\" + inputFile);\n return true;\n }", "public void buildOutPutFile() throws Exception {\n\t\tFile theFile = openInputFile();\n\t\t\n\t\t// Open a random access file for reading the file from the disk\n\t\tRandomAccessFile theRAFile = new RandomAccessFile(theFile, \"r\");\t\n\t\tBufferedWriter theOutFile = null;\n\t\t// Create the file name\n\t\tString fileName = getOutPutFilePath();\n\t\t\n\t\t// Create the buffered writer\n\t\ttheOutFile = new BufferedWriter(new FileWriter(fileName));\n\t\t\n\t\tString badChars[] = {\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"0\"};\n\t\t\n\t\t\n\t\tString line = \"\";\n\t\twhile(line != null) {\t\t\t\t\t\t\t// Loop through the list\n\t\t\tline = theRAFile.readLine();\t\t\t\t// read the next line\n\t\t\tString goodLine=line;\t\t\t\t\t\t// set the good line equal to the line in the file\n\t\t\t// Loop through the line and replace all of the bad characters\n\t\t\tfor (int i=0; i < badChars.length; i++) {\n\t\t\t\t\n\t\t\t\tif (goodLine != null) {\n\t\t\t\t\t// take out the beginning line numbers\n\t\t\t\t\tgoodLine = goodLine.replace(badChars[i], \"\");\t\n\t\t\t\t\tSystem.out.println(\"goodLine\" + goodLine);\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t}\n\t\t\t// Write the good file out\n\t\t\twriteFile(goodLine, theOutFile);\t\t\t\n\t\t}\n\t\ttheRAFile.close();\t\t\t\t\t\t\t\t// close the reader \n\t\ttheOutFile.close();\t\t\t\t\t\t\t\t// close the writer\t\t\n\t}", "private static void pdfFilesOutput() {\n\n // make output directory if it doesn't already exist\n new File(\"output\").mkdirs();\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n try {\n airportFlightCounter.toPDFFile();\n flightInventory.toPDFFile();\n flightPassengerCounter.toPDFFile();\n mileageCounter.toPDFFile();\n } catch (DocumentException | FileNotFoundException e) {\n logger.error(\"Could not write to one or more PDF files - please close any open instances of that file\");\n e.printStackTrace();\n }\n\n logger.info(\"Output to PDF files completed\");\n }", "private static void prepareOutputFile() {\n try {\n outputFileBuffer = new BufferedWriter(new FileWriter(PATH+OUTPUT_FILE_NAME));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void write(File output) throws IOException {\n }", "private void outputfile() {\n\n ConnectDB dbconnect = new ConnectDB();\n\n try {\n PrintWriter writer = new PrintWriter(\"memberoutput.txt\");\n\n try {\n dbconnect.pst = dbconnect.con.prepareStatement(\"select * from members\");\n dbconnect.rs = dbconnect.pst.executeQuery();\n\n while (dbconnect.rs.next()) {\n writer.println(dbconnect.rs.getString(1) + \",\"\n + dbconnect.rs.getString(2) + \",\"\n + dbconnect.rs.getString(3) + \",\"\n + dbconnect.rs.getString(4) + \",\"\n + dbconnect.rs.getString(5) + \",\"\n + dbconnect.rs.getString(6) + \",\"\n + dbconnect.rs.getString(7) + \",\"\n + dbconnect.rs.getString(8) + \",\"\n + dbconnect.rs.getString(9));\n }\n\n writer.flush();\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n }\n writer.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n JOptionPane.showMessageDialog(null, \"File exported\");\n }", "private void write(){\n\t\ttry {\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\t\n\t\t\tString pathSub = ManipXML.class.getResource(path).toString();\n\t\t\tpathSub = pathSub.substring(5, pathSub.length());\n\t\t\tStreamResult result = new StreamResult(pathSub);\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "abstract void outputAsSAL() throws IsabelleException, FileException;", "public void writeOutput() {\n\t\tint lineNumber = 0;\n\t\ttry {\n\t\t\tfor (; lineNumber < outputFileCont.size(); lineNumber++) {\n\t\t\t\t// pobranie i zapisanie kolejnego zapamiêtanego wiersza\n\t\t\t\tString line = (String) outputFileCont.get(lineNumber);\n\t\t\t\toutputBuffer.write(line);\n\t\t\t\t// zapisanie znaku nowego wiersza\n\t\t\t\toutputBuffer.newLine();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"B³¹d zapisu do pliku: \" + outputFileName + \" \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\t// niezbêdne\n\t\t\toutputBuffer.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"B³¹d zamkniêcia pliku: \" + outputFileName\n\t\t\t\t\t+ \" \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Zapisano \"\n\t\t\t\t+ lineNumber\n\t\t\t\t+ \" wiersz\"\n\t\t\t\t+ (lineNumber == 1 ? \"\"\n\t\t\t\t\t\t: (lineNumber > 1 && lineNumber < 5 ? \"e\" : \"y\"))\n\t\t\t\t+ \" do pliku \" + outputFileName);\n\t}", "public void convert(File inputFile, File outputFile) throws IOException {\n\n setType(inputFile);\n\n BufferedReader reader = null;\n PrintWriter writer = null;\n\n try {\n reader = new BufferedReader(new FileReader(inputFile));\n writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));\n\n String nextLine = null;\n\n // Skip meta data. Note for GCT files this includes the mandatory first line\n while ((nextLine = reader.readLine()).startsWith(\"#\") && (nextLine != null)) {\n writer.println(nextLine);\n }\n\n // This is the first non-meta line\n writer.println(nextLine);\n\n // for TAB and RES files the first row contains the column headings.\n int nCols = 0;\n if (type == FileType.TAB || type == FileType.RES) {\n nCols = nextLine.split(\"\\t\").length;\n }\n\n\n if (type == FileType.GCT) {\n // GCT files. Column headings are 3rd row (read next line)\n nextLine = reader.readLine();\n nCols = nextLine.split(\"\\t\").length;\n writer.println(nextLine);\n } else if (type == FileType.RES) {\n // Res files -- skip lines 2 and 3\n writer.println(reader.readLine());\n writer.println(reader.readLine());\n }\n\n\n // Compute the # of data points\n int columnSkip = 1;\n if (type == FileType.RES) {\n columnSkip = 2;\n nCols++; // <= last call column of a res file is sometimes blank, if not this will get\n }\n nPts = (nCols - dataStartColumn) / columnSkip;\n\n // Now for the data\n while ((nextLine = reader.readLine()) != null) {\n String[] tokens = nextLine.split(\"\\t\");\n\n for (int i = 0; i < dataStartColumn; i++) {\n writer.print(tokens[i] + \"\\t\");\n }\n\n DataRow row = new DataRow(tokens, nextLine);\n for (int i = 0; i < nPts; i++) {\n\n if (Double.isNaN(row.scaledData[i])) {\n writer.print(\"\\t\");\n } else {\n\n writer.print(row.scaledData[i]);\n if (type == FileType.RES) {\n writer.print(\"\\t\" + row.calls[i]);\n }\n if (i < nPts - 1) {\n writer.print(\"\\t\");\n }\n }\n }\n writer.println();\n }\n }\n finally {\n if (reader != null) {\n reader.close();\n }\n if (writer != null) {\n writer.close();\n }\n }\n }", "public void writeOutputSettings(File file) throws IOException\n{\n if (file != null && m.getOutputImageManager().getMosaic() != null)\n {\n boolean[][] vFlip = m.getOutputImageManager().getMosaic().getFlipV();\n boolean[][] hFlip = m.getOutputImageManager().getMosaic().getFlipH();\n String[] lines = new String[8];\n lines[0] = \"output\";\n lines[1] = new Integer((int)cp5.getController(\"sizeOfTiles\").getValue()).toString(); //size of cells\n lines[2] = new Integer((int)cp5.getController(\"evenRowShift\").getValue()).toString(); //even row shift\n lines[3] = new Integer((int)cp5.getController(\"oddRowShift\").getValue()).toString(); //odd row shift\n lines[4] = new Integer(vFlip[0].length-1).toString(); //number of x cells\n lines[5] = new Integer(vFlip.length).toString(); //number of y cells\n int i = 6;\n \n boolean[][] array = vFlip;\n while(i < lines.length)\n {\n lines[i] = \"\";\n for (int j = 0; j < array[0].length; j++)\n {\n for (int k = 0; k < array.length; k++)\n {\n if (array[k][j])\n {\n lines[i] += \"t\";\n } else\n {\n lines[i] += \"f\";\n }\n lines[i] += \"-\";\n }\n lines[i] = lines[i].substring(0,lines[i].length()-1);\n lines[i] += \";\";\n }\n array = hFlip;\n i++;\n }\n \n // list the files in the data folder\n String[] filenames = file.list();\n int fileNumber = 1;\n \n for(String f: filenames)\n {\n if(f.endsWith(\".config\") && f.startsWith(\"OutputConfiguration\"))\n {\n f = f.substring(f.length()-8,f.length()-7);\n if(isParsable(f))\n {\n fileNumber = max(Integer.parseInt(f),fileNumber);\n fileNumber++;\n }\n \n }\n }\n \n saveStrings(file+\"/\"+\"OutputConfiguration\"+fileNumber+\".config\", lines);\n }\n}", "void generateContent(OutputStream output) throws Exception;", "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}", "@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 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}", "@Override\n public void writeDataToTxtFile() {\n\n }", "@Override\r\n\tpublic void output(File outFile, Collection<RoleAnimationInfo> collection) throws Exception {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tFileReader myReader=new FileReader();\r\n\t\ttry {\r\n\t\t\tmyReader.readFile(\"D:/test.txt\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\r\n\t\t//This is for writing to the file\r\n\t\t\t\tPrintWriter writer;\r\n\t\t\t\t\r\n\t\t\t\t//Open File 'output.txt'\r\n\t\t\t\ttry {\r\n\t\t\t\t\twriter = new PrintWriter(\"output.txt\", \"UTF-8\");\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\r\n\r\n//\t\t\t\tswitch (methodEmployed){\r\n//\t\t\t\t\tcase 1: //BiSection\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tBisectionMethod(e,l,u,cE);\r\n//\t\t\t\t\t\r\n//\t\t\t\t\twriter.println(\"Report of BisectionSearch\");\r\n//\t\t\t\t\twriter.println(\"--------------------------------------\");\r\n//\t\t\t\t\twriter.println(\"App. Optimum Soln.=\" + String.valueOf(BisectionMethod.getXMean()));\r\n//\t\t\t\t\twriter.println(\"Abs. Range for Opt. Soln.=[\" + String.valueOf(BisectionMethod.getXLower())+\"-\"+String.valueOf(BisectionMethod.getXUpper())+\"]\");\r\n//\t\t\t\t\twriter.println(\"Z=\" + String.valueOf(BisectionMethod.getFunctionValue());\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 2: //GoldenSection\r\n//\t\t\t\t\tGoldenSectionMethod(e,l,u,cE);\r\n//\t\t\t\t\t\r\n//\t\t\t\t\twriter.println(\"Report of GoldenSectionSearch\");\r\n//\t\t\t\t\twriter.println(\"--------------------------------------\");\r\n//\t\t\t\t\twriter.println(\"App. Optimum Soln.=\" + String.valueOf(GoldenSectionMethod.getXMean()));\r\n//\t\t\t\t\twriter.println(\"Abs. Range for Opt. Soln.=[\" + String.valueOf(GoldenSectionMethod.getXLower())+\"-\"+String.valueOf(GoldenSectionMethod.getXUpper())+\"]\");\r\n//\t\t\t\t\twriter.println(\"Z=\" + String.valueOf(GoldenSectionMethod.getFunctionValue());\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 3: // NewtonMethod\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 4: // SecantMethod\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\twriter.close();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\t\tSystem.out.println(\"RESULTS ARE WRITTEN TO 'output.txt' \");\r\n\r\n\t\r\n\t}", "public void setupFiles() {\n File inputDataFile = new File(inputFileName);\n try {\n inputFile = new Scanner(inputDataFile);\n FileWriter outputDataFileOA = new FileWriter(outputFileNameOA);\n FileWriter outputDataFileLL = new FileWriter(outputFileNameLL);\n outputFileOA = new PrintWriter(outputDataFileOA);\n outputFileLL = new PrintWriter(outputDataFileLL);\n outputFileOA.println(\"Output from open addressing hash table:\");\n outputFileOA.println();\n outputFileLL.println(\"Output from linked list hash table:\");\n outputFileLL.println();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void writeToFile(String[] data) {\n\t\t// Regatta hasn't been calculated.\n\t\tif(r == null) {\n\t\t\tSystem.out.println(\"\\nYou haven't processed a regatta yet! \\nUse regatta to begin processing.\\n\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Just the command was specified, we need to get the filename.\n\t\tif(data.length == 1) {\n\t\t\tSystem.out.println(\"Oops, looks like you didn't specify an output file.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\t// Filename was specified but is invalid. Need to get another one.\n\t\tif(!isValidFileName(data[1])) {\n\t\t\tSystem.out.println(\"Looks like your filename is incorrect.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\tinitializeOutput(data[1]);\n\n\t\t// Write out.\n\t\tfileOutput.print(r.podium());\n\t\tfileOutput.close();\n\t}", "@Override\n public int doWork() {\n INPUT = FileListParsingUtils.expandFileList(INPUT);\n\n if (OUTPUT != null && !OUTPUT.getPath().contains(OUTPUT_SLUG)) {\n throw new IllegalArgumentException(OUTPUT + \" does not contain the replacement token \" + OUTPUT_SLUG);\n }\n\n if (OUTPUT == null) {\n setDefaultOutput();\n }\n\n if (DELETE_INPUT_INDICES == null) {\n DELETE_INPUT_INDICES = DELETE_INPUTS;\n }\n\n // Check that input BAM files can be deleted\n if (DELETE_INPUTS) {\n for (File bamFile : INPUT) {\n IOUtil.assertFileIsWritable(bamFile);\n }\n }\n\n if (DELETE_INPUT_INDICES) {\n for (File bamFile : INPUT) {\n final File index = SamFiles.findIndex(bamFile);\n if (index != null && index.exists()) {\n IOUtil.assertFileIsWritable(index);\n }\n }\n }\n\n if (TARGET_BAM_SIZE != null) {\n long targetSize = dehumanizeFileSize(TARGET_BAM_SIZE);\n NUM_OUTPUTS = (int) Math.max(1, Math.round(1.0 * getTotalBamSize(INPUT) / targetSize));\n }\n\n checkOutputOverwrites();\n\n samWriterFactory = new SAMFileWriterFactory().setCreateIndex(CREATE_INDEX);\n\n headerAndIterator = SamFileMergeUtil.mergeInputs(INPUT, true);\n SamHeaderUtil.addPgRecord(headerAndIterator.header, this);\n splitBAMs();\n CloserUtil.close(headerAndIterator.iterator);\n for (SAMFileInfo writerInfo : writerInfoList) {\n writerInfo.getWriter().close();\n }\n if (OUTPUT_MANIFEST != null) {\n writeManifest(OUTPUT_MANIFEST);\n }\n\n\n writeOutputList();\n writeReport();\n\n if (DELETE_INPUTS) {\n deleteInputBamFiles();\n }\n\n\n return 0;\n }", "private void outputToFile(String filename) throws FileNotFoundException, IOException {\n\t\tBufferedWriter writer = new BufferedWriter(\n\t\t\t\tnew FileWriter(filename+\".tmp\"));\n\t\twriter.write(VERIFY_STRING + \"\\n\");\n\n\t\t// output automata info\n\t\twriter.write(machine.getName() + \"\\n\");\n\t\twriter.write(machine.getType() + \"\\n\");\n\n\t\t// output state info\n\t\tfor (State state : machine.getStates()) {\n\t\t\twriter.write(\"STATE\\n\");\n\t\t\twriter.write(state.getName() + \"\\n\");\n\t\t\twriter.write(state.isAccept() + \" \" + state.isStart() + \" \" + \n\t\t\t\t\tstate.getID() + \" \" + state.getGraphic().getX() + \" \" + \n\t\t\t\t\tstate.getGraphic().getY() + \"\\n\");\n\n\t\t\t// output transitions\n\t\t\tfor (Transition t : state.getTransitions())\n\t\t\t\twriter.write(t.getID() + \" \" + t.getInput() + \" \" + \n\t\t\t\t\t\tt.getNext().getID() + \"\\n\");\n\t\t}\n\t\twriter.close();\n\t}", "public void generateOutputFile(String inputFile) {\n\n String outputFile = properties.getProperty(\"output.directory\")\n + properties.getProperty(\"output.file.distinct\");\n\n\n try (PrintWriter out = new PrintWriter(new BufferedWriter(\n new FileWriter(outputFile)))){\n\n loopThroughTokens(out);\n\n\n } catch (FileNotFoundException fileNotFound) {\n fileNotFound.printStackTrace();\n } catch (IOException inputOutputException) {\n inputOutputException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\n PrintWriter outputFile = new PrintWriter(\"ResultFile.txt\");\n\n outputFile.println(\"Line 1\");\n outputFile.println(\"Line 2\");\n outputFile.println(\"Line 3\");\n outputFile.println(\"Line 4\");\n\n\n outputFile.close();\n\n }", "public void writeFile(String filename, ArrayList<String> output)\n {\n try\n {\n PrintWriter write = new PrintWriter(filename);\n for(String out : output)\n {\n write.println(out);\n }\n write.close();\n }\n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n } \n }", "private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}", "private void processGenerateOutputButton() {\n try {\n if(selectedFile != null) {\n //initialScannerOfDataFile();\n world = new World(\"My World\", 0, 0, selectedFile);\n String myTotalOutput = world.toString();\n dataOutputArea.setText(myTotalOutput);\n createTree();\n\n } else {\n JOptionPane.showMessageDialog(null, \"No selected file!\");\n }\n } catch(Exception e2) {\n System.out.println(\"Something is wrong with output generation!\\n\\n\" + e2.getMessage());\n } //end of catch()\n }", "void mergeOut() {\n String outputName = outputDir + flist.get(0).getName().substring(0,\n flist.get(0).getName().lastIndexOf(\".\"));\n if (outputType.equals(\"Text\")) {\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n FileWriter writer = new FileWriter(outputName + \".txt\", true);\n BufferedWriter bWriter = new BufferedWriter(writer);\n for (int j = 1; j < images.length; j++) {\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n }\n bWriter.close();\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n FileWriter writer = new FileWriter(outputName + \".txt\", true);\n BufferedWriter bWriter = new BufferedWriter(writer);\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n bWriter.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n for (int j = 1; j < images.length; j++) {\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n try {\n document.save(outputName + \".pdf\");\n document.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "@Override\n public void writeFile(String arg0, Map result) {\n\n // Initial variables\n ArrayList<HashMap> records;\n ArrayList<HashMap> recordT;\n ArrayList<HashMap> observeRecords; // Array of data holder for time series data\n BufferedWriter bwT; // output object\n StringBuilder sbData = new StringBuilder(); // construct the data info in the output\n HashMap<String, String> altTitleList = new HashMap(); // Define alternative fields for the necessary observation data fields; key is necessary field\n // P.S. Add alternative fields here\n HashMap titleOutput; // contain output data field id\n DssatObservedData obvDataList = DssatObservedData.INSTANCE; // Varibale list definition\n\n try {\n\n // Set default value for missing data\n setDefVal();\n\n // Get Data from input holder\n Object tmpData = getObjectOr(result, \"observed\", new Object());\n if (tmpData instanceof ArrayList) {\n records = (ArrayList) tmpData;\n } else if (tmpData instanceof HashMap) {\n records = new ArrayList();\n records.add((HashMap) tmpData);\n } else {\n return;\n }\n if (records.isEmpty()) {\n return;\n }\n\n observeRecords = new ArrayList();\n for (HashMap record : records) {\n recordT = getObjectOr(record, \"timeSeries\", new ArrayList());\n String trno = getValueOr(record, \"trno\", \"1\");\n if (!recordT.isEmpty()) {\n String[] sortIds = {\"date\"};\n Collections.sort(recordT, new DssatSortHelper(sortIds));\n for (HashMap recordT1 : recordT) {\n recordT1.put(\"trno\", trno);\n }\n observeRecords.addAll(recordT);\n }\n }\n\n // Initial BufferedWriter\n String fileName = getFileName(result, \"T\");\n if (fileName.endsWith(\".XXT\")) {\n String crid = DssatCRIDHelper.get2BitCrid(getValueOr(result, \"crid\", \"XX\"));\n fileName = fileName.replaceAll(\"XX\", crid);\n }\n arg0 = revisePath(arg0);\n outputFile = new File(arg0 + fileName);\n bwT = new BufferedWriter(new FileWriter(outputFile));\n\n // Output Observation File\n // Titel Section\n sbError.append(String.format(\"*EXP.DATA (T): %1$-10s %2$s\\r\\n\\r\\n\",\n fileName.replaceAll(\"\\\\.\", \"\").replaceAll(\"T$\", \"\"),\n getObjectOr(result, \"local_name\", defValBlank)));\n\n titleOutput = new HashMap();\n // TODO get title for output\n // Loop all records to find out all the titles\n for (HashMap record : observeRecords) {\n // Check if which field is available\n for (Object key : record.keySet()) {\n // check which optional data is exist, if not, remove from map\n if (obvDataList.isTimeSeriesData(key)) {\n titleOutput.put(key, key);\n\n } // check if the additional data is too long to output\n else if (key.toString().length() <= 5) {\n if (!key.equals(\"date\") && !key.equals(\"trno\")) {\n titleOutput.put(key, key);\n }\n\n } // If it is too long for DSSAT, give a warning message\n else {\n sbError.append(\"! Waring: Unsuitable data for DSSAT observed data (too long): [\").append(key).append(\"]\\r\\n\");\n }\n }\n // Check if all necessary field is available // P.S. conrently unuseful\n for (String title : altTitleList.keySet()) {\n\n // check which optional data is exist, if not, remove from map\n if (getValueOr(record, title, \"\").equals(\"\")) {\n\n if (!getValueOr(record, altTitleList.get(title), \"\").equals(\"\")) {\n titleOutput.put(title, altTitleList.get(title));\n } else {\n sbError.append(\"! Waring: Incompleted record because missing data : [\").append(title).append(\"]\\r\\n\");\n }\n\n } else {\n }\n }\n }\n\n // decompress observed data\n// decompressData(observeRecords);\n // Observation Data Section\n Object[] titleOutputId = titleOutput.keySet().toArray();\n Arrays.sort(titleOutputId);\n String pdate = getPdate(result);\n for (int i = 0; i < (titleOutputId.length / 39 + titleOutputId.length % 39 == 0 ? 0 : 1); i++) {\n\n sbData.append(\"@TRNO DATE\");\n int limit = Math.min(titleOutputId.length, (i + 1) * 39);\n for (int j = i * 39; j < limit; j++) {\n sbData.append(String.format(\"%1$6s\", titleOutput.get(titleOutputId[j]).toString().toUpperCase()));\n }\n sbData.append(\"\\r\\n\");\n\n for (HashMap record : observeRecords) {\n \n if (record.keySet().size() <= 2 && record.containsKey(\"trno\") && record.containsKey(\"date\")) {\n continue;\n }\n sbData.append(String.format(\" %1$5s\", getValueOr(record, \"trno\", \"1\")));\n sbData.append(String.format(\" %1$5s\", formatDateStr(getObjectOr(record, \"date\", defValI))));\n for (int k = i * 39; k < limit; k++) {\n\n if (obvDataList.isDapDateType(titleOutputId[k], titleOutput.get(titleOutputId[k]))) {\n sbData.append(String.format(\"%1$6s\", formatDateStr(pdate, getObjectOr(record, titleOutput.get(titleOutputId[k]).toString(), defValI))));\n } else if (obvDataList.isDateType(titleOutputId[k])) {\n sbData.append(String.format(\"%1$6s\", formatDateStr(getObjectOr(record, titleOutput.get(titleOutputId[k]).toString(), defValI))));\n } else {\n sbData.append(\" \").append(formatNumStr(5, record, titleOutput.get(titleOutputId[k]), defValI));\n }\n\n }\n sbData.append(\"\\r\\n\");\n }\n }\n // Add section deviding line\n sbData.append(\"\\r\\n\");\n\n // Output finish\n bwT.write(sbError.toString());\n bwT.write(sbData.toString());\n bwT.close();\n } catch (IOException e) {\n LOG.error(DssatCommonOutput.getStackTrace(e));\n }\n }", "public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}", "public void outputToFile(StatementList original, StatementList mutant)\n {\n if (comp_unit == null) \n \t return;\n\t\tif(original.toString().equalsIgnoreCase(mutant.toString()))\n\t\t\treturn;\n String f_name;\n num++;\n f_name = getSourceName(\"SDL\");\n String mutant_dir = getMuantID(\"SDL\");\n\n try \n {\n\t\t PrintWriter out = getPrintWriter(f_name);\n\t\t SDL_Writer writer = new SDL_Writer(mutant_dir, out);\n\t\t writer.setMutant(original, mutant);\n writer.setMethodSignature(currentMethodSignature);\n\t\t comp_unit.accept( writer );\n\t\t out.flush(); \n\t\t out.close();\n } catch ( IOException e ) \n {\n\t\t System.err.println( \"fails to create \" + f_name );\n } catch ( ParseTreeException e ) {\n\t\t System.err.println( \"errors during printing \" + f_name );\n\t\t e.printStackTrace();\n }\n }", "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\n protected void doWriteTo(StreamOutput out) throws IOException {\n }", "private void createFile(String outputData, File file) {\n try {\n FileWriter writer = new FileWriter(file);\n writer.write(outputData);\n writer.close();\n } catch (IOException e) {\n e.getSuppressed();\n }\n }", "void output(OUT out) throws IOException;", "private static void writeOutput (int[][] outData) {\r\n\t\tString outFile = \"Input_\" + outData.length + \".txt\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFile fileLocation = new File(outFile);\t\t\r\n\t\t\tPrintWriter Writer = new PrintWriter(fileLocation, \"UTF-8\");\t\r\n\t\t\tfor (int i = 0; i < outData.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < outData[i].length; j++) {\r\n\t\t\t\t\tif (outData[i][j] == INFINITY) {\r\n\t\t\t\t\t\tWriter.print(\"NA\");\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tWriter.print(outData[i][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (j != outData[i].length - 1) {\r\n\t\t\t\t\t\tWriter.print(\"\\t\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tWriter.println();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tWriter.close();\r\n\t\t} catch (Exception ex) {\r\n System.out.println(ex.toString()); \r\n\t\t}\r\n\t}", "@Test\n void fileWriter() {\n\n\n ArrayList<String> fileLines = Name_Sorter.fileRead(this.readFile, \"src/main/java/oop/assignment3/ex41/base/testFile-ex41\");\n Collections.sort(fileLines);\n this.writeFile = Name_Sorter.fileWriter(this.writeFile, fileLines, \"src/main/java/oop/assignment3/ex41/base/ex41-testOutputFile.txt\");\n boolean actualOutput = this.writeFile != null;\n Assertions.assertTrue(actualOutput);\n }", "public FileOutput(String filename) {\n\t\tthis.filename = filename;\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,false)));\n\t\t\tSystem.out.println(\"Created\\t\\\"\" + filename + \"\\\" sucessfully\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not create\\t\" + filename);\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\twriter.close();\n\t\t}\n\t\t\n\t}", "public abstract void outputGrid(String filename)\r\n throws FileNotFoundException, IOException;", "public static void main(String[] args) throws IOException {\n\t\tString line = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\t\t\n\t\tFiles.write(Paths.get(\"outputh.txt\"), getOutput(line).getBytes(), StandardOpenOption.CREATE);\n\t\t\n\t}", "public boolean writeDataFile();", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\t// if(StringUtils.isNotEmpty(empId)) {\n\t\t\t\t// filePath += \"/\" + empId;\n\t\t\t\t// }\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(EMPLOYEE_DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\t// Write a new student object list to the CSV file\n\t\t\t\t\tfor (EmployeeDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\t// log.debug(\"Writing transaction record for Employee id :\"+\n\t\t\t\t\t\t// transaction.getEmployeeEmpId());\n\t\t\t\t\t\trecord.add(transaction.getEmpId());\n\t\t\t\t\t\trecord.add(transaction.getName());\n\t\t\t\t\t\trecord.add(transaction.getDesignation());\n\t\t\t\t\t\trecord.add(transaction.getManagerName());\n\t\t\t\t\t\trecord.add(transaction.getProjectName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getActive());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "public static void writeFile(String inputFile, String outputFile, String[] encodings){\n File iFile = new File(inputFile);\n File oFile = new File(outputFile);\n //try catch for creating the output file\n try {\n //if it doesn't exist it creates the file. else if clears the output file\n\t if (oFile.createNewFile()){\n System.out.println(\"File is created!\");\n\t } else{\n PrintWriter writer = new PrintWriter(oFile);\n writer.print(\"\");\n writer.close();\n System.out.println(\"File cleared.\");\n\t }\n }\n catch(IOException e){\n e.printStackTrace();\n }\n //try catch to scan the input file\n try {\n Scanner scan = new Scanner(iFile);\n PrintWriter writer = new PrintWriter(oFile);\n //loop to look at each word in the file\n while (scan.hasNext()) {\n String s = scan.next();\n //loop to look at each character in the word\n for(int i = 0; i < s.length(); i++){\n if((int)s.charAt(i)-32 <= 94) {\n writer.print(encodings[(int)s.charAt(i)-32]);\n }\n }\n //gives the space between words\n writer.print(encodings[0]);\n }\n scan.close();\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void createOutputFiles(){\n\t\tFile folder = new File(C.appFolderPath + C.DEBUG_FOLDER);\n\t\tboolean success = true;\n\t\tif(folder.exists()){\n\t\t\t// erase the folder\n\t\t\tDeleteRecursive(folder);\n\t\t}\n\t\t\n\t\t// create necessary folders\n\t\tif (!folder.exists()) {\n\t\t success = folder.mkdir();\n\t\t Log.d(C.LOG_TAG, \"folder is not existed, create one\");\n\t\t} else {\n\t\t\tLog.e(C.LOG_TAG, \"ERROR: folder has not been deleted\");\n\t\t}\n\t\tFile monitorFolder = new File(C.appFolderPath + C.DEBUG_FOLDER + logFolder);\n\t\tmonitorFolder.mkdir();\n\n\t\ttry {\n\t\t\tmMatlabOutFile = new PrintWriter(new FileOutputStream(new File(C.appFolderPath+ C.DEBUG_FOLDER +\"matlab.txt\"),true));\n\t\t\tmMatlabOutFile.println(inputPrefix+audioSettingName);\n\t\t\tmMatlabOutFile.println(RECODER_CHANNEL_CNT);\n\t\t\tmMatlabOutFile.println(C.DEFAULT_VOL);\n\t\t\tmMatlabOutFile.close();\n\t\t\tmMatlabOutFile = null;\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.e(C.LOG_TAG, \"ERROR: can't open sensor file to write\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void generate() throws FileNotFoundException {\n if (clazz.isInterface())\n generateInterface();\n writer.close();\n }", "public void outputFunctionIDFile(String sourceCodeName, ArrayList<ArrayList<ArrayList<String>>> functions, int[][] matrixCID){\n\t\tresetOutput();\n\t\tString outputName = \"Functions-\";\n\t\tString[] temp = sourceCodeName.split(\"\\\\\\\\\");\n\t\ttemp = temp[temp.length-1].split(\"\\\\.nw\");\n\t\toutputName += temp[0] + \".txt\";\n\t\ttry {\n\t\t\tsetOutput(outputName);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tprintFIDList(functions, matrixCID);\n\t\tresetOutput();\n\t}", "public T caseOutputFile(OutputFile object) {\n\t\treturn null;\n\t}", "public default FileInfo customizeExportingFile(ExecuteSearchResponse results, FileInfo resultFile)\r\n\t{\r\n\t\treturn resultFile;\r\n\t}", "HashMap<String, ?> getOutputFiles();", "public File getOutputDb();", "@Override\n public void makeOutPutData(File file) {\n\n prepareHtmlDataList();\n\n PrintWriter pw = null;\n int cnt = 0;\n\n try {\n pw = new PrintWriter(new FileOutputStream(file, true));\n\n pw.println(\"******************** MainData info ********************\");\n pw.println(\"startLoggingTime : \"\n + ALTHelper\n .DateToString(ALTHelper\n .getTimeStartedBefore(1000)));\n pw.println(\"endLoggingTime : \"\n + ALTHelper\n .DateToString(ALTHelper\n .getTimeLaunched()));\n\n pw.println(\"\");\n\n pw.println(\"******************** Launched info ********************\");\n\n // should implement\n\n pw.println(\"\");\n\n pw.println(\"******************** gc info (top5) sorted by total_time ********************\");\n\n // -----------------------\n\n pw.println(String.format(\"%-20s\", \"time\")\n + String.format(\"%-10s\", \"PID\")\n + String.format(\"%-15s\", \"GC_cause\")\n + String.format(\"%-12s\", \"freedObject\")\n + String.format(\"%-10s\", \"freedByte\")\n + String.format(\"%-13s\", \"freedLObject\")\n + String.format(\"%-11s\", \"freedLByte\")\n + String.format(\"%-13s\", \"percent_free\")\n + String.format(\"%-18s\", \"current_heap_size\")\n + String.format(\"%-13s\", \"total_memory\")\n + String.format(\"%-11s\", \"pause_time\")\n + String.format(\"%-11s\", \"Total_time\"));\n\n ArrayList<GCData> totalTimeList = (ArrayList<GCData>)getGCDataList()\n .clone();\n Collections.sort(totalTimeList, new GCDataComparator(\n GCDataComparator.DataSortType.TOTAL_TIME));\n\n for (GCData gc : totalTimeList) {\n\n if (cnt >= 5)\n break;\n\n pw.println(String.format(\"%-20s\",\n ALTHelper.DateToString(gc.valutOfdate))\n + String.format(\"%-10s\", gc.PID)\n + String.format(\"%-15s\", gc.GC_cause)\n + String.format(\"%-12s\", gc.freedObject)\n + String.format(\"%-10s\", gc.freedByte)\n + String.format(\"%-13s\", gc.freedLObject)\n + String.format(\"%-11s\", gc.freedLByte)\n + String.format(\"%-13s\", gc.percent_free)\n + String.format(\"%-18s\", gc.current_heap_size)\n + String.format(\"%-13s\", gc.total_memory)\n + String.format(\"%-11s\", gc.pause_time)\n + String.format(\"%-11s\", gc.Total_time));\n cnt++;\n }\n\n pw.println(\"\");\n\n // -----------------------\n\n pw.println(\"******************** gc info sorted by date ********************\");\n\n pw.println(String.format(\"GC Total count : %5s\", getGCDataList()\n .size() + \" times\"));\n\n pw.println(String.format(\"%-20s\", \"time\")\n + String.format(\"%-10s\", \"processName\")\n + String.format(\"%-15s\", \"GC_cause\")\n + String.format(\"%-12s\", \"freedObject\")\n + String.format(\"%-10s\", \"freedByte\")\n + String.format(\"%-13s\", \"freedLObject\")\n + String.format(\"%-11s\", \"freedLByte\")\n + String.format(\"%-13s\", \"percent_free\")\n + String.format(\"%-18s\", \"current_heap_size\")\n + String.format(\"%-13s\", \"total_memory\")\n + String.format(\"%-11s\", \"pause_time\")\n + String.format(\"%-11s\", \"Total_time\"));\n\n for (GCData gc : getGCDataList()) {\n pw.println(String.format(\"%-20s\",\n ALTHelper.DateToString(gc.valutOfdate))\n + String.format(\"%-10s\", gc.PID)\n + String.format(\"%-15s\", gc.GC_cause)\n + String.format(\"%-12s\", gc.freedObject)\n + String.format(\"%-10s\", gc.freedByte)\n + String.format(\"%-13s\", gc.freedLObject)\n + String.format(\"%-11s\", gc.freedLByte)\n + String.format(\"%-13s\", gc.percent_free)\n + String.format(\"%-18s\", gc.current_heap_size)\n + String.format(\"%-13s\", gc.total_memory)\n + String.format(\"%-11s\", gc.pause_time)\n + String.format(\"%-11s\", gc.Total_time));\n }\n pw.println(\"\");\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } finally {\n if (pw != null)\n pw.close();\n }\n }", "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "@Override\r\n\tpublic void Write_text(String CustomerCode, String Device, String Lot, String CP, File DataSorce,String FileName)\r\n\t\t\tthrows IOException {\n\t\tFile[] Filelist=DataSorce.listFiles();\r\n\t\tfor (int k = 0; k < Filelist.length; k++) {\t\t\t\t\t\r\n\t\t\tparseRawdata parseRawdata=new parseRawdata(Filelist[k]);\r\n\t\t\tLinkedHashMap<String, String> properties=parseRawdata.getProperties();\r\n\t\t\t\r\n\t\t\tString Wafer_ID_R=properties.get(\"Wafer ID\");\r\n\t\t\tString waferid=properties.get(\"Wafer ID\");\r\n\t\t\tString[][] MapCell_R=parseRawdata.getAllDiesDimensionalArray();\r\n\t\t\tString Flat_R=null;\r\n\t\t\tString notch=properties.get(\"Notch\");\r\n\t\t\tif (notch.equals(\"0-Degree\")) {\r\n\t\t\t\tFlat_R=\"Up\";\r\n\t\t\t}else if (notch.equals(\"90-Degree\")) {\r\n\t\t\t\tFlat_R=\"Right\";\r\n\t\t\t}else if (notch.equals(\"180-Degree\")) {\r\n\t\t\t\tFlat_R=\"Down\";\r\n\t\t\t}else {\r\n\t\t\t\tFlat_R=\"Left\";\r\n\t\t\t}\r\n\t\t\tInteger PassDie_R=Integer.parseInt(properties.get(\"Pass Die\"));\t\r\n\t\t\tInteger RightID_R=Integer.valueOf(properties.get(\"RightID\"));\r\n\t\t\tInteger Col_R=(Integer.parseInt(properties.get(\"Map Cols\"))) ;\r\n\t\t\tInteger Row_R=(Integer.parseInt(properties.get(\"Map Rows\")));\r\n\t\t\t\r\n\t\t\tMapCell_R=TurnNighteenDegree.turnNegativeNighteen(MapCell_R, Row_R, Col_R);\t\t\r\n\t\t\tInteger temp=Row_R;\r\n\t\t\tRow_R=Col_R;\r\n\t\t\tCol_R=temp;\r\n\t\t\t\r\n\t\t\tString FailDie_R=properties.get(\"Fail Die\");\r\n\t\t\tString FinalID=RightID_R.toString();\r\n\t\t\tString TestStartTime_R=properties.get(\"Test Start Time\");\r\n\t\t\tString Wafer_Load_Time_R=properties.get(\"Test Start Time\");\r\n\t\t\tTreeMap<Integer, Integer> Bin_Summary_R=parseRawdata.getBinSummary();\r\n\t\t\tString OPerater_R=properties.get(\"Operator\");\r\n\t\t\tString Yeild_R=properties.get(\"Wafer Yield\");\r\n\t\t\tString TestEndTime_R=properties.get(\"Test End Time\");\r\n\t\t\tInteger gross_die=Integer.parseInt(properties.get(\"Gross Die\"));\r\n\t\t\tString waferSize_R=properties.get(\"WF_Size\");\r\n\t\t\tString slotId=properties.get(\"Slot\");\r\n\t\t\tTextReportModel9TurnN90 model1=new TextReportModel9TurnN90();\r\n\t\t\tString VERSION=\"NA\";\r\n\t\t\tif (RightID_R<10) {\r\n\t\t\t\tFinalID=\"0\"+RightID_R.toString();\r\n\t\t\t}\r\n\t\t\tHashMap<String, String> NameMap=model1.InitMap(Lot, FinalID, CP, Wafer_Load_Time_R, Device, Wafer_ID_R, VERSION);\r\n\t\t\tSet<String> keyset1=NameMap.keySet();\r\n\t\t\tString FinalName=FileName;\r\n\t\t\tfor (String key : keyset1) {\r\n\t\t\t\tif (FinalName.contains(key)) {\r\n\t\t\t\t\tFinalName=FinalName.replace(key, NameMap.get(key));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tFile Result_Text=new File(reportBath+CustomerCode+\"/\"+Device+\"/\"+Lot+\"/\"+CP+\"/\"+FinalName);\r\n\r\n\t\t\tPrintWriter out=null;\r\n\t\t\ttry {\r\n\t\t\t\tout=new PrintWriter(new FileWriter(Result_Text));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tout.print(\" \");\r\n\t\t\tfor(int i = 1;i<Col_R;i++)\r\n\t\t\t{\r\n\t\t\t\tif (i<10) {\r\n\t\t\t\t\tout.print(\" 0\"+i);\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tout.print(\" \"+i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\" \");\r\n\t\t\tfor(int i = 1;i<Col_R;i++)\r\n\t\t\t{\r\n\t\t\t\tout.print(\"++-\");\r\n\t\t\t}\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tfor (int i = 0; i < Row_R; i++) {\r\n\t\t\t\tif (i<10) {\r\n\t\t\t\t\tout.print(\"00\"+i+\"|\");\r\n\t\t\t\t}else if (i>9&&i<100) {\r\n\t\t\t\t\tout.print(\"0\"+i+\"|\");\r\n\t\t\t\t}else {\r\n\t\t\t\t\tout.print(i+\"|\");\r\n\t\t\t\t}\r\n\t\t\t\tfor (int j = 0; j < Col_R; j++) {\r\n\t\t\t\t\tif (MapCell_R[i][j]==null) {\r\n\t\t\t\t\t\tout.print(String.format(\"%3s\",\" \"));\r\n\t\t\t\t\t}else if (MapCell_R[i][j].equals(\"S\")||MapCell_R[i][j].equals(\"M\")) {\r\n\t\t\t\t\t\tout.print(String.format(\"%3s\",\" \"));\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tif (Integer.valueOf(MapCell_R[i][j])>9) {\r\n\t\t\t\t\t\t\tout.print(String.format(\"%3s\", MapCell_R[i][j]));\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tout.print(String.format(\"%3s\", \"0\"+MapCell_R[i][j]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tout.print(\"\\r\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tout.print(\"============ Wafer Information () ===========\"+\"\\r\\n\");\r\n\t\t\tout.print(\" Device: \"+Device+\"\\r\\n\");\r\n\t\t\tout.print(\" Lot NO: \"+Lot+\"\\r\\n\");\r\n\t\t\tout.print(\" Slot No: \"+(slotId.length()==1?\"0\"+slotId:slotId)+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer ID: \"+waferid+\"\\r\\n\");\r\n\t\t\tout.print(\" Operater: \"+OPerater_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Size: \"+waferSize_R+\" Inch\"+\"\\r\\n\");\r\n\t\t\tout.print(\" Flat Dir: \"+Flat_R+\"\\r\\n\");\r\n//\t\t\tif (Flat_R.equals(\"LEFT\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+270+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"RIGHT\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+90+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"UP\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+0+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n//\t\t\tif (Flat_R.equals(\"DOWN\")) {\r\n//\t\t\t\tout.print(\" Flat Dir: \"+180+\"-Degree\"+\"\\r\\n\");\r\n//\t\t\t}\r\n\t\t\tout.print(\" Wafer Test Start Time: \"+TestStartTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Test Finish Time: \"+TestEndTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Load Time: \"+TestStartTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Wafer Unload Time: \"+TestEndTime_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Total test die: \"+gross_die+\"\\r\\n\");\r\n\t\t\tout.print(\" Pass Die: \"+PassDie_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Fail Die: \"+FailDie_R+\"\\r\\n\");\r\n\t\t\tout.print(\" Yield: \"+Yeild_R+\"\\r\\n\");\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\"\\r\\n\");\r\n\t\t\tout.print(\" Bin (0~63) Data Deatil Summary\"+\"\\r\\n\");\r\n\t\t\tout.print(\"=======================================================================\"+\"\\r\\n\");\r\n\t\t \r\n\t\t\tString Bin_Sum=\"\";\r\n\t\t\tString Bin_yield_percent=\"\";\r\n\t\t\tfor (int i = 0; i < 64; i++) {\r\n\t\t\t\tString Every_Bininfor=\"\";\r\n\t\t\t\tInteger Sum=0;\r\n\t\t\t\tif (Bin_Summary_R.containsKey(i+1)) {\r\n\t\t\t\t\tSum=Bin_Summary_R.get(i+1);\r\n\t\t\t\t}\r\n\t\t\t\tfor(int j=0;j<5-(\"\"+Sum).length();j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEvery_Bininfor+=\"0\";\r\n\t\t\t\t}\r\n\t\t\t\tBin_Sum+=Every_Bininfor+Sum+\" | \";\r\n\t\t\t\tString percent=String.format(\"%.2f\", ((double)Sum*100/gross_die));\r\n\t\t\t\tif (percent.length()!=5) {\t\t\r\n\t\t\t\t\tpercent=\"0\"+percent;\r\n\t\t\t\t}\r\n\t\t\t\tBin_yield_percent+= percent+\"% | \";\r\n\t\t\t\t\r\n\t\t\t\tif ((i+1)>9) {\r\n\t\t\t\t\tout.print(\"Bin \"+(i+1)+\" | \");\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tout.print(\"Bin \"+(i+1)+\" | \");\r\n\t\t\t\t}\r\n\t\t\t\tif ((i+1)%8==0) {\r\n\t\t\t\r\n\t\t\t\t\tout.print(\"\\r\\n\");\t\t\r\n\t\t\t\t\tout.print(Bin_Sum);\r\n\t\t\t\t\tBin_Sum=\"\";\t\r\n\t\t\t\t\tout.print(\"\\r\\n\");\r\n\t\t\t\t\tout.print(Bin_yield_percent);\r\n\t\t\t\t\tBin_yield_percent=\"\";\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\tif ((i+1)%8==0) {\r\n\t\t\t\t\tout.print(\"\\r\\n\");\r\n\t\t\t\t\tout.print(\"=======================================================================\"+\"\\r\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tout.flush();\r\n\t\t\tout.close();\r\n\t\t\tFTP_Release(CustomerCode, Device, Lot, CP, Result_Text);\r\n\t\t}\r\n\r\n\t}", "public void writeOutputFile(String inputFilePath) {\n\n String outputFile = properties.getProperty(\"output.dir\") +\n properties.getProperty(\"output.file.token.size\");\n\n PrintWriter writer = null;\n try {\n writer = createOutputFile(outputFile);\n writeTotalsToFile(writer);\n writer.println();\n writer.println();\n writeHistograms(writer);\n } catch (IOException iOE) {\n System.out.println(\"Error Writing to \" + outputFile);\n iOE.printStackTrace();\n } catch (Exception exception) {\n System.out.println(\"General Error\");\n exception.printStackTrace();\n } finally {\n try {\n if (writer != null) {\n writer.close();\n }\n } catch (Exception exception) {\n\n exception.printStackTrace();\n }\n }\n }", "void toFile (String fileName);", "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}", "public final File getOutPutFile() {\n\t\treturn outPutFile;\n\t}", "static void writeOperations(){\n \ttry{\n \t\t\n\t\t\t// Create file \n\t\t\tFileWriter fstream = new FileWriter(FILE_FILEOP);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t \tfor (int i=0; i < operations.size(); i++){\n\t \t\tout.write(operations.get(i).getDetails() );\n\t \t}\n\t\t\t\n\t\t\t//Close the output stream\n\t\t\tout.close();\n\t\t}\n \tcatch (Exception e){//Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t\tSystem.out.print(\"Operations file written.\\n\");\n\n \t\n }", "private void writeTextFile(\r\n\t\t\tGDMSMain theMainHomePage,\r\n\t\t\tArrayList<QtlDetailElement> listOfAllQTLDetails, HashMap<Integer, String> hmOfQtlPosition, HashMap<String, Integer> hmOfQtlNameId,\r\n\t\t\tHashMap<Integer, String> hmOfQtlIdandName, String strSelectedExportType, boolean bQTLExists) throws GDMSException {\n\t\t\r\n\t\t\r\n\t\tString strFlapjackTextFile = \"Flapjack\";\r\n\t\tFile baseDirectory = theMainHomePage.getMainWindow().getApplication().getContext().getBaseDirectory();\r\n\t\tFile absoluteFile = baseDirectory.getAbsoluteFile();\r\n\r\n\t\tFile[] listFiles = absoluteFile.listFiles();\r\n\t\tFile fileExport = baseDirectory;\r\n\t\tfor (File file : listFiles) {\r\n\t\t\tif(file.getAbsolutePath().endsWith(\"Flapjack\")) {\r\n\t\t\t\tfileExport = file;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString strFilePath = fileExport.getAbsolutePath();\r\n\t\t//System.out.println(\"strFilePath=:\"+strFilePath);\r\n\t\tgeneratedTextFile = new File(strFilePath + \"\\\\\" + strFlapjackTextFile + \".txt\");\r\n\r\n\t\t/**\twriting tab delimited qtl file for FlapJack \r\n\t\t * \tconsisting of marker chromosome & position\r\n\t\t * \r\n\t\t * **/\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t//factory = new ManagerFactory(GDMSModel.getGDMSModel().getLocalParams(), GDMSModel.getGDMSModel().getCentralParams());\r\n\t\t\tfactory=GDMSModel.getGDMSModel().getManagerFactory();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tOntologyDataManager ontManager=factory.getOntologyDataManager();\r\n\t\t\t*/\r\n\t\t\tFileWriter flapjackTextWriter = new FileWriter(generatedTextFile);\r\n\t\t\tBufferedWriter flapjackBufferedWriter = new BufferedWriter(flapjackTextWriter);\r\n\t\t\t//getAllelicValuesByGidsAndMarkerNames\r\n\t\t\t//genoManager.getAlle\r\n\t\t\t//\t\t\t fjackQTL.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\");\r\n\t\t\tflapjackBufferedWriter.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\\teffect\");\r\n\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\tfor (int i = 0 ; i < listOfAllQTLDetails.size(); i++){\r\n\t\t\t\t//System.out.println(listOfAllQTLDetails.get(i));\r\n\t\t\t\tQtlDetailElement qtlDetails = listOfAllQTLDetails.get(i);\r\n\t\t\t\t\r\n\t\t\t\t/*QtlDetailsPK id = qtlDetails.getQtlName().get.getId();\r\n\t\t\t\tInteger qtlId = id.getQtlId();*/\r\n\t\t\t\t//String strQtlName = hmOfQtlIdandName.get(qtlId);\r\n\t\t\t\tString strQtlName =qtlDetails.getQtlName();\r\n\t\t\t\tint qtlId=hmOfQtlNameId.get(strQtlName);\r\n\t\t\t\t//qtlDetails.get\r\n\t\t\t\t//Float clen = qtlDetails.getClen();\r\n\t\t\t\t//Float fEffect = qtlDetails.getEffect();\r\n\t\t\t\tint fEffect = qtlDetails.getEffect();\r\n\t\t\t\tFloat fMaxPosition = qtlDetails.getMaxPosition();\r\n\t\t\t\tFloat fMinPosition = qtlDetails.getMinPosition();\r\n\t\t\t\t//Float fPosition = qtlDetails.getPosition();\r\n\t\t\t\tString fPosition = hmOfQtlPosition.get(qtlId);\r\n\t\t\t\tFloat frSquare = qtlDetails.getRSquare();\r\n\t\t\t\tFloat fScoreValue = qtlDetails.getScoreValue();\r\n\t\t\t\tString strExperiment = qtlDetails.getExperiment();\r\n\t\t\t\t//String strHvAllele = qtlDetails..getHvAllele();\r\n\t\t\t\t//String strHvParent = qtlDetails.getHvParent();\r\n\t\t\t\t//String strInteractions = qtlDetails.getInteractions();\r\n\t\t\t\tString strLeftFlankingMarker = qtlDetails.getLeftFlankingMarker();\r\n\t\t\t\tString strLinkageGroup = qtlDetails.getChromosome();\r\n\t\t\t\t//String strLvAllele = qtlDetails.getLvAllele();\r\n\t\t\t\t//String strLvParent = qtlDetails.getLvParent();\r\n\t\t\t\tString strRightFM = qtlDetails.getRightFlankingMarker();\r\n\t\t\t\t//String strSeAdditive = qtlDetails.getSeAdditive();\r\n\t\t\t\t\r\n\t\t\t\t//String strTrait = qtlDetails.getTrait();\r\n\t\t\t\tString strTrait = qtlDetails.getTRName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(strQtlName + \"\\t\" + strLinkageGroup + \"\\t\" + fPosition + \"\\t\" + fMinPosition + \"\\t\" + fMaxPosition + \"\\t\" +\r\n\t\t\t\t\t\tstrTrait + \"\\t\" + strExperiment + \"\\t \\t\" + fScoreValue + \"\\t\" + frSquare+\r\n\t \"\\t\" + strLeftFlankingMarker+\"/\"+strRightFM + \"\\t\" + fEffect);\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tflapjackBufferedWriter.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new GDMSException(e.getMessage());\r\n\t\t} \r\n\t\t\r\n\t}", "public void setOutputFile(File params) {\n outputFile = params;\n }", "protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}", "Output createOutput();", "private void outputResults()\n{\n try {\n PrintWriter pw = new PrintWriter(new FileWriter(output_file));\n pw.println(total_documents);\n for (Map.Entry<String,Integer> ent : document_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n }\n pw.println(START_KGRAMS);\n pw.println(total_kdocuments);\n for (Map.Entry<String,Integer> ent : kgram_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n } \n pw.close();\n }\n catch (IOException e) {\n IvyLog.logE(\"SWIFT\",\"Problem generating output\",e);\n }\n}", "public void readFile();", "static void Output(String filename, String message){\n FileOutputStream out;\n DataOutputStream data;\n try {\n out = new FileOutputStream(filename);\n data = new DataOutputStream(out);\n data.writeBytes(message);\n data.close();\n }\n catch (FileNotFoundException ex){\n System.out.println(\"File to open file for writing\");\n }\n catch (IOException ex) {\n System.out.println(\"RuntimeException on writing/closing file\");\n }\n }", "void readWriteFile() throws IOException{\n\t\t\t\t\n\t\t// Sorting before writing it to the file\n\t Map<String, Double> sortedRank = sortByValues(PageRank); \n\t\t\n // below code is used for finding the inlinks count, Comment the probablity sum in below iterator if uncommenting this line\n\t\t//Map<String, Integer> sortedRank = sortByinlinks(inlinks_count);\n\t\t\n\n\t\t//Writing it to the file\n\t\tFile file = new File(\"C:/output.txt\");\n\t\tBufferedWriter output = new BufferedWriter(new FileWriter(file,true));\n\t\tIterator iterator = sortedRank.entrySet().iterator();\n\t\tdouble s = 0.0;\n\t\t\twhile(iterator.hasNext()){\n\t\t\t\tMap.Entry val = (Map.Entry)iterator.next();\n\t\t\t\toutput.write(val.getKey() +\"\\t\"+ val.getValue()+ \"\\n\");\t\t\t\t\n\t\t\t\ts= s+ (double)val.getValue(); //Adding the Probablity ; Comment this line if using Inlink calculation\n\t\t\t}\n\t\t\tSystem.out.println(\"Probablity Sum : \"+s); //After convergence should be 1; ; Comment this line if using Inlink calculation\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\t// Write a new student object list to the CSV file\n\t\t\t\t\tfor (AttendanceDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for Employee id :\" + transaction.getEmployeeEmpId());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getCreatedDate());\n\t\t\t\t\t\trecord.add(String.valueOf(transaction.getEmployeeEmpId()));\n\t\t\t\t\t\trecord.add(transaction.getEmployeeFullName());\n\t\t\t\t\t\trecord.add(DateUtil.convertUTCToIST(transaction.getCheckInTime()));\n\t\t\t\t\t\trecord.add(DateUtil.convertUTCToIST(transaction.getCheckOutTime()));\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\tString siteName = null;\n\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(CONSOLIDATED_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tfor (ReportResult transaction : content) {\n\t\t\t\t\t\tif (StringUtils.isEmpty(siteName) || !siteName.equalsIgnoreCase(transaction.getSiteName())) {\n\t\t\t\t\t\t\tcsvFilePrinter.printRecord(\"\");\n\t\t\t\t\t\t\tcsvFilePrinter\n\t\t\t\t\t\t\t\t\t.printRecord(\"CLIENT - \" + projName + \" SITE - \" + transaction.getSiteName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for site :\" + transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getLocatinName());\n\t\t\t\t\t\trecord.add(transaction.getAssignedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getCompletedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getOverdueJobCount());\n\t\t\t\t\t\trecord.add(transaction.getTat());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(JOB_DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tfor (JobDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for site :\" + transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(String.valueOf(transaction.getTitle()));\n\t\t\t\t\t\trecord.add(transaction.getEmployeeName());\n\t\t\t\t\t\trecord.add(transaction.getJobType());\n\t\t\t\t\t\trecord.add(transaction.getPlannedStartTime());\n\t\t\t\t\t\trecord.add(transaction.getActualEndTime());\n\t\t\t\t\t\trecord.add(transaction.getJobStatus() != null ? transaction.getJobStatus().name()\n\t\t\t\t\t\t\t\t: JobStatus.OPEN.name());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!! \" + e);\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "public void convertInputToOutput() throws FileNotFoundException {\n PrintWriter outputFile = null;\n Scanner input = null;\n int eval = 0;\n String post = \"\";\n try {\n File file = new File(\"..\\\\COSC602_P3_Input.txt\");\n outputFile = new PrintWriter(\"..\\\\COSC602_P3_Output_bkinney0.txt\");\n input = new Scanner(file);\n }\n catch(FileNotFoundException ex){\n System.out.println(\"Error openeing files\");\n throw ex;\n }\n while (input.hasNextLine()) {\n \n String line = input.nextLine();\n String exp = line.replaceAll(\"\\\\s\", \"\"); \n if (!exp.isEmpty()){\n outputFile.println(\"Original Infix: \" + line);\n try{\n post = this.convertInfix(exp); \n }\n catch(NumberFormatException numberException){\n outputFile.println(\"**Invalid Expression** \\n\\n\");\n continue; \n }\n try{\n eval = this.evalPostfix(post);\n }\n catch(NullPointerException nullException){\n outputFile.println(\"**Invalid Expression** \\n\\n\");\n continue; \n } \n \n outputFile.println(\"Corresponding Postfix: \" + post ); \n outputFile.println(\"Evaluation Result: =\"+eval +\" \\n\\n\");\n }\n } \n \n input.close();\n outputFile.close();\n }", "public File getOutputFileForNode(Node node) {\n// String portName = nodeNameToPortName.get(node.getBottomLevelNode().getName());\n// if(portName != null) {\n// System.out.println(\"IWIR output port \" + portName);\n// for(OutputPort outputPort : outputPortToFileMap.keySet()){\n// if(outputPort.getName().equals(portName)){\n// File file = outputPortToFileMap.get(outputPort);\n// System.out.println(\"Output node to file : \" + file.getAbsolutePath());\n// return file;\n// }\n// }\n// }\n\n// ArrayList<ExecutableNode> execNodes = getExecutableNodes(false);\n for(ExecutableNode executableNode : executableNodes) {\n if(executableNode.getNode() != null) {\n if(executableNode.getNode().getName().equals(node.getName())){\n String filename = executableNode.getFilename();\n if(filename != null && !filename.equals(\"\")) {\n return new File(workingDir, filename);\n }\n }\n }\n }\n return null; //To change body of created methods use File | Settings | File Templates.\n }", "public static void ReadVehicle(String inputfile, String outputfile, String[] styleids) {\n\r\n\t\tString StyleID_0 = \"\";\r\n\t\tString ImageID_1 = \"\";\r\n\t\tString FileName_2 = \"\";\r\n\t\tString Type_3 = \"\";\r\n\t\tString Background_4 = \"\";\r\n\t\tString Size_5 = \"\";\r\n\t\tString Carryover_6 = \"\";\r\n\t\tString Year_7 = \"\";\r\n\t\tString DivisionName_8 = \"\";\r\n\t\tString ModelName_9 = \"\";\r\n\t\tString BodyType_10 = \"\";\r\n\t\tString ExactMatch_11 = \"\";\r\n\t\tString OEMTemp_12 = \"\";\r\n\t\t// Assume default encoding.\r\n\t\tFileWriter fileWriter = null;\r\n\t\ttry {\r\n\t\t\tfileWriter = new FileWriter(outputfile);\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// Always wrap FileWriter in BufferedWriter.\r\n\t\tBufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\r\n\r\n\t\tSystem.out.println(\"Started!\");\r\n\t\tint styleLenth = styleids.length;\r\n\t\tfor (String styleid : styleids) {\r\n\r\n\t\t\ttry (BufferedReader br = new BufferedReader(new FileReader(inputfile))) {\r\n\t\t\t\tString line;\r\n\t\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\t\t// process the line.\r\n\t\t\t\t\tList<String> elephantList = Arrays.asList(line.split(\",\"));\r\n\t\t\t\t\tStyleID_0 = elephantList.get(0);\r\n\t\t\t\t\t// StyleID_0=elephantList.get(12); //\r\n\r\n\t\t\t\t\tif (StyleID_0.equalsIgnoreCase(styleid)) {\r\n\t\t\t\t\t\t// if (StyleID_0.equalsIgnoreCase(\"~Y~\")) {\r\n\t\t\t\t\t\tbufferedWriter.write(line);\r\n\t\t\t\t\t\tbufferedWriter.newLine();\r\n\r\n\t\t\t\t\t\tSystem.out.println(line);\r\n\t\t\t\t\t\t// System.out.println(elephantList);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tbufferedWriter.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"Total StyleIDs=\" + styleLenth + \". Complete!\");\r\n\r\n\t}", "public void writeFile() \r\n\t{\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor(String str : scorers)\r\n\t\t\tbuilder.append(str).append(\",\");\r\n\t\tbuilder.deleteCharAt(builder.length() - 1);\r\n\t\t\r\n\t\ttry(DataOutputStream output = new DataOutputStream(new FileOutputStream(HIGHSCORERS_FILE)))\r\n\t\t{\r\n\t\t\toutput.writeChars(builder.toString());\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] File \" + HIGHSCORERS_FILE + \" was not found \" \r\n\t\t\t\t\t+ \"while writing.\");\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] Error while reading the file \" + HIGHSCORERS_FILE);\r\n\t\t}\r\n\t}", "public void close(){\n\t\ttry {\n\t\t\tout.close();\n\t\t\tout = null;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Problem closing file.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public EnigmaFile() throws Exception\n {\n\n String path = Main.class.getClassLoader().getResource(\"filein.txt\").getPath();\n File currentDirectory=new File(path);\n finstream = new FileInputStream(currentDirectory);\n\n\n String pathToWrite = path.replaceFirst(\"filein.txt\",\"fileout.txt\");\n File outputFile = new File(pathToWrite);\n br = new BufferedReader(new InputStreamReader(finstream));\n outputFile.createNewFile();\n FileWriter fileWrite = new FileWriter(outputFile.getAbsoluteFile());\n writer = new BufferedWriter(fileWrite);\n\n\n }" ]
[ "0.7707132", "0.7190524", "0.69420457", "0.66891474", "0.6594704", "0.65933716", "0.659054", "0.65433335", "0.64888877", "0.6408101", "0.6407278", "0.6325824", "0.6325662", "0.6300491", "0.62573546", "0.62436473", "0.622025", "0.62104416", "0.619657", "0.6195531", "0.6143254", "0.6137359", "0.61151946", "0.61090165", "0.6105388", "0.60723716", "0.60529685", "0.6047308", "0.6046552", "0.60456353", "0.60423595", "0.60376114", "0.60270077", "0.60030586", "0.6000352", "0.5994688", "0.59898543", "0.59850997", "0.5981916", "0.59740293", "0.5968991", "0.5941991", "0.5940964", "0.59265155", "0.59181124", "0.5898815", "0.5892969", "0.5884406", "0.58797073", "0.58700997", "0.5859953", "0.58457005", "0.58410454", "0.58295846", "0.5826694", "0.5823901", "0.57985336", "0.57900095", "0.57877105", "0.578248", "0.57800174", "0.5772115", "0.5771786", "0.5755067", "0.5755004", "0.57476836", "0.57451886", "0.57407016", "0.5736934", "0.57367355", "0.5735993", "0.5734851", "0.57260245", "0.5722516", "0.5720029", "0.5718372", "0.57092893", "0.57072735", "0.570466", "0.5701434", "0.5692481", "0.569229", "0.5692228", "0.5691457", "0.56852865", "0.5681667", "0.56809276", "0.5677434", "0.56761706", "0.5673158", "0.5672542", "0.5671035", "0.56662583", "0.56643957", "0.5660716", "0.56551963", "0.56488633", "0.56458277", "0.5643835", "0.5643634", "0.56344676" ]
0.0
-1
Funtion that reads the dataset and populate the arraylist
public static ArrayList<Data> getDataSet(String fileName) { ArrayList<Data> dataset = new ArrayList<>(); Scanner input = new Scanner(Main.class.getResourceAsStream(fileName)); input.nextLine(); String line = null; int size = 0; while (input.hasNextLine()) { String str = null; line = input.nextLine(); line = line.replace(" ", ""); size = line.length() - 1; Data data = new Data(size); for (int i = 0; i < line.length() - 1; i++) { data.variables[i] = Character.getNumericValue(line.charAt(i)); } data.setOutput(Character.getNumericValue(line.charAt(size))); dataset.add(data); } dataset.forEach((data) -> { System.out.println(data.printVariables() + " " + data.getOutput()); }); System.out.println("Data loaded"); COND_LEN = size; GENE_SIZE = (COND_LEN + 1) * NUM_RULES; return dataset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initDataset() {\r\n CollGestDBHelper collGestDBHelper = new CollGestDBHelper(activityContext);\r\n List<CollGestItem> listAllItems = collGestDBHelper.getAllGestItem();\r\n\r\n mDataset = new String[listAllItems.size()][7];\r\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n System.out.println(listAllItems.size());\r\n System.out.println(listAllItems.toString());\r\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n for (int i = 0; i < listAllItems.size(); i++) {\r\n mDataset[i][0] = listAllItems.get(i).getItemName();\r\n mDataset[i][1] = Integer.toString(listAllItems.get(i).getItemMinJoueurs());\r\n mDataset[i][2] = Integer.toString(listAllItems.get(i).getItemMaxJoueurs());\r\n mDataset[i][3] = Integer.toString(listAllItems.get(i).getItemDuration());\r\n mDataset[i][4] = listAllItems.get(i).getItemTypes();\r\n mDataset[i][5] = listAllItems.get(i).getItemCheckedOut();\r\n mDataset[i][6] = listAllItems.get(i).getItemLastPlayed();\r\n }\r\n System.out.println(mDataset);\r\n }", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "private void loadData() {\n this.financeDataList = new ArrayList<>();\n }", "void populateData();", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "public static ArrayList readData(){\n ArrayList alr = new ArrayList();\n try{\n ArrayList stringArray = (ArrayList)read(filename);\n for (int i = 0; i < stringArray.size(); i++){\n String st = (String)stringArray.get(i);\n StringTokenizer star = new StringTokenizer(st, SEPARATOR);\n int movieID = Integer.parseInt(star.nextToken().trim());\n String email = star.nextToken().trim();\n String comment = star.nextToken().trim();\n Review review = new Review(movieID, email, comment);\n alr.add(review);\n }\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n return alr;\n }", "private static void initializeLists() {\n\t\t\n\t\t//read from serialized files to assign array lists\n\t\t//customerList = (ArrayList<Customer>) readObject(customerFile);\n\t\t//employeeList = (ArrayList<Employee>) readObject(employeeFile);\n\t\t//applicationList = (ArrayList<Application>) readObject(applicationFile);\n\t\t//accountList = (ArrayList<BankAccount>) readObject(accountFile);\n\t\t\n\t\t//read from database to assign array lists\n\t\temployeeList = (ArrayList<Employee>)employeeDao.readAll();\n\t\tcustomerList = (ArrayList<Customer>)customerDao.readAll();\n\t\taccountList = (ArrayList<BankAccount>) accountDao.readAll();\n\t\tapplicationList = (ArrayList<Application>)applicationDao.readAll();\n\t\t\n\t\tassignBankAccounts();\n\t}", "private void getDataLists(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile file = new File(path);\n\t\t\tfile.createNewFile();\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\t\t\t\n\t\t\tString str = null;\n\t\t\twhile((str = fileReader.readLine()) != null)\n\t\t\t{\n\t\t\t\tthis.dataList.push(str);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed : data list read\");\n\t\t}\n\t}", "private void initializeData() {\n String[] storeTitles = getResources().getStringArray(R.array.store_titles);\n String[] storeDescriptions = getResources().getStringArray(R.array.store_descriptions);\n TypedArray storeImages = getResources().obtainTypedArray(R.array.stores_images);\n\n //Clear existing data to avoid duplication\n storeData.clear();\n\n //Create an array list of dessert recipes with title, description and images\n for(int i = 0; i < storeTitles.length; i++){\n storeData.add(new Store(storeImages.getResourceId(i,0), storeTitles[i],storeDescriptions[i]));\n }\n\n //Clear up data in the typed array\n storeImages.recycle();\n\n //Notify the adapter of the change in the data set\n storeAdapter.notifyDataSetChanged();\n }", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "public List<Dataset> getDatasets();", "private static ArrayList<ArrayList<Integer>> populateListOfInputs() {\n\t\t\n\t\tArrayList<ArrayList<Integer>> listOflist = new ArrayList<ArrayList<Integer>>();\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(filePath);\n\t\t\tBufferedReader br = new BufferedReader(fr);\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t// Remove all spaces, '[' and ']'\n\t\t\t\tString numbers = line.replace(\" \", \"\");\n\t\t\t\tnumbers = numbers.replace(\"[\", \"\");\n\t\t\t\tnumbers = numbers.replace(\"]\", \"\");\n\t\t\t\t\n\t\t\t\tif(line.equals(\"\")) {\n\t\t\t\t\t//if empty line leave it and continue the loop\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tString[] individualnums = numbers.split(\",\");\n\t\t\t\tfor (int i = 0; i < individualnums.length; i++) {\t\t\t\t\t\n\t\t\t\t\tlist.add(Integer.parseInt(individualnums[i]));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlistOflist.add(list);\t\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listOflist;\n\t}", "List<String[]> readAll();", "private List<Tuple2<Integer, Integer>> initSampleDataset() {\n List<Tuple2<Integer, Integer>> rawChapterData = new ArrayList<>();\n rawChapterData.add(new Tuple2<>(96, 1));\n rawChapterData.add(new Tuple2<>(97, 1));\n rawChapterData.add(new Tuple2<>(98, 1));\n rawChapterData.add(new Tuple2<>(99, 2));\n rawChapterData.add(new Tuple2<>(100, 3));\n rawChapterData.add(new Tuple2<>(101, 3));\n rawChapterData.add(new Tuple2<>(102, 3));\n rawChapterData.add(new Tuple2<>(103, 3));\n rawChapterData.add(new Tuple2<>(104, 3));\n rawChapterData.add(new Tuple2<>(105, 3));\n rawChapterData.add(new Tuple2<>(106, 3));\n rawChapterData.add(new Tuple2<>(107, 3));\n rawChapterData.add(new Tuple2<>(108, 3));\n rawChapterData.add(new Tuple2<>(109, 3));\n\n return rawChapterData;\n }", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}", "void loadData();", "void loadData();", "DataList createDataList();", "private boolean initializeDataset(){\n this.dataset = new Dataset(this.users.size(),this.recipes.size());\n //1. Read Dataset\n boolean succesReadDataset = this.dataset.read(this.userMap,this.recipeMap);\n if (!succesReadDataset) return false;\n return true;\n }", "private void initDataset(){\n dataSet.add(\"Karin\");\n dataSet.add(\"Ingrid\");\n dataSet.add(\"Helga\");\n dataSet.add(\"Renate\");\n dataSet.add(\"Elke\");\n dataSet.add(\"Ursula\");\n dataSet.add(\"Erika\");\n dataSet.add(\"Christa\");\n dataSet.add(\"Gisela\");\n dataSet.add(\"Monika\");\n\n addDataSet.add(\"Anna\");\n addDataSet.add(\"Sofia\");\n addDataSet.add(\"Emilia\");\n addDataSet.add(\"Emma\");\n addDataSet.add(\"Neele\");\n addDataSet.add(\"Franziska\");\n addDataSet.add(\"Heike\");\n addDataSet.add(\"Katrin\");\n addDataSet.add(\"Katharina\");\n addDataSet.add(\"Liselotte\");\n }", "private void prepareListData() {\n mCategoryList = new ArrayList<>();\n mFullList = new ArrayList<>();\n for (Category cat : fileSystem.getLocalInformationList())\n {\n List<Object> phraseList = cat.phraseList;\n mCategoryList.add(new Category(phraseList, cat.name));\n }\n mFullList.addAll(mCategoryList);\n\n }", "private void initializeData() {\n String[] sportsList = getResources().getStringArray(R.array.track_title);\n String[] sportsInfo = getResources().getStringArray(R.array.track_category);\n\n // Clear the existing data (to avoid duplication).\n mSportsData.clear();\n\n TypedArray trackImageResources =\n getResources().obtainTypedArray(R.array.track_image);\n\n // Create the ArrayList of Sports objects with titles and\n // information about each sport.\n for (int i = 0; i < sportsList.length; i++) {\n for (int j = 0; j < workout.size(); j++) {\n if (workout.get(j).equals(sportsList[i])) {\n mSportsData.add(new Track(sportsList[i], sportsInfo[i], trackImageResources.getResourceId(i, 0)));\n }\n }\n }\n\n // Notify the adapter of the change.\n mAdapter.notifyDataSetChanged();\n\n trackImageResources.recycle();\n }", "public static void populateData() {\n\n }", "private ArrayList<SearchModel> initData() {\n // items in the arraylist\n ArrayList<SearchModel> foodList = new ArrayList<>();\n List<FoodModel> foods = foodModelList;\n for(int i=0; i< foods.size(); i++)\n {\n foodList.add(new SearchModel(foods.get(i).getName()));\n }\n return foodList;\n }", "private ArrayList<Alimento> initLista() {\n try {\n File file = new File(\"C:\\\\Users\\\\Gabri\\\\OneDrive\\\\Ambiente de Trabalho\\\\Calorie\\\\src\\\\Assets\\\\alimentos.txt\");\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n ArrayList<Alimento> lista = new ArrayList<>();\n\n int noLines = Integer.parseInt(br.readLine());\n for(int l=0; l<noLines; l++) {\n String[] alimTks = (br.readLine()).split(\",\");\n\n Alimento alimento = new Alimento(idAlimCounter++,alimTks[0],100,Integer.parseInt(alimTks[1]),Float.parseFloat(alimTks[2]),Float.parseFloat(alimTks[3]),Float.parseFloat(alimTks[4]));\n lista.add(alimento);\n }\n\n return lista;\n }catch (Exception e) {\n System.out.println(\"Sistema - getLista() : \"+e.toString());\n }\n return null;\n }", "protected void readAllData() {\n \n String query = buildDataQuery();\n \n try {\n ResultSet rs = executeQuery(query);\n ResultSetMetaData md = rs.getMetaData();\n \n //Construct the internal data containers\n _dataMap = new LinkedHashMap<String,double[]>();\n _textDataMap = new LinkedHashMap<String,String[]>();\n \n //Make containers to collect data as we get it from the ResultSet\n int ncol = md.getColumnCount();\n ResizableDoubleArray[] dataArrays = new ResizableDoubleArray[ncol]; //tmp holder for numeric data\n List<String>[] textDataLists = new List[ncol]; //tmp holder for text data\n for (int i=0; i<ncol; i++) {\n dataArrays[i] = new ResizableDoubleArray();\n textDataLists[i] = new ArrayList<String>();\n }\n\n //Define a Calendar so we get our times in the GMT time zone.\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n \n //Read data from the result set into the ResizableDoubleArray-s which are already in the _dataArrayMap.\n while (rs.next()) { \n for (int i=0; i<ncol; i++) {\n double d = Double.NaN;\n //Check type and read as appropriate\n //TODO: check for other variation of time and text types\n int typeID = md.getColumnType(i+1); \n \n if (typeID == java.sql.Types.TIMESTAMP) { //TODO: test for DATE and TIME types?\n //We need to convert timestamps to numerical values.\n Timestamp ts = rs.getTimestamp(i+1, cal);\n d = ts.getTime();\n } else if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) {\n //Text column. Save strings apart from other data.\n //They will appear as NaNs in the numeric data values.\n String s = rs.getString(i+1);\n textDataLists[i].add(s);\n } else d = rs.getDouble(i+1);\n \n dataArrays[i].addElement(d);\n }\n }\n \n //Extract the primitive arrays from the ResizableDoubleArray-s and put in data map.\n //Segregate the text data. Don't bother to save \"data\" (NaNs) for String types.\n for (int i=0; i<ncol; i++) {\n String name = md.getColumnName(i+1);\n int typeID = md.getColumnType(i+1);\n if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) { \n String[] text = new String[1];\n text = (String[]) textDataLists[i].toArray(text);\n _textDataMap.put(name, text);\n } else {\n double[] data = dataArrays[i].getElements();\n _dataMap.put(name, data);\n }\n }\n \n } catch (SQLException e) {\n String msg = \"Unable to process database query: \" + query;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n }", "private void populateData() {\r\n\t\tfor(int i = 0; i < this.incomeRanges.length; i++) {\r\n\t\t\tthis.addData(new Data(incomeRanges[i], 0), true);\r\n\t\t}\t// end for\r\n\t}", "public void read() {\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(\"studentData.dat\");\n\n\t\t\tObjectInputStream ois;\n\t\t\ttry {\n\t\t\t\tois = new ObjectInputStream(fis);\n\t\t\t\ttry {\n\t\t\t\t\tstudentList = (ArrayList<Student>) ois.readObject();\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tois.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void LoopData() {\n\t\tfor (int i = 0; i < drawable.length; i++) {\n\t\t\titems_list items_list = new items_list();\n\t\t\titems_list.setDrawable(getResources().getDrawable(drawable[i]));\n\t\t\titems_list.setLek(string[i]);\n\t\t\tlists.add(items_list);\n\t\t}\n\n\t}", "public void initData() {\n\t\tnotes = new ArrayList<>();\n\t\t//place to read notes e.g from file\n\t}", "private void importData() {\n // if alarmAdapter null it's means data have not imported, yet or database is empty\n if (alarmAdapter == null) {\n // initialize database manager\n dataBaseManager = new DataBaseManager(this);\n // get Alarm ArrayList from database\n ArrayList<Alarm> arrayList = dataBaseManager.getAlarmList();\n // create Alarm adapter to display detail through RecyclerView\n alarmAdapter = new AlarmAdapter(arrayList, this);\n\n }\n }", "public MyAdapter(ArrayList<GpsData> myDataset) {\r\n dataset = myDataset;\r\n }", "private ArrayList<ArrayList<String>> initArrArrList(ArrayList<String> packetNames) throws FileNotFoundException, IOException {\n ArrayList<ArrayList<String>> arrList=new ArrayList();\n LoadAndSave las=new LoadAndSave();\n for(int x=0;x<packetNames.size();x++) {\n las.load(packetNames.get(x));\n arrList.add(las.loader1);\n arrList.add(las.loader2);\n }\n return arrList;\n \n }", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "private void populateData(String seriesName) {\n competitorsList = new ArrayList<>();\n {\n Cursor cursor = DB.readSeriesResult(seriesName);\n int rankCount = 1;\n while (cursor.moveToNext()) {\n\n int rank = rankCount;\n String bClass = cursor.getString(0);\n int sailNo = Integer.parseInt(cursor.getString(1));\n String helmName = cursor.getString(2);\n String crewName = cursor.getString(3) == null ? \"\" :cursor.getString(3) ;\n int PY = Integer.parseInt(cursor.getString(4));\n int points = cursor.getString(5) == null ? -1 : Integer.parseInt(cursor.getString(5));\n rankCount++;\n FinalCompetitorData competitor = new FinalCompetitorData(rank, bClass, sailNo, helmName, crewName, PY, points);\n competitorsList.add(competitor);\n }\n records = new String[competitorsList.size()][columnHeaders.length];\n for (int i = 0; i < competitorsList.size(); i++) {\n FinalCompetitorData s = competitorsList.get(i);\n\n records[i][0] = String.valueOf(s.getRank());\n records[i][1] = s.getBoatClass();\n records[i][2] = String.valueOf(s.getSailNo());\n records[i][3] = s.getHelmName();\n records[i][4] = s.getCrewName().equals(\"\") ? \"--\" : s.getCrewName();\n records[i][5] = String.valueOf(s.getPY());\n records[i][6] = s.getPoints() == -1 ? \"--\" : String.valueOf(s.getPoints());\n }//for\n }\n }", "private void initializeData() {\n\n TypedArray sportsImageResources = getResources().obtainTypedArray(R.array.sports_images);\n String[] sportsList = getResources().getStringArray(R.array.sports_title);\n String[] sportsInfo = getResources().getStringArray(R.array.sports_info);\n\n //clear the existing data(to avoid the duplication)\n mSportsData.clear();\n\n //create the arraylist of sports objects with titles and information\n for(int i = 0; i<sportsList.length;i++){\n mSportsData.add(new Sport(sportsList[i], sportsInfo[i], sportsImageResources.getResourceId(i, 0)));\n }\n\n //Notify the change to the adapter\n mAdapter.notifyDataSetChanged();\n sportsImageResources.recycle(); //avoid duplication, works fine without it\n }", "public static void read(String fname){\r\n\t\t\t\r\n\t\t\tString line = \"\";\r\n\t\t\ttry {\r\n\t // FileReader reads text files in the default encoding.\r\n\t FileReader fileReader = new FileReader(fname);\r\n\t \r\n\t // Always wrap FileReader in BufferedReader.\r\n\t BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\t header=bufferedReader.readLine();\r\n\t \r\n\t data = new ArrayList<alldata>();\r\n\r\n\t while((line = bufferedReader.readLine()) != null) {\r\n\t \t\r\n\t //parse line and divide data by comma\r\n\t \r\n\t \t\r\n\t \tString[] lineStr = line.split(\",\");\r\n\t \t\r\n\t //create object row into which data from each line is stored and then added to array list\t\r\n\t \t\r\n\t if(lineStr.length >0) {\r\n\t \talldata row = new alldata();\r\n\t \trow.Name = lineStr[0]+ \",\" + lineStr[1];\r\n\t \trow.Num = lineStr[2];\r\n\t \trow.State = lineStr[3];\r\n\t \trow.Zip = lineStr[4];\r\n\t \trow.Age = Integer.parseInt(lineStr[6]);\r\n\t \trow.Sex = lineStr[7];\r\n\t \t\r\n\t \tdata.add(row);\r\n\t }\r\n\t \r\n\t \r\n\t } \r\n\t bufferedReader.close(); // Always close files. \r\n\t }catch(FileNotFoundException ex) {\r\n\t System.out.println(\"Unable to open file '\" + fname + \"'\"); \r\n\t }catch(IOException ex) {\r\n\t System.out.println(\"Error reading file '\" + fname + \"'\"); \r\n\t }\r\n\t\t\tSystem.out.println(\"Finish reading data from file \"+ fname);\r\n\t\t}", "private void fillData()\n {\n\n }", "protected abstract void loadData();", "protected void loadData()\n {\n }", "private static void buildList() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (connection == null || connection.isClosed()) \r\n\t\t\t\tconnection = DataSourceManager.getConnection();\r\n\t\t\t\r\n\t\t\tstatement = connection.prepareStatement(LOAD_ALL);\r\n\t \tresultset = statement.executeQuery();\r\n\t \t\r\n\t \tgroups = getCollectionFromResultSet(resultset);\r\n\t \tresultset.close();\r\n\t statement.close();\r\n\t\t\t\r\n\t\t} catch (ClassNotFoundException | SQLException e) {\r\n\t\t\tlog.fatal(e.toString());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t}", "public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }", "private void loadData(){\n\n fileName = EditedFiles.getActiveFacilityFile();\n getFacilities().clear();\n\n try {\n getFacilities().addAll(ReaderThreadRunner.startReader(fileName));\n } catch (ExecutionException | InterruptedException e) {\n e.printStackTrace();\n }\n\n\n observableList = FXCollections.observableList(getFacilities());\n facilitiesView.setItems(observableList);\n }", "public List<Event> fillArrayList()\r\n {\r\n List<Event> list1=new ArrayList<>();\r\n FileReader fr=null;\r\n \r\n try{\r\n \r\n fr=new FileReader(\"./event.txt\");\r\n BufferedReader bf=new BufferedReader(fr);\r\n String s;\r\n \r\n while((s=bf.readLine())!=null)\r\n {\r\n Event event=new Event();\r\n String s1[]=new String[7];\r\n for(int i=0;i<s1.length;i++)\r\n {\r\n s1=s.split(\",\");\r\n \r\n event.setId(Integer.parseInt(s1[0]));\r\n \r\n event.setName(s1[1]);\r\n \r\n event.setOrganizer(s1[2]);\r\n \r\n Date date=Date.valueOf(s1[3]);\r\n \r\n event.setDate(date);\r\n \r\n event.setFees(Double.parseDouble(s1[4]));\r\n \r\n } \r\n list1.add(event);\r\n }\r\n \r\n bf.close();\r\n \r\n }catch(Exception e){e.printStackTrace();}\r\n return list1;\r\n\r\n }", "Set<String> readData();", "private List<Arbeitspaket> retrieveData() {\r\n\t\treturn Arrays.asList(new Arbeitspaket(\"A\", 0, 0, 0, 0, 0, 0, 0), new Arbeitspaket(\"B\", 0, 0, 0, 0, 0, 0, 0),\r\n\t\t\t\tnew Arbeitspaket(\"C\", 0, 0, 0, 0, 0, 0, 0), new Arbeitspaket(\"D\", 0, 0, 0, 0, 0, 0, 0));\r\n\t}", "public MyAdapter(ArrayList<String> myDataset) {\n mDataset = myDataset;\n }", "public void build() throws ClusException, IOException {\n m_List = getRun().getDataSet(ClusRun.TRAINSET).getData(); // m_Data;\n }", "public static ArrayList<LurikData> loadData(Context context) throws IOException {\n\t\tLog.d(TAG, \"loading lurik\");\n\t\tResources resources = context.getResources();\n\t\tInputStream inputStream = resources.openRawResource(R.raw.data1);\n\t\tArrayList<LurikData> arListLurik = new ArrayList<LurikData>();\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n\t\ttry {\n\t\t\tString word;\n\t\t\t\n\t\t\twhile ((word = reader.readLine()) != null) {\n\t\t\t\tString[] strings = TextUtils.split(word, \":\");\n\n\t\t\t\tString[] data = new String[2];\n\t\t\t\tfor (int i = 0; i < strings.length; i = i + 2) {\n\t\t\t\t\tdata[0] = strings[i];\n\t\t\t\t\tdata[1] = strings[i + 1];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tLurikData lurikData = new LurikData(data[1], SAMPLE_WIDTH, SAMPLE_HEIGHT);\n\t\t\t\t\n\t\t\t\t\tarListLurik.add(lurikData);\n\t\t\t\t\tint index = 0;\n\t\t\t\t\tfor (int y = 0; y < lurikData.getHeight(); y++) {\n\t\t\t\t\t\tfor (int x = 0; x < lurikData.getWidth(); x++) {\n\t\t\t\t\t\t\tlurikData.setData(x, y, data[0].charAt(index++) == '1');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//word = reader.readLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treader.close();\n\t\t\tinputStream.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\tLog.d(TAG, \"DONE loading lurik\");\n\t\treturn arListLurik;\n\t}", "void populateArray () {\r\n\r\n\t\ttry {\r\n\t\t\tfis = new FileInputStream (\"Bank.dat\");\r\n\t\t\tdis = new DataInputStream (fis);\r\n\t\t\t//Loop to Populate the Array.\r\n\t\t\twhile (true) {\r\n\t\t\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\t\t\trecords[rows][i] = dis.readUTF ();\r\n\t\t\t\t}\r\n\t\t\t\trows++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\ttotal = rows;\r\n\t\t\tif (total == 0) { }\r\n\t\t\telse {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdis.close();\r\n\t\t\t\t\tfis.close();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception exp) { }\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private ArrayList<Item> prepareDataSet() {\n ArrayList<Item> flowerData = new ArrayList<>();\n Item flower;\n\n //1st Item\n flower = new Item();\n flower.setItemName(\"CAR Lock\");\n flower.setItemphoto(R.drawable.locks);\n flowerData.add(flower);\n\n //2nd Item\n flower = new Item();\n flower.setItemName(\"Car Unlock\");\n flower.setItemphoto(R.drawable.unlock);\n flowerData.add(flower);\n\n\n //3rd Item\n flower = new Item();\n flower.setItemName(\"Doors\");\n flower.setItemphoto(R.drawable.doors);\n flowerData.add(flower);\n\n\n //4th Item\n flower = new Item();\n flower.setItemName(\"Vehicle Speed\");\n flower.setItemphoto(R.drawable.speed);\n flowerData.add(flower);\n\n\n //5th Item\n flower = new Item();\n flower.setItemName(\"Location\");\n flower.setItemphoto(R.drawable.location);\n flowerData.add(flower);\n\n\n //6th Item\n flower = new Item();\n flower.setItemName(\"Previous Trips\");\n flower.setItemphoto(R.drawable.trips);\n flowerData.add(flower);\n\n //6th Item\n flower = new Item();\n flower.setItemName(\"Honk\");\n flower.setItemphoto(R.drawable.honk);\n flowerData.add(flower);\n\n\n return flowerData;\n\n }", "public void populateListFromFile() \n\t{\n\t\tBufferedReader bufferedReader = null;\n\t\tallQuestions = new ArrayList<ArrayList<String>>();\n\t\tquestionAndAnswers = new ArrayList<String>();\n\n\t\ttry {\n\t\t bufferedReader = new BufferedReader(new FileReader(\"questions.txt\"));\n\t\t String line = \"\";\n\t\t \n\t\t while ((line = bufferedReader.readLine()) != null) \n\t\t {\t\t\t \t\n\t\t \tif(line.length() > 0)\n\t\t \t\tquestionAndAnswers.add(line);\n\t\t \telse if (line.length() == 0)\n\t\t \t{\n\t\t \t\tallQuestions.add(questionAndAnswers);\n\t\t \t\tquestionAndAnswers = new ArrayList<String>();\n\t\t \t}\n\t\t } \n\t\t} catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t}", "public void initArrayList()\n {\n\tSQLiteDatabase db = getWritableDatabase();\n\tCursor cursor = db.rawQuery(\"SELECT * FROM \" + TABLE_NAME, null);\n\n\tif (cursor.moveToFirst())\n\t{\n\t do\n\t {\n\t\tJacocDBLocation newLocation = new JacocDBLocation();\n\t\tnewLocation.setLocationName(cursor.getString(1));\n\t\tnewLocation.setRealLocation(new LocationBorder(new LatLng(cursor.getDouble(2), cursor.getDouble(3)), new LatLng(cursor.getDouble(4), cursor.getDouble(5))));\n\t\tnewLocation.setMapLocation(new LocationBorder(new LatLng(cursor.getInt(6), cursor.getInt(7)), new LatLng(cursor.getInt(8), cursor.getInt(9))));\n\t\tnewLocation.setHighSpectrumRange(cursor.getDouble(10));\n\t\tnewLocation.setLowSpectrumRange(cursor.getDouble(11));\n\n\t\t// adding the new Location to the collection\n\t\tlocationList.add(newLocation);\n\t }\n\t while (cursor.moveToNext()); // move to the next row in the DB\n\n\t}\n\tcursor.close();\n\tdb.close();\n }", "private void initializeData() {\n ListaOfertas.removeAll(ListaOfertas);\n for(Articulo listaJuegos: ArticuloRepository.getListArticulo()){\n if(listaJuegos.getOferta().contains(\"S\")){\n listaJuegos.setValorDescuento(String.valueOf(listaJuegos.getPrecioArticulo()-(listaJuegos.getPrecioArticulo()*listaJuegos.getPorcentajeDescuento()/100)));\n ListaOfertas.add(listaJuegos);\n }\n\n }\n }", "public ArrayList < Dataclass > getData() {\n ArrayList < Dataclass > dataList = new ArrayList < Dataclass > ();\n Connection connection = getConnection();\n String query = \"SELECT * FROM `przychodnia` \";\n if (option == 1) query = \"SELECT * FROM `lekarz` \";\n if (option == 2) query = \"SELECT * FROM `wizyta` \";\n if (option == 3) query = \"SELECT * FROM `badanie` \";\n Statement st;\n ResultSet rs;\n\n try {\n st = connection.createStatement();\n rs = st.executeQuery(query);\n Dataclass dc;\n while (rs.next()) {\n if (option == 1) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Imię\"), rs.getString(\"Nazwisko\"), rs.getString(\"Specjalizacja\"), rs.getInt(\"ID_Przychodni\"));\n else if (option == 2) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getString(\"Opis Badania\"), rs.getString(\"Imię i nazwisko pacjenta\"), rs.getInt(\"ID_Lekarza\"));\n else if (option == 3) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getBlob(\"Załącznik\"));\n else dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Nazwa\"), rs.getString(\"Adres\"), rs.getString(\"Miasto\"));\n dataList.add(dc);\n }\n } catch (Exception e) {\n System.err.print(e);\n }\n return dataList;\n }", "static void ReadAndWriteDataSet(String folderName) throws IOException\n\t{\n\t\t\n\t\t String path = \"data\"+FS+\"data_stage_one\"+FS+folderName; // Folder path \n\t\t \n\t\t String filename, line;\n\t\t File folder = new File(path);\n\t\t File[] listOfFiles = folder.listFiles();\n\t\t BufferedReader br = null;\n\t\t for(int i=0; i < listOfFiles.length; i++)\n\t\t { \n\t\t\t System.out.println(listOfFiles[i].getName());\n\t\t\t filename = path+FS+listOfFiles[i].getName();\n\t\t\t try\n\t\t\t {\n\t\t\t\t br= new BufferedReader(new FileReader(new File(filename)));\n\t\t\t\t while((line = br.readLine())!= null)\n\t\t\t\t {\n\t\t\t\t\tfor(int j=0; j<prep.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t\t\twhile(st.hasMoreTokens())\n\t\t\t\t\t\t\tif(st.nextToken().equalsIgnoreCase(prep[j]))\n\t\t\t\t\t\t\t{\t//System.out.println(line);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(arr[j] == null)\n\t\t\t\t\t\t\t\t\tarr[j] = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarr[j].add(line.toLowerCase().replaceAll(\"\\\\p{Punct}\",\"\").trim().replaceAll(\"\\\\s+\", \" \"));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }\n\t\t\t catch(Exception e)\n\t\t\t {\n\t\t\t\t System.err.println(\"exception: \"+e.getMessage() );\n\t\t\t\t e.printStackTrace();\n\t\t\t\t System.exit(0);\n\t\t\t }\n\t\t\t finally\n\t\t\t {\n\t\t\t\t br.close();\n\t\t\t }\n\t\t }\n\t\t \n\t\t // Writes the entire arraylist(preposition wise seperated files)\n\t\t \n\t\t WriteSeperated(folderName);\n\t\t \n\t\t for(int i=0; i<prep.length; i++)\n\t\t {\n\t\t\t arr[i].clear();\n\t\t }\n\t\t \n\t}", "private void loadDataFromMemory(String filename){\n shoppingList.clear();\n new ReadFromMemoryAsync(filename, getCurrentContext(), new ReadFromMemoryAsync.AsyncResponse(){\n\n @Override\n public void processFinish(List<ShoppingItem> output) {\n shoppingList.addAll(output);\n sortItems();\n }\n }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n// for (ShoppingItem item: items) {\n// shoppingList.add(item);\n// }\n// sortItems();\n }", "public static void initializeData() {\n\t\tList list;\n\t\tint i;\n\t\tList data = new ArrayList<>();\n\t\tString filename = \".\\\\data\\\\ticketType.dat\";\n\t\t\n\t\tMovieType movieType;\n\t\tCinemaClass cinemaClass;\n\t\tMovieGoerGroup[] movieGoerGroupL;\n\t\tString[] dayOfWeekL;\n\t\tString[] isPublicHolidayL;\n\t\tdouble price;\n\t\tTicketType ticketType, temp;\n\t\t\n\t\t//Type 1\n\t\tmovieType = MovieType.REG;\n\t\tcinemaClass = CinemaClass.REG;\n\t\tmovieGoerGroupL = new MovieGoerGroup[] {MovieGoerGroup.SENIOR};\n\t\tdayOfWeekL = new String[] {\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\"};\n\t\tisPublicHolidayL = new String[] {\"false\"};\n\t\tprice = 5;\n\t\tticketType = new TicketType(movieType,cinemaClass,movieGoerGroupL,dayOfWeekL,isPublicHolidayL,price);\n\t\tdata.add(ticketType);\n\t\t\n\t\t//Type 2\n\t\tmovieType = MovieType.REG;\n\t\tcinemaClass = CinemaClass.REG;\n\t\tmovieGoerGroupL = new MovieGoerGroup[] {MovieGoerGroup.STUDENT};\n\t\tdayOfWeekL = new String[] {\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\"};\n\t\tisPublicHolidayL = new String[] {\"false\"};\n\t\tprice = 7;\n\t\tticketType = new TicketType(movieType,cinemaClass,movieGoerGroupL,dayOfWeekL,isPublicHolidayL,price);\n\t\tdata.add(ticketType);\n\t\t\n\t\t//Type 3\n\t\tmovieType = MovieType.REG;\n\t\tcinemaClass = CinemaClass.REG;\n\t\tmovieGoerGroupL = new MovieGoerGroup[] {MovieGoerGroup.ADULT};\n\t\tdayOfWeekL = new String[] {\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\"};\n\t\tisPublicHolidayL = new String[] {\"false\"};\n\t\tprice = 9;\n\t\tticketType = new TicketType(movieType,cinemaClass,movieGoerGroupL,dayOfWeekL,isPublicHolidayL,price);\n\t\tdata.add(ticketType);\n\t\t\n\t\t//Type 4: Sat, Sun \n\t\tmovieType = MovieType.REG;\n\t\tcinemaClass = CinemaClass.REG;\n\t\tmovieGoerGroupL = new MovieGoerGroup[] {MovieGoerGroup.STUDENT, MovieGoerGroup.ADULT, MovieGoerGroup.SENIOR};\n\t\tdayOfWeekL = new String[] {\"Sat\", \"Sun\"};\n\t\tisPublicHolidayL = new String[] {\"false\"};\n\t\tprice = 13;\n\t\tticketType = new TicketType(movieType,cinemaClass,movieGoerGroupL,dayOfWeekL,isPublicHolidayL,price);\n\t\tdata.add(ticketType);\n\t\t\n\t\t//Type 5: public holiday \n\t\tmovieType = MovieType.REG;\n\t\tcinemaClass = CinemaClass.REG;\n\t\tmovieGoerGroupL = new MovieGoerGroup[] {MovieGoerGroup.STUDENT, MovieGoerGroup.ADULT, MovieGoerGroup.SENIOR};\n\t\tdayOfWeekL = new String[] {\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"};\n\t\tisPublicHolidayL = new String[] {\"true\"}; //public holiday\n\t\tprice = 13;\n\t\tticketType = new TicketType(movieType,cinemaClass,movieGoerGroupL,dayOfWeekL,isPublicHolidayL,price);\n\t\tdata.add(ticketType);\n\t\t\n\t\t//Type 6: Atmos cinemaType\n\t\tmovieType = MovieType.REG;\n\t\tcinemaClass = CinemaClass.ATMOS;\n\t\tmovieGoerGroupL = new MovieGoerGroup[] {MovieGoerGroup.STUDENT, MovieGoerGroup.ADULT, MovieGoerGroup.SENIOR};\n\t\tdayOfWeekL = new String[] {\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"};\n\t\tisPublicHolidayL = new String[] {\"true\", \"false\"}; \n\t\tprice = 14;\n\t\tticketType = new TicketType(movieType,cinemaClass,movieGoerGroupL,dayOfWeekL,isPublicHolidayL,price);\n\t\tdata.add(ticketType);\n\t\t\n\t\t//Type 7: Platinum cinemaType\n\t\tmovieType = MovieType.REG;\n\t\tcinemaClass = CinemaClass.PLATINUM;\n\t\tmovieGoerGroupL = new MovieGoerGroup[] {MovieGoerGroup.STUDENT, MovieGoerGroup.ADULT, MovieGoerGroup.SENIOR};\n\t\tdayOfWeekL = new String[] {\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"};\n\t\tisPublicHolidayL = new String[] {\"true\", \"false\"}; \n\t\tprice = 28;\n\t\tticketType = new TicketType(movieType,cinemaClass,movieGoerGroupL,dayOfWeekL,isPublicHolidayL,price);\n\t\tdata.add(ticketType);\n\t\t\n\t\t//3D movie: price + 2\n\t\tfor(i = 0 ; i < 7 ; i++) {\n\t\t\ttemp = (TicketType) data.get(i);\n\t\t\tticketType = new TicketType(MovieType._3D, temp.getCinemaClass(), temp.getMovieGoerGroupL(),\n\t\t\t\t\t\t\t\t\t\ttemp.getDayOfWeekL(), temp.getIsPublicHolidayL(), temp.getPrice() + 2);\n\t\t\tdata.add(ticketType);\n\t\t}\n\t\t\n\t\t//Blockbuster movie: price + 1\n\t\tfor(i = 0 ; i < 7 ; i++) {\n\t\t\ttemp = (TicketType) data.get(i);\n\t\t\tticketType = new TicketType(MovieType.BLOCKBUSTER, temp.getCinemaClass(), temp.getMovieGoerGroupL(),\n\t\t\t\t\t\t\t\t\t\ttemp.getDayOfWeekL(), temp.getIsPublicHolidayL(), temp.getPrice() + 2);\n\t\t\tdata.add(ticketType);\n\t\t}\n\t\t\n\t\tSerializeDB.writeSerializedObject(filename, data); //Write data\n\t}", "private List<Integer> createData() {\r\n\t\tList<Integer> data = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "private void fillData() {\n table.setRowList(data);\n }", "private ArrayList<Item> getData() { // generates an array containing 3 Item class objects\n\n // cost\n String[] cost = getResources().getStringArray(R.array.elvCostItems);\n Item i1=new Item(cost[0], new ArrayList<>(Collections.singletonList(cost[5])),false); // Define an Item object call i1\n i1.elements.add(cost[1]); // child elements below\n i1.elements.add(cost[2]);\n i1.elements.add(cost[3]);\n i1.elements.add(cost[4]);\n i1.elements.add(cost[5]);\n i1.elements.add(cost[6]);\n\n // activity or event\n String[] category = getResources().getStringArray(R.array.elvCategoryItems);\n Item i2=new Item(category[0], new ArrayList<>(Arrays.asList(category[1],category[2])),true); // Item.Option is set by the arg1 and default selection is set by arg 2\n i2.elements.add(category[1]);\n i2.elements.add(category[2]);\n\n // city\n String[] location = getResources().getStringArray(R.array.elvLocationItems);\n Item i4=new Item(location[0],new ArrayList<>(Collections.singletonList(location[1])),false);\n i4.elements.add(location[1]);\n\n // distance away\n String[] distance = getResources().getStringArray(R.array.elvDistanceItems);\n Item i5=new Item(distance[0],new ArrayList<>(Collections.singletonList(distance[4])),false);\n i5.elements.add(distance[1]);\n i5.elements.add(distance[2]);\n i5.elements.add(distance[3]);\n i5.elements.add(distance[4]);\n i5.elements.add(distance[5]);\n\n // other - disabled access, indoors, etc\n String[] other = getResources().getStringArray(R.array.elvOtherItems);\n ArrayList<String> temp = new ArrayList<>();\n Item i6=new Item(other[0], temp,true);\n i6.elements.add(other[1]);\n i6.elements.add(other[2]);\n i6.elements.add(other[3]);\n i6.elements.add(other[4]);\n i6.elements.add(other[5]);\n i6.elements.add(other[6]);\n\n // add items to the elv\n ArrayList<Item> allItems=new ArrayList<>(); // append all Item objects into an ArrayList\n allItems.add(i1);\n allItems.add(i2);\n allItems.add(i4);\n allItems.add(i5);\n allItems.add(i6);\n\n return allItems;\n }", "private void prepareArrayLits(){\t\n\t\tprogressDialog_1 = ProgressDialog.show(SlyThemesActivity.this, \"\",Constants.PROCESSING_REQUEST);\n\n\t\tadapter = new ListViewNewRestaurantAdapter(this, itemList);\n\t\tlistview.setAdapter(adapter);\n\t\tprogressDialog_1.dismiss();\n\t}", "public abstract void loadData();", "public abstract void loadData();", "public ArrayList<String> getData() {\n\t\treturn null;\r\n\t}", "public MyAdapter(ArrayList<MyData> myDataset) {\n\n mDataset = myDataset;\n }", "private void loadLists() {\n }", "private void fillData() {\n adapter = new ListViewAdapter();\n listview01.setAdapter(adapter);\n }", "List<T> readList();", "ArrayList<WordListItem> addDataFromFile(){\n BufferedReader br;\n InputStream inputStream = context.getResources().openRawResource(R.raw.animal_list);\n br = new BufferedReader(\n new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"))\n );\n String currentLine;\n ArrayList<WordListItem> wordListItems = new ArrayList<WordListItem>();\n try {\n while ((currentLine = br.readLine()) != null) {\n String[] tokens = currentLine.split(\";\");\n\n String word = tokens[0];\n String pronunciation = tokens[1];\n String description = tokens[2];\n\n WordListItem wordItem = new WordListItem(word, pronunciation, description);\n wordItem.setImgResNbr(setImgResFromWord(wordItem.getWord().toLowerCase()));\n wordListItems.add(wordItem);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null) br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n return wordListItems;\n }", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public DataSet() {\n this.bars = new ArrayList<Bar>();\n this.reviews = new ArrayList<Review>();\n }", "public static List<Person> loadTrainingSet(){\n List<Person> list_of_persons = new LinkedList<Person>();\n String[] names = getAllNames();\n\n try (Connection con = DriverManager.getConnection(url, user, password)){\n for(int i=0; i<names.length; i++){\n List<Histogram> histograms = new ArrayList<>();\n String query = \"SELECT h_json FROM \"+DATABASE_NAME+\".\"+names[i]+\";\";\n \n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n\n while (rs.next()) {\n Map<Integer, Integer> map = new HashMap<>();\n JSONObject obje = new JSONObject(rs.getString(1));\n for(int y=0; y<255; y++){\n map.put(y, (int)obje.get(\"\"+y));\n }\n histograms.add(new Histogram(map));\n }\n\n list_of_persons.add(new Person(names[i], histograms));\n }\n con.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return list_of_persons;\n }", "private void fillData() {\n\t\tfor(Entry<String, HashMap<String, Double>> entry : m.map.entrySet()) {\n\t\t\tfor(Entry<String, Double> subEntry : entry.getValue().entrySet()) {\n\t\t\t\tMappingData item = new MappingData(entry.getKey(), subEntry.getKey(), subEntry.getValue());\n\t\t\t\tdataList.add(item);\n\t\t\t}\n\t\t}\n\t}", "public GalleryAdapter(ArrayList<String> myDataset) {\n mDataset = myDataset;\n }", "private ArrayList<String> loadIds() {\n\n\t\tArrayList<String> idArray = new ArrayList<String>();\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context.openFileInput(SAVE_FILE);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<ArrayList<String>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tArrayList<String> list = gson.fromJson(inputStreamReader, listType);\n\t\t\tidArray = list;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn idArray;\n\t}", "public ArrayList<ArrayList<String>> getData(String sqlString){\n \n /* Temporary statement */\n PreparedStatement stmnt = null;\n \n /* Creates a 2-d ArrayList that will be used to return the results from the commonGetData. */\n ArrayList<ArrayList<String>> result = commonGetData(sqlString, false, stmnt); \n \n /* Returns the final 2-d ArrayList */\n return result;\n }", "public ArrayList<String> readItem();", "public ArrayList<CategoryData> addData(){\n return databaseManager.retrieveInfo();\n }", "private ArrayList<String> getFileData(InputStream is) {\n ArrayList<String> restaurantData = new ArrayList<>();\n\n // Initialize the reader for the csv file\n BufferedReader reader = new BufferedReader(new InputStreamReader(is,\n Charset.forName(\"UTF-8\")));\n\n // Read each line into the ArrayList\n try {\n // Read the file\n String row;\n while ((row = reader.readLine()) != null) {\n restaurantData.add(row);\n }\n } catch (IOException ex) {\n Log.i(TAG, \"Error reading line\", ex);\n } finally {\n try {\n // Close the file\n reader.close();\n } catch (IOException ex) {\n Log.i(TAG, \"Error closing file\", ex);\n }\n }\n\n // Return data\n return restaurantData;\n }", "ArrayList retrievestudentdata() throws ClassNotFoundException;", "private void fillData()\n\t{\n\t\tNightliesAdapter na = new NightliesAdapter( context );\n\t\ttry\n\t\t{\n\t\t\tna.read();\n\n\t\t\t// get Downloads\n\t\t\tCursor cur_dl = na.getDownloadsCursor();\n\t\t\tcur_dl.moveToFirst();\n\n\t\t\t// we will start db records from 1: 0 reserved for our custom record\n\t\t\tint count_dl = cur_dl.getCount() + 1;\n\t\t\tif ( count_dl > 1 )\n\t\t\t{\n\t\t\t\tdownloads = new DownloadsRecord[count_dl];\n\t\t\t\tchangelogs = new ChangeLogRecord[count_dl][];\n\n\t\t\t\tDownloadsRecord dr;\n\t\t\t\tlong dateTo = ( new Date() ).getTime();\n\t\t\t\tlong dateFrom = cur_dl.getLong( cur_dl.getColumnIndex( NightliesAdapter.CM_DATE ) );\n\n\t\t\t\t// empty first record\n\t\t\t\tdr = new DownloadsRecord();\n\t\t\t\tdr.filename = \"next nightly\";\n\t\t\t\tdr.type = \"nightly\";\n\t\t\t\tdr.size = \"\";\n\t\t\t\tdr.md5sum = \"\";\n\t\t\t\tdr.date_added = new Date();\n\t\t\t\tdownloads[0] = dr;\n\n\t\t\t\t// get change log data\n\t\t\t\tchangelogs[0] = fillChangeLogData( na, dateFrom, dateTo );\n\n\t\t\t\tfor ( int i = 1; i < count_dl && !cur_dl.isAfterLast(); i++ )\n\t\t\t\t{\n\t\t\t\t\tdr = new DownloadsRecord();\n\t\t\t\t\tdr.filename = cur_dl.getString( cur_dl\n\t\t\t\t\t\t\t.getColumnIndex( NightliesAdapter.CM_FILENAME ) );\n\t\t\t\t\tdr.type = cur_dl.getString( cur_dl.getColumnIndex( NightliesAdapter.CM_TYPE ) );\n\t\t\t\t\tdr.md5sum = cur_dl.getString( cur_dl\n\t\t\t\t\t\t\t.getColumnIndex( NightliesAdapter.CM_MD5SUM ) );\n\t\t\t\t\tdr.size = cur_dl.getString( cur_dl.getColumnIndex( NightliesAdapter.CM_SIZE ) );\n\t\t\t\t\tdateFrom = cur_dl.getLong( cur_dl.getColumnIndex( NightliesAdapter.CM_DATE ) );\n\t\t\t\t\tdr.date_added = new Date( dateFrom );\n\t\t\t\t\tdownloads[i] = dr;\n\n\t\t\t\t\t// get change log data\n\t\t\t\t\tchangelogs[i] = fillChangeLogData( na, dateFrom, dateTo );\n\n\t\t\t\t\tdateTo = dateFrom;\n\t\t\t\t\tcur_dl.moveToNext();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t\t// no records found\n\t\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\t\tdr.filename = \"No Records found, please refresh\";\n\t\t\t\tdr.type = \"nightly\";\n\t\t\t\tdr.size = \"\";\n\t\t\t\tdr.md5sum = \"\";\n\t\t\t\tdr.date_added = null;\n\t\t\t\tdownloads[0] = dr;\n\t\t\t}\n\t\t}\n\t\tcatch ( SQLException e )\n\t\t{\n\t\t\t// data base does not exist or cannot be opened for read\n\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t// no records found\n\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\tdr.filename = \"Problem with DB, please refresh\";\n\t\t\tdr.type = \"nightly\";\n\t\t\tdr.size = \"\";\n\t\t\tdr.md5sum = \"\";\n\t\t\tdr.date_added = null;\n\t\t\tdownloads[0] = dr;\n\n\t\t\tLog.e( TAG, \"DB Fail\", e );\n\t\t}\n\t\tcatch ( CursorIndexOutOfBoundsException e )\n\t\t{\n\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t// no records found\n\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\tdr.filename = \"Problem with DB, please refresh\";\n\t\t\tdr.type = \"nightly\";\n\t\t\tdr.size = \"\";\n\t\t\tdr.md5sum = \"\";\n\t\t\tdr.date_added = null;\n\t\t\tdownloads[0] = dr;\n\n\t\t\tLog.e( TAG, \"DB Fail\", e );\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif ( na != null )\n\t\t\t{\n\t\t\t\tna.close();\n\t\t\t}\n\t\t}\n\t}", "List<T> readAll();", "private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "java.util.List<com.sanqing.sca.message.ProtocolDecode.DataObject> \n getDataObjectList();", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "private void fetchDataFromDatabase() {\n\n listOfPersons.clear();\n Cursor cursor = AppDatabase.getInstance(context).getPersonList();\n if (cursor != null && cursor.moveToFirst()) {\n do {\n String firstName = cursor.getString(cursor.getColumnIndex(\"firstName\"));\n String lastName = cursor.getString(cursor.getColumnIndex(\"lastName\"));\n String email = cursor.getString(cursor.getColumnIndex(\"email\"));\n String dob = cursor.getString(cursor.getColumnIndex(\"dobDate\"));\n String phoneNumber = cursor.getString(cursor.getColumnIndex(\"phoneNumber\"));\n String pictureUrl = cursor.getString(cursor.getColumnIndex(\"pictureMediumUrl\"));\n String pictureImageData = cursor.getString(cursor.getColumnIndex(\"pictureImageData\"));\n String fullName = firstName + \" \" + lastName;\n Bitmap imageBitmap = UtilFunctions.stringToBitmap(pictureImageData);\n\n PersonWrapper person = new PersonWrapper(fullName, email, dob, phoneNumber, pictureUrl, imageBitmap);\n listOfPersons.add(person);\n\n } while (cursor.moveToNext());\n }\n\n initView(listOfPersons);\n }", "private static void populateZipcodeList() {\n\t\t// only load the data once...\n\t\tif (ZipCodes.zipCodesList.size() > 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tList<String> headers = null;\n\t\tList<String> values = null;\n\t\tString line = null;\n\t\t\n\t\t// create handle the source data file\n\t\tInputStream stream = ZipCodes.class.getResourceAsStream(\"zipCodes.csv\");\n\t\tBufferedReader buffer = new BufferedReader(new InputStreamReader(stream));\n\n try {\n\t\t\t// pull header row\n \theaders = Arrays.asList(buffer.readLine().split(\",\"));\n \t\n \t// add data rows\n \twhile((line = buffer.readLine()) != null) {\n \t\n \t\tHashMap<String, String> zip = new HashMap<String, String>();\n \t\tvalues = Arrays.asList(line.split(\",\"));\n \t\tfor (int i = 0; i < headers.size(); i++) {\n \t\t\tzip.put(headers.get(i), values.get(i));\n \t\t}\n \t\tZipCodes.zipCodesList.add(zip);\n\t\t\t}\n\t\t\tstream.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private void initData() {\n\n }", "Collection getData();", "public void readInOrganizations() {\n // read CSV file for Organizations\n allOrganizations = new ArrayList<Organization>();\n InputStream inputStream = getResources().openRawResource(R.raw.organizations);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] organizationInfo = (String[]) scoreList.get(i);\n\n // inputs to Organization constructor:\n // String name, int logoPhotoID, int photo1ID, int photo2ID, int photo3ID\n\n // group together description\n String description = getDescription(5, organizationInfo);\n\n // get all image IDs according to the names\n int logoPhotoID = context.getResources().getIdentifier(organizationInfo[1], \"drawable\", context.getPackageName());\n int photo1ID = context.getResources().getIdentifier(organizationInfo[2], \"drawable\", context.getPackageName());\n int photo2ID = context.getResources().getIdentifier(organizationInfo[3], \"drawable\", context.getPackageName());\n int photo3ID = context.getResources().getIdentifier(organizationInfo[4], \"drawable\", context.getPackageName());\n allOrganizations.add(new Organization(organizationInfo[0], logoPhotoID, photo1ID, photo2ID, photo3ID, description));\n\n //System.out.println(\"organizationInfo: \" + organizationInfo[0] + \" \" + organizationInfo[1] + \" \" + organizationInfo[2] + \" \" + organizationInfo[3] + \" \" + organizationInfo[4]);\n }\n }", "public void readData() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Enter employee ID \");\n int id = sc.nextInt();\n System.out.println(\"Enter Employee name \");\n String name = sc.next();\n System.out.println(\"Enter Employee salary \");\n double salary = sc.nextDouble();\n\n employeePayrollDataList.add(new EmployeePayrollData(id, name, salary));\n }", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public void LoadFromCSV(){\n InputStream inputStream = getResources().openRawResource(R.raw.movielist);\n CSVinput csVinput = new CSVinput(inputStream);\n final List<String[]> movList = csVinput.read();\n\n for(String[] data : movList) {\n itemArrAdapt.add(data);\n }\n }", "public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }", "private void initializeRestaurantList(ArrayList<String> restaurantData) {\n // For each line of csv data, create a restaurant with it and put it in the restaurant list\n for (String dataLine : restaurantData) {\n // Separate the comma-spliced-values\n String[] restaurantValues = dataLine.split(\"\\\\s*,\\\\s*\");\n\n // Remove any quotations from entries\n for (int i = 0; i < restaurantValues.length; i++) {\n String str = restaurantValues[i];\n str = str.replaceAll(\"\\\"\", \"\");\n restaurantValues[i] = str;\n }\n\n // If the current csv row is data (and not the title), then add it to the list\n if (!(restaurantValues[0].equals(\"TRACKINGNUMBER\"))) {\n // Extract the comma-spliced-values into variables\n String trackingNumber = restaurantValues[0];\n String name = restaurantValues[1];\n String address = restaurantValues[2];\n String city = restaurantValues[3];\n String type = restaurantValues[4];\n double latitude = Double.parseDouble(restaurantValues[5]);\n double longitude = Double.parseDouble(restaurantValues[6]);\n\n // Create a restaurant\n Restaurant restaurant = new Restaurant(trackingNumber, name, address, city, type,\n latitude, longitude);\n\n // Store the restaurant inside the list of restaurants\n this.restaurantList.add(restaurant);\n }\n }\n Collections.sort(this.restaurantList);\n }", "public ArrayList<Rate> getData(){\n String[] r = new String[6];\n int[] col = new int[6];\n String query = \"SELECT * FROM \"+ TABLE_RATE ;//+ \" WHERE \" + COL_USERNAME+\"='\"+username+\"'\";\n\n ArrayList<Rate> rates= new ArrayList<Rate>();\n SQLiteDatabase db = getWritableDatabase();\n Cursor c = db.rawQuery(query, null);\n c.moveToFirst();\n\n col[0]=c.getColumnIndex(COL_ID);\n col[1]=c.getColumnIndex(COL_CARNUM);\n col[2]=c.getColumnIndex(COL_DATE);\n col[3]=c.getColumnIndex(COL_RATE);\n col[4]=c.getColumnIndex(COL_PARKINPNUM);\n col[5]=c.getColumnIndex(COL_FLOORNUM);\n\n while(!c.isAfterLast()){\n for(int i=0;i<col.length;i++){\n r[i]=c.getString(col[i]);\n }\n rates.add(new Rate((long) Double.parseDouble(r[3]),r[2],r[1],Long.parseLong(r[0]),Integer.parseInt(r[4]),Integer.parseInt(r[5])));\n c.moveToNext();\n }\n return rates;\n }", "private void readSourceData() throws Exception {\n\t\tthis.fileDataList = new ArrayList<String>();\n\t\tReader reader = new Reader(this.procPath);\n\t\treader.running();\n\t\tthis.fileDataList = reader.getFileDataList();\n\t}" ]
[ "0.7253073", "0.68867147", "0.67341787", "0.67047936", "0.66325814", "0.6527542", "0.6517953", "0.64986265", "0.6479019", "0.6429495", "0.6427154", "0.6421745", "0.6412567", "0.64078534", "0.6347321", "0.6321944", "0.63107693", "0.63107693", "0.63102525", "0.6279889", "0.6273119", "0.62508816", "0.6227715", "0.62145585", "0.6202079", "0.61718214", "0.6165759", "0.6129783", "0.6078965", "0.6071123", "0.6047584", "0.6042274", "0.6032776", "0.6028638", "0.60273623", "0.60043305", "0.59979177", "0.59964865", "0.5986495", "0.5985954", "0.59827423", "0.5976652", "0.59704506", "0.5967282", "0.59626174", "0.5960157", "0.59579206", "0.59501046", "0.59466565", "0.59461254", "0.5936343", "0.5928803", "0.5923076", "0.58985776", "0.5898383", "0.5898137", "0.58778876", "0.58721", "0.58702785", "0.5869482", "0.58688813", "0.5868557", "0.5858257", "0.5843249", "0.5843249", "0.5843163", "0.5840247", "0.5839542", "0.58316875", "0.5831319", "0.5823059", "0.58226955", "0.5814105", "0.5812412", "0.581052", "0.5809882", "0.5808516", "0.58066094", "0.5800766", "0.57991767", "0.579507", "0.5790758", "0.5788703", "0.5785772", "0.57789695", "0.57762927", "0.5774553", "0.577437", "0.576736", "0.57662654", "0.57644105", "0.5759829", "0.5758819", "0.57584417", "0.5758139", "0.5749376", "0.5749302", "0.57413626", "0.5740467", "0.5736342" ]
0.6137654
27
This is the method to handle the get user permissions request.
public static void getUserPermissions(ArrayList<String> parameters, HashMap<String, ArrayList<String>> sessions, ObjectOutputStream oos) throws IOException { ArrayList<Integer> userPermissions; // check if correct number of parameters have been provided if (parameters.size() != 2) { oos.writeObject(new Response(StatusCodes.BAD_REQUEST, "Parameters Invalid")); } else { // check if token from parameters is valid and if session token has not yet expired if (sessions.containsKey(parameters.get(1)) && !hasTokenExpired(sessions, parameters.get(1))) { // check if the user exists if (Users.doesUserExists(parameters.get(0))) { // check if user is attempting to get their own permissions if (parameters.get(0).equals(sessions.get(parameters.get(1)).get(0))) { // get the user's permissions userPermissions = Users.getUserPermissionsFromDB(parameters.get(0)); if (userPermissions.isEmpty()) { oos.writeObject(new Response(StatusCodes.NO_CONTENT, userPermissions)); } else { oos.writeObject(new Response(StatusCodes.OK, userPermissions)); } } else { // check if the user has the "Edit Users" permission if (Users.userHasPermission(sessions.get(parameters.get(1)).get(0), ServerPermissions.EDIT_USERS)) { // get the user's permissions userPermissions = Users.getUserPermissionsFromDB(parameters.get(0)); if (userPermissions.isEmpty()) { oos.writeObject(new Response(StatusCodes.NO_CONTENT, userPermissions)); } else { oos.writeObject(new Response(StatusCodes.OK, userPermissions)); } } else { oos.writeObject(new Response(StatusCodes.FORBIDDEN, "Missing Permissions")); } } } else { oos.writeObject(new Response(StatusCodes.INTERNAL_ERROR, "User Does Not Exist")); } } else { oos.writeObject(new Response(StatusCodes.UNAUTHORISED, "Unauthorised Request")); } } // flush oos oos.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected String requiredGetPermission() {\n return \"user\";\n }", "private void fetchPermissionsFromUser() {\n Log.d(TAG, \"in fetch permisssion s\");\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION\");\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.READ_CONTACTS)) {\n\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION show request\");\n\n } else {\n\n // No explanation needed, we can request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION with return request\");\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION\");\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION erequest\");\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION with return requet\");\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n\n }", "@RequestMapping(value = \"/getPermissionByIdUser\", method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getPermissionByIdUser() throws JsonParseException, JsonMappingException, IOException {\n\t\tMap<String, Object> result = permissionAuthorize.getPermissionByIdUser(SecurityUtil.getIdUser());\n\t\t// return.\n\t\treturn new ResponseEntity<Map<String, Object>>(result, HttpStatus.OK);\n\t}", "abstract public void getPermission();", "@RequestMapping(value = \"/getPermissionForUserMenu\", method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getPermissionForUserMenu() throws JsonParseException, JsonMappingException, IOException {\n\t\tMap<String, Object> result = permissionAuthorize.getPermissionForUserMenu(SecurityUtil.getIdUser());\n\t\t// return.\n\t\treturn new ResponseEntity<Map<String, Object>>(result, HttpStatus.OK);\n\t}", "UserPermissions authenticate (Request request);", "public List<Permission> getPermissions(User user) throws UserManagementException;", "void askForPermissions();", "private void getPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_READ_CONTACTS);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n }", "public List<Permission> getPermissions(T object, User user);", "@TargetApi(23)\r\n public void requestPermission() {\r\n ArrayList<String> arrayList;\r\n String[] strArr = this.mPermissions;\r\n for (String str : strArr) {\r\n if (this.mActivity.checkCallingOrSelfPermission(str) != 0) {\r\n if (shouldShowRequestPermissionRationale(str) || !PermissionUtils.isNeverShowEnabled(PermissionUtils.getRequestCode(str))) {\r\n if (this.normalPermissions == null) {\r\n this.normalPermissions = new ArrayList<>(this.mPermissions.length);\r\n }\r\n arrayList = this.normalPermissions;\r\n } else {\r\n if (this.settingsPermissions == null) {\r\n this.settingsPermissions = new ArrayList<>(this.mPermissions.length);\r\n }\r\n arrayList = this.settingsPermissions;\r\n }\r\n arrayList.add(str);\r\n }\r\n }\r\n Log.d(TAG, \"requestPermission() settingsPermissions:\" + this.settingsPermissions);\r\n Log.d(TAG, \"requestPermission() normalPermissions:\" + this.normalPermissions);\r\n ArrayList<String> arrayList2 = this.normalPermissions;\r\n if (arrayList2 == null || arrayList2.size() <= 0) {\r\n ArrayList<String> arrayList3 = this.settingsPermissions;\r\n if (arrayList3 == null || arrayList3.size() <= 0) {\r\n IGrantedTask iGrantedTask = this.mTask;\r\n if (iGrantedTask != null) {\r\n iGrantedTask.doTask();\r\n }\r\n } else {\r\n Activity activity = this.mActivity;\r\n PermissionUtils.showPermissionSettingsDialog(activity, activity.getResources().getString(R.string.app_name), this.settingsPermissions, true);\r\n this.settingsPermissions = null;\r\n }\r\n finishFragment();\r\n return;\r\n }\r\n requestPermissions((String[]) this.normalPermissions.toArray(new String[this.normalPermissions.size()]), 5003);\r\n this.normalPermissions = null;\r\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {\n }", "public List<Permission> getPermissionsPending(User user) throws UserManagementException;", "void requestNeededPermissions(int requestCode);", "protected void doGetPermissions() throws TmplException {\r\n try {\r\n GlbPerm perm = (GlbPerm)TmplEJBLocater.getInstance().getEJBRemote(\"pt.inescporto.permissions.ejb.session.GlbPerm\");\r\n\r\n perms = perm.getFormPerms(MenuSingleton.getRole(), permFormId);\r\n }\r\n catch (java.rmi.RemoteException rex) {\r\n //can't get form perms\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(rex);\r\n throw tmplex;\r\n }\r\n catch (javax.naming.NamingException nex) {\r\n //can't find GlbPerm\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(nex);\r\n throw tmplex;\r\n }\r\n }", "@Override\n public void onPermissionGranted() {\n }", "public Permission getPermission(String objectId, User user, Boolean pending) throws UserManagementException;", "@Override\n public void onPermissionGranted(PermissionGrantedResponse permissionGrantedResponse) {\n\n }", "@Override\n public void onPermissionGranted() {\n }", "private void requestPermissionFromUser() {\n if(ActivityCompat.shouldShowRequestPermissionRationale(this,android.Manifest.permission.READ_EXTERNAL_STORAGE)){\n Toast.makeText(getApplicationContext(),\"READ STORAGE Allows Us To Upload Image From Your Gallery To The DataBase\",Toast.LENGTH_SHORT).show();\n }else{\n ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.READ_EXTERNAL_STORAGE},PERMISSION_REQUEST_CODE);\n }\n }", "private void requestPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (!ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.CAMERA},\n 1);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n }\n }", "void permissionGranted(int requestCode);", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "public List<String> getPermission(int userId, String crp);", "private void getPermissions(){\n // Check READ storage permission\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n Log.i(\"STORAGE PERMISSION\", \"request READ_EXTERNAL_STORAGE\");\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},\n REQUEST_READ_EXTERNAL_STORAGE);\n } else {\n Log.i(\"STORAGE PERMISSION\", \"READ_EXTERNAL_STORAGE already granted\");\n read_external_storage_granted = true;\n }\n\n // Check WRITE storage permission\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n Log.i(\"STORAGE PERMISSION\", \"request WRITE_EXTERNAL_STORAGE\");\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_WRITE_EXTERNAL_STORAGE);\n } else {\n Log.i(\"STORAGE PERMISSION\", \"WRITE_EXTERNAL_STORAGE already granted\");\n write_external_storage_granted = true;\n }\n\n // Check camera permission\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED){\n Log.i(\"CAMERA PERMISSION\", \"request CAMERA permission\");\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA},\n REQUEST_CAMERA);\n } else {\n Log.i(\"CAMERA PERMISSION\", \"CAMERA permission already granted\");\n camera_permission_granted = true;\n }\n\n }", "protected void handlePermissionResult() {\n for (String permission : Constants.PERMISSIONS_NEEDED) {\n if (mUtils.hasPermission(permission)) {\n // User granted this permission, check for next one\n continue;\n }\n // User not granted permission\n if (SpyState.Listeners.permissionsListener != null) // Let app handle this\n {\n SpyState.Listeners.permissionsListener.onPermissionDenied(!mActivity.shouldShowRequestPermissionRationale(permission));\n return;\n }\n\n AlertDialog.Builder permissionRequestDialog = new AlertDialog.Builder(mActivity)\n .setTitle(R.string.dialog_permission_title)\n .setMessage(R.string.dialog_permission_message)\n .setCancelable(false)\n .setNegativeButton(R.string.exit,\n (dialog, whichButton) -> {\n mUtils.showToast(R.string.closing_app);\n mActivity.finish();\n });\n if (!mActivity.shouldShowRequestPermissionRationale(permission)) {\n // User clicked on \"Don't ask again\", show dialog to navigate him to\n // settings\n permissionRequestDialog\n .setPositiveButton(R.string.go_to_settings,\n (dialog, whichButton) -> {\n Intent intent =\n new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri =\n Uri.fromParts(\"package\", mActivity.getPackageName(), null);\n intent.setData(uri);\n mActivity.startActivityForResult(intent,\n OPEN_SETTINGS_REQUEST_CODE);\n })\n .show();\n } else {\n // User clicked on 'deny', prompt again for permissions\n permissionRequestDialog\n .setPositiveButton(R.string.try_again,\n (dialog, whichButton) -> grantPermissions())\n .show();\n }\n return;\n }\n Log.i(TAG, \"All required permissions have been granted!\");\n }", "public List<Permission> getUserPermission() {\n\t\treturn securityContext.getAuthorizationContext().getPermissions();\n\t}", "public void getPermission() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(permissions,\n MULTIPLE_PERMISSIONS);\n }\n }", "public void requestPermissions(){\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.READ_EXTERNAL_STORAGE)) {\n\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n public void getPermissionToReadUserContacts() {\n // 1) Use the support library version ContextCompat.checkSelfPermission(...) to avoid\n // checking the build version since Context.checkSelfPermission(...) is only available\n // in Marshmallow\n // 2) Always check for permission (even if permission has already been granted)\n // since the user can revoke permissions at any time through Settings\n if (ContextCompat.checkSelfPermission (this, Manifest.permission.READ_CONTACTS)\n != PackageManager.PERMISSION_GRANTED) {\n\n // The permission is NOT already granted.\n // Check if the user has been asked about this permission already and denied\n // it. If so, we want to give more explanation about why the permission is needed.\n if (shouldShowRequestPermissionRationale (\n Manifest.permission.READ_CONTACTS)) {\n // Show our own UI to explain to the user why we need to read the contacts\n // before actually requesting the permission and showing the default UI\n }\n\n // Fire off an async request to actually get the permission\n // This will show the standard permission request dialog UI\n requestPermissions (new String[]{Manifest.permission.READ_CONTACTS},\n READ_CONTACTS_PERMISSIONS_REQUEST);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n // Checking run time permission status\n if(requestCode == AllKeys.REQUEST_PERMISSION){\n\n // When all required permission is granted\n if (hasPermissions(this, permissions)){\n // Permission is granted so we can retrieve call list\n getCallList();\n }else{\n Toast.makeText(getApplicationContext(),this.getResources().getString(R.string.permission_denied),Toast.LENGTH_SHORT).show();\n }\n }\n }", "String getPermission();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_PERMISSION_SETTING) {\n checkPermission();\n }\n }", "List<Permission> getPermissions();", "@Override\n public void onRequestAllow(String permissionName) {\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n public void getNecessaryPermissions() {\n final String TAG_getNecessaryPermissions = \" getNecessartPermissions(): \";\n Log.d(TAG, TAG_getNecessaryPermissions + \" called\");\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_SMS) != PackageManager.PERMISSION_GRANTED) {\n //if permission is not granted then show an education UI to give reason to user\n if (shouldShowRequestPermissionRationale(Manifest.permission.READ_SMS)) {\n Toast.makeText(this, \"Please allow permission!\", Toast.LENGTH_SHORT).show();\n }\n //and then let the system request permission from user for your app.\n //results in callback to onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)\n requestPermissions(new String[]{Manifest.permission.READ_SMS, Manifest.permission.READ_CONTACTS}, REQUESTCODEFORPERMISSIONS_READSMS_READCONTACTS_ENDOFPERMISSIONS);\n }\n }", "@MemberOrder(sequence = \"30\")\n @Render(Render.Type.EAGERLY)\n @Paged(50)\n @NotInServiceMenu\n @NotContributed(NotContributed.As.ACTION) // ie contributed as property\n @ActionSemantics(ActionSemantics.Of.SAFE)\n public List<UserPermissionViewModel> permissions(ApplicationUser user) {\n final Collection<ApplicationFeature> allMembers = applicationFeatures.allMembers();\n return Lists.newArrayList(\n Iterables.transform(\n allMembers,\n UserPermissionViewModel.Functions.asViewModel(user, container))\n );\n }", "List<String> getAvailablePermissions() throws GWTJahiaServiceException;", "@Path(\"/ListUserPermissions/{userName}\")\n @Produces({\"application/xml\", \"text/xml\", \"application/json\", \"text/yaml\", \"text/x-yaml\", \"application/x-yaml\"})\n @GET\n public ListUserPermissionsResponse listUserPermissions(@PathParam(\"userName\") String userName) {\n \n ListUserPermissionsResponse response = new ListUserPermissionsResponse();\n Connector connection = null;\n AccumuloConnectionFactory.Priority priority = AccumuloConnectionFactory.Priority.ADMIN;\n try {\n Map<String,String> trackingMap = connectionFactory.getTrackingMap(Thread.currentThread().getStackTrace());\n connection = connectionFactory.getConnection(priority, trackingMap);\n \n SecurityOperations ops = connection.securityOperations();\n \n List<datawave.webservice.response.objects.SystemPermission> systemPermissions = new ArrayList<>();\n SystemPermission[] allSystemPerms = SystemPermission.values();\n for (SystemPermission next : allSystemPerms) {\n if (ops.hasSystemPermission(userName, next)) {\n systemPermissions.add(new datawave.webservice.response.objects.SystemPermission(next.name()));\n }\n }\n \n List<datawave.webservice.response.objects.TablePermission> tablePermissions = new ArrayList<>();\n TableOperations tops = connection.tableOperations();\n SortedSet<String> tables = tops.list();\n TablePermission[] allTablePerms = TablePermission.values();\n for (String next : tables) {\n for (TablePermission nextPerm : allTablePerms) {\n if (ops.hasTablePermission(userName, next, nextPerm)) {\n tablePermissions.add(new datawave.webservice.response.objects.TablePermission(next, nextPerm.name()));\n }\n }\n }\n \n List<datawave.webservice.response.objects.NamespacePermission> namespacePermissions = new ArrayList<>();\n NamespaceOperations nops = connection.namespaceOperations();\n SortedSet<String> namespaces = nops.list();\n NamespacePermission[] allNamespacePerms = NamespacePermission.values();\n for (String next : namespaces) {\n for (NamespacePermission nextPerm : allNamespacePerms) {\n if (ops.hasNamespacePermission(userName, next, nextPerm)) {\n namespacePermissions.add(new datawave.webservice.response.objects.NamespacePermission(next, nextPerm.name()));\n }\n }\n }\n \n UserPermissions userPermissions = new UserPermissions();\n userPermissions.setSystemPermissions(systemPermissions);\n userPermissions.setTablePermissions(tablePermissions);\n userPermissions.setNamespacePermissions(namespacePermissions);\n response.setUserPermissions(userPermissions);\n \n return response;\n } catch (AccumuloSecurityException e) {\n log.error(e.getMessage(), e);\n response.addException(e);\n throw new UnauthorizedException(e, response);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n response.addException(e);\n throw new AccumuloWebApplicationException(e, response);\n } finally {\n try {\n connectionFactory.returnConnection(connection);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }\n }", "public void askPermission() {\n try {\n if (Build.VERSION.SDK_INT >= 23) {\n //call the function to ask for permission\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, 100);\n return;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public void onPermissionGranted() {\n\n }", "public Permissions[] getPermissionsNeeded(ContainerRequestContext context) throws Exception {\n Secured auth = resourceInfo.getResourceMethod().getAnnotation(Secured.class);\n\n // If there's no authentication required on method level, check class level.\n if (auth == null) {\n auth = resourceInfo.getResourceClass().getAnnotation(Secured.class);\n }\n\n // Else, there's no permission required, thus we chan continue;\n if (auth == null) {\n log.log(Level.INFO, \"AUTHENTICATION: Method: \" + context.getMethod() + \", no permission required\");\n return new Permissions[0];\n }\n\n return auth.value();\n }", "private void checkAndRequestPermissions() {\n missingPermission = new ArrayList<>();\n // Check for permissions\n for (String eachPermission : REQUIRED_PERMISSION_LIST) {\n if (ContextCompat.checkSelfPermission(this, eachPermission) != PackageManager.PERMISSION_GRANTED) {\n missingPermission.add(eachPermission);\n }\n }\n // Request for missing permissions\n if (missingPermission.isEmpty()) {\n DroneModel.getInstance(this).setDjiProductStateCallBack(this);\n DroneModel.getInstance(this).startSDKRegistration();\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n ActivityCompat.requestPermissions(this,\n missingPermission.toArray(new String[missingPermission.size()]),\n REQUEST_PERMISSION_CODE);\n }\n }", "@NonNull\n Set<String> getGrantedPermissions(@NonNull String packageName, @UserIdInt int userId);", "int getPermissionRead();", "void checkPermission(T request) throws AuthorizationException;", "@Override\n public Collection<WegasPermission> getRequieredUpdatePermission(RequestContext context) {\n return this.getState().getRequieredUpdatePermission(context);\n }", "@Override\r\n\tpublic List<Permission> queryPermissionsByUsers(User dbUser) {\n\t\treturn permissionDao.queryPermissionsByUsers(dbUser);\r\n\t}", "private void requestPermissions() {\n mWaiting4Permission = Boolean.TRUE;\n\n ActivityCompat.requestPermissions(this, permissionsToAsk(), PERMISSIONS_REQUEST_CODE);\n }", "private void checkPermissions() {\n List<String> permissions = new ArrayList<>();\n String message = \"osmdroid permissions:\";\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.ACCESS_FINE_LOCATION);\n message += \"\\nLocation to show user location.\";\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);\n message += \"\\nStorage access to store map tiles.\";\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.READ_PHONE_STATE);\n message += \"\\n access to read phone state.\";\n //requestReadPhoneStatePermission();\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECEIVE_SMS) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.RECEIVE_SMS);\n message += \"\\n access to receive sms.\";\n //requestReadPhoneStatePermission();\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.GET_ACCOUNTS) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.GET_ACCOUNTS);\n message += \"\\n access to read sms.\";\n //requestReadPhoneStatePermission();\n }\n if (!permissions.isEmpty()) {\n // Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n String[] params = permissions.toArray(new String[permissions.size()]);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(params, REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n } // else: We already have permissions, so handle as normal\n }", "@Override\n\tpublic String checkPermision(String user, String userType) {\n\t\treturn null;\n\t}", "public void OnConfHostRequest(BoUserInfoBase user, int permission);", "protected void setPermissions(){\n //Set permissions\n //READ_PHONE_STATE\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED\n ) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.RECORD_AUDIO)) {\n //Show an explanation to the user *asynchronously* -- don't block\n //this thread waiting for the user's response! After the user\n //sees the explanation, request the permission again.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.RECORD_AUDIO,Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA,Manifest.permission.READ_PHONE_STATE},\n GET_PERMISSION);\n } else {\n //No explanation needed, we can request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.RECORD_AUDIO,Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA,Manifest.permission.READ_PHONE_STATE},\n GET_PERMISSION);\n\n //MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n //app-defined int constant. The callback method gets the\n //result of the request.\n }\n }\n }", "@Path(\"{uid}/\")\n @GET\n @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n public Permissions getPermissions(@PathParam(\"uid\") Long uid) {\n try (Connection cn = catalogue.getConnection()) {\n LogicalData res = catalogue.getLogicalDataByUid(uid, cn);\n if (res == null) {\n throw new WebApplicationException(Response.Status.NOT_FOUND);\n }\n MyPrincipal mp = (MyPrincipal) request.getAttribute(\"myprincipal\");\n Permissions p = catalogue.getPermissions(uid, res.getOwner(), cn);\n if (!mp.canRead(p)) {\n throw new WebApplicationException(Response.Status.UNAUTHORIZED);\n }\n return p;\n } catch (SQLException ex) {\n Logger.getLogger(PermissionsResource.class.getName()).log(Level.SEVERE, null, ex);\n throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);\n }\n }", "@Override\n public void checkPermission(Permission perm) {\n }", "@Override\n public void onDenied(Context context, ArrayList<String> deniedPermissions) {\n getPermissions();\n }", "public List<Permission> getPermissions(String objectId) throws UserManagementException;", "private void checkRunTimePermission() {\n\n if(checkPermission()){\n\n Toast.makeText(MainActivity.this, \"All Permissions Granted Successfully\", Toast.LENGTH_LONG).show();\n\n }\n else {\n\n requestPermission();\n }\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\tString path = request.getRequestURI();\r\n\t\tString[] parts = path.split(\"/\");\r\n\t\tm.setMessage(\"The requested access is not permitted\");\r\n\t\tstatus = 401;\r\n\r\n\t\tSystem.out.println(\"User requested \" + Integer.parseInt(parts[3]));\r\n\t\tHttpSession session = request.getSession();\r\n\t\tPrintWriter pw = response.getWriter();\r\n\t\tUser currentUser = (User) session.getAttribute(\"currentUser\");\r\n\r\n\t\tif (currentUser != null) {\r\n\t\t\tUser userRequested = UserService.findUserByID(currentUser.getUserId(), Integer.parseInt(parts[3]),\r\n\t\t\t\t\tcurrentUser.getRole().getRoleId());\r\n\r\n\t\t\tif (userRequested != null) {\r\n\t\t\t\tpw.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(userRequested));\r\n\t\t\t\tstatus = 200;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tpw.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(m));\r\n\t\t}\r\n\t\tresponse.setStatus(status);\r\n\r\n\t}", "@PackageManager.PermissionFlags\n @RequiresPermission(anyOf = {\n android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS,\n android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS,\n android.Manifest.permission.GET_RUNTIME_PERMISSIONS\n })\n //@SystemApi\n public int getPermissionFlags(@NonNull String packageName, @NonNull String permissionName,\n @NonNull UserHandle user) {\n try {\n return mPermissionManager.getPermissionFlags(packageName, permissionName,\n user.getIdentifier());\n } catch (RemoteException e) {\n throw e.rethrowFromSystemServer();\n }\n }", "private void dynamicPermission() {\n if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) {\n Log.i(\"MainActivity\", \"android sdk <= 28 Q\");\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n String[] strings =\n {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION};\n ActivityCompat.requestPermissions(this, strings, 1);\n }\n } else {\n // Dynamically apply for required permissions if the API level is greater than 28. The android.permission.ACCESS_BACKGROUND_LOCATION permission is required.\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,\n \"android.permission.ACCESS_BACKGROUND_LOCATION\") != PackageManager.PERMISSION_GRANTED) {\n String[] strings = {android.Manifest.permission.ACCESS_FINE_LOCATION,\n android.Manifest.permission.ACCESS_COARSE_LOCATION,\n \"android.permission.ACCESS_BACKGROUND_LOCATION\"};\n ActivityCompat.requestPermissions(this, strings, 2);\n }\n }\n }", "@CrossOrigin()\n @ResponseBody()\n @GetMapping(\"/godojo/user-permissions\" ) // user id param not needed because we have user jwt anyhow\n public PermissionsDTO userPermissions(\n @RequestHeader(\"X-User-Info\") String user_jwt) {\n\n User the_user = this.user_factory.createUser(user_jwt);\n\n return new PermissionsDTO(the_user);\n }", "public interface PermissionHandlerConstants {\n\n //Permissions code\n public static final int STORAGE_PERMISSION_CODE = 1;\n public static final int CAMERA_PERMISSION_CODE = 2;\n public static final int ACCOUNTS_PERMISSION_CODE = 3;\n public static final int STORAGE_CAMERA_PERMISSION_CODE = 4; //ONE CODE CAN BE USED TO REQUEST MULTIPLE PERMISSIONS\n public static final int READ_CALENDAR_PERMISSION_CODE = 5;\n public static final int WRITE_CALENDAR_PERMISSION_CODE = 6;\n public static final int READ_CONTACTS_PERMISSION_CODE = 7;\n public static final int WRITE_CONTACTS_PERMISSION_CODE = 8;\n public static final int FINE_LOCATION_PERMISSION_CODE = 9;\n public static final int COURSE_LOCATION_PERMISSION_CODE = 10;\n public static final int RECORD_AUDIO_PERMISSION_CODE = 11;\n public static final int READ_PHONE_STATE_PERMISSION_CODE = 12;\n public static final int CALL_PHONE_PERMISSION_CODE = 13;\n public static final int READ_CALL_LOG_PERMISSION_CODE = 14;\n public static final int WRITE_CALL_LOG_PERMISSION_CODE = 15;\n public static final int ADD_VOICEMAIL_PERMISSION_CODE = 16;\n public static final int USE_SIP_PERMISSION_CODE = 17;\n public static final int PROCESS_OUTGOING_CALLS_PERMISSION_CODE = 18;\n public static final int BODY_SENSORS_PERMISSION_CODE = 19;\n public static final int SEND_SMS_PERMISSION_CODE = 20;\n public static final int RECEIVE_SMS_PERMISSION_CODE = 21;\n public static final int READ_SMS_PERMISSION_CODE = 22;\n public static final int RECEIVE_WAP_PUSH_PERMISSION_CODE = 23;\n public static final int RECEIVE_MMS_PERMISSION_CODE = 24;\n //*******************************************************************\n}", "@Override\n\t\tfinal public FREObject call(FREContext context, FREObject[] args) {\n\t\t\ttry {\n\t\t\t\tif (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {\n\t\t\t\t\tActivity act = context.getActivity();\n\t\t\t\t\tact.overridePendingTransition(0,0);\n\t\t\t\t\t\n\t\t\t\t\tfinal FREArray array = (FREArray) args[0];\n\t\t\t\t\tfinal int lng = (int) array.getLength();\n\t\t\t\t final String[] permissions = new String[(int) array.getLength()];\n\t\t\t\t \n\t\t\t\t for (int i = 0; i < lng; i += 1) {\n\t\t\t\t \tString permission = array.getObjectAt(i).getAsString();\n\t\t\t\t \tif(permission != null) permissions[i] = permission;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t if(PermissionsExtension.VERBOSE > 0) Log.d(PermissionsExtension.TAG, \"Checking permissions: \"+ permissions);\n\t\t\t\t \n\t\t\t\t\tfinal Intent intent = new Intent(act, PermissionsRequestActivity.class);\n\t\t\t\t\tintent.putExtra(\"permissions\", permissions);\n\t\t\t\t\tact.startActivity(intent);\n\t\t\t\t\t\n\t\t\t\t\tact.overridePendingTransition(0,0);\n\t\t\t\t\t\n\t\t\t\t\treturn FREObject.newObject(true); //true means that we should wait for callback on AS3 side\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn FREObject.newObject(false); //false means that we can continue without waiting for callback\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "UserPermissionsType createUserPermissionsType();", "@Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n // switch chooses appropriate action based on which feature requested permission\n switch (requestCode) {\n case MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"onRequestPermissionsResult: PackageManager.PERMISSION_GRANTED\");\n // when user first time grants the permissions, these lines get executed\n Glide\n .with(getActivity())\n .load(selectedImageUri)\n .apply(RequestOptions.circleCropTransform())\n .into(addProfileImage);\n\n profile.setProfileImageUri(selectedImageUri);\n\n } else {\n Toast.makeText(getActivity(), \"Get read permission denied\", Toast.LENGTH_SHORT).show();\n }\n break;\n default:\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }\n }", "private void askForPermission(){\n if (ContextCompat.checkSelfPermission(MainActivity.this,\n Manifest.permission.ACCESS_NOTIFICATION_POLICY)\n != PackageManager.PERMISSION_GRANTED) {\n Log.i(TAG,\"don't have permission\");\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this,\n Manifest.permission.ACCESS_NOTIFICATION_POLICY)) {\n Log.i(TAG,\"Asking for permission with explanation\");\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_NOTIFICATION_POLICY},\n MY_PERMISSIONS_MODIFY_AUDIO_SETTINGS);\n\n } else {\n Log.i(TAG,\"Asking for permission without explanation\");\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_NOTIFICATION_POLICY},\n MY_PERMISSIONS_MODIFY_AUDIO_SETTINGS);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n Log.i(TAG,\"Already had permission\");\n }\n\n }", "java.util.List<java.lang.String>\n getPermissionsList();", "private void RequestMultiplePermission()\n {\n /**\n * Creating String Array with Permissions.\n */\n ActivityCompat.requestPermissions(FamilyMemberActivity.this, new String[]\n {\n CAMERA,\n WRITE_EXTERNAL_STORAGE,\n READ_EXTERNAL_STORAGE\n }, PERMISSION_REQUEST_CODE);\n\n }", "private boolean permisos() {\n for(String permission : PERMISSION_REQUIRED) {\n if(ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n switch (requestCode) {\n case 1: {\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n\n } else {\n }\n return;\n }\n }\n }", "public List<String> getUserPermissions(String login) throws IOException;", "public Enumeration permissions();", "public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)\n {\n if (requestCode == CAMERA_PERMISSIONS_REQUEST)\n {\n Log.i(TAG, \"Received Response For Camera Permission Request\");\n\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED)\n {\n Log.i(TAG, \"Permission Granted\");\n Intent intent = new Intent(RuntimePermissionActivity.this, PermissionGrantedActivity.class);\n startActivity(intent);\n }\n else\n {\n if (Build.VERSION.SDK_INT >= 23)\n {\n //********************* FIRST WAY ********************\n /*\n * showRationale = false If permission is denied (and never ask again is checked), otherwise true\n * shouldShowRequestPermissionRationale will return false if user clicks Never Ask Again, otherwise true\n */\n boolean showRationale = shouldShowRequestPermissionRationale(Manifest.permission.CAMERA);\n if (showRationale)\n {\n Log.i(TAG, \"Permission Denied\");\n permissionUtils.dialogWhenDenied();\n }\n else\n {\n Log.i(TAG, \"Never Ask Again With Checked\");\n permissionUtils.dialogWhenNeverAskAgain();\n }\n\n\n //********************* OR SECOND WAY ********************\n /*if (ActivityCompat.shouldShowRequestPermissionRationale(RuntimePermissionActivity.this, Manifest.permission.CAMERA))\n {\n Log.i(TAG, \"Permission Denied\");\n permissionUtils.dialogWhenDenied();\n }\n else\n {\n Log.i(TAG, \"Never Ask Again With Checked\");\n permissionUtils.dialogWhenDenied();\n }*/\n\n }\n }\n }\n else\n {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }\n }", "private void checkAndRequestForPermission() {\n if(ContextCompat.checkSelfPermission(RegisterActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(RegisterActivity.this,\n Manifest.permission.READ_EXTERNAL_STORAGE)){\n Toast.makeText(RegisterActivity.this, \"Please accept for required permission\",\n Toast.LENGTH_SHORT).show();\n }\n else{\n ActivityCompat.requestPermissions(RegisterActivity.this,\n new String []{Manifest.permission.READ_EXTERNAL_STORAGE},PReqCode);\n }\n }\n else{\n openGallery();\n }\n }", "protected String[] getRequiredPermissions() {\n return REQUIRED_PERMISSIONS;\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode) {\n case Utility.MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE:\n if(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if(userChoosenTask.equals(\"Take Photo\")) {\n cameraIntent();\n } else if(userChoosenTask.equals(\"Choose from Gallery\")) {\n galleryIntent();\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Denied!\", Toast.LENGTH_SHORT).show();\n }\n break;\n }\n }", "PermissionService getPermissionService();", "private void requestPermissions(){\n Intent intent = new Intent(this.getApplication(), MainActivity.class);\r\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }", "private PermissionHelper() {}", "@Override\n public void onRequestRefuse(String permissionName) {\n }", "@Override\n public void onAction(List<String> permissions) {\n Log.e(TAG, \"permission success\");\n callback.onSuccess(permissions);\n\n }", "private void requestStoragePermission(){\n requestPermissions(storagePermissions, STORAGE_REQUESTED_CODE);\n }", "private void checkPermissions() {\n final ArrayList<String> missedPermissions = new ArrayList<>();\n\n for (final String permission : PERMISSIONS_REQUIRED) {\n if (ActivityCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {\n missedPermissions.add(permission);\n }\n }\n\n if (!missedPermissions.isEmpty()) {\n final String[] permissions = new String[missedPermissions.size()];\n missedPermissions.toArray(permissions);\n\n ActivityCompat.requestPermissions(this, permissions, PERMISSION_REQUEST_CODE);\n }\n }", "public List<Permission> getPermissions()\r\n/* */ {\r\n/* 228 */ return this.permissions;\r\n/* */ }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if (requestCode == READ_SMS_PERMISSIONS_REQUEST) {\n if (grantResults.length == 1 &&\n grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(getApplicationContext(), \"Read SMS permission granted\", Toast.LENGTH_SHORT).show();\n getPermission(Manifest.permission.READ_CONTACTS, getString(R.string.request_read_contact_permission), READ_CONTACTS_PERMISSIONS_REQUEST);\n\n\n } else {\n Toast.makeText(getApplicationContext(), \"Read SMS permission denied :(\", Toast.LENGTH_SHORT).show();\n\n }\n } else if (requestCode == READ_CONTACTS_PERMISSIONS_REQUEST) {\n if (grantResults.length == 1 &&\n grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(getApplicationContext(), \"Read contacts permission granted\", Toast.LENGTH_SHORT).show();\n if (getPermission(Manifest.permission.READ_SMS, getString(R.string.request_read_sms_permission), READ_SMS_PERMISSIONS_REQUEST)) {\n MessageList.refreshFromSMSInbox(getApplicationContext());\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Read contacts permission denied :(\", Toast.LENGTH_SHORT).show();\n }\n } else if (requestCode == READ_PHONE_STATE_PERMISSIONS_REQUEST) {\n if (grantResults.length == 1 &&\n grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(getApplicationContext(), \"Read phone state permission granted\", Toast.LENGTH_SHORT).show();\n if (getPermission(Manifest.permission.READ_PHONE_STATE, getString(R.string.request_read_phone_state_permission), READ_PHONE_STATE_PERMISSIONS_REQUEST)) {\n MessageList.refreshFromSMSInbox(getApplicationContext());\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Read phone state permission denied :(\", Toast.LENGTH_SHORT).show();\n }\n } else {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }\n }", "public void requestPermission() {\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{\n Manifest.permission.CAMERA,\n Manifest.permission.READ_CONTACTS\n }, RequestPermissionCode);\n }", "public Permission getPermission() {\n return permission;\n }", "public List<String> grantpermission() {\n\t\tList<Integer> userids = new ArrayList<>();\n\t\tuserids = crud1.grantPermission();\n\t\tList<String> username = new ArrayList<>();\n\t\tfor (Integer x : userids) {\n\n\t\t\tusername.add(crud1.findById(x).get().getUsername());\n\t\t}\n\t\treturn username;\n\t}", "@Override\n\tpublic Set<String> getPermissions(String username) {\n\t\tSet<String> pers = userDao.getPermissions(username);\n\t\treturn pers;\n\t}", "@Override\n public boolean hasAccessPermission(String user, NamespaceKey key, DatasetConfig datasetConfig) {\n return userPredicate.test(user);\n }", "public List<Permission> getPermissionsPending(String objectId) throws UserManagementException;", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n }", "public void checkPermission() {\n Log.e(\"checkPermission\", \"checkPermission\");\n\n // Here, thisActivity is the current activity\n if (ContextCompat.checkSelfPermission(RegisterActivity.this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(RegisterActivity.this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n ActivityCompat.requestPermissions(RegisterActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_READ_CONTACTS);\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n\n ActivityCompat.requestPermissions(RegisterActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_READ_CONTACTS);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode) {\n case RequestPermissionCode:\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n //Permission was granted\n Log.d(TAG, \"onRequestPermissionsResult: Permission Granted\");\n Toast.makeText(MainActivity.this, \"Permission Granted\", Toast.LENGTH_SHORT).show();\n } else {\n //Permission Denied\n Log.d(TAG, \"onRequestPermissionsResult: Permission Denied\");\n Toast.makeText(MainActivity.this, \"Permission Denied\", Toast.LENGTH_SHORT).show();\n }\n return;\n }\n }", "@ApiModelProperty(required = true, value = \"The remote system permission of the invoking user on the file/folder.\")\n public String getPermissions() {\n return permissions;\n }", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "public int getUserModificationPermission() {\n return permission;\n }", "public java.util.List<org.eclipse.stardust.engine.api.runtime.Permission>\n getPermissions()\n throws org.eclipse.stardust.common.error.WorkflowException;" ]
[ "0.7293788", "0.7121141", "0.6960619", "0.6857262", "0.6766301", "0.6716588", "0.6710104", "0.65183866", "0.64779407", "0.6456909", "0.6429359", "0.64137334", "0.64137334", "0.6402126", "0.6370451", "0.63301337", "0.6324454", "0.6298752", "0.6266905", "0.6262366", "0.619409", "0.6179714", "0.61641544", "0.6145464", "0.61392915", "0.61258966", "0.605619", "0.60477304", "0.60461605", "0.6041489", "0.60151535", "0.60116637", "0.5999534", "0.59818923", "0.59767985", "0.59746736", "0.59587055", "0.59551436", "0.59161365", "0.5915399", "0.5906393", "0.5892473", "0.58904064", "0.58888316", "0.5871756", "0.5866335", "0.58636767", "0.5852686", "0.5836957", "0.5835227", "0.5831178", "0.5831066", "0.582094", "0.58078134", "0.58001363", "0.5784659", "0.577854", "0.57710594", "0.57659334", "0.5744865", "0.5740246", "0.5706904", "0.5706298", "0.5705747", "0.5698749", "0.56871456", "0.5686999", "0.56830627", "0.56829804", "0.5660564", "0.565496", "0.5652079", "0.56462216", "0.5632301", "0.56306976", "0.5629365", "0.56094867", "0.5607726", "0.56029814", "0.56029177", "0.5594659", "0.5593321", "0.5592577", "0.55900776", "0.55588824", "0.55499643", "0.5542777", "0.5540241", "0.553985", "0.5534633", "0.5532783", "0.5527298", "0.55206275", "0.55196005", "0.5513655", "0.55123985", "0.55115265", "0.55054706", "0.5502748", "0.549865", "0.5496185" ]
0.0
-1
Empty Board has zero score:
@Test public void testBasicScorer() { assertEquals(0, stateScorer.scoreState(builder().build(), TwoPlayerKey.PLAYER_1)); //The other player has won if they occupy every node on the board: assertEquals(-1, stateScorer.scoreState(builder().allOccupiedBy(TwoPlayerKey.PLAYER_2).build(), TwoPlayerKey.PLAYER_1)); //I have won if I occupy every node on the board: assertEquals(1, stateScorer.scoreState(builder().allOccupiedBy(TwoPlayerKey.PLAYER_1).build(), TwoPlayerKey.PLAYER_1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double getEmtpyScore(Game2048Board board) {\n double empty = 0;\n if (board.getEmptyTiles().size() < 4) {\n empty = (4 - board.getEmptyTiles().size());\n }\n return empty;\n }", "@Test\n public void emptyBoard() {\n Board b = new Board();\n for (int c = 0; c < b.SIZE; c += 1) {\n for (int r = 0; r < b.SIZE; r += 1) {\n assertEquals(EMPTY, b.get(c, r));\n }\n }\n }", "public boolean isEmpty()\n {\n return scores.isEmpty();\n }", "@Test\n\tpublic void testblankBoard() {\n\t\tGameState test = new GameState();\n\t\ttest.blankBoard();\n\t\tfor (int x = 0; x < 25; x++) {\n\t\t\tassertTrue(!test.state()[x]);\n\t\t}\n\t}", "private static float computeEmptyCellScore(GameModel model) {\n\n int numEmptyCells = 0;\n for (byte b : model.getGrid()) {\n if (b < 0) {\n numEmptyCells++;\n }\n }\n return 1 << numEmptyCells;\n }", "@Test\n public void zero() {\n \n BowlingGame bowlinggame = new BowlingGame();\n \n bowlinggame.getScore();\n assertEquals(0, bowlinggame.getScore());\n \n }", "public boolean isBoardFull() {\r\n\r\n\t\t\r\n for (int i = 0; i < boardsize; i++) \r\n {\r\n for (int j = 0; j < boardsize; j++) \r\n {\r\n if (board[i][j] == -1) \r\n {\r\n return false;\r\n }\r\n }\r\n }\r\n\t\t\r\n return true;\r\n }", "private boolean isBoardFilled() {\n for (char[] y : board) {\n for (char xy : y) {\n if (xy == 0) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean isFullBoard() {\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n if(board[x][y]==0) {\n return false;\n }\n }\n }\n return true;\n }", "public int evaluate(PentagoBoardState pbs) {\n PentagoBoardState.Piece[][] pieces = pbs.getBoard();\n\n\n int whitescore =0; //keep track of white's total score\n int blackscore = 0;//keep track of black's total score\n\n //Check rows\n for (int x = 0; x <6 ; x++) {\n int countWHori = 0;\n int countBHori = 0;\n\n int blacks = 0;\n int whites = 0;\n\n\n for (int y = 0; y <5 ; y++) {\n //Count how many black and white pieces\n if (pieces[x][y].ordinal() == 0 ) {\n\n //countBHori = countBHori + countvalue;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1) {\n\n //countWHori = countWHori +countvalue;\n whites++;\n }\n\n //Check for consecutive\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 0 ) {\n\n countBHori = countBHori +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 2 ) {\n\n countBHori = countBHori + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x][y+1].ordinal() == 0 ) {\n\n countBHori = countBHori + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 1 ) {\n\n countWHori = countWHori +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 2 ) {\n\n countWHori = countWHori + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x][y+1].ordinal() == 1 ) {\n\n countWHori = countWHori + blankspaceconsec;\n }\n\n //Check for disjoint and joint set If * B B W * * then disjoint and * B B * B * Then joint set for B * B\n if (y!=4){\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 0 && pieces[x][y+2].ordinal() == 1){\n countBHori = countBHori +disjointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 1 && pieces[x][y+2].ordinal() == 0){\n countWHori = countWHori +disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 2 && pieces[x][y+2].ordinal() == 0){\n countBHori = countBHori +jointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 2 && pieces[x][y+2].ordinal() == 1){\n countWHori = countWHori +jointset;\n }\n }\n }\n //check if unwinnable\n if (blacks == 4 && whites==2){\n countBHori += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWHori += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countWHori += unwinnable;\n countBHori += unwinnable;\n }\n\n\n //Run value for row in evaluation scheme and add to total score\n int valuew = consecutivevalue(countWHori);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBHori);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec hori \" + valueb + \"White consec hori \" + valuew);\n\n }\n\n //Check Verticals\n for (int y = 0; y <6 ; y++) {\n int countWvert = 0;\n int countBvert = 0;\n int blacks = 0;\n int whites = 0;\n\n\n for (int x = 0; x <5 ; x++) {\n if (pieces[x][y].ordinal() == 0) {\n\n //countBvert = countBvert +1;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1) {\n\n //countWvert = countWvert +1;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 0 ) {\n\n countBvert = countBvert +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 2 ) {\n\n countBvert = countBvert + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 0 ) {\n\n countBvert = countBvert + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 1 ) {\n\n countWvert = countWvert +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 2 ) {\n\n countWvert = countWvert + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 1 ) {\n\n countWvert = countWvert + blankspaceconsec;\n }\n\n if (x!=4){\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 1){\n countBvert = countBvert +disjointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 0){\n countWvert = countWvert +disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 0){\n countBvert = countBvert +jointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 1){\n countWvert = countWvert +jointset;\n }\n }\n }\n\n if (blacks == 4 && whites==2){\n countBvert += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBvert += unwinnable;\n countWvert += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWvert += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBvert + \"White consec \" + countWvert);\n int valuew = consecutivevalue(countWvert);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBvert);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec VERT \" + valueb + \"White consec hori \" + valuew);\n }\n\n //S West N EAST Top\n for (int a = 1; a <6 ; a++) { //loop through all diagonal lines\n int countWdiagSoNe = 0;\n int countBdiagSoNe = 0;\n int x=0;\n int blacks = 0;\n int whites = 0;\n\n\n for (int y = a; y !=0 ; y--) { //loop through one diagonal line\n\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y-1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n\n //countBdiagSoNe = countBdiagSoNe +2;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1 ) {\n\n //countWdiagSoNe = countWdiagSoNe +2;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n // check for joint and disjoint set at these x y coordinates by looking 2 pieces ahead\n if (x==0 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==1 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==0 && y==5){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==1 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==3 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n\n x++;\n\n\n }\n if (blacks == 4 && whites==2){\n countBdiagSoNe += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBdiagSoNe += unwinnable;\n countWdiagSoNe += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n if (a==4 && blacks == 4 && whites==1){\n countBdiagSoNe += unwinnable;\n }\n if (a==4 && blacks == 1 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagSoNe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBdiagSoNe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagSoNe + \"White consec hori \" + valuew + \" \" + countWdiagSoNe);\n }\n //S West N EAST Bot\n for (int a = 1; a <5 ; a++) {\n int countWdiagSoNe = 0;\n int countBdiagSoNe = 0;\n int y=5;\n int blacks = 0;\n int whites = 0;\n\n for (int x = a; x <5 ; x++) {\n\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y-1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n\n //countBdiagSoNe = countBdiagSoNe +\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1 ) {\n\n //countWdiagSoNe = countWdiagSoNe +2;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n if (x==1 && y==5){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==3 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n //System.out.println(x + \" y:\" + y +\" Black consec DIAGOMAAL \" + countBdiagSoNe + \"White consec hori \" + countWdiagSoNe);\n y--;\n\n\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagSoNe += unwinnable;\n }\n /*if (blacks == 3 && whites==3){\n countBdiagSoNe += unwinnable;\n countWdiagSoNe += unwinnable;\n }*/\n if (a==1&& blacks == 1 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagSoNe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBdiagSoNe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagSoNe + \"White consec hori \" + valuew + \" \" + countWdiagSoNe);\n }\n\n //NorthWest S EAST Left\n for (int a = 0; a <5 ; a++) {\n int countWdiagNoSe = 0;\n int countBdiagNoSe = 0;\n int y=0;\n int blacks = 0;\n int whites = 0;\n\n for (int x = a; x <5 ; x++) {\n //System.out.println(pbs+\"x \" + x+ \" y \" +y);\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y+1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n blacks++;\n //countBdiagNoSe = countBdiagNoSe +2;\n }\n if (pieces[x][y].ordinal() == 1) {\n whites++;\n //countWdiagNoSe = countWdiagNoSe +2;\n }\n\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countWdiagNoSe= countWdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe + blankspaceconsec;\n }\n\n if (x==0 && y==0){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==3 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==0){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==3 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n y++;\n\n\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n if (blacks == 4 && whites==2){\n countBdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagNoSe += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBdiagNoSe += unwinnable;\n countWdiagNoSe += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 1 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n\n int valuew = consecutivevalue(countWdiagNoSe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue( countBdiagNoSe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagNoSe + \"White consec hori \" + valuew + \" \" + countWdiagNoSe);\n }\n //NorthWest S EAST Right\n for (int a = 1; a <5 ; a++) {\n int countWdiagNoSe = 0;\n int countBdiagNoSe = 0;\n int x=0;\n int blacks = 0;\n int whites = 0;\n\n for (int y = a; y <5 ; y++) {\n //System.out.println(\"x \" + x+ \" y \" +y);\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y+1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0 ) {\n blacks++;\n //countBdiagNoSe = countBdiagNoSe +2;\n }\n if (pieces[x][y].ordinal() == 1) {\n whites++;\n //countWdiagNoSe = countWdiagNoSe +2;\n }\n\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countWdiagNoSe= countWdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe + blankspaceconsec;\n }\n\n if (x==0 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n x++;\n\n\n }\n if (a==1 && blacks == 1 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagNoSe += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagNoSe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue( countBdiagNoSe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagNoSe + \"White consec hori \" + valuew + \" \" + countWdiagNoSe);\n }\n\n\n\n\n\n //System.out.println(\"Black consec score \" + blackscore +\" \" + \"White consec scpre \" + whitescore);\n //System.out.println(\"max player is \" + maxplayer + \"My colour is \" + mycolour);\n int i = -123456789;\n if (mycolour == 0){\n //System.out.println(blackscore-whitescore +\" I am black\");\n\n\n i= blackscore-whitescore;\n return i;\n\n }\n else {\n //System.out.println(whitescore-blackscore +\" I am white\");\n i= whitescore-blackscore;\n return i;\n }\n /*\n if(i>0 && i<1000){\n return 100; //i*2;\n }\n else if(i>=1000 && i<10000){\n return 1000; //i*10;\n }\n else if(i>=10000 && i<100000){\n return 10000; //i*50;\n }\n else if(i>=100000){\n return 100000;//i*500;\n }\n else if(i<=0 && i>-100){\n return -100; //i*2;\n }\n else if(i<=-100 && i>-1000){\n return -1000; //i*10;\n }\n else if(i<=-1000 && i>-10000){\n return -10000; //i*50;\n }\n else if(i<=0 && i>-100000){\n return -100000;//i*500;\n }\n\n */\n\n\n }", "private boolean isBoardEmpty() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n if (board[i][j].equals(\" \"))\n return false;\n }\n }\n return true;\n }", "private boolean full(Board board)\n {\n for (int i = 0; i < size; i++)\n for (int j = 0; j < size; j++)\n if (board.array[i][j] == EMPTY)\n return false;\n return true;\n }", "public boolean isFull(){\r\n\t\tfor(int i = 0; i < boardSize; i++){\r\n\t\t\tif(board[i] == Box.EMPTY){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public int countEmptyCells()\n\t{\n\t\tint count = 0;\n\t\tfor(int i=0;i<this.numberOfRows;i+=1)\n\t\t{\n\t\t\tfor(int j=0;j<this.numberOfColumns;j+=1)\n\t\t\t{\n\t\t\t\tif(this.board[i][j].value==0)\n\t\t\t\t{\n\t\t\t\t\tcount+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public static boolean isFull() {\n return (board[0][0] > 0 && board[0][1] > 0 && board[0][2] > 0\n && board[1][0] > 0 && board[1][1] > 0 && board[1][2] > 0\n && board[2][0] > 0 && board[2][1] > 0 && board[2][2] > 0\n && board[0][0] > 0 && board[1][0] > 0 && board[2][0] > 0\n && board[0][1] > 0 && board[1][1] > 0 && board[2][1] > 0\n && board[0][2] > 0 && board[1][2] > 0 && board[2][2] > 0\n && board[0][0] > 0 && board[1][1] > 0 && board[2][2] > 0\n && board[0][2] > 0 && board[1][1] > 0 && board[2][0] > 0);\n }", "Board() {\n clear();\n }", "Board() {\n clear();\n }", "private boolean isBoardFull() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n if (boardState[i][j] != 'X' && boardState[i][j] != 'O') {\n return false; \n }\n }\n }\n return true; \n }", "public static boolean fullBoard(){\r\n if(numTurns==42){\r\n return true; //determines if the outcome of the game is a draw\r\n }\r\n return false;\r\n }", "@Override\n\tpublic boolean boardIsfull() {\n\t\treturn _columnFull.size() == _columnCount;\n\t}", "private static int evaluateBoard(final int[][] givenBoard) {\n final int[][] board = cloneBoard(givenBoard);\n\n final int numRows = givenBoard.length;\n final int numCols = givenBoard[0].length;\n\n \n // If the game is complete\n if (!Utils.hasMove(board)) {\n // Find largest absolute move value for player and opponent\n int playerScore = 0;\n int opponentScore = 0;\n for (final int[] row : board) {\n for (final int val : row) {\n if (val > playerScore) playerScore = val;\n if (val < opponentScore) opponentScore = val;\n } \n }\n // Give a big reward + the ammount we won the game by\n return WIN_REWARD + playerScore + opponentScore;\n }\n boardsEvaluated++;\n\n \n // If the game is incomplete, return the diference between the average \n // distance that the player and opponent are from each empty square\n int[][] playerDistances = distanceGrid(board);\n int[][] opponentDistances = distanceGrid(flipBoard(board));\n \n int totalPlayerDistance = 0;\n int totalOpponentDistance = 0;\n \n int maxPlayerDistance = 0;\n int maxOpponentDistance = 0;\n \n \n int largestPlayerMove = 0;\n int smallestOpponentMove = 0;\n \n int numEmptySpaces = 0;\n \n for (int r = 0; r < numRows; r++) {\n for (int c = 0; c < numCols; c++) {\n if (playerDistances[r][c] > 0) {\n totalPlayerDistance += playerDistances[r][c];\n numEmptySpaces++;\n }\n if (opponentDistances[r][c] > 0) {\n totalOpponentDistance += opponentDistances[r][c];\n }\n \n int boardVal = board[r][c];\n if (largestPlayerMove < boardVal) largestPlayerMove = boardVal;\n if (smallestOpponentMove > boardVal) smallestOpponentMove = boardVal;\n \n } \n }\n int averageDistanceDifference = totalOpponentDistance - totalPlayerDistance;\n\n int largestMoveDifference = largestPlayerMove + smallestOpponentMove;\n\n\n return averageDistanceDifference + largestMoveDifference;\n }", "public static boolean isBoardFull() {\n\t\treturn spacesLeft == 0;\n\t}", "public boolean checkBoardFull() {\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (grid[i][j].getSymbol() == '-')\n return false;\n }\n }\n return true;\n }", "private void deadvance() {\n if (currColumn == 0) {\n if (currRow != 0) {\n currColumn = 8;\n currRow--;\n }\n } else {\n currColumn--;\n }\n if (!(currRow == 0 && currColumn == 0)) {\n if (startingBoard[currRow][currColumn] != 0) {\n deadvance();\n }\n }\n }", "public static int minimumNumberOfBlackWallsOnBoard()\n {\n return 0;\n }", "@Override\n public boolean gameOver() {\n //true if the board full or a winner has been found\n return getWinner() != EMPTY || isBoardFull();\n }", "public boolean isBoardFull() {\n\t\t// REPLACE NEXT LINE WITH YOUR IMPLEMENTATION\n\t\tint boardSize = getBoardSize();\n\t\t\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t\n\t\t\t\tif (isSpotBlank(i,j)) {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "private static float computeScore(GameModel model) {\n\n float score = 0;\n int numEmptyCells = 0;\n for (byte b : model.getGrid()) {\n if (b < 0) {\n numEmptyCells++;\n } else {\n score += 1 << b;\n }\n }\n return score * (1 + numEmptyCells * EMPTY_CELL_SCORE_BONUS);\n }", "@Override\n public boolean isBoardFull() {\n //assume board is full\n boolean isFull = true;\n\n int i = 0;\n try {\n //if a column is not full => the board is not full and the loop ends\n while (isFull && i < NUM_COLS) {\n isFull = isColumnFull(i);\n i++;\n }\n } catch (IllegalColumnException e) {\n System.out.println(e + \" in MyGameState.java Method isBoardFull\");\n }\n\n return isFull;\n }", "public void setScoreZero() {\n this.points = 10000;\n }", "public boolean isFull() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (getBoard()[i][j] == null)\n return false;\n }\n }\n return true;\n }", "@Test\n public void test15() { \n Board board15 = new Board();\n board15.put(1,3,1);\n \n assertFalse(board15.isEmpty(1,3));\n }", "public int countEmptyCellInOriginalSudoku()\n\t{\n\t\treturn ((BoardIndividual)getBest()).countEmptyCellInOriginalSudoku();\n\t}", "@Override\r\n\t\t\tpublic boolean isFull() {\r\n\t\t\t\tfor(int row = 0; row +1< 6; row++) {\r\n\t\t\t\t\tfor(int col = 0; col < 7; col++) {\r\n\t\t\t\t\t\tString brick = board[row][col].getText().trim();\r\n\t\t\t\t\t\tif(brick.isEmpty()){\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}", "private void initializeBoard(){\r\n checks =new int[][]{{0,2,0,2,0,2,0,2},\r\n {2,0,2,0,2,0,2,0},\r\n {0,2,0,2,0,2,0,2},\r\n {0,0,0,0,0,0,0,0},\r\n {0,0,0,0,0,0,0,0},\r\n {1,0,1,0,1,0,1,0},\r\n {0,1,0,1,0,1,0,1},\r\n {1,0,1,0,1,0,1,0}};\r\n }", "public GameBoard(){\r\n\t\tboard = new Box[boardSize];\r\n\t\tfor(int i = 0; i < boardSize; i++){\r\n\t\t\tboard[i] = Box.EMPTY;\r\n\t\t}\r\n\t}", "public static SquareBoard getEmptyBoard() {\n\n\t\tSquareBoard emptyBoard = new SquareBoard(BOARD_SIZE);\n\t\t\n\t\treturn emptyBoard;\n\t}", "public void printBoard(){\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] == 0){\n System.out.print(\"0 \");\n }else{\n System.out.print(currentBoardState[i][j] + \" \");\n }\n }\n System.out.println();\n }\n }", "public Board()\n\t{\n\t\tcols = DEFAULT_WIDTH;\n\t\trows = DEFAULT_HEIGHT;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = -1;\n\t\t}\n\t}", "private boolean boardIsFull() {\n int numberOfFieldsOnBoard = boardSize * boardSize;\n return (numberOfFieldsOnBoard == this.numberOfOccupiedFields);\n }", "@Test\r\n public void calculateScore() {\r\n board3.swapTiles(0,0,1,1);\r\n board3.getSlidingScoreBoard().setTime(2);\r\n board3.getSlidingScoreBoard().calculateScore();\r\n assertEquals(496, board3.getSlidingScoreBoard().getScore());\r\n }", "public Board() {\n\t\tthis.myBoard = new BlockFor2048[4][4];\n\t\tint randomInserted = 0;\n\t\tint colInd = 0;\n\t\tint rowInd = 0;\n\t\twhile (randomInserted != 2){\n\t\t\tcolInd = (int)(Math.random() * 4);\n\t\t\trowInd = (int)(Math.random() * 4);\n\t\t\tif (this.myBoard[colInd][rowInd] == null){\n\t\t\t\tthis.myBoard[colInd][rowInd] = new BlockFor2048(2);\n\t\t\t\trandomInserted++;\n\t\t\t}\n\t\t}\t\t\n\t\tthis.ScoreValue = 0;\n\t}", "public int updateBoard() {\n clearTemporaryData();\n setUsedValuesbyRow();\n setUsedValuesByColumns();\n setUsedValueInBoxes();\n findUniqueInBoxes();\n updateValues();\n\n return numbers.stream()\n .filter(n -> n.getValue() == 0)\n .collect(Collectors.toList()).size();\n }", "boolean checkTie(){\n for (int aGameBoard : gameBoard){\n if (aGameBoard == 0)\n return false;\n }\n return true;\n }", "public boolean solved()\n\t{\n\t\tfor(int row = 0; row < board.length; row++)\n\t\t{\n\t\t\tfor(int col = 0; col < board.length; col++)\n\t\t\t{\n\t\t\t\tif(board[row][col] == 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean full()\n {\n // Check whether every column is full one by one\n for (int col = 0; col < COLUMNS; col++ )\n {\n // If a column is not full, the check failed\n if (chessBoard[0][col] == 0)\n {\n return false;\n }\n }\n // If all columns are full, the check passes\n return true;\n }", "@Test\n\tpublic void verifyNoValidMoves() {\n\t\tBoard board = boardFactory.fromTextGenerateBoard(\"/boards/NoMoves.txt\", mockGroup);\n\t\tassertTrue(board.outOfMoves());\n\n\t}", "private static int countNonEmptyBoxes(short[][] puzzle) {\r\n\t\tint count = 0;\r\n\t\tfor(int y = 0; y < puzzle.length; y++){\r\n\t\t\tfor(int x = 0; x < puzzle[0].length;x++){\r\n\t\t\t\t\r\n\t\t\t\tif(puzzle[y][x]!=0)\r\n\t\t\t\t\tcount++;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "@Override\r\n\tpublic boolean gameOver() {\r\n\t\t// the game might be over only if the freecells is zero\r\n\t\tif(freeCells == 0) {\r\n\t\t\t// checks if there is any possible move\r\n\t\t\treturn !((new Board2048model(this)).moveUP() || (new Board2048model(this)).moveDOWN()\r\n\t\t\t\t\t|| (new Board2048model(this)).moveLEFT() || (new Board2048model(this)).moveRIGHT());\r\n\t\t}\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}", "public static int minimumNumberOfWhiteWallsOnBoard()\n {\n return 0;\n }", "private boolean isEmpty(Point pos){\r\n Cells aux = model.getValueAt(pos);\r\n return (aux == Cells.BLACK_FLOOR);\r\n }", "public void solve() {\n\t\tArrayList<Piece> pieceListBySize = new ArrayList<Piece>(pieceList);\n\t\tCollections.sort(pieceListBySize);\t// This is done since the order\n\t\t\t\t\t\t\t\t\t\t\t// of piece placements does not matter.\n\t\t\t\t\t\t\t\t\t\t\t// Placing larger pieces down first lets\n\t\t\t\t\t\t\t\t\t\t\t// pruning occur sooner.\n\t\t\n\t\t/**\n\t\t * Calculates number of resets needed for a game board.\n\t\t * A \"reset\" refers to a tile that goes from the solved state to\n\t\t * an unsolved state and back to the solved state.\n\t\t * \n\t\t * This is the calculation used for pruning.\n\t\t */\n\t\t\n\t\tArrayList<Integer> areaLeft = new ArrayList<Integer>();\n\t\tareaLeft.add(0);\n\t\tint totalArea = 0;\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\ttotalArea += pieceListBySize.get(i).numberOfFlips;\n\t\t\tareaLeft.add(0, totalArea);\n\t\t}\n\t\tint totalResets = (totalArea - gameBoard.flipsNeeded) / (gameBoard.goal + 1);\n\t\tSystem.out.println(\"Total Resets: \" + totalResets);\n\t\t\n\t\t/* \n\t\tint highRow = 0;\n\t\tint highCol = 0;\n\t\tint[][] maxDim = new int[2][pieceListBySize.size()];\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\tif (highRow < pieceListBySize.get(i).rows)\n\t\t\t\thighRow = pieceListBySize.get(i).rows;\n\t\t\t\n\t\t\tif (highCol < pieceListBySize.get(i).cols)\n\t\t\t\thighCol = pieceListBySize.get(i).cols;\n\t\t\t\n\t\t\tmaxDim[0][i] = highRow;\n\t\t\tmaxDim[1][i] = highCol;\n\t\t}\n\t\t*/\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tNode<GameBoard> currentNode = new Node<GameBoard>(gameBoard);\n\t\tStack<Node<GameBoard>> stack = new Stack<Node<GameBoard>>();\n\t\tstack.push(currentNode);\n\t\t\n\t\twhile (!stack.isEmpty()) {\n\t\t\tnodeCount++;\n\t\t\t\n\t\t\tNode<GameBoard> node = stack.pop();\n\t\t\tGameBoard current = node.getElement();\n\t\t\tint depth = node.getDepth();\n\t\t\t\n\t\t\t// Checks to see if we reach a solved state.\n\t\t\t// If so, re-order the pieces then print out the solution.\n\t\t\tif (depth == pieceListBySize.size() && current.isSolved()) {\n\t\t\t\tArrayList<Point> moves = new ArrayList<Point>();\n\t\t\t\t\n\t\t\t\twhile (node.parent != null) {\n\t\t\t\t\tint index = node.level - 1;\n\t\t\t\t\tint sequence = pieceList.indexOf(pieceListBySize.get(index));\n\t\t\t\t\tPoint p = new Point(current.moveRow, current.moveCol, sequence);\n\t\t\t\t\tmoves.add(p);\n\t\t\t\t\t\n\t\t\t\t\tnode = node.parent;\n\t\t\t\t\tcurrent = node.getElement();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tCollections.sort(moves);\n\t\t\t\tfor (Point p : moves) {\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Nodes opened: \" + nodeCount);\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"Elapsed Time: \" + ((endTime - startTime) / 1000) + \" secs.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tPiece currentPiece = pieceListBySize.get(depth);\n\t\t\tint pieceRows = currentPiece.rows;\n\t\t\tint pieceCols = currentPiece.cols;\n\t\t\t\n\t\t\tPriorityQueue<Node<GameBoard>> pQueue = new PriorityQueue<Node<GameBoard>>();\n\t\t\t\n\t\t\t// Place piece in every possible position in the board\n\t\t\tfor (int i = 0; i <= current.rows - pieceRows; i++) {\n\t\t\t\tfor (int j = 0; j <= current.cols - pieceCols; j++) {\n\t\t\t\t\tGameBoard g = current.place(currentPiece, i, j);\n\t\t\t\t\t\n\t\t\t\t\tif (totalResets - g.resets < 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\t// Put in the temporary priority queue\n\t\t\t\t\tpQueue.add(new Node<GameBoard>(g, node));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Remove from priority queue 1 at a time and put into stack.\n\t\t\t// The reason this is done is so that boards with the highest reset\n\t\t\t// count can be chosen over ones with fewer resets.\n\t\t\twhile (!pQueue.isEmpty()) {\n\t\t\t\tNode<GameBoard> n = pQueue.remove();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public boolean checkScore() {\r\n return !(this.scoreTable.getRank(this.score.getValue()) > this.scoreTable.size());\r\n }", "public void resetBoard(){\r\n for(int i = 0;i<6;i++){ //empty board \r\n for (int j = 0; j < 7; j++) {\r\n boardRep[i][j] = 0;\r\n }\r\n }\r\n \r\n for (int i = 0; i < 7; i++) { // set column heights to 0\r\n currentFilled[i] = 0;\r\n }\r\n \r\n blackToPlay = true; //black goes first for now\r\n refreshDisplay(); \r\n \r\n }", "public boolean isFull(){\n for(int i=0;i<3;i++){\n for(int j=0;j<3;j++){\n if(!gameBoard[i][j].equals(\"O\") && !gameBoard[i][j].equals(\"X\")){\n return false;\n }\n }\n }\n return true;\n }", "public Scoreboard() {\n\t}", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }", "@Ignore\n @Test\n public void kingSecurity() {\n board = new Board(\"rnbqkbnr/ppp2ppp/8/8/8/8/3PPPPP/RNBQKBNR w qkQK -\");\n board.printBoard();\n\n int value = StaticEvaluator.getValue(board.getSquares());\n\n assertTrue(value > 0);\n\n }", "private void checkMyScore() {\n\n int[] scores = ar.checkMyScore();\n System.out.println(\" My score: \");\n int level = 1;\n for (int i : scores) {\n System.out.println(\" level \" + level + \" \" + i);\n if (i > 0)\n solved[level - 1] = 1;\n level++;\n }\n }", "public Board() {\n\t\tfor(int i = 0; i < board.length; i++){\n\t\t\tfor(int j = 0; j < board[i].length; j++){\n\t\t\t\tboard[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic int updateBoard(int num) {\n\t\treturn 0;\n\t}", "private void initializeGameBoard()\n\t{\n\t\tboard = new State[3][3];\n\t\tfor (int r = 0; r < 3; r++)\n\t\t\tfor (int c = 0; c < 3; c++)\n\t\t\t\tboard[r][c] = State.EMPTY;\n\t}", "private boolean isEmpty(){\n return cellSize == 0;\n }", "public static boolean isGameBoardEmpty(Player[][] board) {\n\t\tint emptyRow = 0;\n\t\tfor (int row = 0; row < Score4Constants.rowMax; row++) {\n\t\t\tif (isArrayEmpty(board[row])) {\n\t\t\t\temptyRow++;\n\t\t\t}\n\t\t}\n\t\treturn (emptyRow == Score4Constants.rowMax);\n\t}", "@Test\n public void initialiseEmptyBoardTest() {\n String[][] newBoard = new String[15][10];\n newBoard = enemyGameBoard.initialiseEmptyBoard();\n int counter = 0;\n for(int i = 0; i < GameConstants.BOARD_SIZE_X; i++) {\n for (int j = 0; j < GameConstants.BOARD_SIZE_Y; j++){\n assertTrue(newBoard[i][j].equals(\"WATER\"));\n counter++;\n }\n }\n assertTrue(counter == 150); \n }", "@Test\n public void testGetScore() {\n assertEquals(250, board3by3.getScore());\n }", "public void resetBoard(){\n totalmoves = 0;\n this.board = new Cell[3][3];\n //fill the board with \"-\"\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board[i][j]=new Cell(new Coordinates(i,j), \"-\");\n }\n }\n }", "protected int checkAllCardsAppliedHaveZeroBalance() {\r\n boolean allCardsValuesAreZero = true;\r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n GiftCard tempGiftCard = null;\r\n int numBlankCards = 0;\r\n \r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n if (!tempGiftCard.getIsBlank() && tempGiftCard.getAmountAvailable() != 0.0d) {\r\n return NO_ERRORS;\r\n }\r\n if (tempGiftCard.getIsBlank()) {\r\n numBlankCards++;\r\n }\r\n }\r\n \r\n if (numBlankCards == getMaxNumGiftCards() || numBlankCards == getGiftCardList().size()) {\r\n return NO_ERRORS;\r\n }\r\n \r\n return ALL_CARDS_ARE_ZERO;\r\n }", "@Override\n\tpublic void checkScore() {\n\t\t\n\t}", "@Override\n\tpublic boolean check(piece[][] board) {\n\t\t\n\t\treturn false;\n\t\t\n\t}", "public Marker gameWon() {\r\n for (int s : sums) {\r\n if (s == BOARD_SIZE) {\r\n return Marker.X;\r\n }\r\n else if (s == -BOARD_SIZE) {\r\n return Marker.O;\r\n }\r\n }\r\n\r\n return Marker.EMPTY;\r\n }", "public Board() {\n this.x = 0;\n this.o = 0;\n }", "protected static boolean isFull(final Board board)\r\n {\r\n for (int col = 0; col < board.getBoardKey()[0].length; col++)\r\n {\r\n for (int row = 0; row < board.getBoardKey().length; row++)\r\n {\r\n //if there is an empty space return false\r\n if (board.getKey(col, row) == Board.KEY_EMPTY)\r\n return false;\r\n }\r\n }\r\n \r\n //this board is full\r\n return true;\r\n }", "public int CheckForClear(){\n int endState = -1;\n //check top\n for (int i = 0; i < 6; i++){\n if(this.gameBoard[i] != 0){\n endState = -1;\n break;\n }\n else{\n endState = 0;\n }\n }\n //check bottom\n if (endState == -1){\n for (int i = 7; i < 13; i++){\n if (this.gameBoard[i] != 0){\n endState = -1;\n break;\n }\n else{\n endState = 1;\n }\n }\n }\n return endState;\n }", "private void setEmpty() {\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++)\n\t\t\t\tboard[r][c] = new Cell(false, false,\n\t\t\t\t\t\tfalse, false); // totally clear.\n\t}", "private void initializeBoard() {\n\t\t\n\t}", "public static void clearBoard(){\n for(int i = 0; i < Board.X_UPPER_BOUND * Board.Y_UPPER_BOUND ; i++){\n Board.board[i] = null;\n }\n white_player.setpieceList(null);\n black_player.setpieceList(null);\n }", "public int hamming() {\n int wrong = 0;\n for (int row = 0; row < N; ++row) {\n for (int col = 0; col < N; ++col) {\n int goalValue = N * row + col + 1;\n if (tiles[row][col] != 0 && tiles[row][col] != goalValue) {\n wrong++;\n }\n }\n }\n\n return wrong;\n }", "private static double upLeftScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && col != 0 && state.getGrid()[row-1][col-1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "private static void mineInitialization(){\n\t\tfor (int m = 0; m < BOARD_SIZE; m++)\n\t\t{\n\t\t\tmX = RNG.nextInt(BOARD_SIZE);\n\t\t\tmY = RNG.nextInt(BOARD_SIZE);\n\t\t\tif(gameBoard[mX][mY].equals(Spaces.Empty))\n\t\t\t{\n\t\t\t\tgameBoard[mX][mY] = Spaces.Mine;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm--;\n\t\t\t}\n\t\t}\n\t}", "public int evalBoard(){\n if (wins('o')){\n return 3;\n }\n // Return 0 if human wins\n else if (wins('b')){\n return 0;\n }\n //Return 2 if game is draw\n else if (isDraw()){\n return 2;\n }\n // Game is not a draw and no player has won. Game is still undecided.\n else {\n return 1;\n }\n }", "public void testNoYes () throws Exception{\n\n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"5,2,A,12,No\",\n \"6,2,A,12,Yes\",\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team2,1,32\",\n \"2,team1,0,0\",\n };\n \n scoreboardTest (2, runsData, rankData);\n }", "public Board()\r\n\t{\r\n\t\treset();\r\n\t}", "public boolean squareIsEmpty (int row, int col){\n return this.gameBoard[row][col] == 'g';\n }", "public boolean isTerminal(){\n for(int row=0; row<8; row++)\n {\n for(int col=0; col<8; col++)\n {\n if(gameboard[row][col] == EMPTY)\n {\n return false;\n }\n }\n }\n return true;\n\n }", "public void clearBoard() \n {\n\tfor(int i=0;i<rows;i++)\n\t {\n\t\tfor(int j=0;j<cols;j++)\n\t\t {\n\t\t\tfrontBoard[i][j] = \"00\";\n\t\t\tbackBoard[i][j] = \"00\";\n\t\t }\n\t }\n\tunused = new Piece[pieces.length];\n\tfor(int i=0;i<pieces.length;i++)\n\t {\n\t\t\tunused[i] = pieces[i];\n\t }\n }", "public static void blankBoard() {\r\n\t\tfor (int i = 0; i < Spaces.length; i++) {\r\n\t\t\tSpaces[i] = new Piece();\r\n\t\t}\r\n\t}", "public static void clearBoard() {\n for (int row = 0; row < SIZE_ROW; row++) {\n for (int col = 0; col < SIZE_COL; col++) {\n board[row][col] = 0;\n }\n }\n }", "public int determineWinner() {\n\t\tif(board[1][1] != 0 && (\n\t\t\t(board[1][1] == board[0][0] && board[1][1] == board[2][2]) ||\n\t\t\t(board[1][1] == board[0][2] && board[1][1] == board[2][0]) ||\n\t\t\t(board[1][1] == board[0][1] && board[1][1] == board[2][1]) ||\n\t\t\t(board[1][1] == board[1][0] && board[1][1] == board[1][2]))){\n\t\t\treturn board[1][1];\n\t\t}\n\t\telse if (board[0][0] != 0 &&(\n\t\t\t(board[0][0] == board[0][1] && board[0][0] == board[0][2]) ||\n\t\t\t(board[0][0] == board[1][0] && board[0][0] == board[2][0]))){\n\t\t\treturn board[0][0];\n\t\t}\n\t\telse if (board [2][2] != 0 && (\n\t\t\t(board[2][2] == board[2][0] && board[2][2] == board[2][1]) ||\n\t\t\t(board[2][2] == board[0][2] && board[2][2] == board[1][2]))) {\n\t\t\treturn board[2][2];\n\t\t}\n\t\t\n\t\t//See if every square has been marked, return still in progress if not\n\t\tfor(int i = 0; i < 3; ++i) {\n\t\t\tfor(int j = 0; j < 3; ++j) {\n\t\t\t\tif (board[i][j] == 0)\n\t\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Return tie\n\t\treturn 3;\n\t}", "public void updateBoard() {\r\n\t\tfor(int i = 0, k = 0; i < board.getWidth(); i+=3) {\r\n\t\t\tfor(int j = 0; j < board.getHeight(); j+=3) {\r\n\t\t\t\t//Check that there are pieces to display\r\n\t\t\t\tif(k < bag.size()) {\r\n\t\t\t\t\tboard.setTile(bag.get(k), i, j);\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tboard.fillSpace(GridSquare.Type.EMPTY, i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public UIBoard()\r\n\t{\r\n\t\t//Creates a 10x10 \"Board\" object\r\n\t\tsuper(10,10);\r\n\t\tgrid = new int[getLength()][getWidth()];\r\n\t\t\r\n\t\t//Sets all coordinates to the value 0, which corresponds to \"not hit yet\"\r\n\t\tfor(int i=0; i<grid.length; i++)\r\n\t\t\tfor(int j=0; j<grid[i].length; j++)\r\n\t\t\t\tgrid[i][j] = 0;\t\t\r\n\t}", "public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}", "public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }", "private void resetBoard() {\n\t\tGameScores.ResetScores();\n\t\tgameTime = SystemClock.elapsedRealtime();\n\t\t\n\t}", "private static void createEmptyBoard()\n {\n for (int index = 1; index < board.length; index++)\n {\n board[index] = ' ';\n }\n }", "public void gameOfLife(int[][] board) {\n\n for(int i = 0; i < board.length; i++) {\n for (int j = 0; j < board[i].length; j++) {\n int liveCount = countLiveNeighbor(board, i ,j);\n if (board[i][j] == 0) {\n /* dead cell reproduction*/\n board[i][j] = liveCount == 3? 11 : 0;\n } else {\n if (liveCount < 2 || liveCount > 3) {\n /* livecell under-population or over-population */\n board[i][j] = 10;\n }\n }\n }\n }\n for(int i = 0; i < board.length; i++) {\n for (int j = 0; j < board[i].length; j++) {\n if (board[i][j] >= 10) {\n board[i][j] -= 10;\n }\n }\n }\n }", "boolean isValid() {\n\t\t// see if there is a empty square with no available move\n\t\tint counter;\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor(int j = 0; j < boardSize; j++) {\n\t\t\t\tcounter = 0;\n\t\t\t\tif (board[i][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\t\tif (availMoves[i][j][k] == true) {\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (counter == 0) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// see if there is a number missing in availMoves + board in each line/box \n\t\tboolean[][] verticalNumbers = new boolean[boardSize][boardSize];\n\t\tboolean[][] horizontalNumbers = new boolean[boardSize][boardSize];\n\t\tboolean[][] boxNumbers = new boolean[boardSize][boardSize];\n\t\tint box = 0;\n\t\tfor(int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tbox = i/boxSize + ((j/boxSize) * boxSize); \n\t\t\t\tif (board[i][j] > 0) {\n\t\t\t\t\tverticalNumbers[i][board[i][j] - 1] = true;\n\t\t\t\t\thorizontalNumbers[j][board[i][j] - 1] = true;\n\t\t\t\t\tboxNumbers[box][board[i][j] - 1] = true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\t\tif (availMoves[i][j][k] == true) {\n\t\t\t\t\t\t\tverticalNumbers[i][k] = true;\n\t\t\t\t\t\t\thorizontalNumbers[j][k] = true;\n\t\t\t\t\t\t\tboxNumbers[box][k] = true;\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\t\n\t\t// if there is any boolean still false it means that number is missing from that box/line\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tif (verticalNumbers[i][j] == false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (horizontalNumbers[i][j] == false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (boxNumbers[i][j] == false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public void calculateScores()\r\n {\r\n for(int i = 0; i < gameBoard.getBoardRows(); i++)\r\n for(int j = 0; j < gameBoard.getBoardCols(); j++)\r\n {\r\n if(gameBoard.tilePlayer(i,j) == 0)\r\n currentRedScore = currentRedScore + gameBoard.tileScore(i,j);\r\n if(gameBoard.tilePlayer(i,j) == 1)\r\n currentBlueScore = currentBlueScore + gameBoard.tileScore(i,j);\r\n }\r\n }" ]
[ "0.8127512", "0.72658956", "0.71850985", "0.6989699", "0.6914524", "0.68576235", "0.6824944", "0.6730027", "0.66322017", "0.6619409", "0.6577767", "0.6547518", "0.6514565", "0.65016955", "0.65006876", "0.64846444", "0.64846444", "0.6478031", "0.64779365", "0.64566344", "0.64517736", "0.6439695", "0.6389329", "0.6388712", "0.6367022", "0.6360719", "0.63339186", "0.6325064", "0.6307671", "0.6302205", "0.6295592", "0.6287031", "0.6279623", "0.6272726", "0.62681687", "0.62371165", "0.6233076", "0.623179", "0.62225044", "0.62074", "0.6206019", "0.62033445", "0.6196691", "0.6193882", "0.61938775", "0.61836195", "0.6171042", "0.6170536", "0.6165195", "0.61630213", "0.6157559", "0.61530876", "0.61530864", "0.6142942", "0.61254007", "0.6125346", "0.6112382", "0.6105848", "0.6102224", "0.60979635", "0.6085362", "0.6083804", "0.60772127", "0.6073517", "0.60604566", "0.60593534", "0.60545635", "0.604828", "0.60470515", "0.6029946", "0.6025466", "0.60253114", "0.60243094", "0.6023122", "0.6022298", "0.6020461", "0.6018309", "0.60156924", "0.60048705", "0.5993837", "0.59914434", "0.5991181", "0.5980922", "0.5978689", "0.5977696", "0.5974094", "0.59738696", "0.59675807", "0.5960052", "0.59551036", "0.59533066", "0.5950316", "0.5944582", "0.5942234", "0.5936415", "0.5935833", "0.5933152", "0.5932943", "0.5930934", "0.59259444" ]
0.598688
82
///////////// to api ///////////////
public ArrayList<JSONObject> getGroups() { return groups; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "API createAPI();", "public api() {}", "public interface Api {\n /**{\"response\": {\"zbsVer\": 0, \"hostId\": \"001207C40173\", \"room\": [{\"type\": \"\\u603b\\u7ecf\\u7406\", \"roomId\": \"322\", \"name\": \"\\u603b\\u7ecf\\u7406\"}, {\"roomId\": \"350\", \"type\": \"\\u4e3b\\u5367\", \"name\": \"\\u4e3b\\u5367\"}, {\"type\": \"\\u53a8\\u623f\", \"roomId\": \"366\", \"name\": \"\\u5475\\u5475\"}, {\"roomId\": \"381\", \"type\": \"\\u53a8\\u623f\", \"name\": \"\\u53a8\\u623f\"}, {\"roomId\": \"382\", \"type\": \"\\u9910\\u5385\", \"name\": \"\\u9910\\u5385\"}], \"softver\": 104, \"timestamp\": 1501838857, \"zbhVer\": 0, \"lastbackup\": 1499826785, \"pandId\": 101, \"firmver\": 217, \"numbers\": \"15905214137,15252089063,18912345678,15263985632,15152208332\", \"channelNo\": \"f\", \"registerHost\": false, \"name\": \"40173\"}, \"ret\": 0, \"md5\": \"a92c08fdf3a4b4f9aef04b3ce102df32\"}\n\n * 云端接口\n */\n String wrapper_request = \"/wrapper/request\";\n //\n// CloudInterface.h\n// ihome\n//\n// Created by on 3/13/15.\n// Copyright (c) 2015 Co.ltd. All rights reserved.\n\n //测试\n String urlCloud = \"/https://api2.boericloud.com\";\n //正式\n// String urlCloud = \"/https://api.boericloud.com\";\n\n String urlResetMobile = \"/auth/resetMobile\"; //重置手机号码\n String urlNegotiate = \"/auth/negotiate\";\n String urlRegister = \"/auth/register\"; //注册\n String urlSignin = \"/auth/login\"; //登录\n String urlSignOff = \"/auth/logout\"; //登出\n\n String urlResetCloudPassword = \"/auth/resetCloudpassword\"; //重置密码\n String urlSmsVerify = \"/auth/sms_verify\"; //短信验证\n String urlResetPWD = \"/auth/reset_password\"; //忘记密码\n String urlMobileVerify = \"/auth/mobile_verify\"; //验证手机号\n\n String urlUserUpdate = \"/user/update\";\n String urlUserUpdateToken = \"/user/update_token\";\n\n String urlUserPermissions = \"/user/host_permissions\"; //查询用户权限\n String urlUserUpdateExtend = \"/user/update_extend\"; //更新铃声和震动\n String urlUserShowExtend = \"/user/show_extend\"; //获取铃声和震动\n\n String urlHostBind = \"/host/bind\";\n String urlHostShow = \"/host/show\";\n\n String urlHostverifyadminpassword = \"/host/verifyadminpassword\";\n String urlHostSwitch = \"/host/switch\";\n\n String urlWrapperRequest = \"/wrapper/request\";//透传接口,一键备份\n String urlHostRestoreproperty = \"/host/restoreproperty\";//透传接口,一键还原\n\n String urlHostUpgrade = \"/upgrade/latest\";\n String urlHostUpgradeSoftware = \"/host/software_upgrade\";\n\n String urlSystemMessageShow = \"/systemMessage/show\"; //请求某天某类型的系统消息\n\n String urlWarningShow = \"/alarm/show1\"; //请求某天某类型的历史告警\n String urlAlarmDelete = \"/alarm/delete1\";//删除单条或多条历史告警\n String urlAlarmBatchDelete = \"/alarm/batch_delete\";//删除某天某类型的所有告警\n\n String urlSystemMessageDelete = \"/systemMessage/remove\";//删除某天某类型的系统消息\n String urlSystemBatchDelete = \"/systemMessage/batch_delete\";//删除某天某类型的所有系统消息\n\n String urlAlarmRead = \"/alarm/confirm_read\";//确认某条系统告警\n String urlSystemMessageRead = \"/systemMessage/confirmRead\";//确认某条系统消息\n\n String urlAddBlackList = \"/user/add_black_list\";//加入黑名单\n String urlRemoveBlackList = \"/user/remove_black_list\";//移除黑名单\n String urlQueryBlackList = \"/user/query_in_black_list\";//查询用户是否在黑名单内\n\n /*****************************/\n//主机直连 -> 设备相关\n String urlQueryWiseMediaList = \"/device/queryWiseMediaList\";//查询华尔斯背景音乐的歌曲列表\n String urlDeviceScan = \"/device/scan\";//扫描设备\n String urlDeviceLink = \"/device/link\";//关联设备->(新增)\n String urlDeviceQuerylink = \"/device/querylink\";//查询关联设备->(新增)\n String urlDeviceCmd = \"/device/cmd\";//控制设备\n String urlDeviceRemove = \"/device/remove\";//删除设备\n String urlDeviceDismiss = \"/device/dismiss\";//解绑设备\n String urlDeviceUpdateProp = \"/device/updateprop\";//更新设备属性\n String urlDevicesProperties = \"/devices/properties\";//查询设备属性\n String urlDeviceStatus = \"/device/status\";//查询设备状态\n String urlDeviceQueryOneProp = \"/device/queryOneProp\";//查询某一设备的属性->(新增)\n String urlDeviceConfigHgc = \"/device/configHgc\";//配置中控->(新增)\n String urlDeviceDeleteHgcConfig = \"/device/deleteHgcConfig\";//删除中控配置->(新增)\n String urlDeviceQueryHgcConfig = \"/device/queryHgcConfig\";//查询中控配置->(新增)\n String urlDeviceQueryMeterAddr = \"/device/queryMeterAddr\";//查询水电表的地址->(新增)\n String urlDeviceModifyMeterName = \"/device/modifyMeterName\";//修改水电表的名称->(新增)\n String urlDeviceQueryAllDevices = \"/device/queryAllDevices\";//查询所有设备的属性和状态->(新增)\n String urlDeviceSetFloorHeatingTimeTask = \"/device/setFloorHeatingTimeTask\";//设置地暖的定时任务->(新增)\n String urlDeviceSwitchFloorHeatingTimeTask = \"/device/switchFloorHeatingTimeTask\";//开启或者关闭地暖的定时任务->(新增)\n\n //主机直连 -> 主机相关\n String urlHostShowProperty = \"/host/showproperty\";//查询主机信息\n String urlHostModifyProperty = \"/host/modifyproperty\";//修改主机信息\n String urlHostQueryglobaldata = \"/host/queryglobaldata\";//查询全局信息->(新增)\n String urlHostModifyHostName = \"/host/modifyHostName\";//修改主机名称->(新增)\n\n //主机直连 -> 联动模式相关\n String urlPlanShow = \"/plan/show\";//查询指定的联动预案或模式\n String urlPlanUpdate = \"/plan/update\";//更新联动预案或模式\n String urlPlanQueryGlobalModes = \"/plan/queryGlobalModes\";//查询全局模式->(新增)\n String urlPlanModifyModeName = \"/plan/modifyModeName\";//修改模式名称->(新增)\n String urlPlanSetTimeTask = \"/plan/setTimeTask\";//设置模式定时\n String urlPlanTimeTaskSwitch = \"/plan/switchTimeTask\";//开启或关闭模式定时\n String urlPlanAllModes = \"/plan/allModes\";//查询当前主机下所有模式\n\n //主机直连 -> 房间区域相关\n String urlRoomsRemove = \"/room/remove\";//删除房间\n String urlRoomsUpdate = \"/room/update\";//更新房间\n String urlRoomsShow = \"/room/show\";//查询房间\n String urlAreaRemove = \"/room/removearea\";//删除区域\n String urlAreaUpdate = \"/room/updatearea\";//更新区域\n String urlAreaShow = \"/room/showarea\";//查询区域\n String urlRoomsUpdateMode = \"/room/updatemode\";//更新房间模式\n String urlRoomsShowMode = \"/room/showmode\";//查询房间模式\n String urlRoomsActiveMode = \"/room/activemode\";//激活房间模式\n\n//主机直连 -> 告警相关\n\n\n //主机直连 -> 用户相关\n String urlUserLogin = \"/user/login\";//直连登录->(新增)\n String urlUserAuthorizedLogin = \"/user/authorizedLogin\";//授权后的直连登陆(已在云端登陆)->(新增)\n String urlUserLogout = \"/user/logout\";//退出登录->(新增)\n String urlUserSaveUserInfo = \"/user/saveUserInfo\";//直连登录->(新增)\n /*****************************/\n\n String urlReportBloodsugar = \"/health/report_bloodsugar\";//上报血糖值\n String urlDeleteBloodsugar = \"/health/delete_bloodsugar\";//删除血糖值\n String urlUpdateBloodsugar = \"/health/update_bloodsugar\";//修改血糖值\n\n String urlReportBloodPressure = \"/health/report_bloodpressure\";//上报血压值\n String urlDeleteBloodPressure = \"/health/delete_bloodpressure\";//删除血压值\n\n String urlReportBodyWeight = \"/health/report_bodyweight\";//上报体重值\n String urlDeleteBodyWeight = \"/health/delete_bodyweight\";//删除体重值\n\n String urlReportUrine = \"/health/report_urine\"; //上报尿检值\n String urlDeleteUrine = \"/health/delete_urine\";//删除某一条尿检记录\n\n String urlDownHealthCache = \"/data/health_down\";//下载缓存数据\n String urlUploadHealthCache = \"/data/health_upload\";//上传缓存数据\n String urlUploadBloodPressureCache = \"/data/health_upload_blood_pressure\";//上传血压缓存数据\n String urlUploadBloodGlucoseCache = \"/data/health_upload_blood_glucose\";//上传血糖缓存数据\n String urlUploadBodyWeightCache = \"/data/health_upload_body_weight\";//上传体重缓存数据\n String urlUploadUrineCache = \"/data/health_upload_urine\";//上传尿检缓存数据\n\n String urlQueryElec = \"/energy/query_elec\"; //查询电能数据\n String urlQuerySocket = \"/energy/query_socket\"; //查询插座数据\n String urlQueryWater = \"/energy/query_water\"; //查询水表数据\n String urlQueryGas = \"/energy/query_gas\"; //查询气表数据\n\n\n String urlHostShow1 = \"/host/show1\"; //家庭管理中的主机属性\n\n String urlUserInfo = \"/user/userInfo\"; //查找用户信息\n String urlShowInviteCode = \"/user/show_invitecode\"; //查看邀请码\n String urlInvitationConvert = \"/integral/exchange_integral\"; //兑换邀请码\n String urlFamilyAddUser = \"/family/add_user\"; //增加家庭成员\n String urlFamilyTransPermission = \"/family/admin_permission_transfer\"; //转让管理员权限\n String urlFamilyUpdateAlias = \"/family/update_alias\"; //更新主机别名或用户别名\n String urlFamilyDeleteUser = \"/family/delete_user\"; //主机删除用户\n String urlFamilyDeleteHost = \"/family/delete_host\"; //管理员删除主机\n String urlFamilyUserIsAdmin = \"/family/user_isAdmin\"; //当前用户是否为管理员\n String urlFamilyUpdatePermissaion = \"/family/update_permission\"; //更新用户权限\n String urlFamilyUpdateShare = \"/family/update_share\"; //家庭分享健康数据\n String urlFamilyHostAdmin = \"/family/host_admin\"; //查询主机管理员\n\n String urlApplyUserApply = \"/apply/user_apply\"; //主机用户申请\n\n String urlApplyUserApplyV1 = \"/apply/user_apply_v1\"; //主机用户申请接口V1(将判断和推送放在后台)\n String urlApplyUserShow = \"/apply/user_show\"; //查询主机用户申请\n String urlApplyUserDelete = \"/apply/user_delete\"; //删除用户申请\n String urlApplyUserUpdateStatus = \"/apply/user_update_state\"; //更新用户状态\n\n String urlApplyUserUpdateStatusV1 = \"/apply/update_status_v1\"; //更新用户申请状态(将当前状态发送给后台进行筛选)\n String urlApplyUserHost = \"/apply/host_show\"; //查询主机下申请用户\n String urlApplyUserApplyIsExists = \"/apply/user_applyuserid_exist\"; //判断当前用户是否已经申请过\n String urlApplyUserReapply = \"/family/user_reapply\"; //用户重新申请\n String urlApplyQueryUserApplyOrAdnimReject = \"/apply/query_user_apply_reject\"; //查询用户申请或管理员拒绝记录\n\n String urlQueryUserApplyOrShare = \"/apply/query_user_apply_share\"; //查询用户是否有未处理申请或分享\n\n String urlNotificationPush = \"/notification/notification_push\"; //推送通知\n\n String notification_updateMsg = \"/notification_updateMsg\"; //报警通知\n String notification_updateScence = \"/notification_updateScence\"; //场景更新\n String notification_startHomeTimer = \"/notification_startHomeTimer\"; //开启主页轮询\n String notification_stopHomeTimer = \"/notification_stopHomeTimer\"; //关闭主页轮询\n String notification_startDeviceTimer = \"/notification_startDeviceTimer\"; //开启设备轮询\n String notification_stopDeviceTimer = \"/notification_stopDeviceTimer\"; //关闭设备轮询\n String notification_changeHost = \"/notification_changeHost\"; //切换主机\n String notification_updateCity = \"/notification_updateCity\"; //更新城市信息\n String notification_updateFamilyMembers = \"/notification_updateFamilyMembers\"; //更新家庭成员信息\n String notification_removeHomeNotifications = \"/notification_removeHomeNotifications\"; //移除所有通知\n String notification_familyRefresh = \"/notification_familyRefresh\"; //家庭成员刷新\n\n String urlShareUser = \"/share/user_share\"; //查询家庭的接口\n String urlQueryHealth = \"/health/query_health\"; //查询选定日期区间健康数据接口\n String urlQueryRecentHealth = \"/health/query_recent_health\"; //查询最近的健康数据分享接口\n\n String urlQueryRecentNotification = \"/notification/query_recent_notification\"; //查询最近的通知消息\n\n String urlFeedback = \"/feedback/feedback_push\"; //客户端的意见反馈\n\n String urlHostGuard = \"/host/guard\";//门禁对讲接听推送请求\n\n\n String urlStartScanBatch = \"/device/startScanBatch\";//开始批量添加\n String urlStopScanBatch = \"/device/stopScanBatch\";//停止批量添加\n\n String urlQueryDeviceBatch = \"/device/queryDeviceBatch\";//查询设备\n String urlSaveDeviceBatch = \"/device/saveDeviceBatch\";//保存\n\n String urlCommonDevice = \"/device/commondevice\";//设置、取消常用设备\n\n String urlHostShowOnline = \"/host/showonline\"; // 主机是否在线\n String urlgetMsgSettings = \"/settings/find_message_settings_by_mobile\";//获取消息设置\n String urlsetMsgSettings = \"/settings/save_message_settings\";//设置消息设置\n String urlsetPushMsg = \"/notification/notification_push\";//消息推送\n\n String urlQueryAirFilter = \"/energy/query_airFilter\";// 查询 历史记录\n String urlQueryTableWaterFilter = \"/energy/query_tableWaterFilter\";//\n String urlQueryFloorWaterFilter = \"/energy/query_floorWaterFilter\";//\n\n\n}", "public interface TvApi {\n\n /*\n 获取电视节目表\n */\n @POST(\"getProgram\")\n Call<TvShowData> getProgram(@Query(\"code\") String code, @Query(\"date\") String date, @Query(\"key\") String key);\n\n /*\n 获取频道类型列表\n */\n @POST(\"getCategory\")\n Call<TvTypeData> getCategory(@Query(\"key\") String key);\n\n /*\n\n */\n @POST(\"getChannel\")\n Call<TvChannelData> getChannel(@Query(\"pId\") String pId, @Query(\"key\") String key);\n}", "public interface API {\n\n// String BASE_URL = \"https://www.apiopen.top/\";\n String BASE_URL = \"http://gc.ditu.aliyun.com/\";\n\n\n @GET\n Observable<Response<ResponseBody>> doGet(@Url String Url);\n\n @FormUrlEncoded\n @POST\n Observable<Response<ResponseBody>> doPost(@Url String Url, @FieldMap HashMap<String, String> map);\n\n @Streaming\n @GET\n Observable<Response<ResponseBody>> doDownload(@Url String Url);\n}", "public API() {}", "public interface GoogleApi {\n\n @Headers(\"Content-Type: application/json\")\n @POST(VISION_CLOUD)\n Call<VisionRespose> processImage64(@Header(\"Content-Length\") String bodyLength, @Query(\"key\") String apiKey, @Body VisionRequest visionRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(VISION_CLOUD)\n Call<LogoResponse> processLogoImage64(@Header(\"Content-Length\") String bodyLength, @Query(\"key\") String apiKey, @Body VisionRequest visionRequest);\n\n @Headers(\"Content-Type: application/json\")\n @GET(TRANSLATION_CLOUD)\n Call<TranslationResponse> translateQuery(@Query(\"key\") String apiKey, @Query(\"source\") String source, @Query(\"target\") String target, @Query(\"q\") List<String> queries);\n}", "public interface ApiInterface {\n String HOST = \"http://fanyi.youdao.com/\";\n String IMG_HOST = \"http://www.bing.com/\";\n\n @GET(\"openapi.do\")\n Observable<Translation> getTranslation(@Query(\"keyfrom\") String keyfrom,\n @Query(\"key\") String key,\n @Query(\"type\") String type,\n @Query(\"doctype\") String doctype,\n @Query(\"version\") String version,\n @Query(\"q\") String q);\n\n @GET(\"HPImageArchive.aspx\")\n Observable<BackImg> getBackgroundImg(@Query(\"format\") String format,\n @Query(\"idx\") int idx,\n @Query(\"n\") int n);\n\n\n\n}", "public interface ApiInterface {\n\n\n @Headers({\"Content-Type: application/json\",})\n @POST(\"transport/public/registrations\")\n Call<Void> Register(@Body User user);\n\n\n //loginProcess\n @GET(\"user\")\n @Headers({\"Content-Type: application/json\"})\n Call<cUser> postWithFormParams();\n\n\n //userMe\n @GET(\"transport/user/me\")\n @Headers({\"Content-Type: application/json\"})\n Call<JsonObject> UserMe();\n\n\n\n //drivers\n @GET(\"transport/drivers\")\n @Headers({\"Content-Type: application/json\"})\n Call<JsonObject> drivers(\n @Query(\"latitud\") double latitud,\n @Query(\"longitud\") double longitud);\n\n\n}", "public interface BruceApi {\n\n\tString ENDPOINT = \"http://gank.avosapps.com/api\";\n\n\t@GET(\"/data/福利/\" + BruceFactory.pageSize + \"/{page}\")\n\tvoid getListData(@Path(\"page\") int page, Callback<FuliList> response);\n\n\t@GET(\"/day/{year}/{month}/{day}\")\n\tvoid getDataSet(@Path(\"year\") int year, @Path(\"month\") int month, @Path(\"day\") int day,Callback<DataSet> response);\n\n\t@GET(\"/day/{year}/{month}/{day}\")\n\tObservable<DataSet> getDataObservable(@Path(\"year\")int year,@Path(\"month\")int month,@Path(\"day\")int day);\n\n\t//但如果我们想获得JSON字符串,Callback的泛型里就不能写POJO类了,要写Response(retrofit.client包下)\n\t@GET(\"/data/福利/\" + BruceFactory.pageSize + \"/{page}\")\n\tvoid getResponseData(@Path(\"page\") int page, Callback<Response> response);\n\n\n}", "public interface APIService {\n /**\n * 如果不需要转换成Json数据,可以用了ResponseBody;\n * @return call\n */\n @GET(\"apps?api_token={Your API Token}\")\n// Call<AppInfo> getAppInfo();\n Call<ResponseBody> getAppInfo();\n // you can add some other meathod\n}", "public interface apiService {\n\n\n\n String base_url= \"http://192.168.43.154:8081/\";\n\n @GET(\"getprofile\")\n Call<Employee> getProfilehero(@Query(\"racf\") String id,@Query(\"password\") String pass);\n\n @GET(\"getpeopleonleave\")\n Call<Datesss> getdetailsondate(@Query(\"date\") String d);\n\n @GET(\"authentication\")\n Call<Auth> getAuth(@Query(\"racf\") String d,@Query(\"password\") String dd);\n\n @GET(\"getleavedates\")\n Call<leaves> getleavedates(@Query(\"racf\") String d);\n\n @GET(\"getwfhdates\")\n Call<WorkFromHome> getwfhdates(@Query(\"racf\") String dd);\n\n @GET(\"updateno\")\n Call<Auth> updating(@Query(\"racf\") String d,@Query(\"contacts\") String dd,@Query(\"contactnames\") String ddd);\n\n @GET(\"updateworkfromhome\")\n Call<Auth> updatingwfh(@Query(\"racf\") String d,@Query(\"dates\") String dd,@Query(\"reasons\") String ddd);\n\n @GET(\"updateonleave\")\n Call<Auth> updatingleave(@Query(\"racf\") String d,@Query(\"date\") String dd,@Query(\"reason\") String ddd);\n\n\n}", "public interface ApiService {\n @POST(\"/AutoComplete/autocomplete/json\")\n void placeAuto(@Query(\"input\") String input, @Query(\"key\") String key, Callback<AutoComplete> callback);\n\n @POST(\"/geocode/json\")\n void getLatLng(@Query(\"address\") String address, @Query(\"key\") String key, Callback<GeocodingMain> callback);\n\n @POST(\"/directions/json\")\n void getroute(@Query(\"origin\") String origin, @Query(\"destination\") String destination, @Query(\"key\") String key, Callback<Directions> callback);\n\n @POST(\"/geocode/json\")\n void reverseGeoCoding(@Query(\"latlng\") String latLng, @Query(\"key\") String key, Callback<RevGeocodingMain> callback);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n}", "public interface WayMapAPI {\n @GET(\"maps/api/directions/json?\")\n Call<WayPoints> getWayFromCoordinate(@Query(\"origin\")String from, @Query(\"destination\") String to, @Query(\"key\") String api_key);\n\n\n}", "public interface ApiStore {\n String API_SERVER_URL = \"http://124.205.9.251:8082/\";//北京\n\n //轮播图\n @POST(\"/mobile/index/noticeList\")\n Call<BannerModel> bannerData(@Query(\"notice_type\") String notice_type);\n\n\n\n //上传文件\n @Multipart\n @POST(\"/mobile/fileUpload/plupload\")\n// Observable<UploadThumbModel> plupload(@Part(\"file\") MultipartBody file, @Query(\"module\") String module);\n Call<UploadThumbModelOkHttp> plupload(@Part MultipartBody.Part file, @Query(\"module\") String module);\n}", "public interface API {\n\n //Penyakit\n @GET(\"penyakitall/{page}/{count_page}\")\n Call<DiseaseResponse>\n getDiseaseList(@Path(\"page\") String page, @Path(\"count_page\") String count_page);\n\n @GET(\"penyakit/{page}/{count_page}\")\n Call<DiseaseResponse>\n getDiseaseListByLokasi(@Path(\"page\") String page, @Path(\"count_page\") String count_page, @Query(\"id_desa\") String id_desa);\n\n @POST(\"penyakit\")\n Call<DiseasePostResponse>\n postDisease(@Body DiseaseBody diseaseBody);\n @DELETE(\"penyakit\")\n Call<DeletePenyakitResponse> deletePenyakit(@Query(\"Id_penyakit\") String id_penyakit);\n\n @PUT(\"penyakit\")\n Call<PutPenyakitResponse> editPenyakit(@Query(\"Id_penyakit\") String id_penyakit,\n @Body PutPenyakitBody putPenyakitBody);\n\n @GET(\"tipepenyakit/{page}/{count_page}\")\n Call<TipePenyakitResponse>\n getTipePenyakitList(@Path(\"page\") String page, @Path(\"count_page\") String count_page);\n\n @POST(\"multimedia\")\n Call<MultimediaPostResponse>\n postMultimedia(@Body MultimediaBody multimediaBody);\n}", "@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}", "public interface ApiService {\n public static final String Base_URL = \"http://ip.taobao.com/\";\n /**\n *普通写法\n */\n @GET(\"service/getIpInfo.php/\")\n Observable<ResponseBody> getData(@Query(\"ip\") String ip);\n\n\n @GET(\"{url}\")\n Observable<ResponseBody> executeGet(\n @Path(\"url\") String url,\n @QueryMap Map<String, String> maps);\n\n\n @POST(\"{url}\")\n Observable<ResponseBody> executePost(\n @Path(\"url\") String url,\n @FieldMap Map<String, String> maps);\n\n /* @Multipart\n @POST(\"{url}\")\n Observable<ResponseBody> upLoadFile(\n @Path(\"url\") String url,\n @Part(\"image\\\\\"; filename=\\\\\"image.jpg\") RequestBody avatar);\n\n @POST(\"{url}\")\n Call<ResponseBody> uploadFiles(\n @Url(\"url\") String url,\n @Part(\"filename\") String description,\n @PartMap() Map<String, RequestBody> maps);*/\n\n}", "public interface TravelApiService {\n @GET(\"api/users/{userCode}/travels\")\n Call<List<Travel>> getTravel(@Path(value = \"userCode\") String userCode);\n\n @POST(\"api/users/{userCode}/travels\")\n Call<PostTravelGsonResponce> postTravel(@Path(value = \"userCode\") String userCode, @Field(\"travel_date\") String travelDate, @Field(\"latitude\") Double latitude, @Field(\"longitude\") Double longitude, @Field(\"area_name\") String areaName, @Field(\"contry_name\") String countryName, @Field(\"token\") String token);\n}", "public interface API {\n @GET(\"api/v1.5/tr.json/translate\")\n Call<Resp> Translate(@QueryMap Map<String, String> parameters);\n\n}", "public interface Api {\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"anslogsave\")\n Call<ResponseBody> anslogsave(@Body RequestBody anslog);\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"robotlogsave\")\n Call<ResponseBody> robotlogsave(@Body RequestBody robotlogsave);\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"robotstatsave\")\n Call<ResponseBody> robotstatsave(@Body RequestBody robotstatsave);\n\n @FormUrlEncoded\n @POST(\"borr\")\n Call<String> borr(@Field(\"title\")String title,\n @Field(\"inflag\")int inflag);\n @FormUrlEncoded\n @POST(\"guide\")\n Call<String> guide(@Field(\"title\")String title);\n @FormUrlEncoded\n @POST(\"\")\n Call<String> baidu();\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"data\")\n Call<ResponseBody> upCewen(@Body RequestBody upCewen);\n\n @GET(\"doc_list?\")\n Call<String> search(@Query(\"search_txt\")String search);\n}", "private WAPIHelper() { }", "public interface ClientApi extends Api {\n\n\t/**\n\t * To parse client request\n\t * \n\t * @param message\n\t * the request message from client to be parsed\n\t * @return IsoBuffer object the implementation of {@link ConcurrentHashMap}\n\t * @throws PosException\n\t * thrown when an exception occurs during parsing\n\t */\n\tpublic IsoBuffer parse(String message) throws PosException;\n\n\t/**\n\t * To parse emv data\n\t * \n\t * @param isoBuffer\n\t * the parsed buffer containing emv data\n\t * @return Map object containing tags and data as key value pair\n\t */\n\tpublic Map<EmvTags, String> parseEmvData(IsoBuffer isoBuffer);\n\n\t/**\n\t * To modify the {@link IsoBuffer} object for client response.\n\t * \n\t * @param isoBuffer\n\t * the buffer need to modified for response\n\t */\n\tpublic void modifyBits4Response(IsoBuffer isoBuffer, Data data);\n\n\t/**\n\t * To build the client message\n\t * \n\t * @param isoBuffer\n\t * the buffer holding all fields and data need to be formed as\n\t * response\n\t * @return response formed response {@link String} object need to responded\n\t * to client\n\t */\n\tpublic String build(IsoBuffer isoBuffer);\n\n\tpublic String getStoredProcedure();\n\t\n\tpublic Boolean checkHostToHost();\n\n\tpublic boolean errorDescriptionRequired();\n\n}", "public interface RestApi {\n\n @GET(\"/ride.asp\")\n Call<List<Model>> getData (@Query(\"userid\") int userId,\n @Query(\"from_name\") String fromName,\n @Query(\"from_lat\") double lat,\n @Query(\"from_lng\") double lng,\n @Query(\"to_name\") String toName,\n @Query(\"to_lat\") double toLat,\n @Query(\"to_lng\") double toLng,\n @Query(\"time\") long time);\n}", "public interface Api {\n\n\n @GET(\"users?site=stackoverflow\")\n Call<UserResponse> getUser(@Query(\"pagesize\")int size,@Query(\"sort\")String sort);\n\n @GET(\"comments?site=stackoverflow\")\n Call<CommentsResponse> getComments(@Query(\"order\")String order,@Query(\"sort\")String votes,@Query(\"pagesize\")int size,@Query(\"min\")int min);\n\n @GET(\"posts/{ids}?site=stackoverflow\")\n Call<PostResponse> getPostResponseCall(@Path(\"ids\") long id);\n @GET(\"users/{ids}/questions?site=stackoverflow\")\n Call<QuestionsResponse> getQuestionsResponseCall (@Path(\"ids\")long id),@Query(\"sort\")String votes,\n}", "public interface RequestService {\n //http://gank.io/api/data/Android/10/1\n /*@GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();*/\n @GET(\"api/data/Android/10/1\")\n Call<GankBean> getAndroidInfo();\n @GET(\"api/data/Android/10/{page}\")\n Call<GankBean> getAndroidInfo(@Path(\"page\") int page);\n @GET(\"api/data/query?cityname=深圳\")\n Call<ResponseBody> getWeather(@Query(\"key\") String key,@Query(\"area\") String area);\n @GET(\"group/{id}/users\")\n Call<List<User2>> groupList(@Field(\"id\") int groupId, @QueryMap Map<String,String> options);\n @GET\n Call<GankBean> getAndroid2Info(@Url String url);\n\n}", "private ApiInfo apiInfo() {\n Contact contact = new Contact(\"Hanchuanjun\", \"\", \"[email protected]\");\n ApiInfo apiInfo = new ApiInfo(\n \"GEHC SmartX SSO-OAuth模块api\",\n \"GEHC SmartX SSO-OAuth模块服务api\",\n \"v0.0.1\",\n \"初始化版本\",\n contact,\n \"\",\n \"\");\n return apiInfo;\n }", "public interface IPokeapiService {\n\n\n\n// @GET(\"lp_iem/result.json\")\n// Call<PokemonWs> listPokemon();\n\n @GET(\"?action=cardlist&\")\n Call<List<Pokemon>> listPokemon(@Query(\"user\")int user);\n //@Query(\"user\")int user\n\n @GET(\"?action=details&\")\n Call<Pokemon> getPokemon(@Query(\"card\")int id_card);\n\n @GET(\"?action=pokedex\")\n Call<List<Pokemon>> getPokedex();\n\n}", "public interface ProjectsApi {\n //findProjectsByLanguage\n void findProjectsByLanguage(String lang, Handler<AsyncResult<List<ProjectInfo>>> handler);\n \n}", "public interface DetailMovie {\n @GET(\"{id}\")\n Call<DetailMovies> getData(@Path(\"id\") int id,\n @Query(\"api_key\") String api_key,\n @Query(\"language\") String language,\n @Query(\"append_to_response\") String append_to_response\n );\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public interface ApiInterface {\n // TODO (6) buat class ApiInterface\n //class ini berfungsi untuk mendefinisikan interface untuk retrofit\n\n @GET(\"movie/top_rated\")\n Call<MovieResponse>getTopRatedMovies(@Query(\"api_key\") String apiKey);\n\n @GET(\"move/{id}\")\n Call<MovieResponse> getMovieDetails(@Path(\"id\")int id,@Query(\"api_key\")String apiKey);\n}", "public interface CircleService {\n\n @FormUrlEncoded\n @POST(\"/circle/list\")\n LiveData<BaseBean<List<CircleBean>>> getCircleData(@Field(\"userid\") long useId, @Field(\"pagesize\") int pageSize, @Field(\"pageno\") int pageNo);\n @FormUrlEncoded\n @POST(\"/circle/add\")\n Flowable<BaseBean<CircleBean>> upCircleData(@Field(\"userid\")long userId,@Field(\"content\") String content,@Field(\"images\") String images);\n}", "protected abstract IRawService<T> getApi();", "public interface APIInterface {\n @GET(\"/data/price\")\n Call<Object> compareCurrency(@Query(\"fsym\")String fsym, @Query(\"tsyms\") String tsyms);\n @GET(\"/api/data/coinlist/\")\n Call<CurrencyResource> CoinsList();\n}", "public interface SaavnApi\n{\n @GET(\"/api.php\")\n Call<List<Song>> makeSongRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<SongList> makePlaylistRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<Show> makeShowRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<Song> makeEpisodeRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n}", "public interface CultureListApiService {\n @GET(Variable._CULTURE_LIST_SERVER_REQUEST_URL)\n Maybe<CultureTotalData> getCultureList(@QueryMap Map<String, String> map);\n\n class Factory extends Converter.Factory{\n public static CultureListApiService create(){\n return RetrofitFactory.initRetrofit().create(CultureListApiService.class);\n }\n }}", "public interface ApiService {\n\n @GET(\"datacatalog?format=json\")\n Call<Catalog> getTopCatalog();\n\n\n/* @GET(\"item/{storyid}.json\")\n Call<StoryResponse> getStoryDetails(@Path(\"storyid\") String storyid);\n\n @GET(\"autocomplete/json\")\n Call<AutoCompleteGooglePlaces> getAutoCompleteResults(@Query(\"key\") String API_KEY,\n @Query(\"input\") String encode);\n\n @GET(\"nearbysearch/json\")\n Call<GetPlacesResponse> getPlaceDetails(@Query(\"location\") String location,\n @Query(\"radius\") int radius,\n @Query(\"key\") String key);*/\n}", "public interface ApiService {\n @GET(\"/lista_pokemons.php\")\n void getPokemons(Callback<List<PokemonEntity>> response);\n\n\n}", "public interface Api {\n\n// String BASE_URL_REMOTE = \"http://192.168.0.11/videoworld/v1/\"; //远程服务器的\n\n String BASE_URL_REMOTE = \"http://www.luocaca.cn/VideoWorld/v1/\"; //远程服务器的\n// String BASE_URL_REMOTE = \"http://115.159.196.175/VideoWorld/v1/\"; //远程服务器的\n\n// String BASE_URL = \"http://v.juhe.cn/weather/\";\n\n\n @GET(\"citys\")\n Observable<AllCity> getAllCity(@Query(\"key\") String key);\n\n\n /**\n * http://localhost:8089/hello/book/add?name=大傻1&book_id=222&number=222&detail=详细信息\n *\n * @param book_id\n * @param number\n * @param detail\n * @param name\n * @return\n */\n\n @GET(\"book/add\")\n Observable<ApiResult> requestAdd(@Query(\"book_id\") String book_id,\n @Query(\"number\") String number,\n @Query(\"detail\") String detail,\n @Query(\"name\") String name,\n @Query(\"url\") String url\n );\n\n\n @GET(\"book/allbook\")\n Observable<ApiResult<List<Book>>> requestBookList();\n\n @GET(\"book/del/{bookId}\")\n Observable<ApiResult> requestDelete(@Path(\"bookId\") String bookId);\n\n @GET\n Observable<ObjectResponse> requestGetMovies(@Url String baseUrl, @Query(\"url\") String url);\n\n @GET\n Observable<ObjectResponse> requestAddMovies(@Url String baseUrl, @Query(\"url\") String url, @Query(\"list\") String list);\n\n //http://api.nlkmlk.com:81/love/user/1711111\n @GET\n Observable<Result> requestVip(@Url String baseUrl );\n\n\n}", "public interface ApiService {\n\n\n}", "public interface TermStatusApi {\n\n /**\n * 初始化终端参数\n * @return\n */\n @Headers(RetrofitManager.CACHE_CONTROL_AGE + RetrofitManager.CACHE_STALE_SHORT)\n @GET(\"mcReset\")\n Observable<CommonResponse<TermInitResult>> mcReset(@Query(\"mc_no\") String mc_no, @Query(\"time\") long time, @Query(\"sign\") String sign);\n\n @Headers(RetrofitManager.CACHE_CONTROL_AGE + RetrofitManager.CACHE_STALE_SHORT)\n @GET(\"mcInit\")\n Observable<CommonResponse<TermInitResult>> mcInit(@Query(\"mc_no\") String mc_no, @Query(\"time\") long time, @Query(\"sign\") String sign);\n\n\n}", "public interface GetProductionDataApi {\n @GET(\"/api/Production/GetProductionData\")\n public void getProductionData(@Query(NetWorkConstant.stid) String stid,@Query(NetWorkConstant.apikey)String apikey,NetCallback<NetWorkResultBean<ProductionDataPackge>> NetCallback);\n\n @GET(\"/api/Production/GetProductionState/\")\n public void getProductionState(@Query(NetWorkConstant.stid) String stid, @Query(NetWorkConstant.apikey) String apikey, NetCallback<NetWorkResultBean<ProductionStatePackge>> callback);\n\n}", "public interface d2ticker {\n @GET(\"/match/{id}\")\n void getMatchesList(@Path(\"id\") long id, Callback<Api> api);\n}", "public interface ApiInterface {\n\n\n @GET(\"api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call<List<News>> getNewsAPIList();\n\n @PUT(\"api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call<List<News>> createNewsAPIBlob();\n\n @DELETE(\"/api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call deletePost();\n\n}", "public interface IOpenWeatherAPI {\n String ENDPOINT = \"http://api.openweathermap.org/\";\n\n String KEY_OPEN_WEATHER_API = \"0d664d5c76a364c4e18b207ac25a0ef4\";\n\n //******** 5 DÍAS/8 HORAS *******\n //@GET(\"/data/2.5/forecast\")\n //Call<RootPredicciones> getPredicciones(@Query(\"lat\") String latitud, @Query(\"lon\") String longitud);//Información meteorológica de 5 días de la latitud y longitud\n\n\n //******** Actual ***********\n @GET(\"data/2.5/weather\")\n Call<Prediccion> getPrediccionActual(@Query(\"lat\") String latitud, @Query(\"lon\") String longitud);//Información meteorológica actual de la latitud y longitud\n}", "public interface DataKPU {\n @GET(\"open/v1/api.php?cmd=wilayah_browse&\")\n Call<RWilayah> wilayah_browse(@Query(\"wilayah_id\") String idWil);\n}", "public interface ShortUrlApi {\n\n @POST(\"shorturl\")\n @Converter(ShortUrlConverter.class)\n Call<String> shortUrl(@Body String longUrl,@Query(\"access_token\")String accessToken);\n\n class ShortUrlConverter extends JacksonConverter<String,String> {\n @Override\n public byte[] request(ObjectMapper mapper, Type type, String longUrl) throws IOException {\n return String.format(\"{\\\"action\\\":\\\"long2short\\\",\\\"long_url”:”%s”}\",longUrl).getBytes(CHARSET_UTF8);\n }\n\n @Override\n public String response(ObjectMapper mapper, Type type, byte[] response) throws IOException {\n JsonNode jsonNode = mapper.readTree(response);\n return jsonNode.path(\"short_url\").asText();\n }\n }\n}", "public interface LooksoftMainApi {\n @GET(\"main\")\n Call<Data> loadData();\n}", "public interface Service {\n\n\n @GET(\"/3/search/movie\")\n Call<Lista> getSearch(@Query(\"api_key\") String apiKey, @Query(\"query\") String queryString);\n\n}", "public interface BaiDuApis {\n\n /**\n * http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.common&query=%E7%88%B1%E6%88%91%E8%BF%98%E6%98%AF%E4%BB%96&page_size=30&page_no=1&format=xml\n */\n\n\n String Host = \"http://tingapi.ting.baidu.com/v1/restserver/\";\n String Method_search = \"baidu.ting.search.catalogSug\";\n //String Method_search = \"baidu.ting.search.common\";\n String Method_lrc=\"\";\n String Method_play = \"baidu.ting.song.play\";\n\n @GET(\"ting\")\n Flowable<BaiDuMusicSearchBean> fetchMusicListInfo(@Query(\"method\") String method, @Query(\"query\") String query);\n\n @GET(\"ting\")\n Flowable<BaiDuPlayBean> playMusicLink(@Query(\"method\") String method, @Query(\"songid\") String songId);\n}", "public interface Api {\n\n// root url after add multiple servlets\n\n String BASE_URL = \"https://simplifiedcoding.net/demos/\";\n\n @GET(\"marvel\")\n Call<List<Modelclass>> getmodelclass();\n\n\n\n}", "public interface API {\n\n String ZHIHU_DAILY_BEFORE = \"http://news.at.zhihu.com/api/4/news/before/\";\n String ZHIHU_DAILY_OFFLINE_NEWS = \"http://news-at.zhihu.com/api/4/news/\";\n String SEARCH = \"http://zhihudailypurify.herokuapp.com/search/\";\n\n}", "public interface SeePatientCaseModel {\n /**\n * 向服务器上传添加患者的信息\n */\n void updateTherapy(String token, int therapyId, List<String> photos, int doctorId, int patientId, String state, String date, String record, CallBack callBack);\n\n /**\n * 获取病例信息\n */\n void getTherapy(String token,int therapyId,CallBack callBack);\n}", "public interface ReceiveThirdDataService {\n\n /**\n * 解析第三数据,每叫号业务推送\n *\n * @param courtTakeNumPojo\n * @return\n */\n RestApiMsg<String> transferThirdData(CourtTakeNumPojo courtTakeNumPojo, HttpServletRequest request);\n}", "public interface UdonShopApi {\n @GET(\"/RestSearchAPI/20150630/\")\n public Observable<UdonShopEntity> getUdonShops(@Query(\"keyid\") final String keyid,\n @Query(\"format\") final String format,\n @Query(\"category_l\") final String category_l,\n @Query(\"category_s\") final String category_s,\n @Query(\"input_coordinates_mode\") final String input_coordinates_mode,\n @Query(\"latitude\") final String latitude,\n @Query(\"longitude\") final String longitude,\n @Query(\"range\") final String range,\n @Query(\"hit_per_page\") final String hit_per_page);\n\n}", "public interface Api {\n\n @GET(\"index\")\n Call<String> getSimple();\n\n @GET(\"getxml\")\n Call<String> getXml(@Query(\"code\") int code);\n\n @FormUrlEncoded\n @POST(\"postme\")\n Call<String> postSimple(@Field(\"from\") String foo);\n\n @Headers({\"Content-Type: application/xml\", \"Accept: application/json\"})\n @POST(\"postxml\")\n Call<String> postXml(@Body RequestBody aRequestBody);\n\n\n}", "private ApiInfo getApiInfo()\n {\n Contact contact = new Contact(\"Melchior Vrolijk\", \"\",\"[email protected]\");\n\n return new ApiInfo(\n \"Spring boot secure API documentation\",\n \"This is the demo spring boot secure api project documentation\",\n \"1.0\",\"\",contact,\n \"\",\"\",Collections.emptyList());\n }", "public interface GrosirMobilApi {\n\n String v1 = \"v1\";\n String v2 = \"v2\";\n\n String loginPath = \"/api/auth/loginMobile\";\n String tipeUsahaPath = \"/api/registrasi/tipeusahamobile\";\n String questionOnePath = \"/api/registrasi/KebutuhanKendaraanBulanMobile\";\n String questionTwoPath = \"/api/registrasi/Rata2PenjualanMobile\";\n String questionThreePath = \"/api/registrasi/KebutuhanPembelianMobile\";\n String questionFourPath = \"/api/registrasi/JenisMobilMobile\";\n String questionFivePath = \"/api/registrasi/SumberInfoMobile\";\n String tahunKendaraanPath = \"/api/registrasi/TahunKendaraanMobile\";\n String asalKendaraanPath = \"/api/registrasi/AsalKendaraanMobile\";\n String saveDataRegisterPath = \"/api/registrasi/SimpanMobile\";\n String validationOtpPath = \"/api/registrasi/validasiOtpMobile\";\n String resendOtpPath = \"/api/registrasi/resendOtp\";\n String logoutPath = \"/api/auth/logout\";\n String provincePath = \"/api/registrasi/Propinsi\";\n String kabupatenPath = \"/api/registrasi/Kabupaten\";\n String kecamatanPath = \"/api/registrasi/Kecamatan\";\n String kelurahanPath = \"/api/registrasi/Kelurahan\";\n String checkActiveTokenPath = \"/api/cekaktiftokenMobile\";\n String wareHousePath = \"/api/lokasi/warehouseMobile\";\n String homeLivePath = \"/api/Live/HomeMobile\";\n String homeComingSoonPath = \"/api/comingsoon/listeventMobile\";\n String homeHistoryPath = \"/api/Live/RiwayatMobile\";\n String liveVehicleDetailPath = \"/api/Live/detailMobile\";\n String timeServerPath = \"/api/jamserverMobile\";\n String liveNegoPath = \"/api/Live/LiveNegoMobile\";\n String liveBuyNowPath = \"/api/Live/LiveBuyNow\";\n String listCartPath = \"/api/Live/datakeranjang\";\n String setAndUnsetFavoritePath = \"/api/favorite/setAndUnsetFavorite\";\n String changePasswordPath = \"/api/auth/changePasswordForgot\";\n String generateVaPath = \"/api/Pembayaran/GenerateVA\";\n String invoiceVaPath = \"/api/Pembayaran/InvoiceVA\";\n String historyTransactionPath = \"/api/Live/RiwayatMobile\";\n String checkStatusHistoryTransactionPath = \"/api/Pembayaran/cekStatusPembayaran\";\n String merekPath = \"/api/filter/merek\";\n String gradePath = \"/api/filter/grade\";\n String infoMenuPath = \"/api/info/getInfo\";\n\n\n //@Headers(\"X-Requested-With:XMLHttpRequest\")\n\n @Headers(\"Content-Type: application/json\")\n @POST(loginPath)\n Single<LoginResponse> loginApi(@Body LoginRequest loginRequest);\n\n @Headers(\"Content-Type: application/json\")\n @GET(logoutPath)\n Call<GeneralResponse> logoutApi(@Header(\"Authorization\") String authToken);\n\n// @Headers(\"Content-Type: application/json\")\n// @POST(historyBillPaymentPath)\n// Single<HistoryBillPaymentResponse> historyBillPaymentApi(@Header(\"Authorization\") String authToken,\n// @Body HistoryTransactionRequest historyTransactionRequest);\n\n @Headers(\"Content-Type: application/json\")\n @GET(checkActiveTokenPath)\n Call<CheckActiveTokenResponse> checkActiveTokenApi(@Header(\"Authorization\") String authToken);\n\n @Headers(\"Content-Type: application/json\")\n @GET(provincePath)\n Call<ProvinceResponse> provinceApi();\n\n @Headers(\"Content-Type: application/json\")\n @POST(kabupatenPath)\n Call<KabupatenResponse> kabupatenApi(@Body KabupatenRequest kabupatenRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(kecamatanPath)\n Call<KecamatanResponse> kecamatanApi(@Body KecamatanRequest kecamatanRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(saveDataRegisterPath)\n Call<SaveDataRegisterResponse> saveDataRegisterApi(@Body SaveDataRegisterRequest saveDataRegisterRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(validationOtpPath)\n Call<GeneralResponse> validationOtpApi(@Body ValidationOtpRequest validationOtpRequest);\n\n\n @Headers(\"Content-Type: application/json\")\n @POST(resendOtpPath)\n Call<GeneralResponse> resendOtpApi(@Body ResendOtpRequest resendOtpRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(kelurahanPath)\n Call<KelurahanResponse> kelurahanApi(@Body KelurahanRequest kelurahanRequest);\n\n @Headers(\"Content-Type: application/json\")\n @GET(tipeUsahaPath)\n Call<TipeUsahaResponse> tipeUsahaApi(); \n \n @Headers(\"Content-Type: application/json\")\n @GET(questionOnePath)\n Call<QuestionResponse> questionOneApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(questionTwoPath)\n Call<QuestionResponse> questionTwoApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(questionThreePath)\n Call<QuestionResponse> questionThreeApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(questionFourPath)\n Call<QuestionResponse> questionFourApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(questionFivePath)\n Call<QuestionResponse> questionFiveApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(tahunKendaraanPath)\n Call<QuestionResponse> tahunKendaraanApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(asalKendaraanPath)\n Call<QuestionResponse> asalKendaraanApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(wareHousePath)\n Call<WareHouseResponse> wareHouseApi(@Header(\"Authorization\") String authToken);\n\n @Headers(\"Content-Type: application/json\")\n @POST(homeLivePath)\n Call<HomeLiveResponse> homeLiveApi(@Header(\"Authorization\") String authToken,\n @Body HomeLiveRequest homeLiveRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(homeComingSoonPath)\n Call<HomeComingSoonResponse> homeComingSoonApi(@Header(\"Authorization\") String authToken,\n @Body HomeComingSoonRequest homeComingSoonRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(homeHistoryPath)\n Call<HomeHistoryResponse> homeHistoryApi(@Header(\"Authorization\") String authToken,\n @Body HomeHistoryRequest homeHistoryRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(liveVehicleDetailPath)\n Call<VehicleDetailResponse> liveVehicleDetailApi(@Header(\"Authorization\") String authToken,\n @Body VehicleDetailRequest vehicleDetailRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(timeServerPath)\n Call<TimeServerResponse> timeServerApi();\n\n @Headers(\"Content-Type: application/json\")\n @POST(liveNegoPath)\n Call<GeneralNegoAndBuyNowResponse> liveNegoApi(@Header(\"Authorization\") String authToken,\n @Body NegoAndBuyNowRequest negoAndBuyNowRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(liveBuyNowPath)\n Call<GeneralNegoAndBuyNowResponse> liveBuyNowApi(@Header(\"Authorization\") String authToken,\n @Body NegoAndBuyNowRequest negoAndBuyNowRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(setAndUnsetFavoritePath)\n Call<GeneralResponse> setAndUnsetFavoriteApi(@Header(\"Authorization\") String authToken,\n @Body FavoriteRequest favoriteRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(listCartPath)\n Call<CartResponse> lisCartApi(@Header(\"Authorization\") String authToken);\n\n @Headers(\"Content-Type: application/json\")\n @POST(changePasswordPath)\n Call<GeneralResponse> changePasswordApi(@Body ChangePasswordRequest changePasswordRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(generateVaPath)\n Call<GenerateVaResponse> generateVaApi(@Header(\"Authorization\") String authToken,\n @Body GenerateVaRequest favoriteRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(invoiceVaPath)\n Call<InvoiceVaResponse> invoiceVaApi(@Header(\"Authorization\") String authToken,\n @Body InvoiceVaRequest invoiceVaRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(historyTransactionPath)\n Call<HistoryTransactionResponse> historyTransactionApi(@Header(\"Authorization\") String authToken,\n @Body HistoryTransactionRequest historyTransactionRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(merekPath)\n Call<MerekResponse> filterMerekApi(@Header(\"Authorization\") String authToken,\n @Body MerekRequest merekRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(gradePath)\n Call<GradeResponse> filterGradeApi(@Header(\"Authorization\") String authToken,\n @Body MerekRequest merekRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(infoMenuPath)\n Call<InfoMenuResponse> infoMenuApi(@Header(\"Authorization\") String authToken,\n @Body MerekRequest merekRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(checkStatusHistoryTransactionPath)\n Call<CheckStatusHistoryTransactionResponse> checkStatusHistoryTransactionApi(@Header(\"Authorization\") String authToken,\n @Body CheckStatusHistoryRequest historyTransactionRequest);\n\n}", "public interface RestApis {\n\n @POST(\"verifyPassword?key= AIzaSyAUjt3lOrt0cFwbbd5Ag8M1-ISzQlE0Wjg\")\n Call<LoginResponse> loginUser(@Body LoginBody loginBody);\n\n @GET(\"events.json\")\n Call<EventKeyModel> getAllEvents();\n\n @PATCH(\"events/{eventid}\")\n Call<Void> punchit(@Path(\"eventid\") String eventid,@Body AddpunchedListModel addpunchedListModel);\n\n @POST(\"signupNewUser?key= AIzaSyAUjt3lOrt0cFwbbd5Ag8M1-ISzQlE0Wjg\")\n Call<LoginResponse> registerUser(@Body LoginBody loginBody);\n\n @POST(\"users/{uid}\")\n Call<Void> registerUserDb(@Path(\"uid\")String uid,@Body UserDetailsModel eventsDetailsBodyModel);\n}", "public interface MmInterface{\n //http://xehoihanoi.com.vn/api/auth/[email protected]&password=123456&username=xuansang&phone=0986373770\n //1.\n @GET(\"api/auth/create\")\n Call<Response> createUser(@Query(\"username\") String username,@Query(\"email\") String email,@Query(\"password\") String password,@Query(\"phone\") String phone);\n\n //2.api/group/create?name=hoang&text=noidung&status=1\n @GET(\"api/auth/create\")\n Call<Response> createGroup(@Query(\"name\") String groupName,@Query(\"text\") String description,@Query(\"status\") String status);\n //3. http://xehoihanoi.com.vn/api/auth/[email protected]&password=123456\n Call<Response> login(@Query(\"email\") String email,@Query(\"password\") String password);\n\n\n //4. Load AdUnitId\n\n}", "OptimizeResponse() {\n\n\t}", "public interface ApiService {\n @GET(\"questcms/floorplan\")\n Call<List<FloorPlan>> listFloorPlan();\n}", "public interface ComicService {\n\n\n\n @GET(\"/v1/public/characters/{characterId}/comics\")\n Call<ResponseBody> getComics(@Path(\"characterId\") int characterId, @Query(\"offset\") int offset, @Query(\"limit\") int limit,\n @Query(\"ts\") long ts, @Query(\"apikey\") String apikey, @Query(\"hash\") String hash);\n}", "public interface Api {\n @GET(\"topher/2017/May/59121517_baking/baking.json\")\n Call<List<Recipe>> getRecipes();\n}", "public interface UserApi {\n @POST(\"mobile/user/login\")\n Observable<BS_BaseBean<UserLoginBean>> userLogin(@Query(\"urid\") String urid, @Query(\"pwd\") String pwd, @Query(\"jgid\") String jgid);\n @GET(\"mobile/user/get/agencys\")\n Observable<BS_BaseListBean<AgencyBean>> getAgency(@Query(\"urid\") String urid);\n\n\n}", "public interface APIService {\n\n String baseUrl = \"http://api.zhuishushenqi.com\";\n\n /**\n */\n// @FormUrlEncoded\n// @POST(\"/cats/lv2/statistics/\")\n// Flowable<GetListRsp> login(@Field(\"username\") String username,\n// @Field(\"password\") String password);\n\n /**\n * GetListRsp\n */\n @GET(\"/cats/lv2/statistics/\")\n Observable<GetListRsp> login(@QueryMap Map<String, String> params);\n}", "public interface ApiInterFace {\n @GET(\"restaurants\")\n Call<Restaurant_model> getRestaurants();\n\n @POST(\"/profile\")\n @FormUrlEncoded\n Call<LoginFragment.UserSentResponse> sendUserData(@Field(\"name\") String name, @Field(\"picUrl\") String picUrl, @Field(\"email\") String email);\n\n\n @GET(\"/search/{keyword}\")\n Call<SearchModel> search(@Path(\"keyword\") String keyword);\n\n @GET(\"/profile/{id}\")\n Call<UserProfile_model> getUserInfo(@Path(\"id\") String id);\n\n @GET(\"/meal/{id}\")\n Call<RestaurantMealResponse> getRestaurantMeal(@Path(\"id\") int id);\n\n @GET(\"/restaurant/{id}\")\n Call<RestaurantDetailResponse> getRestaurantDetailResponse(@Path(\"id\") int id);\n}", "interface RetrofitApi {\n @C7730f(mo20420a = \"/aweme/v1/aweme/delete/\")\n C18253l<BaseResponse> deleteItem(@C7744t(mo20436a = \"aweme_id\") String str);\n\n @C7730f(mo20420a = \"/aweme/v1/commit/item/digg/\")\n C18253l<BaseResponse> diggItem(@C7744t(mo20436a = \"aweme_id\") String str, @C7744t(mo20436a = \"type\") int i, @C7744t(mo20436a = \"channel_id\") int i2);\n\n @C7730f(mo20420a = \"/aweme/v1/commit/item/digg/\")\n C18253l<BaseResponse> diggItem(@C7744t(mo20436a = \"aweme_id\") String str, @C7744t(mo20436a = \"origin_aweme_id\") String str2, @C7744t(mo20436a = \"type\") int i, @C7744t(mo20436a = \"channel_id\") int i2);\n }", "public interface ApiInterface {\n\n //Account API\n String ping(OkHttpClient client);\n\n String obtainAuthToken(OkHttpClient client, String username, String password);\n\n JSONObject checkAccountInfo(OkHttpClient client, String token);\n\n JSONObject getServerInformation(OkHttpClient client);\n\n //Starred File API\n List<StarredFile> listStarredFiles(OkHttpClient client, String token);\n\n //Library API\n List<Library> listLibraries(OkHttpClient client, String token);\n\n Library getLibraryInfo(OkHttpClient client, String token, String repo_id);\n\n List<LibraryHistory> getLibraryHistory(OkHttpClient client, String token, String repo_id);\n\n JSONObject createNewLibrary(OkHttpClient client, String token, String libName, String desc, String password);\n\n boolean deleteLibrary(OkHttpClient client, String token, String repo_id);\n\n //File API\n String getFileDownloadLink(OkHttpClient client, String token, String repo_id, String p, boolean reuse);\n\n FileDetail getFileDetail(OkHttpClient client, String token, String repo_id, String p);\n\n List<FileCommit> getFileHistory(OkHttpClient client, String token, String repo_id, String p);\n\n boolean createFile(OkHttpClient client, String token, String repo_id, String p);\n\n boolean renameFile(OkHttpClient client, String token, String repo_id, String p, String newName);\n\n boolean moveFile(OkHttpClient client, String token, String repo_id, String p, String dst_repo, String dst_dir);\n\n boolean revertFile(OkHttpClient client, String token, String repo_id, String p, String commit_id);\n\n boolean deleteFile(OkHttpClient client, String token, String repo_id, String p);\n\n String getUploadLink(OkHttpClient client, String token, String repo_id, String p);\n\n List<UploadFileRes> uploadFile(OkHttpClient client, String token, String uploadLink, String parent_dir, String relative_path, File... files);\n\n String getUpdateLink(OkHttpClient client, String token, String repo_id, String p);\n\n boolean updateFile(OkHttpClient client, String token, String updataLink, File file, String target_file);\n\n //Directory API\n List<DirectoryEntry> listDirEntriesByP(OkHttpClient client, String token, String repo_id, String p);\n\n// List<DirectoryEntry> listDirectoryEntriesByID(OkHttpClient client,String token,String repo_id,String id);\n\n List<DirectoryEntry> listAllDirEntries(OkHttpClient client, String token, String repo_id);\n\n boolean createNewDir(OkHttpClient client, String token, String repo_id, String p);\n\n boolean renameDir(OkHttpClient client, String token, String repo_id, String p, String newName);\n\n boolean deleteDir(OkHttpClient client, String token, String repo_id, String p);\n\n String getDirDownloadToken(OkHttpClient client, String token, String repo_id, String parent_dir, String dirents);\n\n boolean queryZipProgress(OkHttpClient client, String token, String dirDownloadToken);\n\n String getDirDownloadLink(OkHttpClient client, String token, String dirDownloadToken);\n}", "private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}", "public interface ApiInterface {\n @GET(\"api/place/nearbysearch/json?rankby=distance&sensor=false\")\n Call<CityPlacesResponse> getNearPlaces(@Query(\"location\") String ltlng,@Query(\"types\") String type,@Query(\"key\") String key);\n\n @GET(\"api/place/details/json?\")\n Call<PlaceDetailsResponse> getDetailsPlace(@Query(\"placeid\") String placeId, @Query(\"key\") String key);\n\n @GET(\"api/directions/json?&units=metric\")\n Call<DistanceResponse> getWay(@Query(\"origin\") String ltlng, @Query(\"destination\") String pltplng, @Query(\"sensor\") boolean sensor, @Query(\"language\") String language, @Query(\"key\") String key);\n}", "public interface APIInterface {\r\n @GET(\"api.php/action=query&format=json&prop=pageimages%7Cpageterms&generator=prefixsearch&redirects=1&formatversion=2&piprop=thumbnail&pithumbsize=50&pilimit=10&wbptterms=description\")\r\n Call<SearchResponseModel> getDataList(@Query(\"gpssearch\") String name , @Query(\"gpslimit\") String gpsLimit);\r\n}", "public interface RetroiftService {\n @GET(\"catalog\")\n Call<CgBaseEntity> getCategories(@Query(\"key\") String key);\n\n @FormUrlEncoded\n @POST(\"query\")\n Call<BookBaseEntity> getBookList(@Field(\"catalog_id\") String id, @Field(\"pn\") String\n pn, @Field(\"rn\") String rn, @Field(\"key\") String key);\n\n}", "public interface ArticleApi {\n\n\n //获取所有文章\n @GET(value = \"article/list/{random}\")\n Observable<List<PushArticleDataBean>> getArticleList(@Path(\"random\") int random);\n\n //获取单篇文章\n @GET(value = \"article/single/{article_id}\")\n Observable<PushArticleDataBean> getArticle(@Path(\"article_id\") int article_id);\n\n //搜索文章\n @POST(value = \"article/search\")\n Call<ArrayList<PushArticleDataBean>> search(@Query(\"searchData\") String searchData);\n\n}", "public void request() {\n }", "private CallResponse() {\n initFields();\n }", "public interface API {\n\n// String BASE_URL = \"http://logicalsofttech.com/helpmewaka/api/\";\n// String BASE_URL_IMG_CON = \"https://logicalsofttech.com/helpmewaka/upload/contractor/profile/\";\n// String BASE_URL_IMG_CUST = \"https://logicalsofttech.com/helpmewaka/upload/customer/\";\n// String BASE_URL_DOWNLOAD_IMG_CUST = \"https://logicalsofttech.com/helpmewaka/upload/jobs/customer/\";\n// String BASE_URL_DOWNLOAD_IMG_CONTRACTOR = \"https://logicalsofttech.com/helpmewaka/upload/jobs/contractor/\";\n// String BASE_URL_IMEGES = \"https://www.helpmewaka.com/images/\";\n\n String BASE_URL = \"https://helpmewaka.com/api/\";\n String BASE_URL_IMG_CON = \"https://www.helpmewaka.com/upload/contractor/profile/\";\n String BASE_URL_IMG_CUST = \"https://www.helpmewaka.com/upload/customer/\";\n String BASE_URL_DOWNLOAD_IMG_CUST = \"https://www.helpmewaka.com/upload/jobs/customer/\";\n String BASE_URL_DOWNLOAD_IMG_CONTRACTOR = \"https://www.helpmewaka.com/upload/jobs/contractor/\";\n String BASE_URL_IMEGES = \"https://www.helpmewaka.com/images/\";\n\n}", "public interface RestCall {\n\n String query();\n\n String delete();\n\n String put();\n\n String get();\n\n String keys();\n\n}", "public interface baseApiService {\n\n @POST(\"login\")\n Call<FeedLogin> loginRequest(@Body LoginUser login);\n\n\n @GET(\"profile\")\n Call<FeedUser> getAllProfile(@Header(\"Content-Type\") String contenType,\n @Header(\"Accept\") String Accept,\n @Header(\"Authorization\") String authToken);\n\n @POST(\"register\")\n Call<DataRegister> registerReques(@Body registerUser registerUser);\n\n\n}", "public interface Api {\n @GET(\"sites\") //Check urls here https://inthecheesefactory.com/blog/retrofit-2.0/en?fb_comment_id=885081521586565_886605554767495\n Single<List<Site>> sitesGet();\n\n @GET(\"sites/state\")\n Single<List<SiteState>> sitesStateGet(@QueryMap() Map<String, String> query);\n\n @POST(\"sites/state/connection/follow\")\n Single<SiteState> follow(@Body FollowCommand params);\n\n @POST(\"sites/state/connection/unfollow\")\n Completable unfollow(@Body UnfollowCommand params);\n }", "public interface ApiService {\n\n /**\n * 问题列表\n * @param city\n * @return\n */\n @GET(URLs.QUESTIONS)\n Call<Result<ArrayList<Question>>> questions(@Query(\"city\") String city);\n\n /**\n * 用户登录\n * @param mobile\n * @param password\n * @return\n */\n @FormUrlEncoded\n @POST(URLs.LOGIN)\n Call<Result<User>> login(@Field(\"mobile\") String mobile,\n @Field(\"password\") String password);\n\n}", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "public interface CommonApi {\n\n //账号登录\n @FormUrlEncoded\n @POST(\"API/tmd/Login\")\n Observable<Response<Result<CommonResult>>> Login(@Field(\"userName\") String userAccount, @Field(\"passWord\") String userPassword);\n\n //报表获取\n @GET(\"API/tmd/GetStatistic\")\n Observable<Response<Result<CommonResult>>> Statistic();\n\n //人员定位\n @GET(\"API/tmd/GetEmpinformation\")\n Observable<Response<CommonResult>> GetEmp(@Query(\"GPS_SIMID\") String empSimid);\n\n //车辆定位\n @GET(\"API/tmd/GetTruck\")\n Observable<Response<CommonResult>> GetTruck(@Query(\"GPS_SIMID\") String empSimid);\n\n //查询\n @GET(\"API/tmd/GetUserSearch\")\n Observable<Response<Result<CommonResult>>> GetSearch(@Query(\"Name\") String name);\n\n //修改密码\n @FormUrlEncoded\n @POST(\"API/tmd/ResetPass\")\n Observable<Response<Result<CommonResult>>> ResetPass(@FieldMap Map<String, String> map);\n\n //获取消息通知\n @GET(\"API/tmd/GetMessages\")\n Observable<Response<Result<CommonResult>>> GetMessages(@QueryMap Map<String, String> map);\n\n //意见反馈\n @FormUrlEncoded\n @POST(\"API/tmd/Feedback\")\n Observable<Response<Result<CommonResult>>> Feedback(@FieldMap Map<String, String> map);\n}", "public interface GrabTicketQueryService {\n\n\n /**\n * 抢票查询\n * @param method\n * @param train_date\n * @param from_station\n * @param to_station\n * @return\n */\n JSONObject grabTicketQuery(String uid, String partnerid, String method, String from_station, String to_station, String from_station_name, String to_station_name, String train_date, String purpose_codes);\n// JSONObject grabTicketQuery(String partnerid, String method, String from_station, String to_station, String train_date, String purpose_codes);\n}", "public interface CountryListAPI {\n\n //@POST(Constants.NewSessionURL)\n //Call<Session>createSession(@Body loginRequest loginRequest);\n\n @GET(Constants.CountriesListURL)\n Call<List<Country>> getAllCountries();\n\n\n\n}", "public interface ApiInterface {\n\n @GET(\"Articles/\")\n Call<List<Article>> getAllArticles();\n\n\n}", "interface ApiService {\n\n @GET(\"users/{user}/repos\")\n Call<List<FlickR>> getFlickRItems(@Path(\"user\") String user);\n\n @GET(\"users/{user}\")\n Call<Owner> getFlickRMedia(@Path(\"user\") String user);\n\n }", "private ApiInfo apiInfo()\r\n\t {\r\n\t ApiInfo apiInfo = new ApiInfo(\r\n\t \"My Project's REST API\",\r\n\t \"This is a description of your API.\",\r\n\t \"version-1\",\r\n\t \"API TOS\",\r\n\t \"[email protected]\",\r\n\t \"API License\",\r\n\t \"API License URL\"\r\n\t );\r\n\t return apiInfo;\r\n\t }", "public interface IApiService {\n\n @GET(\"/its/master_halte/{id}\")\n public Data<Station> getSynchListStation(@Path(\"id\") String id);\n\n @GET(\"/its/eta/{koridor}/{id}\")\n public Data<Incoming> getSynchListIncoming(@Path(\"koridor\") String koridor,@Path(\"id\") String id);\n}", "public interface ApiServer {\n//\n @GET(\"umIPmfS6c83237d9c70c7c9510c9b0f97171a308d13b611?uri=homepage\")\n Observable<HomeBean> getHome();\n @POST\n Observable<Login> getDengLu(@Url String name, @QueryMap Map<String, String> paw);\n @GET(\"product/getCatagory\")\n Observable<Sort_lift> lift();\n @GET\n Observable<Sort_right> right(@Url String s);\n @GET\n Observable<Commodity_pagingBean> xia(@Url String s);\n @GET\n Observable<detailsBean> spxq(@Url String ss);\n @GET\n Observable<AddcartBean> add(@Url String s);\n @GET\n Observable<QurryBean> qurry(@Url String s);\n @GET\n Observable<AddcartBean> delete(@Url String s);\n @GET\n Observable<AddcartBean> addDd(@Url String s);\n @GET\n Observable<OrderBean> Ddlb(@Url String s);\n\n\n\n\n\n\n}", "ResourceAPI createResourceAPI();", "public interface SinaApiService {\n\n @GET(\"cgi-bin/pitu_open_access_for_youtu.fcg\")\n Observable<MoveListBean> faceMerge(@Header(\"Authorization\") String appSign,\n @Body RequestBody body);\n}", "public interface ApiManager {\n @POST\n Call<ResponseBody> upload(@Url() String url);\n\n //上传文件\n @POST\n Call<ResponseBody> uploadFile(@Url() String url, @Body RequestBody body);\n\n //修改手机号\n @POST\n Call<ResponseBody> changePhone(@Url() String url);\n\n //订单详情\n @POST\n Observable<PayDetails> orderDetatls(@Url() String url);\n\n //通知已读\n @POST\n Call<ResponseBody> notityReader(@Url() String url);\n}", "public interface ICupidoApi {\n @POST(\"/api/location\")\n Call<Location> savePosition(@Body Location l);\n\n @GET(\"/api/users\")\n Call<List<User>> getUsers();\n}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public interface TouTiaoApi {\n @Headers({\n \"Content-Type:application/x-www-form-urlencoded\"\n })\n @POST(\"/auth/access/device/\")\n Call<TokenResponse>getNewToken();\n//\n// @Headers({\n// \"Content-Type:application/x-www-form-urlencoded\"\n// })\n @FormUrlEncoded\n @POST(\"auth/access/device/\")\n Observable<TokenResponse>getToken(@FieldMap HashMap<String,String>params);\n\n @GET(\"/data/stream/v3\")\n Observable<NewsResponse>getNews(@Query(\"access_token\") String token,@QueryMap HashMap<String,String>params);\n}", "public interface ServiceApi {\n @GET(\"/user/login\")\n Observable<DlBean> dL(@Query(\"mobile\") String mobile,@Query(\"password\") String password );\n @GET(\"/user/reg\")\n Observable<ZcBean> zC(@Query(\"mobile\") String mobile,@Query(\"password\") String password );\n @GET(\"/ad/getAd\")\n Observable<LbBean> lieb(@Query(\"source\") String source );\n // http://120.27.23.105/product/getProductDetail?pid=1&source=android\n @GET(\"/product/getProductDetail\")\n Observable<XqBean> xQ(@Query(\"source\") String source, @Query(\"pid\") int pid);\n @GET(\"product/getCarts\")\n Observable<MsgBean<List<DataBean>>> getDatas(@Query(\"uid\") String uid, @Query(\"source\") String source);\n @GET(\"product/deleteCart\")\n Observable<MsgBean> deleteData(@Query(\"uid\") String uid, @Query(\"pid\") String pid, @Query(\"source\") String source);\n\n}", "public interface StrockIndexApiService {\r\n// @Headers(GlobalContants.HeadsSet)\r\n// @GET(\"?key=a23cd4983655b336fbd1f440acfb1152\")\r\n// Call<StrockIndexBean> getStrockIndex(\r\n// @Query(\"type\") int type\r\n// );\r\n}", "public interface LibraryService {\n\n /*\n\n 1.Search--Keyword\n 2.Get List\n A.Order by created time\n B.Refresh and load next page\n 3.Get specific one\n\n */\n\n @GET(\"classes/Library\")\n Observable<BaseResponse<Library>> getLibrary(@QueryMap Map<String, String> parametersMap);\n\n /*\n curl -X PUT \\\n -H \"X-LC-Id: OOhkF87ffBYBHmvph465ApmV-gzGzoHsz\" \\\n -H \"X-LC-Key: OkaU2qxpo1fbHPtc9o7yQVgM\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"upvotes\":{\"__op\":\"Increment\",\"amount\":1}}' \\\n https://api.leancloud.cn/1.1/classes/Post/558e20cbe4b060308e3eb36c\n */\n @PUT(\"classes/Library/{objId}\")\n Observable<ResponseBody> increaseCount(@Path(\"objId\") String objId, @Body CountIncrement countIncrement);\n\n \n}", "public interface RealTimeTransportApi {\n\n @GET(\"busstopinformation\")\n Call<PublicStopListResponse> listAllStops(@Query(\"operator\") String operator);\n\n @GET(\"realtimebusinformation\")\n Call<RealtimeRouteResponse> getRealtimeInfo(@Query(\"stopid\") String stopId);\n\n}" ]
[ "0.62555206", "0.60394746", "0.60217977", "0.5856615", "0.58525693", "0.5814141", "0.5800721", "0.57763577", "0.57588416", "0.5729675", "0.57166016", "0.57138145", "0.57038224", "0.57014626", "0.56923723", "0.56891024", "0.568676", "0.56803536", "0.5668173", "0.56652224", "0.56645375", "0.56523126", "0.5639654", "0.56384236", "0.56358534", "0.56204784", "0.5613525", "0.56075597", "0.55790174", "0.5574116", "0.55737454", "0.5570154", "0.556785", "0.5565536", "0.5557827", "0.5550305", "0.55500215", "0.5549595", "0.55448914", "0.5538998", "0.55366486", "0.5533036", "0.55314714", "0.5530936", "0.5522767", "0.55222225", "0.5520921", "0.55177647", "0.55173826", "0.55106133", "0.55095226", "0.55084616", "0.55004543", "0.54970425", "0.549572", "0.54905105", "0.5488863", "0.5488225", "0.54855865", "0.5483826", "0.5479645", "0.5478036", "0.5473167", "0.54727906", "0.54716945", "0.5463553", "0.5461214", "0.5459733", "0.54593366", "0.5459298", "0.5458598", "0.54583746", "0.5457737", "0.5457318", "0.54556614", "0.5454963", "0.5452043", "0.5450072", "0.54488045", "0.54469854", "0.54469585", "0.5444855", "0.54446524", "0.5439989", "0.54376966", "0.5430487", "0.54260236", "0.5424389", "0.54241776", "0.54235643", "0.54192156", "0.54166967", "0.5409399", "0.5404217", "0.5402222", "0.5400133", "0.53997296", "0.539509", "0.5394955", "0.5391868", "0.53908736" ]
0.0
-1
Method de lookup Method Download Image ? montando se houver algum campo do tipo bin?rio |DOWNLOADIMAGE|
public void findbyid() throws Exception { try { Con_contadorDAO con_contadorDAO = getCon_contadorDAO(); List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT); con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT(); } catch (Exception e) { e.printStackTrace(); setMsg("Falha ao realizar consulta!"); } finally { close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bitmap downloadImage(String theUrl){ \n\t \t//Log.i(\"ZZ\", \"AppDelegate downloadImage: \" + theUrl); \n\t \tdownloadInProgress = 1;\n\t InputStream in = null; \n\t \tBitmap bitmap = null;\n\t try{\n\t \tin = Obj_Downloader.OpenHttpConnection(theUrl);\n\t\t bitmap = BitmapFactory.decodeStream(in);\n\t }catch (Exception e) {\n \tLog.i(\"ZZ\", \"AppDelegate:downloadImage: ERROR: \" + e.getMessage()); \n\t //return null;\n\t }\n\t downloadInProgress = 0;\n\t return bitmap; \n\t }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "private void doNetGetImg() {\n\t\tString url = UploadUtils.PATIENTAPP_FILE_URL + CommonUtils.getTokenParam(activity) +\"&patientId=\"+orderMoreDetails.getPatientId()+\"&reportType=mr\";\n\t\tQJNetUICallback2 callback = new QJNetUICallback2<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>(activity) {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tif (result != null\n\t\t\t\t\t\t&& result.getResults() != null) {\n\t\t\t\t\tList<ImgQiNiuEntity> list = result.getResults().get(\"files\");\n\t\t\t\t\tif (list != null) {\n\n\t\t\t\t\t\tif (list.size()>=9) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.GONE);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 0; i < list.size(); i ++){\n\t\t\t\t\t\t\tImageItem item = new ImageItem();\n\t\t\t\t\t\t\titem.imagePath = list.get(i).getThumbnailUrl();\n\t\t\t\t\t\t\titem.upImagePath = list.get(i).getAbsFileUrl();\n\t\t\t\t\t\t\tdataChoosed.add(item);\n\t\t\t\t\t\t\tnoScrollgridview.setAdapter(adapter);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void onError(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onError(e, result);\n\t\t\t\tToastUtil.showToast(activity, \"获取失败!\",Toast.LENGTH_LONG);\n\t\t\t}\n\n\t\t\tpublic void onCompleted(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onCompleted(e, result);\n\t\t\t}\n\t\t};\n\t\tNetOld.with(activity).fetch( url ,null, new TypeToken<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>() {}, callback);\n\t}", "public void DownloadFromUrl(String imageURL, String fileName) {\n\t\tfinal String PATH = \"/data/data/org.draijer.nvkf/\";\n\t\t\n\t\ttry {\n\t\t\tURL url = new URL(imageURL); //you can write here any link\n\t\t\tFile file = new File(PATH+fileName);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tLog.d(\"ImageManager\", \"download begining\");\n\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\n\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\" + fileName);\n\t\t\n\t\t\t/* Open a connection to that URL. */\n\t\t\tURLConnection ucon = url.openConnection();\n\t\t \n\t\t\t/*\n\t\t\t * Define InputStreams to read from the URLConnection.\n\t\t\t */\n\t\t\tBufferedInputStream bis = null;\n\t\t\ttry {\n\t\t\t\tInputStream is = ucon.getInputStream();\n\t\t\t\tbis = new BufferedInputStream(is);\n\t\t\t} catch (Exception e) {\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Read bytes to the Buffer until there is nothing more to read(-1).\n\t\t\t */\n\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\n\t\t\ttry {\n\t\t\t\tint current = 0;\n\t\t\t\twhile ((current = bis.read()) != -1) {\n\t\t\t\t baf.append((byte) current);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t\t}\n\t\t\t\n\t\t\t/* Convert the Bytes read to a String. */\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tfos.write(baf.toByteArray());\n\t\t\tfos.close();\n\t\t\tLog.d(\"ImageManager\", \"download ready in \"+ ((System.currentTimeMillis() - startTime) / 1000) + \" sec\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t}\n\t}", "public void download(String reporteId) throws IOException{\n Request request = new Request.Builder()\n .url(\"https://pbs.twimg.com/profile_images/61655057/2425718692_1783fe0913_b.jpg\")\n .build();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.d(\"ERROR\",\"No se descarga imagen\");\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n ResponseBody body = response.body();\n long contentLength = body.contentLength();\n BufferedSource source = body.source();\n\n File file = new File(Environment.getExternalStorageDirectory()+\"/ReportApp/\"+ \"imagen.jpg\");\n BufferedSink sink = Okio.buffer(Okio.sink(file));\n\n long bytesRead = 0;\n while (source.read(sink.buffer(), 2048) != -1) {\n bytesRead += 2048;\n int progress = (int) ((bytesRead * 100) / contentLength);\n }\n sink.writeAll(source);\n sink.close();\n\n }\n });\n }", "private ImageDownloader(){ \t\n \n }", "void downloadImage(String imageURL, ImageView imageView);", "@GetMapping(\"/retrive/{fileId}\")\r\n public ResponseEntity<ByteArrayResource> downloadFile(@PathVariable Integer fileId) {\n Optional<Image> image;\r\n image = imgrepo.findById(fileId);\r\n Image ima=null;\r\n if(image.isPresent()) {\r\n ima = image.get();\r\n }\r\n return ResponseEntity.ok()\r\n .contentType(MediaType.parseMediaType(ima.getFileType()))\r\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + ima.getFileName() + \"\\\"\")\r\n .body(new ByteArrayResource(ima.getData()));\r\n\t\r\n\t\r\n }", "public Blob downloadFile(String inKey, String inFileName);", "@Override\n\tpublic String imageDownLoad(String url, String name) {\n\t\treturn HttpUtil.httpDownLoad(url, name);\n\t}", "public void downloadFile() {\n String path = images.get(viewPager.getCurrentItem()).getFilePath();\n String uRl = \"https://image.tmdb.org/t/p/w500\" + path;\n String name = path.substring(1, 5);\n File direct = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/Cinemato\");\n if (!direct.exists()) {\n direct.mkdirs();\n }\n DownloadManager mgr = (DownloadManager) Objects.requireNonNull(getContext())\n .getSystemService(Context.DOWNLOAD_SERVICE);\n Uri downloadUri = Uri.parse(uRl);\n DownloadManager.Request request = new DownloadManager.Request(\n downloadUri);\n request.setAllowedNetworkTypes(\n DownloadManager.Request.NETWORK_WIFI\n | DownloadManager.Request.NETWORK_MOBILE)\n .setAllowedOverRoaming(false).setTitle(name)\n .setDescription(\"Saved images from Cinemato\")\n .setDestinationInExternalPublicDir(Environment.DIRECTORY_PICTURES + \"/Cinemato\", name + \".jpg\");\n assert mgr != null;\n mgr.enqueue(request);\n // Open Download Manager to view File progress\n Toast.makeText(getContext(), \"Downloading...\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS));\n }", "public File downloadImage(String path2repository, String path2save) {\t\n\t\tFile imgfile = new File(path2save);\n\t\t\n\t\tValueCollection payload = new ValueCollection();\n\t\tpayload.put(\"path\", new StringPrimitive(path2repository));\n\t\t\n\t\ttry {\n\t\t\tInfoTable info = client.invokeService(ThingworxEntityTypes.Things, \"SmartDoorRepository\", \"LoadImage\", payload, 5000);\n\t\t\tImagePrimitive bin = (ImagePrimitive) info.getLastRow().getPrimitive(\"Content\");\n\t\t\tBufferedImage img = ImageIO.read(new ByteArrayInputStream(bin.getValue()));\t\t\n\t\t\timgfile.getParentFile().mkdirs();\n\t\t\timgfile.createNewFile();\n\t\t\tImageIO.write(img, \"jpg\", new File(path2save));\n\t\t\tLOG.info(\"Image {} was downloaded to {}.\",path2repository, path2save);\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Image couldn't be uploaded. Error: {}\",e);\n\t\t}\n\t\treturn imgfile;\n\t}", "private void getUserImage(){\r\n \t//setProgressBarIndeterminateVisibility(true);\r\n \t\r\n \tusername=null;\r\n \tfor(int i=0; i<senderList.size(); i++) {\t// kovetkezo felhasznalo kepe\r\n \t\tString str=senderList.get(i);\r\n \t\tif (!userImage.containsKey(str)) {\r\n \t\t\tusername=str;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (username==null) return;\r\n \t\r\n\t String url = \"ImageDownload?size=medium&username=\" + username +\r\n\t \t\t\t\t\t\t \"&ssid=\" + UserInfo.getSSID();\r\n\t downloadUserImage = new HttpGetByteConnection(url, mHandler, TASK_GETUSERIMAGE);\r\n\t downloadUserImage.start();\r\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "private byte[] downloadBinaryData(String imageUrlText)\r\n\t\t\tthrows MalformedURLException, IOException {\r\n\t\t// retrieve the image from the webpage and put it in HashMap\r\n\t\tURL url = new URL(imageUrlText);\r\n\r\n\t\t// input from image\r\n\t\tBufferedInputStream in = new BufferedInputStream(url.openStream());\r\n\t\t// downloaded bytes\r\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\r\n\t\t// download buffer\r\n\t\tfinal int BUFFERSIZE = 4096;\r\n\t\tbyte[] buffer = new byte[BUFFERSIZE];\r\n\t\tint bytesToWrite;\r\n\r\n\t\twhile ((bytesToWrite = in.read(buffer)) != -1) {\r\n\t\t\tout.write(buffer, 0, bytesToWrite);\r\n\t\t}\r\n\r\n\t\tbyte[] imgArray = out.toByteArray();\r\n\r\n\t\tin.close();\r\n\t\tout.close();\r\n\t\treturn imgArray;\r\n\t}", "@Override\n protected String doInBackground(String... params) {\n bitmap = DownloadImageBitmap(url);\n return null;\n }", "protected Bitmap doInBackground(String...urls){\n String urlOfImage = urls[0];\n Bitmap logo = null;\n try{\n InputStream is = new URL(urlOfImage).openStream();\n /*\n decodeStream(InputStream is)\n Decode an input stream into a bitmap.\n */\n logo = BitmapFactory.decodeStream(is);\n }catch(Exception e){ // Catch the download exception\n e.printStackTrace();\n }\n return logo;\n }", "FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}", "private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "private Bitmap downloadBitmap(final String id, final String url) {\n\n\t\t\ttry {\n\n\t\t\t\t\n\t\t\t\t//Log.e(\"123\", \"inside download -------\"+url+\"------id------\"+id);\n\t\t\t\tURL aURL = new URL(url);\n\t\t\t\tURLConnection conn = aURL.openConnection();\n\t\t\t\tconn.connect();\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\n\t\t\t\t\t\tconn.getInputStream(), 8 * 1024);\n\t\t\t\tBitmap bm = BitmapFactory.decodeStream(bis);\n\n\t\t\t\tif (bm == null) {\n\n\t\t\t\t\tDefaultHttpClient httpclient = new DefaultHttpClient();\n\t\t\t\t\tHttpGet httppost = new HttpGet(url);\n\t\t\t\t\tHttpResponse response;\n\t\t\t\t\tresponse = httpclient.execute(httppost);\n\t\t\t\t\tHttpEntity ht = response.getEntity();\n\t\t\t\t\tBufferedHttpEntity buf = new BufferedHttpEntity(ht);\n\t\t\t\t\tbm = BitmapFactory.decodeStream(buf.getContent());\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresponse = null;\n\t\t\t\t\t\tht = null;\n\t\t\t\t\t\tbuf.consumeContent();\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t//Logs.show(e);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tif (imgView != null\n\t\t\t\t\t\t\t&& imgView.getTag() != null\n\t\t\t\t\t\t\t&& imgView.getTag().toString()\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"fullImage\")) {\n\t\t\t\t\t\tif (bm != null) {\n\t\t\t\t\t\t\tint imgViewWidth = imgView.getWidth();\n\t\t\t\t\t\t\tint bitmapHeight = bm.getHeight();\n\t\t\t\t\t\t\tint bitmapWidth = bm.getWidth();\n\n\t\t\t\t\t\t\tif (imgViewWidth > 0 && bitmapWidth > 0\n\t\t\t\t\t\t\t\t\t&& bitmapWidth < imgViewWidth\n\t\t\t\t\t\t\t\t\t&& bitmapHeight > 0) {\n\t\t\t\t\t\t\t\tbitmapHeight = (int) (((float) imgViewWidth / bitmapWidth) * bitmapHeight);\n\t\t\t\t\t\t\t\tbm = Bitmap.createScaledBitmap(bm,\n\t\t\t\t\t\t\t\t\t\timgViewWidth, bitmapHeight, false);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t//Logs.show(e);\n\t\t\t\t}\n\n\t\t\t\tif (isRoundCornerReq) {\n\t\t\t\t\tImageHelper mImageHelper = new ImageHelper();\n\t\t\t\t\tbm = mImageHelper.getRoundedCornerImage(bm);\n\t\t\t\t}\n\t\t\t\tif (bm != null) {\n\t\t\t\t\taddBitmapToSoftCache(id, bm);\n\t\t\t\t}\n\t\t\t\t//Log.e(\"123\", \"aURL----\"+aURL+\"----bm------\"+bm);\n\t\t\t\tbis.close();\n\t\t\t\tbis = null;\n\t\t\t\tconn = null;\n\t\t\t\taURL = null;\n\t\t\t\treturn bm;\n\t\t\t} catch (IOException e) {\n\n\t\t\t\t\n\n\t\t\t\t//Logs.show(e);\n\n\t\t\t} catch (Exception e) {\n\n\t\t\t\t\n\n\t\t\t\t//Logs.show(e);\n\n\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\t//Logs.show(e);\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n normalDownload(finalBitmap,input.getText()+\"\");\n }", "private Bitmap downloadImage(String url)\n \t {\n \n \t Bitmap bitmap = null;\n \t InputStream stream = null;\n \t BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n \t bmOptions.inSampleSize = 1;\n \n \t try\n \t {\n \t stream = getHttpConnection(url);\n \t bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n \t stream.close();\n \n \t return bitmap;\n \t }\n \t catch (IOException e1)\n \t {\n \t e1.printStackTrace();\n \t }\n \t return bitmap;\n \t }", "public boolean GetImgPagina(int cod, String filePathName) throws SQLException {\n try {\n\n Connection con = model.connectionDataBase.ConnectionDB.Connect();\n\n \n PreparedStatement stmt = con.prepareStatement(\"SELECT `immagine_pagina` FROM `pagine_opera` WHERE cod_pagina = ?\");\n\n stmt.setInt(1, cod);\n ResultSet rs = stmt.executeQuery();\n\n\n while (rs.next()) {\n InputStream in = rs.getBinaryStream(1);\n OutputStream f = new FileOutputStream(new File(filePathName));\n \n int n = 0;\n while ((n = in.read()) > -1) {\n f.write(n);\n }\n f.close();\n in.close();\n\n return true;\n }\n } catch(Exception ex){\n System.out.println(ex.getMessage());\n }\n return false;\n }", "@RequestMapping(path = \"/memdownload\", method = RequestMethod.GET)\n public ResponseEntity<Resource> download(@RequestParam(\"image\") String image) throws IOException {\n File file = new ClassPathResource(SERVER_LOCATION + File.separator + image).getFile();\n\n HttpHeaders header = new HttpHeaders();\n header.add(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=img.jpg\");\n header.add(\"Cache-Control\", \"no-cache, no-store, must-revalidate\");\n header.add(\"Pragma\", \"no-cache\");\n header.add(\"Expires\", \"0\");\n\n Path path = Paths.get(file.getAbsolutePath());\n ByteArrayResource resource = new ByteArrayResource(Files.readAllBytes(path));\n\n return ResponseEntity.ok()\n .headers(header)\n .contentLength(file.length())\n .contentType(MediaType.parseMediaType(\"application/octet-stream\"))\n .body(resource);\n\n }", "abstract public String imageUrl ();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "void mo54427b(DownloadInfo downloadInfo);", "public String downloadImage(String imageName) {\r\n\t\ttry {\r\n\t\t\tMyWebService myService = service.getPort(MyWebService.class);\r\n\t\t\t// lets now download the uploaded image\r\n\t\t\tbyte[] downloadedImage = myService\r\n\t\t\t\t\t.retrieveImage(imageName + \".jpg\");\r\n\t\t\tFile imageFromServer = new File(PATH + \"ImageFromServer\" + imageName\r\n\t\t\t\t\t+ \".jpg\");\r\n\t\t\ttry {\r\n\t\t\t\tFileOutputStream fileOuputStream = new FileOutputStream(\r\n\t\t\t\t\t\timageFromServer);\r\n\t\t\t\tfileOuputStream.write(downloadedImage);\r\n\t\t\t\tfileOuputStream.close();\r\n\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn \"success\";\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\r\n\t}", "protected Bitmap doInBackground(String...urls){\n String urlOfImage = urls[0];\n Bitmap logo = null;\n try{\n InputStream is = new URL(urlOfImage).openStream();\n /*\n decodeStream(InputStream is)\n Decode an input stream into a bitmap.\n */\n logo = BitmapFactory.decodeStream(is);\n\n }catch(Exception e){ // Catch the download exception\n e.printStackTrace();\n }\n return logo;\n }", "@Test\n\tpublic void testDownLoadImage(){\n\t\tFile file = new File(\"D:\\\\mxk-test\\\\images\\\\20140214\\\\103171-10404.jpg\");\n\t\tSystem.out.println(\"ok\");\n//\t\tContent content = new Content();\n//\t\tbyte[] byteFile = HttpUtil.getImageByte(content.getSimpleImage());\n//\t\tif(byteFile != null){\n//\t\t\tString fileName = StringUtil.cutOutUrlFileName(content.getSimpleImage());\n//\t\t\tString foldler = StringUtil.dateToString(new Date(), \"yyyyMMdd\");\n//\t\t\tString simpleImage = baseFileUploadService.saveFile(byteFile, fileName , foldler);\n//\t\t\tresource.setSimpleImage(simpleImage);//图片保存成功后\n//\t\t\tif(simpleImage != null){\n//\t\t\t\tresource.setSimpleImageName( foldler + \"/\" + fileName);\n//\t\t\t\tStringBuilder sb = new StringBuilder();\n//\t\t\t\tfor(String img : content.getImages()){\n//\t\t\t\t\tsb.append(img+\",\");\n//\t\t\t\t}\n//\t\t\t\tresource.setImages(sb.toString());\n//\t\t\t}\n\t}", "private void downloadingImage(Intent intent) {\n Bitmap bitmap = null;\n InputStream in = null;\n int responseCode = -1;\n\n String urlPath = intent.getStringExtra(URL);\n\n String fileName = intent.getStringExtra(FILENAME);\n\n /*7.2 mb on web and 15.85 mb on mobile image file*/\n String s = \"https://upload.wikimedia.org/wikipedia/commons/0/05/Sambro_Island_Lighthouse_%282%29.jpg\";\n\n try {\n\n URL url = new URL(urlPath);//params[0]\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.connect();\n responseCode = httpURLConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_OK) {\n in = httpURLConnection.getInputStream();\n bitmap = BitmapFactory.decodeStream(in);\n in.close();\n\n if (bitmap != null) {\n // successfully finished\n result = Activity.RESULT_OK;\n saveImage(bitmap, fileName);\n } else {\n publishResults(fileName, result);\n }\n }\n\n } catch (MalformedURLException e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n e.printStackTrace();\n } catch (Exception e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n Log.v(TAG, \"Exception : \" + e.getMessage());\n }\n }", "@ApiMethod(name = \"imageDownload\")\n public SerializedProto imageDownload(User user, EncodedImageRef ref)\n throws InvalidProtocolBufferException {\n ImageRef imageRef = ImageRef.newBuilder()\n .mergeFrom(BaseEncoding.base64().decode(ref.getRefEncoded()))\n .build();\n Logger.getGlobal().info(\"Getting downloadUrl for: \" + imageRef.toString());\n\n try {\n ImageDownloadRef downloadRef = ImageDownloadRef.newBuilder()\n .setImage(imageRef)\n .setUrl(ImageStore.getDownloadUrl(imageRef))\n .build();\n return SerializedProto.fromProto(downloadRef);\n } catch (Exception ex) {\n Logger.getGlobal().log(Level.WARNING, \"Unhandled exception:\", ex);\n throw ex;\n }\n }", "@Override\n protected Bitmap doInBackground(String... params) {\n imageUrl = params[0];\n ImageView thumbnail = imageViewReference.get();\n try {\n InputStream is = (InputStream) new URL(imageUrl).getContent();\n Bitmap bitmap = ImageCommons.decodeSampledBitmapFromInputStream(is, thumbnail.getWidth(), thumbnail.getHeight());\n addBitmapToMemoryCache(imageUrl, bitmap);\n return bitmap;\n } catch (IOException e) {\n e.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n Log.d(\"myLog\", getClass().getSimpleName() + \" Erro ao fazer download de imagem\");\n return ImageCommons.decodeSampledBitmapFromResource(context.getResources(), R.drawable.ic_launcher, 70, 70);\n }", "public interface ImageDownloader {\n\n /**\n * Load the image from the URL into the image view resizing it if necessary.\n * @param imageURL Image URL.\n * @param imageView ImageView reference to load the image into.\n */\n void downloadImage(String imageURL, ImageView imageView);\n\n}", "public void download() {\n }", "public void downloadImage(View v)\n {\n\n String url=editText.getText().toString();\n Thread mythread=new Thread(new downloadImagesUsingWorkerThread(url));\n mythread.start();\n // downloadImagesUsingThreads(listofImages[0]);//must not do this downloading on main thread\n }", "public void testDownloadAndShowImage(){\n final String url = \"https://ict.image.alimmdn.com/banma_h5/zebrai/zebra_login_bg.png\";\n new Thread(new Runnable() {\n @Override\n public void run() {\n String hash = DownImageUtils.downloadImage(url);\n final String fileName = DownImageUtils.getImagePath(hash);\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //YmImageUtil.showImageInView(getContext(), fileName);\n showImage(fileName);\n }\n });\n }\n }).start();\n }", "private static Bitmap downloadImageTask(String src) {\n try {\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n Log.i(LOG_TAG, \"won: \" + myBitmap);\n return myBitmap;\n } catch (IOException e) {\n Log.e(LOG_TAG, \"error while making book cover\", e);\n e.printStackTrace();\n return null;\n }\n }", "@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}", "void mo54428b(DownloadTask downloadTask);", "public Blob downloadFile(String inKey, File inDestFile);", "private Bitmap downloadBitmap(String path) {\n\t\tURL url = null;\n\t\tHttpURLConnection connection = null;\n\t\tInputStream is = null;\n\t\tFileOutputStream outputStream = null;\n\t\tBitmap bitmap = null;\n\t\ttry {\n\t\t\turl = new URL(path);\n\t\t\tconnection = (HttpURLConnection) url.openConnection();\n\t\t\tconnection.setConnectTimeout(5000);\n\t\t\tconnection.setRequestMethod(\"GET\");\n\t\t\tif (connection.getResponseCode() == 200) {\n\t\t\t\tis = connection.getInputStream();\n\t\t\t\tmax_length = connection.getContentLength();\n\t\t\t\tprogressBar.setMax(max_length);\n\t\t\t\tFile file = new File(IMAGE_PATH);\n\t\t\t\toutputStream = new FileOutputStream(file);\n\t\t\t\tbyte[] buffer = new byte[64];\n\t\t\t\tint len = 0;\n\t\t\t\twhile ((len = is.read(buffer)) != -1) {\n\t\t\t\t\toutputStream.write(buffer, 0, len);\n\t\t\t\t\tpublishProgress(len);\n\t\t\t\t}\n\t\t\t\tbitmap = BitmapFactory.decodeFile(IMAGE_PATH);\n\t\t\t}\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (connection != null) {\n\t\t\t\tconnection.disconnect();\n\t\t\t}\n\t\t\tif (outputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\toutputStream.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (is != null) {\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn bitmap;\n\t}", "private void getPic(final CacheHolder cacheHolder, final CacheImage imageInfo) {\n String fileName = cacheHolder.getCode() + \"_\" + imageInfo.getURL().substring(imageInfo.getURL().lastIndexOf('/') + 1);\n fileName = Common.ClearForFileName(fileName).toLowerCase();\n final String target = MainForm.profile.dataDir + fileName;\n imageInfo.setFilename(fileName);\n try {\n File ftest = new File(target);\n if (ftest.exists()) {\n if (ftest.length() == 0) {\n ftest.delete();\n }\n else {\n cacheHolder.getDetails().getImages().add(imageInfo);\n }\n }\n else {\n if (downloadPics) {\n UrlFetcher.fetchDataFile(imageInfo.getURL(), target);\n ftest = new File(target);\n if (ftest.exists()) {\n if (ftest.length() > 0) {\n cacheHolder.getDetails().getImages().add(imageInfo);\n }\n else {\n ftest.delete();\n }\n }\n }\n }\n }\n catch (final IOException e) {\n String ErrMessage;\n String wp, n;\n if (cacheHolder != null && cacheHolder.getCode() != null)\n wp = cacheHolder.getCode();\n else\n wp = \"WP???\";\n if (cacheHolder != null && cacheHolder.getName() != null)\n n = cacheHolder.getName();\n else\n n = \"name???\";\n\n String m;\n try {\n m = e.getMessage();\n if (m == null)\n m = \"\";\n }\n catch (Exception e2) {\n m = \"\";\n }\n\n if (m.length() == 0)\n ErrMessage = \"Ignoring error: OCXMLImporter.getPic: IOExeption == null, while downloading picture: \" + fileName + \" from URL:\" + imageInfo.getURL();\n else {\n if (m.equalsIgnoreCase(\"could not connect\") || m.equalsIgnoreCase(\"unkown host\")) {\n // is there a better way to find out what happened?\n ErrMessage = MyLocale.getMsg(1618, \"Ignoring error in cache: \") + n + \" (\" + wp + \")\" + MyLocale.getMsg(1619, \": could not download image from URL: \") + imageInfo.getURL();\n }\n else {\n ErrMessage = MyLocale.getMsg(1618, \"Ignoring error in cache: \") + n + \" (\" + wp + \"): ignoring IOException: \" + m + \" while downloading picture:\" + fileName + \" from URL:\" + imageInfo.getURL();\n }\n }\n inf.addWarning(ErrMessage);\n Preferences.itself().log(ErrMessage, e, true);\n }\n }", "java.lang.String getImage();", "public abstract Image getImage();", "public abstract Image getImage();", "@Override\n\t\t\tprotected Drawable doInBackground(ImageView... params) {\n\t\t\t\timageview = params[0];\n\t\t\t\tDrawable drawable = null;\n\t\t\t\tFile downloadPath = createDownloadsPath(activity, url.split(\"/\"));\n\t\t\t\tdo {\n\t\t\t\t\tdrawable = Utils.LoadImageFromWebOperations(url,\n\t\t\t\t\t\t\tdownloadPath);\n\t\t\t\t\tattempts--;\n\t\t\t\t} while (attempts > 0 && drawable == null);\n\t\t\t\treturn drawable;\n\t\t\t}", "protected abstract File download(Exception previousException) throws Exception;", "private Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }", "public Bitmap download(String url){\n \tSystem.out.println(url);\n \t//url = \"http://140.115.113.164:8080/wardrobe/wardrobedata/pic/15b0cfe6f85d45b9b09d6cc4f8d139b749f1c58c4c8e4ec6982d843116b70aca-R.PNG\";\n \tBitmap bitmap = null;\n \tbitmap = downloadBitmap(url);\n \tif(bitmap == null)\n \tSystem.out.print(\"bitmap is null!!\");\n \taddBitmapToCache(url, bitmap);\n \treturn bitmap;\n }", "@Override\n\tpublic void onImageDownloadFinish(Bitmap googleimagebitmap) {\n\n\t}", "public downloadImageServlet() {\n\t\tsuper();\n\t}", "@Override\r\n\tpublic void download() {\n\t\t\r\n\t}", "@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}", "String getItemImage();", "String getImage();", "DownloadInfo mo54444i(int i);", "private static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.\n decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }", "public static void download(String args,String file) throws IOException {\n\t\tResponse resultImageResponse;\n\t\t\n\t\t// output here\n\t\tFileOutputStream out;\n\t\ttry {\n//\t\t\tresultImageResponse = Jsoup.connect(args)\n//\t\t\t\t\t.userAgent(\"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31\")\n//\t\t\t\t\t//.userAgent(\"Opera/9.80 (Android 2.3.4; Linux; Opera Mobi/build-1107180945; U; en-GB) Presto/2.8.149 Version/11.10\")\n//\t\t\t\t\t.header(\"Accept\", \"text/html\")\n//\t\t.header(\"Accept-Charset\", \"utf-8\")\n//\t\t.header(\"Accept-Encoding\", \"gzip\")\n//\t\t.header(\"Accept-Language\", \"en-US,en\")\n//\t\t\t\t\t.ignoreContentType(true)\n//\t\t\t\t\t.execute();\n\t\t\tConnection conn = Jsoup.connect(args);\n\t\t\t\n\t\t\tconn.header(\"Accept\", \"text/html\");\n\t\t\tconn.header(\"Accept-Charset\", \"utf-8\");\n\t\t\tconn.header(\"Accept-Encoding\", \"gzip\");\n\t\t\tconn.header(\"Accept-Language\", \"en-US,en\");\n\t\t\tconn.userAgent(\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.160 Safari/537.22\");\n\t\t\tconn.ignoreContentType(true);\n\t\t\tresultImageResponse = conn.execute();\n\t\t\tout = (new FileOutputStream(new java.io.File(file)));\n\t\t\tout.write(resultImageResponse.bodyAsBytes()); \n\t\t\t// resultImageResponse.body() is where the image's contents are.\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t}", "File resolveImage(Box box);", "void downloadNdwi6(File file, int id) throws IOException, SQLException;", "protected abstract Image loadImage();", "public int getImage();", "interface DownloadDone {\n void onImageLoaded(String path);\n void onError(String message);\n}", "protected Bitmap getImage(URL url) {\n\n HttpURLConnection iconConn = null;\n try {\n iconConn = (HttpURLConnection) url.openConnection();\n iconConn.connect();\n int response = iconConn.getResponseCode();\n //if the reponse 200 the successfull\n if (response == 200) {\n return BitmapFactory.decodeStream(iconConn.getInputStream());\n } else {\n return null;\n }\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n } finally {\n if (iconConn != null) {\n iconConn.disconnect();\n }\n }\n }", "public abstract String getFotoPath();", "static public boolean downloadImage(String imageFile, String dataPath, DbxClientV2 client) throws Exception\n\t{ \n \ttry (OutputStream fos = new FileOutputStream(new File(dataPath + \"/\" + imageFile)))\n \t{\n FileMetadata metadata = client.files().downloadBuilder(\"/Photos/\" + imageFile).download(fos);\n fos.close();\n client.files().delete(\"/Photos/\" + imageFile); \n \t}\n\t catch (DbxException exception)\n\t\t{\n\t\t\t//System.out.println(imageFile + \" does not exist\");\n\t\t\treturn true;\n\t\t}\n \t\n \treturn false;\n\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();", "@Override\n protected Bitmap doInBackground(String... params) {\n try {\n contacted_Image = ImageLoaderAPI.AzureImageDownloader(params[0]);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n Log.d(\"AsyncLoadImage\", e.getMessage());\n }\n\n return contacted_Image;\n }", "@Override\n public Bitmap getImage(String url) {\n try {\n if (!taskForUrlAlreadyRunning(url)) {\n imageDownloadTaskMap.put(url, startDownload(url));\n }\n } catch (MalformedURLException e) {\n Log.i(\"ImageDownloadManager\", \"Malformed url\" + url);\n }\n return null;\n }", "public void DownloadFromUrl(Context ctx) {\n\t\ttry {\r\n\t\t\tURL url = new URL(link);\r\n\t\t\tString root = Environment.getExternalStorageDirectory().toString();\r\n\t\t\tif (type.contentEquals(\"image\")) {\r\n\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER_IMG);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\tLog.d(\"ImageManager\", \"download begining\");\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\t\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\r\n\t\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\");\r\n\t\t\t\t/* Open a connection to that URL. */\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Define InputStreams to read from the URLConnection.\r\n\t\t\t\t */\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Read bytes to the Buffer until there is nothing more to\r\n\t\t\t\t * read(-1).\r\n\t\t\t\t */\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\tif (cancel)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Convert the Bytes read to a String. */\r\n\t\t\t\tif (!cancel) {\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t\tLog.d(\"ImageManager\",\r\n\t\t\t\t\t\t\t\"download ready in\"\r\n\t\t\t\t\t\t\t\t\t+ ((System.currentTimeMillis() - startTime) / 1000)\r\n\t\t\t\t\t\t\t\t\t+ \" sec\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"award\")) {\r\n\t\t\t\t\r\n\t\t\t\tLog.e(\"download\",\" award here\");\r\n\t\t\t\t//TODO download files here\r\n\t\t\t\t Log.e(\"name\",name);\r\n\t\t\t\t Log.e(\"link\",link);\r\n\t\t\t\r\n\t\t\t\tFile file = new File(name);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\r\n\t\t\t\t\t\tis);\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tif(cancel) break;\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\tfos.close();\r\n\t\t\t\tif(cancel) file.delete();\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"video\")) {\r\n\r\n\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER_VIDEO);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\t\t\t\t// Log.v(\"fname\",fname);\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\t\t\t\tLog.d(\"ImageManager\", \"download begining\");\r\n\t\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\r\n\t\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\");\r\n\t\t\t\t/* Open a connection to that URL. */\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\t/*\r\n\t\t\t\t * Define InputStreams to read from the URLConnection.\r\n\t\t\t\t */\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\t// bookmarkstart\r\n\t\t\t\t/*\r\n\t\t\t\t * Read bytes to the Buffer until there is nothing more to\r\n\t\t\t\t * read(-1) and write on the fly in the file.\r\n\t\t\t\t */\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\tfinal int BUFFER_SIZE = 25 * 1024;\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is,\r\n\t\t\t\t\t\tBUFFER_SIZE);\r\n\t\t\t\tbyte[] baf = new byte[BUFFER_SIZE];\r\n\t\t\t\tint actual = 0;\r\n\t\t\t\twhile (actual != -1) {\r\n\t\t\t\t\tfos.write(baf, 0, actual);\r\n\t\t\t\t\tactual = bis.read(baf, 0, BUFFER_SIZE);\r\n\t\t\t\t\tif (cancel) {\r\n\t\t\t\t\t\tfile.delete();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfos.close();\r\n\r\n\t\t\t\t// bookmarkend\r\n\t\t\t\tLog.d(\"ImageManager\",\r\n\t\t\t\t\t\t\"download ready in\"\r\n\t\t\t\t\t\t\t\t+ ((System.currentTimeMillis() - startTime) / 1000)\r\n\t\t\t\t\t\t\t\t+ \" sec\");\r\n\r\n\t\t\t\tString link = root + Constants.APP_FOLDER_IMG + name;\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"audio\")) {\r\n\t\t\t\tLog.v(\"training\", \"in audio\");\r\n\r\n\t\t\t\tFile myDir = new File(Environment.getExternalStorageDirectory()\r\n\t\t\t\t\t\t.getAbsolutePath() + Constants.APP_FOLDER_AUDIO);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\r\n\t\t\t\t// long startTime = System.currentTimeMillis();\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\r\n\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\tif (cancel)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Convert the Bytes read to a String. */\r\n\t\t\t\tif (!cancel) {\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t}\r\n\r\n\t\t\t}// end of audio\r\n\t\t\telse{\r\n\t\t\t\ttry {\r\n\t\t\t\t\turl = new URL(link);\r\n\t\t\t\t\troot = Environment\r\n\t\t\t\t\t\t\t.getExternalStorageDirectory()\r\n\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\tLog.v(\"type is \", type.toString());\r\n\r\n\t\t\t\t\tString foldername = \"\";\r\n\t\t\t\t\tif (type.contentEquals(\"pdf\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.pdf);\r\n\t\t\t\t\telse if (type.contentEquals(\"ppt\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.ppt);\r\n\t\t\t\t\telse if (type.contentEquals(\"doc\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.doc);\r\n\t\t\t\t\telse if (type.contentEquals(\"xls\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.xls);\r\n\t\t\t\t\telse if (type.contentEquals(\"video\"))\r\n\t\t\t\t\t\tfoldername = \"mobcast_videos\";\r\n\t\t\t\t\telse if (type.contentEquals(\"audio\"))\r\n\t\t\t\t\t\tfoldername = \"mobcast_audio\";\r\n\r\n\t\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER\r\n\t\t\t\t\t\t\t+ foldername);\r\n\r\n\t\t\t\t\tString fname = ename;\r\n\r\n\t\t\t\t\tmyDir.mkdirs();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\t\tif (file.exists())\r\n\t\t\t\t\t\tfile.delete();\r\n\t\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\r\n\t\t\t\t\t\t\tis);\r\n\t\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\t\tint current = 0;\r\n\t\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\t\tif(cancel) break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\r\n\t\t\t\t\t\t\tfile);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tif(cancel) file.delete();\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\r\n\t\t}\r\n\r\n\t}", "public void downloadFile(final Context context, final String fileKey, String pageFileKey, String fileType, final DownloadListener downloadListener) {\n\n final String pathName = Config.getPathName(context) + fileType + getFIleNameFromFileKEy(fileKey);\n final String pagePathName = Config.getPathName(context) + PAGES_FILE + getFIleNameFromFileKEy(pageFileKey);\n\n final long totalBytes = 0;\n TransferObserver downloadObserver = transferUtility.download(\n Config.BUCKET_NAME,\n fileKey,\n new File(pathName));\n\n\n // Attach a listener to the observer to get state update and progress notifications\n downloadObserver.setTransferListener(new TransferListener() {\n\n @Override\n public void onStateChanged(int id, TransferState state) {\n if (TransferState.COMPLETED == state) {\n\n downloadListener.onDownloadFinish(id, state.name(), pathName, pagePathName);\n }\n }\n\n @Override\n public void onProgressChanged(int id, long bytesCurrent,long bytesTotal) {\n\n\n if (bytesTotal == 0){\n\n bitesCorrent = bytesCurrent;\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n\n URL url = null;\n try {\n url = new URL(S3_JABRUTOUCH + fileKey);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n URLConnection conection = null;\n try {\n conection = url.openConnection();\n } catch (IOException e) {\n e.printStackTrace();\n }\n // getting file length\n int lengthOfFile = conection.getContentLength();\n\n float percentDonef = ((float) bitesCorrent / (float) lengthOfFile) * 100;\n final int percentDone = (int) percentDonef;\n\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n downloadListener.onProgressChanged(percentDone);\n }\n });\n }\n });\n thread.start();\n\n }else {\n\n\n float percentDonef = ((float) bytesCurrent / (float) bytesTotal) * 100;\n int percentDone = (int) percentDonef;\n\n downloadListener.onProgressChanged(percentDone);\n }\n\n\n }\n\n @Override\n public void onError(int id, Exception ex) {\n\n Toast.makeText(context, \"Error downloading file \" + fileKey, Toast.LENGTH_LONG).show();\n downloadListener.onDownloadError();\n\n }\n\n });\n\n // If you prefer to poll for the data, instead of attaching a\n // listener, check for the state and progress in the observer.\n if (TransferState.COMPLETED == downloadObserver.getState()) {\n // Handle a completed upload.\n\n\n }\n\n\n }", "public interface ImageDownLoadCallBack {\n void onDownLoadSuccess(File file);\n void onDownLoadSuccess(Bitmap bitmap);\n\n void onDownLoadFailed();\n}", "public Xoi_cmd_imageMagick_download(Gfo_usr_dlg usr_dlg, Gfui_kit kit, Io_url trg) {this.Ctor(usr_dlg, kit); this.trg = trg;}", "@SuppressWarnings(\"deprecation\")\r\n @Override\r\n public AvailableStatus requestFileInformation(final DownloadLink link) throws IOException, PluginException {\r\n br = new Browser();\r\n // need to correct links that are added prior to fixing!\r\n correctDownloadLink(link);\r\n prepBrowser(br);\r\n br.setFollowRedirects(true);\r\n final URLConnectionAdapter con = br.openGetConnection(link.getDownloadURL());\r\n if (con.getResponseCode() == 503 || con.getResponseCode() == 404) {\r\n con.disconnect();\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n br.followConnection();\r\n if (br.containsHTML(\"<title>\\\\s*-\\\\s*(?:Yunfile|Dix3)[^<]*</title>\")) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n // Access denied\r\n if (br.containsHTML(\"Access denied<|资源已被禁止访问</span>\")) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n // Not found\r\n if (br.containsHTML(\"<span>(资源未找到|Not found)</span>\")) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n /* Wrong link */\r\n if (br.containsHTML(\">Wrong</span>\")) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n String filename = null, filesize = null;\r\n // if (br.getURL().matches(\"http://page\\\\d+\\\\.yunfile.com/fs/[a-z0-9]+/\")) ;\r\n filename = br.getRegex(\"Downloading:&nbsp;<a></a>&nbsp;([^<>]*) - [^<>]+<\").getMatch(0);\r\n if (filename == null) {\r\n filename = br.getRegex(\"<title>(.*?)\\\\s*-\\\\s*(?:Yunfile|Dix3)[^<]*</title>\").getMatch(0);\r\n }\r\n if (filename == null) {\r\n filename = br.getRegex(\"<h2 class=\\\"title\\\">文件下载\\\\&nbsp;\\\\&nbsp;([^<>\\\"]*?)</h2>\").getMatch(0);\r\n }\r\n filesize = br.getRegex(\"文件大小: <b>([^<>\\\"]*?)</b>\").getMatch(0);\r\n if (filesize == null) {\r\n filesize = br.getRegex(\"File Size: <b>([^<>\\\"]*?)</b>\").getMatch(0);\r\n }\r\n if (filesize == null) {\r\n filesize = br.getRegex(\"id=\\\"file_show_filename\\\">[^<>]+</span> \\\\- ([^<>\\\"]+) <\").getMatch(0);\r\n }\r\n if (filename == null) {\r\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\r\n }\r\n link.setName(decode(\"111\", filename.trim()));\r\n link.setDownloadSize(SizeFormatter.getSize(filesize));\r\n return AvailableStatus.TRUE;\r\n }", "void mo45684a(DownloadInfo cVar, BaseException aVar, int i) throws RemoteException;", "public File String_to_File(String img_url) {\n\n try {\n File rootSdDirectory = Environment.getExternalStorageDirectory();\n\n casted_image = new File(rootSdDirectory, \"attachment.jpg\");\n if (casted_image.exists()) {\n casted_image.delete();\n }\n casted_image.createNewFile();\n\n FileOutputStream fos = new FileOutputStream(casted_image);\n\n URL url = new URL(img_url);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setDoOutput(true);\n connection.connect();\n InputStream in = connection.getInputStream();\n\n byte[] buffer = new byte[1024];\n int size = 0;\n while ((size = in.read(buffer)) > 0) {\n fos.write(buffer, 0, size);\n }\n fos.close();\n return casted_image;\n\n } catch (Exception e) {\n\n System.out.print(e);\n // e.printStackTrace();\n\n }\n return casted_image;\n }", "void downloadNdwi5(File file, int id) throws IOException, SQLException;", "private Bitmap downloadBitmap(String url) {\n \tFile bufferFolder = new File(MainActivity.image_cache_dir);\n\t\tif(!bufferFolder.exists()) bufferFolder.mkdirs();\n \t//If it is in the local file, get it from there.\n \tFile imageFile = new File(MainActivity.image_cache_dir + getFileName(url));\n\t\tif(imageFile.exists()) {\n\t\t\tSystem.out.println(\"get image from \" + imageFile.getAbsolutePath());\n\t\t\treturn BitmapFactory.decodeFile(imageFile.getAbsolutePath());\t\t\t\t\t\t\n\t\t}else{\n\t\t\tSystem.out.println(\"image \" + imageFile.getAbsolutePath() + \" doesn't exist!\");\n\t\t}\n \n \tfinal int IO_BUFFER_SIZE = 4 * 1024;\n\n // AndroidHttpClient is not allowed to be used from the main thread\n// final HttpClient client = (mode == Mode.NO_ASYNC_TASK) ? new DefaultHttpClient() :\n// AndroidHttpClient.newInstance(\"Android\");\n// final HttpGet getRequest = new HttpGet(url);\n HttpClient client = new DefaultHttpClient();\n HttpGet getRequest = new HttpGet(url);\n try {\n HttpResponse response = client.execute(getRequest);\n final int statusCode = response.getStatusLine().getStatusCode();\n if (statusCode != HttpStatus.SC_OK) {\n Log.w(\"ImageDownloader\", \"Error \" + statusCode +\n \" while retrieving bitmap from \" + url);\n return null;\n }else{\n \tLog.w(\"ImageDownloader\", \"HttpStatus.SC_OK \" + statusCode +\n \" while retrieving bitmap from \" + url);\n }\n\n final HttpEntity entity = response.getEntity();\n if (entity != null) {\n InputStream inputStream = null;\n try {\n inputStream = entity.getContent();\n // return BitmapFactory.decodeStream(inputStream);\n // Bug on slow connections, fixed in future release.\n \n FlushedInputStream flushedInputStream = new FlushedInputStream(inputStream);\n // Need to be fixed: Save the loaded picture directly and transfer into bitmap then.\n FileOutputStream fout = null;\n \t\ttry {\n \t\t\t\tfout = new FileOutputStream(imageFile);\t\t\t\t\n \t\t\t\t /*\n * Read bytes to the Buffer until there is nothing more to read(-1).\n */\n \t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(512);\n int current = 0;\n while ((current = flushedInputStream.read()) != -1) {\n baf.append((byte) current);\n }\n fout.write(baf.toByteArray()); \n \t\t\t\t//System.out.println(\"bitmap.compress \" + imageFile.getAbsolutePath());\n \t\t} catch (FileNotFoundException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}finally{\n \t\t\t\tif(fout != null){\n \t\t\t\t\ttry {\n \t\t\t\t\t\tfout.flush();\n \t\t\t\t\t\tfout.close();\n \t\t\t\t\t} catch (IOException e) {\t\t\t\t\t\t\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\t\t\t\t\t\n \t\t\t\t}\t \n \t\t\t} \t\t \n //return BitmapFactory.decodeStream(flushedInputStream);\n \t\t\treturn BitmapFactory.decodeFile(imageFile.getAbsolutePath());\n } finally {\n if (inputStream != null) {\n inputStream.close();\n }\n entity.consumeContent();\n }\n }\n } catch (IOException e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"I/O error while retrieving bitmap from \" + url, e);\n } catch (IllegalStateException e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"Incorrect URL: \" + url);\n } catch (Exception e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"Error while retrieving bitmap from \" + url, e);\n } finally {\n if ((client instanceof AndroidHttpClient)) {\n ((AndroidHttpClient) client).close();\n }\n }\n return null;\n }", "@RequestMapping(value = \"/downloadphoto\", method = RequestMethod.GET)\n void buildDynamicReportDownload(HttpServletRequest request, HttpServletResponse response) {\n try {\n\n // Get the form id from the submitted form.\n String photoKey = request.getParameter(\"photoKey\");\n byte[] photoBytes = s3Client.getObjectBytes(bucketName, photoKey) ;\n InputStream is = new ByteArrayInputStream(photoBytes);\n\n // Define the required information here.\n response.setContentType(\"image/png\");\n response.setHeader(\"Content-disposition\", \"attachment; filename=\"+photoKey);\n org.apache.commons.io.IOUtils.copy(is, response.getOutputStream());\n response.flushBuffer();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private String downloadIcon(String iconUrl) {\n String[] urlArr = iconUrl.split(\"/\");\n String iconFileName = urlArr[urlArr.length - 1];\n // Files array from app personal storage\n String[] files = fileList();\n\n // If icon file name is present in personal storage return icon name\n for (String fileName : files) {\n if (fileName.equals(iconFileName)) return iconFileName;\n }\n\n // Else download the icon\n try {\n URL url = new URL(iconUrl);\n URLConnection connection = url.openConnection();\n connection.connect();\n InputStream input = new BufferedInputStream(url.openStream());\n FileOutputStream fileOutputStream = openFileOutput(iconFileName, Context.MODE_PRIVATE);\n\n byte tmpBuffer[] = new byte[1024];\n int read = input.read(tmpBuffer);\n\n while (read != -1) {\n fileOutputStream.write(tmpBuffer, 0, read);\n read = input.read(tmpBuffer);\n }\n\n fileOutputStream.flush();\n fileOutputStream.close();\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return iconFileName;\n }", "public Image getOne();", "public void clickOnDownloadIcon();", "void mo54418a(DownloadTask downloadTask);", "private void downloadInBackground(){\n\t\tdownloadResourceInBackground(imageUrl1, R.id.dl_image_1, R.id.dl_progressbar_1);\n\t\tdownloadResourceInBackground(imageUrl2, R.id.dl_image_2, R.id.dl_progressbar_2);\n\t\tdownloadResourceInBackground(imageUrl3, R.id.dl_image_3, R.id.dl_progressbar_3);\n\t\tdownloadResourceInBackground(imageUrl4, R.id.dl_image_4, R.id.dl_progressbar_4);\n\t\tdownloadResourceInBackground(imageUrl5, R.id.dl_image_5, R.id.dl_progressbar_5);\n\t}", "private void downloadImage(String url, int version) {\n ContextWrapper cw = new ContextWrapper(getApplicationContext());\n // path to /data/data/yourapp/app_data/imageDir\n File directory = cw.getDir(\"imageDir\", Context.MODE_PRIVATE);\n // Create imageDir\n File myPath = new File(directory, \"profile.jpg\");\n try {\n URL downloadURL = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) downloadURL.openConnection();\n int responseCode = conn.getResponseCode();\n if (responseCode != 200) {\n throw new Exception(\"Error in connection\");\n }\n InputStream is = conn.getInputStream();\n FileOutputStream os = new FileOutputStream(myPath);\n byte[] buffer = new byte[1024];\n int byteCount;\n while ((byteCount = is.read(buffer)) != -1) {\n os.write(buffer, 0, byteCount);\n }\n os.close();\n is.close();\n if (version > -1) {\n PrefManager.saveInt(DownloadService.this, \"VERSION\", version);\n }\n Log.d(\"com.ajs.glidetest\", \"download complete \" + version);\n PrefManager.saveBoolean(DownloadService.this, \"DOWNLOAD_OK\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void listarImg(int id, HttpServletResponse response) {\n\n String sql = \"select foto from producto where idProducto=?;\";\n\n InputStream inputStream = null;\n OutputStream outputStream = null;\n BufferedInputStream bufferedInputStream = null;\n BufferedOutputStream bufferedOutputStream = null;\n response.setContentType(\"image/*\"); //que hace esto?? uu\n\n try (Connection conn = getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sql);) {\n outputStream = response.getOutputStream();\n\n pstmt.setInt(1, id);\n\n try (ResultSet rs = pstmt.executeQuery()) {\n if (rs.next()) {\n inputStream = rs.getBinaryStream(\"foto\");\n }\n }\n bufferedInputStream = new BufferedInputStream(inputStream);\n bufferedOutputStream = new BufferedOutputStream(outputStream);\n\n int i = 0;\n while ((i = bufferedInputStream.read()) != -1) {\n bufferedOutputStream.write(i);\n }\n bufferedOutputStream.flush();\n\n } catch (SQLException | IOException e) {\n e.printStackTrace();\n }\n }", "public void getImageBitMap(final String url, final GetImageBitMapListener listener) {\n String localFileName = getLocalImageFileName(url);\n final Bitmap image = loadImageFromFile(localFileName);\n if (image == null) { //if image not found - try downloading it from parse\n firebaseModel.getImageBitMap(url, new GetImageBitMapListener() {\n @Override\n public void onComplete(Bitmap bitMap) {\n //2. save the image localy\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }\n\n @Override\n public void fail() {\n listener.fail();\n }\n });\n } else {\n //Log.d(\"TAG\",\"OK reading cache image: \" + localFileName);\n listener.onComplete(image);\n }}", "public static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n\n InputStream stream = getHttpConnection(url);\n if(stream!=null) {\n bitmap = BitmapFactory.decodeStream(stream);\n try {\n stream.close();\n }catch (IOException e1) {\n Log.d(\"MyDebugMsg\", \"IOException in downloadImage()\");\n e1.printStackTrace();\n }\n }\n\n return bitmap;\n }", "byte[] getRecipeImage(CharSequence query);", "String getImagePath();", "String getImagePath();", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Ref.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n figureURL = String.valueOf(uri);\n }\n });\n Toast.makeText(Create_order.this, \"Upload Image Berhasil\", Toast.LENGTH_SHORT).show();\n }", "@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }", "public DownloadImageService() {\n\n super(\"DownloadImageService\");\n }", "@GetMapping(value = \"/image/id/{id}\", produces={ \"image/jpeg\" })\n public @ResponseBody byte[] getImageById(@PathVariable(name=\"id\") Long id) throws IOException {\n InputStream in = getClass()\n .getResourceAsStream(\"/com/users/info/images/babu.jpg\");\n return IOUtils.toByteArray(in);\n }", "private void download()\n {\n if(mDownloadConnection!=null && mDownloadConnection.mBinder!=null)\n {\n if (mDownloadConnection.mBinder.download(\"file1\"))\n {\n mTvFilename.setText(\"file1\");\n }\n }\n }", "@Override\r\n\t\tprotected Void doInBackground(String... params) {\n\r\n\t\t\ttry {\r\n\t\t\t\tfileName = params[0];\r\n\t\t\t\timageOnServer.downloadFileFromServer(params[0], params[1]);\r\n\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}", "public String getImageUrl();", "public DocumentFile downloadPhoto(ContactsService service, ContactEntry entry)\r\n\t\t\tthrows ServiceException, IOException {\n\t\tDocumentFile image = new DocumentFile();\r\n\t\tLink photoLink = entry.getContactPhotoLink();\r\n\t\tif (photoLink != null) {\r\n\t\t\tGDataRequest req = service.createLinkQueryRequest(photoLink);\r\n\t\t\ttry{\r\n\t\t\t\treq.execute();\r\n\t\t\t\tInputStream in = req.getResponseStream();;\r\n\t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\r\n\t\t\t\timage.setFileType(\"image/pjpeg\");\r\n\t\t\t\tbyte[] buffer = new byte[4096];\r\n\t\t\t\tint read = 0;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif ((read = in.read(buffer)) != -1) {\r\n\t\t\t\t\t\tout.write(buffer, 0, read);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbyte[] content = out.toByteArray();\r\n\t\t\t\timage.setContent(content);\r\n\t\t\t\timage.setLength(content.length);\r\n\t\t\t\timage.setName(entry.getName().getFullName().getValue()+\".jpg\");\r\n\r\n\t\t\t}catch(ResourceNotFoundException rne){\r\n\t\t\t\tSystem.out.println(\"No hay foto\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn image;\r\n\t}", "FetchedImage getFujimiyaUrl(String query){\n return getFujimiyaUrl(query,100);\n }" ]
[ "0.65058637", "0.6499366", "0.64978504", "0.6446233", "0.6332163", "0.63258684", "0.6322505", "0.6292782", "0.6240417", "0.62266725", "0.6225085", "0.6211343", "0.61779195", "0.617279", "0.6150254", "0.6118683", "0.6070788", "0.60391456", "0.6025774", "0.60194236", "0.6017261", "0.60109687", "0.60104924", "0.600745", "0.59861255", "0.5973506", "0.5971429", "0.596444", "0.5962372", "0.59398866", "0.59349424", "0.5927992", "0.5927611", "0.59229255", "0.5911913", "0.58911455", "0.5883161", "0.5863293", "0.58612025", "0.5860953", "0.585594", "0.5850224", "0.58426255", "0.58407456", "0.58396614", "0.58396614", "0.5838518", "0.5830087", "0.5829288", "0.5818781", "0.58163863", "0.5802592", "0.57886106", "0.57862675", "0.57848066", "0.5774857", "0.57715815", "0.57511604", "0.5745257", "0.57417285", "0.57292014", "0.5728903", "0.5728231", "0.57249755", "0.5724799", "0.5718535", "0.5712437", "0.571141", "0.57027715", "0.57005477", "0.56784666", "0.56758475", "0.5671368", "0.5665466", "0.5662348", "0.56593007", "0.56403786", "0.5632705", "0.5628097", "0.5625531", "0.56123066", "0.5607975", "0.5592648", "0.55920213", "0.55907315", "0.55741704", "0.5569742", "0.5553084", "0.55507594", "0.5534593", "0.553349", "0.553349", "0.5529259", "0.5526981", "0.55253196", "0.5520763", "0.55190414", "0.55180174", "0.5512322", "0.5510706", "0.55025065" ]
0.0
-1
Volta para a p?gina de consulta
public void consult() throws Exception { // TODO Consult try { String page = "con_contadorConsult.jsp";// defina aqui a p?gina que deve ser chamada getResponse().sendRedirect(page); } catch (Exception e){} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Jugador consultarGanador();", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void PagarConsulta() {\n\t\tSystem.out.println(\"el patronato es gratiuto y no necesita pagar \");\r\n\t}", "public static ResultSet mostrar(int cod) throws SQLException {\n int nFilas = 0;\r\n String lineaSQL = \"Select * from pago WHERE codigo LIKE '%\"+ cod +\"%';\" ;\r\n ResultSet resultado = Conexion.getInstance().execute_Select(lineaSQL);\r\n \r\n return resultado;\r\n \r\n }", "public String recherche() {\n\n listAnnonce = iServiceGestionAnnonce.findByExampleSql( annonce, adresse );\n\n return \"rechercheResultat\";\n\n }", "@Override\r\n public VehiculoModel consultarVehiculo(String placa) {\n Connection conn = null;\r\n VehiculoModel vehiculo = null; //defino un objeto de vehiculo como nulo\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"Select * from vehiculo where vehPlaca=?\";\r\n PreparedStatement statement = conn.prepareStatement(sql); //se prepara para la query\r\n statement.setString(1, placa);\r\n ResultSet result = statement.executeQuery(sql);\r\n while(result.next()){\r\n vehiculo = new VehiculoModel(result.getString(1), result.getString(2), result.getString(3), \r\n result.getInt(4), result.getInt(5), result.getString(6), result.getInt(7));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Codigo : \" + ex.getErrorCode() + \"\\nError: \" + ex.getMessage());\r\n }\r\n \r\n return vehiculo;\r\n }", "public void consult() throws Exception {\n // TODO Consult\n try {\n String page = \"pi_per_intConsult.jsp\";// defina aqui a p?gina que deve ser chamada\n getResponse().sendRedirect(page);\n } catch (Exception e) {\n }\n }", "private String getQuerySelecaoBonusPulaPula()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" ID_CODIGO_NACIONAL, \" +\n\t\t\t\" VLR_BONUS_MINUTO, \" +\n\t\t\t\" VLR_BONUS_MINUTO_FF \" +\n\t\t\t\"FROM \" +\n\t\t\t\" TBL_GER_BONUS_PULA_PULA \";\n\t\t\n\t\treturn result;\n\t}", "public void consultasSeguimiento() {\r\n try {\r\n switch (opcionMostrarAnalistaSeguim) {\r\n case \"Cita\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(2, mBsesion.codigoMiSesion());\r\n break;\r\n case \"Entrega\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(3, mBsesion.codigoMiSesion());\r\n break;\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".consultasSeguimiento()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "Reserva Obtener();", "Tablero consultarTablero();", "public void buscar(){\n \n String atributo=txtBuscar.getText();\n String consulta=extraerCombo();\n DefaultTableModel modelo=da.consultar(consulta, atributo);\n tblConsultar.setModel(modelo);\n lblTotal.setText(\"Se encontraron: \"+Integer.toString(da.getTotalRegistros())+\" resultados\");\n \n }", "public void consult() throws Exception {\n\t// TODO Consult\n\ttry {\n\t String page = \"ume_unidade_medidaConsult.jsp\";// defina aqui a pagina que deve ser chamada\n\t getResponse().sendRedirect(page); \n\t} catch (Exception e){} \n }", "@Override\r\n public Resultado consultar(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n // instanciando DAO de acordo com a classe\r\n IDAO dao = daos.get(nmClass);\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"PESQUISAR\");\r\n if (msg.isEmpty()) {\r\n if (dao.consultar(entidade).isEmpty()) {\r\n //caso dados não foram encontrados\r\n resultado.setMsg(\"dados nao encontrados\");\r\n } else {\r\n //caso dados foram encontrados \r\n resultado.setMsg(\"pesquisa feita com sucesso\");\r\n }\r\n resultado.setEntidades(dao.consultar(entidade));\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "public String btnAdvSearchSemental_action()\n {\n GregorianCalendar birth = new GregorianCalendar();\n Date bdate = this.getBirthDate().getSelectedDate();\n if(bdate!=null){\n birth.setTime(bdate);\n getgermplasm$SementalSessionBean().getQuerySementalDTO().setBirthDate(birth);\n }\n \n \n //Indicarle al SessionBean que el paginador debe \"trabajar\" en modo busqueda avanzada\n this.getgermplasm$SementalSessionBean().setQueryMode(true);\n //Desabilitar la bandera de busqueda simple\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(false);\n //Finalmente se inicializa el data provider del paginador con los resultados de la consulta\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults(\n this.getgermplasm$SementalSessionBean().\n getGermplasmFacadeRemote().\n countSementalAdvancedSearch(\n getgermplasm$SementalSessionBean().\n getQuerySementalDTO()).intValue());\n \n this.getgermplasm$SementalSessionBean().getPagination().firstResults();\n this.getgermplasm$SementalSessionBean().getPagination().refreshList();\n \n this.getTxSimpleSearch().setValue(\"\");\n \n return null;\n }", "public void PoblarINFO(String llamado) {//C.P.M Aqui llega como argumento llamado\r\n try {\r\n rs = modelo.Obteninfo();//C.P.M Mandamos a poblar la informacion de negocio\r\n if (llamado.equals(\"\")) {//C.P.M si el llamado llega vacio es que viene de la interface\r\n while (rs.next()) {//C.P.M recorremos el resultado para obtener los datos\r\n vista.jTNombreempresa.setText(rs.getString(1));//C.P.M los datos los enviamos a la vista de la interface\r\n vista.jTDireccion.setText(rs.getString(2));\r\n vista.jTTelefono.setText(rs.getString(3));\r\n vista.jTRFC.setText(rs.getString(4));\r\n }\r\n }\r\n if (llamado.equals(\"factura\")) {//C.P.M de lo contrario es llamado de factura y los valores se van a la vista de vactura \r\n while (rs.next()) {//C.P.M recorremos el resultado \r\n vistafactura.jTNombreempresa.setText(rs.getString(1));//C.P.M enviamos los datos a la vista de factura\r\n vistafactura.jTDireccion.setText(rs.getString(2));\r\n vistafactura.jTTelefono.setText(rs.getString(3));\r\n vistafactura.jTRFC.setText(rs.getString(4));\r\n }\r\n }\r\n } catch (SQLException ex) {//C.P.M Notificamos a el usuario si ocurre algun error\r\n JOptionPane.showMessageDialog(null,\"Ocurio un error al intentar consultar la informacion del negocio\");\r\n }\r\n }", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public void rechercheEtudiantInscripEcheanceParMatricule(){\r\n try { \r\n setViewEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findByMatricule(getViewEtudiantInscripEcheance().getMatricule())); \r\n \r\n //initialisation des echeances\r\n// viewEtudiantInscripEcheance.setVers1(0); \r\n// viewEtudiantInscripEcheance.setVers2(0); \r\n// viewEtudiantInscripEcheance.setVers3(0); \r\n// viewEtudiantInscripEcheance.setVers4(0); \r\n// viewEtudiantInscripEcheance.setVers5(0); \r\n// viewEtudiantInscripEcheance.setVers6(0); \r\n } catch (Exception e) {\r\n FacesMessage message = new FacesMessage(\"Accun étudiant n'a été trouvé! \");\r\n message.setSeverity(FacesMessage.SEVERITY_WARN);\r\n FacesContext.getCurrentInstance().addMessage(null, message); \r\n \r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n } \r\n }", "GestionPrecioDTO findCampania(String codigoCampaniaReferencia);", "@Override\n public boolean SearchSQL() {\n\n /*\n appunto su query.next()\n inizialmente query.next è posto prima della prima riga\n alla prima chiaata si posiziona sulla prima row\n alla seconda chiamata si posiziona sulla seconda row e cosi via\n */\n\n boolean controllo = false;\n\n openConnection();\n\n String sql =\"select user,pass,vol_o_cand from pass where user='\"+userInserito+\"'\";\n ResultSet query = selectQuery(sql);\n\n try {\n\n if(query.next()){\n\n String pass = query.getString(\"pass\");\n\n if(pass.equals(passInserita)) {\n controllo = true;\n volocand = query.getString(\"vol_o_cand\");\n }\n\n }\n\n\n }catch(SQLException se){\n se.printStackTrace();\n }finally{\n closeConnection();\n }\n\n\n return controllo;\n\n }", "private String getConsulta(int indice) {\r\n\t\tString sql = \"\";\r\n\t\tStringBuffer variables = new StringBuffer();\r\n\t\tinParams = ((TxParams)todo.get(indice)).getParams().entrada;\r\n\t\toutParams = ((TxParams)todo.get(indice)).getParams().salida;\r\n\t\tif ((inParams == null || inParams.size() == 0) && (outParams == null || outParams.size() == 0))\r\n\t\t\tsql = \"{call \" + consultas[indice] + \"}\";\r\n\t\telse {\r\n\t\t\t//Por cada parametro de entrada corresponde un ?\r\n\t\t\t//Ojo que tambien hay que considerar los de salida si es necesario\r\n\t\t\t//pero no esta cubierto en esta primera etapa\r\n\t\t\tif (inParams != null) {\r\n\t\t\t\tfor (int i = 0; i < inParams.size(); i++)\r\n\t\t\t\t\tvariables.append(\"?,\");\r\n\t\t\t}\r\n\t\t\tif (outParams != null) {\r\n\t\t\t\tfor (int i = 0; i < outParams.size(); i++)\r\n\t\t\t\t\tvariables.append(\"?,\");\r\n\t\t\t}\r\n\t\t\tString listaVars = variables.toString();\r\n\t\t\tlistaVars = listaVars.substring(0, listaVars.length() - 1);\r\n\t\t\tsql = \"{call \" + consultas[indice] + \"(\" + listaVars + \")}\";\r\n\t\t}\r\n\t\treturn sql;\r\n\t}", "Turno consultarTurno();", "public void search() {\n\n lazyModel = new LazyDataModel<Pesquisa>() {\n private static final long serialVersionUID = -6541913048403958674L;\n\n @Override\n public List<Pesquisa> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {\n\n pesquisarBC.searhValidation(searchParam);\n\n int count = pesquisarBC.count(searchParam);\n lazyModel.setRowCount(count);\n\n if (count > 0) {\n if (first > count) {\n // Go to last page\n first = (count / pageSize) * pageSize;\n }\n SearchFilter parameters = new SearchFilter();\n parameters.setFirst(first);\n parameters.setPageSize(pageSize);\n List<Pesquisa> list = pesquisarBC.search(searchParam, parameters);\n\n logger.info(\"END: load\");\n return list;\n } else {\n return null;\n }\n }\n };\n\n }", "public void search() {\n listTbagendamentos\n = agendamentoLogic.findAllTbagendamentoByDataAndPacienteAndFuncionario(dataSearch, tbcliente, tbfuncionario);\n }", "public String btnSimpleSearch_action()\n {\n String userInput = \"\";\n if(this.getTxSimpleSearch().getValue()!= null)\n userInput = this.getTxSimpleSearch().getValue().toString();\n userInput = userInput.trim();\n System.out.println(1);\n if(userInput.length()==0){\n //Se desabilitan las banderas de busqueda simple y avanzada\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(false);\n this.getgermplasm$SementalSessionBean().setQueryMode(false);\n //Finalmente se setea el data provider del paginador con los datos por default\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults\n (getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n countAllSemental().intValue());\n }\n else{\n //Setear el string para consulta simple del SessionBean\n this.getgermplasm$SementalSessionBean().setConsultaSimple(userInput);\n //Indicarle al SessionBean que el paginador debe \"trabajar\" en modo busqueda simple\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(true);\n //Desabilitar la bandera de busqueda avanzada\n this.getgermplasm$SementalSessionBean().setQueryMode(false);\n //Finalmente se inicializa el data provider del paginador con los resultados de la consulta\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults\n (getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n countSementalSimpleSearch(\n userInput).intValue());\n }\n //set the first result of the query\n this.getgermplasm$SementalSessionBean().getPagination().firstResults();\n return null;\n }", "public void action_consultar(ActionEvent actionEvent) throws GWorkException {\r\n\t\ttry {\r\n\r\n\t\t\tConsultsService consultsService = new ConsultsServiceImpl();\r\n\r\n\t\t\tboolean esValido = true;\r\n\r\n\t\t\tif (criterio != null && criterio.trim().length() != 0)\r\n\t\t\t\tesValido = Util.validarPlaca(criterio);\r\n\r\n\t\t\tif (!esValido)\r\n\t\t\t\tthrow new GWorkException(Util\r\n\t\t\t\t\t\t.loadErrorMessageValue(\"CRITERIO.CARACTER\"));\r\n\r\n\t\t\t// List<Users> users = new UsersDAO().find\r\n\t\t\tlistUsers = consultsService.usuariosCiat(criterio.toUpperCase(),\r\n\t\t\t\t\tcriterio.toUpperCase(), criterio.toUpperCase());\r\n\t\t\tif (listUsers != null && listUsers.size() > 0) {\r\n\t\t\t\tsetListUsers(listUsers);\r\n\t\t\t\tsetMostrarTabla(true);\r\n\t\t\t} else\r\n\t\t\t\tthrow new GWorkException(Util\r\n\t\t\t\t\t\t.loadErrorMessageValue(\"search.not.found\"));\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetListUsers(null);\r\n\t\t\tmostrarMensaje(e.getMessage(), false);\r\n\t\t}\r\n\t}", "List<Plaza> consultarPlazas();", "private void buscar() {\n try { \n conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/sistema_gmg\", \"root\", \"1405\");\n\n st = conexion.createStatement();\n \n rs = st.executeQuery(\"select * from ciclos where ciclo like '%\" + this.jtf_buscar.getText() + \"%'\");\n\n jtf_id_ciclo.setText(null);\n jtf_ciclo.setText(null);\n jtf_finicio.setText(null);\n jtf_ftermino.setText(null);\n \n jt_ciclos.setModel(DbUtils.resultSetToTableModel(rs));\n \n jb_cancelar.setEnabled(true); \n rs = st.executeQuery(\"select *from ciclos\");\n } catch (SQLException ex) {\n Logger.getLogger(JF_Alumnos.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "protected void exibirPacientes(){\n System.out.println(\"--- PACIENTES CADASTRADOS ----\");\r\n String comando = \"select * from paciente order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nomepaciente\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "@Override\r\n\tpublic Empresa consulta(String cnpj) {\n\t\treturn null;\r\n\t}", "public void nom_ven(){\n \n String SQL_select = \"SELECT Nombres FROM `vendedor` WHERE User = '\"+login.a+\"'\";\n String lolo = \"\";\n try {\n ps = con.getConnection().prepareStatement(SQL_select);\n RS = ps.executeQuery();\n while (RS.next()) { \n lolo = RS.getString(1);\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"no encontro el usuario\");\n }\n \n txtVendedor.setText(lolo);\n }", "public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }", "@Override\n public void onClick(View v) {\n queryMain = svBusqueda.getQuery();\n Toast.makeText(getApplicationContext(),\"ejecutando consulta \"+queryMain,Toast.LENGTH_LONG).show();\n consultarDb();\n }", "private String getQuerySelecaoClientesRebarba()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \"\n\t\t\t+\t\" P_ASSINANTE.IDT_MSISDN, \" \n\t\t\t+\t\" P_ASSINANTE.IDT_PROMOCAO, \"\n\t\t\t+\t\" P_ASSINANTE.DAT_EXECUCAO, \" \n\t\t\t+\t\" P_ASSINANTE.DAT_ENTRADA_PROMOCAO, \"\n\t\t\t+\t\" P_ASSINANTE.IND_SUSPENSO, \"\n\t\t\t+\t\" P_ASSINANTE.IND_ISENTO_LIMITE, \"\n\t\t\t+\t\" ASSINANTE.IDT_STATUS, \" \n\t\t\t+\t\" ASSINANTE.VLR_SALDO_PRINCIPAL, \" \n\t\t\t+\t\" ASSINANTE.DAT_EXPIRACAO_PRINCIPAL, \" \n\t\t\t+\t\" PROMOCAO.IND_ZERAR_SALDO_BONUS, \" \n\t\t\t+\t\" PROMOCAO.IND_ZERAR_SALDO_SMS, \" \n\t\t\t+\t\" PROMOCAO.IND_ZERAR_SALDO_GPRS, \" \n\t\t\t//A divisao por 60 deve-se a alteracao da carga de CDRs para preencher os valores da \n\t\t\t//TBL_GER_TOTALIZACAO_PULA_PULA em segundos e nao minutos, de forma a diminuir a perda de precisao.\n\t\t\t+\t\" NVL(MINUTOS.MIN_CREDITO, 0)/60 AS MIN_CREDITO, \" \n\t\t\t+\t\" NVL(MINUTOS.MIN_FF, 0)/60 AS MIN_FF \" \n\t\t\t+\t\"FROM \"\n\t\t\t+\t\" TBL_APR_ASSINANTE ASSINANTE, \"\n\t\t\t+\t\" TBL_GER_PROMOCAO PROMOCAO, \" \n\t\t\t+\t\" TBL_GER_PROMOCAO_ASSINANTE P_ASSINANTE, \" \n\t\t\t+\t\" TBL_GER_TOTALIZACAO_PULA_PULA MINUTOS \"\n\t\t\t+\t\"WHERE \"\n\t\t\t+\t\" ASSINANTE.IDT_MSISDN = P_ASSINANTE.IDT_MSISDN AND \"\n\t\t\t+\t\" P_ASSINANTE.IDT_PROMOCAO = PROMOCAO.IDT_PROMOCAO AND \"\n\t\t\t+\t\" P_ASSINANTE.IDT_MSISDN = MINUTOS.IDT_MSISDN (+) AND \"\n\t\t\t+\t\" P_ASSINANTE.IDT_PROMOCAO = ? AND \"\n\t\t\t//Descartar assinantes que entraram na promocao no mes da execucao\n\t\t\t+\t\" MINUTOS.DAT_MES (+) = ? AND \"\n\t\t\t+\t\" P_ASSINANTE.DAT_ENTRADA_PROMOCAO < ? AND \"\n\t\t\t+\t\" PROMOCAO.IDT_CATEGORIA = \" \n\t\t\t+\t\tString.valueOf(ID_CATEGORIA_PULA_PULA) + \" AND \"\n\t\t\t//PONTO DE ATENCAO: Verificar pela fila de recargas e nao pela tabela de recargas devido aos\n\t\t\t//agendamentos (Se a execucao na fila de recargas ainda nao tiver sido realizada, o registro na\n\t\t\t//fila sera duplicado)\n\t\t\t+\t\" NOT EXISTS \"\n\t\t\t+\t\" ( \"\n\t\t\t+\t\" SELECT 1 \" \n\t\t\t+\t\" FROM \"\n\t\t\t+\t\" TBL_REC_FILA_RECARGAS RECARGAS \" \n\t\t\t+\t\" WHERE \" \n\t\t\t+\t\" RECARGAS.IDT_MSISDN = P_ASSINANTE.IDT_MSISDN AND \"\n\t\t\t+\t\" RECARGAS.TIP_TRANSACAO = ? AND \"\n\t\t\t+\t\" RECARGAS.IDT_STATUS_PROCESSAMENTO IN \" \n\t\t\t+\t\" (\" \n\t\t\t+\t\t\t\tString.valueOf(REC_STATUS_NAO_EXECUTADO) + \", \" \n\t\t\t+\t\t\t\tString.valueOf(REC_STATUS_OK) + \", \"\n\t\t\t+\t\t\t\tString.valueOf(REC_STATUS_TESTE_PULA_PULA) \n\t\t\t+\t\" ) AND \"\n\t\t\t+\t\" RECARGAS.DAT_EXECUCAO >= ? AND \"\n\t\t\t+\t\" RECARGAS.DAT_EXECUCAO < ? \"\n\t\t\t+\t\" ) AND \"\n\t\t\t//Descartar assinantes que nao possuem ligacoes\n\t\t\t+\t\" NOT EXISTS \"\n\t\t\t+\t\" ( \"\n\t\t\t+\t\" SELECT 1 \" \n\t\t\t+\t\" FROM \"\n\t\t\t+\t\" TBL_GER_HISTORICO_PULA_PULA HISTORICO \" \n\t\t\t+\t\" WHERE \" \n\t\t\t+\t\" HISTORICO.IDT_MSISDN = P_ASSINANTE.IDT_MSISDN AND \"\n\t\t\t+\t\" HISTORICO.DAT_EXECUCAO BETWEEN ? AND ? AND \" \n\t\t\t+\t\" HISTORICO.IDT_CODIGO_RETORNO = \" + String.valueOf(RET_PULA_PULA_LIGACOES_NOK) \n\t\t\t+\t\" ) \";\n\n\t\treturn result;\n\t}", "public void okFind()\n {\n ASPManager mgr = getASPManager();\n\n trans.clear();\n q = trans.addQuery(headblk);\n q.addWhereCondition(\"WO_NO<(SELECT Number_Serie_API.Get_Last_Wo_Number FROM DUAL) AND CONTRACT IN(SELECT User_Allowed_Site_API.Authorized(CONTRACT) FROM DUAL)\");\n q.addWhereCondition(\"CONNECTION_TYPE_DB = 'EQUIPMENT'\");\n q.includeMeta(\"ALL\");\n\n // nimhlk - Begin\n if (mgr.dataTransfered())\n {\n ASPBuffer retBuffer = mgr.getTransferedData();\n if (retBuffer.itemExists(\"WO_NO\"))\n {\n String ret_wo_no = retBuffer.getValue(\"WO_NO\");\n q.addWhereCondition(\"WO_NO = ?\");\n q.addParameter(\"WO_NO\",ret_wo_no);\n }\n else\n q.addOrCondition(mgr.getTransferedData());\n }\n // nimhlk - End\n\n mgr.querySubmit(trans,headblk);\n\n if (headset.countRows() == 0)\n {\n mgr.showAlert(mgr.translate(\"PCMWACTIVESEPARATENODATA: No data found.\"));\n headset.clear();\n }\n if (headset.countRows() == 1)\n {\n lay.setLayoutMode(lay.SINGLE_LAYOUT);\n }\n mgr.createSearchURL(headblk);\n }", "public Paises obtenerPaisPorID(Integer txtPais);", "public ConsultaPNporproducto() {\n initComponents();\n ListarPro();\n }", "public void buscarController() {\n\t\tSystem.out.println(\"\\n*** Consultando Registros\\nCampo de Consulta Pesquisa: \"+selectPesquisa);\n\t\tif (selectPesquisa.equals(null) || selectPesquisa.equals(\"\")){\t\t\t\n\t\t\t\n\t\t\tatualizarTela(); \t\t\t\n\t\t}\n\t\t\n\t\tif (selectPesquisa.equals(\"nome\")){\n\t\t\t\n\t\t\tif(campoPesquisa.equals(null)){ // Evitar o Erro de passar parametro nulo para o metodo\n\t\t\t\tatualizarTela(); \t\n\t\t\t}\n\t\t\telse{\n\t\t\tSystem.out.println(\"\\n*** Buscando por Nome\\n\");\n\t\t\tString nome = campoPesquisa; // Inserindo o valor que vai passar como parametro para os metodos\n\t\t\tlistaPaciente = pacienteService.buscarPorNome(nome);\t\n\t\t\t}\n\t\t} //FECHANDO O IF SELECTPESQUISA(NOME)\n\t\t\n\t\tif (selectPesquisa.equals(\"idPaciente\")){\n\t\t\t\n\t\t\tif(campoPesquisa.equals(null)){ // Evitar o Erro de passar parametro nulo para o metodo\n\t\t\t\tatualizarTela(); \t\n\t\t\t}\t\t\n\t\t\t\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"\\n*** Buscando por ID\\n\");\n\t\t\t\ttry{ // Tratamento de Erro Caso o usuario Colocar Letras no campo\n\t\t\t\t\tSystem.out.println(\"** ID PACIENTE: \"+campoPesquisa);\n\t\t\t\t\tlong idPaciente = Long.parseLong(campoPesquisa); \n\t\t\t\t\tlistaPaciente = pacienteService.buscarPorId(idPaciente);\t\t\t\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"\\n ** ID invalido\\n\"+e);\t\t\t\t\t\n\t\t\t\t\tlistaPaciente = null; // Lista vai ser vazia pois o ID foi invalido\n\t\t\t\t}\t\t\n\t\t\t} // FECHANDO O ELSE\n\t\t} //FECHANDO O IF SELECTPESQUISA(IDPROPRIETARIO)\n\t\t\n\t\tif (selectPesquisa.equals(\"cpf\")){\n\t\t\t\n\t\t\tif(campoPesquisa.equals(null)){ // Evitar o Erro de passar parametro nulo para o metodo\n\t\t\t\tatualizarTela(); \t\n\t\t\t}\t\t\n\t\t\telse{\n\t\t\tSystem.out.println(\"\\n*** Buscando por CPF\\n\");\t\t\t\n\t\t\tString cpf = campoPesquisa; // Inserindo o valor que vai passar como parametro para os metodos\n\t\t\tlistaPaciente = pacienteService.buscarPorCpf(cpf);\t\n\t\t\t}\n\t\t\n\t\t} // Fechando IF SELECTPESQUISA(CPF)\n\t\t\n\t\n\t}", "public static void ConsultarReq(String codCurso) {\n try {\n DefaultTableModel model = (DefaultTableModel) Vistas.ConsultaCursoReq.tblConsultaCurso.getModel();\n model.setRowCount(0);\n String consulta = \"Select distinct curreq.codigoCursoReq AS 'Requerimiento', Curso.nombreCurso AS 'Nombre curso'\\n\"\n + \"from Curso cur\\n\"\n + \"inner join Curso_Requisito curreq\\n\"\n + \"ON (Cur.codigoCurso= curreq.codigoCurso)\\n\"\n + \"join Curso \\n\"\n + \"ON (Curso.codigoCurso = curreq.codigoCursoReq)\"\n + \"WHERE cur.codigoCurso ='\" + codCurso + \"' \";\n ResultSet res = Modelo.ConexionSQL.consulta(consulta);\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getString(1));\n v.add(res.getString(2));\n model.addRow(v);\n Vistas.ConsultaCursoReq.tblConsultaCurso.setModel(model);\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage(), \"Error conexion\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}", "public String consultaParametrosEstado(String estado){\n String select =\"SELECT parsadm_parsadm, parsadm_nombre, parsadm_estado, parsadm_valor FROM ad_tparsadm where parsadm_estado = '\"+estado+\"'\";\n \n return select;\n }", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public String getToernooiSoort(){\n if(typeField.getText().equals(\"Toernooi\")){\n try {\n Connection con = Main.getConnection();\n PreparedStatement st = con.prepareStatement(\"SELECT soort_toernooi FROM Toernooi WHERE TC = ?\");\n st.setInt(1, Integer.parseInt(codeField.getText()));\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n String toernooiSoort = rs.getString(\"soort_toernooi\");\n System.out.println(toernooiSoort);\n return toernooiSoort;\n }\n\n }catch(Exception e){\n System.out.println(e);\n System.out.println(\"ERROR: er is een probleem met de database(getToernooiSoort)\");\n }\n }\n\n return \"poepieScheetje\";}", "public void buscaPersonalizada(){\n ClienteDAO cd = new ClienteDAO();\n String pesquisa = txtPesquisa.getText();\n String jcbx = jcbxTipoPesq.getSelectedItem().toString();\n \n\n if(pesquisa.equals(\"%\") || pesquisa.equals(\" %\") || pesquisa.equals(\"% \") || pesquisa.equals(\"\") && jcbx.equals(null)){\n exibeClientes();\n }\n else{ \n \n if(jcbx.equalsIgnoreCase(\"CNPJ\")){\n Vector row = new Vector();\n Cliente c = new Cliente(); \n \n c = cd.PesquisaCNPJ(pesquisa);\n\n if(!c.equals(null)){\n preecheTabCliente(c);\n } \n }else\n if(jcbx.equalsIgnoreCase(\"Razão Social\")){\n \n populaTabela(cd.PesquisaRSocial(pesquisa), tbClientes);\n \n }else\n if(jcbx.equalsIgnoreCase(\"Nome Fantasia\")){\n \n populaTabela(cd.PesquisaNFantasia(pesquisa), tbClientes);\n\n }else\n if(jcbx.equalsIgnoreCase(\"Responsável\")){\n \n \n populaTabela(cd.PesquisaResponsavel(pesquisa), tbClientes);\n \n }else\n if(jcbx.equalsIgnoreCase(\"Telefone\")){\n populaTabela(cd.PesquisaTelefone(pesquisa), tbClientes);\n \n }else\n if(jcbx.equalsIgnoreCase(null) ||jcbx.equalsIgnoreCase(\"\") ||jcbx.equalsIgnoreCase(\" \")){\n \n exibeClientes();\n } \n \n \n \n }\n }", "public void buscarDatos() throws Exception {\r\n try {\r\n String parameter = lbxParameter.getSelectedItem().getValue()\r\n .toString();\r\n String value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n Map<String, Object> parameters = new HashMap();\r\n parameters.put(\"parameter\", parameter);\r\n parameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n getServiceLocator().getHospitalizacionService().setLimit(\r\n \"limit 25 offset 0\");\r\n\r\n List<Hospitalizacion> lista_datos = getServiceLocator()\r\n .getHospitalizacionService().listar(parameters);\r\n rowsResultado.getChildren().clear();\r\n\r\n for (Hospitalizacion hospitalizacion : lista_datos) {\r\n rowsResultado.appendChild(crearFilas(hospitalizacion, this));\r\n }\r\n\r\n gridResultado.setVisible(true);\r\n gridResultado.setMold(\"paging\");\r\n gridResultado.setPageSize(20);\r\n\r\n gridResultado.applyProperties();\r\n gridResultado.invalidate();\r\n gridResultado.setVisible(true);\r\n\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }", "public void limpiarCamposFormBusqueda() {\n\t}", "public void find() {\n\t\tnome = editTextNome.getText().toString();\n\t\tsexo = \"\" + Sexo.valueOf(spinnerSexo.getSelectedItem().toString()).ordinal();\n\t\tdataNascimento = DateUtil.fromDate(DateUtil.toDate(editTextDataNascimento.getText().toString(), \"\"), \"\");\n\n \tIntent intent = new Intent(this, ClienteListActivity.class);\n\t\tintent.putExtra(\"TYPE_LIST_VIEW\", TypeListView.RESULT);\n\n \tif(checkBoxFindnome.isChecked()) {\n \t\tintent.putExtra(\"nome\", nome);\n \t}\n \tif(checkBoxFindsexo.isChecked()) {\n \t\tintent.putExtra(\"sexo\", sexo);\n \t}\n \tif(checkBoxFinddataNascimento.isChecked()) {\n \t\tintent.putExtra(\"dataNascimento\", dataNascimento);\n \t}\n\n \tstartActivity(intent);\n\t}", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "@Override\n public Asesor getAsesor(String numeroPersonal) {\n Asesor asesor = null;\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor where numeroPersonal =?\");\n orden.setString(1, numeroPersonal);\n ResultSet resultadoConsulta = orden.executeQuery();\n if(resultadoConsulta.first()){\n String nombre;\n String idioma;\n String correo;\n String telefono;\n numeroPersonal = resultadoConsulta.getString(1);\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n }else{\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"No se encuentra el asesor\");\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return asesor;\n }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public void consutaBD(String Campo, String txtSQL) {\n String consultaBD = \"SELECT * FROM `cronograma_actividades` WHERE \" + Campo + \" LIKE '\" + txtSQL + \"_%'\";\n //JOptionPane.showMessageDialog(null, consultaBD);\n javax.swing.JTable Tabla = this.Tabla_addActividad;\n // Enviamos los parametros para la consulta de la tabla\n // conexion consulta de la base de datos y el nombre de la tabla\n String cabesera[] = {\"Código\", \"Asunto\", \"Actividad\",\"hora\",\"Fecha\",\"Estado\"};\n cone1.GetTabla_Sincabeseras_sql_bd(cn, consultaBD, Tabla, cabesera);\n\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "private static void consultaProduto() throws Exception {\r\n boolean erro;\r\n int id;\r\n Produto p;\r\n Categoria c;\r\n System.out.println(\"\\t** Consultar produto **\\n\");\r\n do {\r\n erro = false;\r\n System.out.print(\"ID do produto a ser consultado: \");\r\n id = read.nextInt();\r\n if (id <= 0) {\r\n erro = true;\r\n System.out.println(\"ID Inválida! \");\r\n }\r\n System.out.println();\r\n } while (erro);\r\n p = arqProdutos.pesquisar(id - 1);\r\n if (p != null && p.getID() != -1) {\r\n c = arqCategorias.pesquisar(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (c != null) {\r\n System.out.println(\"Categoria: \" + c.nome);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n } else {\r\n System.out.println(\"Produto não encontrado!\");\r\n }\r\n }", "private void listar(HttpPresentationComms comms, String _operacion) throws HttpPresentationException, KeywordValueException {\n/* 219 */ activarVista(\"consulta\");\n/* 220 */ if (_operacion.equals(\"X\")) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 225 */ PrcRecursoDAO ob = new PrcRecursoDAO();\n/* 226 */ Collection<PrcRecursoDTO> arr = ob.cargarTodos();\n/* 227 */ HTMLTableSectionElement hte = this.pagHTML.getElementDetalle();\n/* 228 */ int cuantas = 0;\n/* 229 */ Iterator<PrcRecursoDTO> iterator = arr.iterator();\n/* 230 */ while (iterator.hasNext()) {\n/* 231 */ PrcRecursoDTO reg = (PrcRecursoDTO)iterator.next();\n/* 232 */ HTMLElement eltr = (HTMLElement)this.pagHTML.createElement(\"tr\");\n/* 233 */ eltr.appendChild(newtd(\"\" + reg.getIdRecurso()));\n/* 234 */ String url = \"PrcRecurso.po?_operacion=V&idRecurso=\" + reg.getIdRecurso() + \"\";\n/* 235 */ eltr.appendChild(newtdhref(\"\" + reg.getNombreIdTipoRecurso(), url));\n/* 236 */ eltr.appendChild(newtd(\"\" + reg.getDescripcionRecurso()));\n/* 237 */ eltr.appendChild(newtd(\"\" + reg.getNombreIdProcedimiento()));\n/* 238 */ eltr.appendChild(newtd(\"\" + reg.getNombreEstado()));\n/* 239 */ hte.appendChild(eltr);\n/* 240 */ cuantas++;\n/* */ } \n/* 242 */ arr.clear();\n/* 243 */ this.pagHTML.setTextNroRegistros(\"\" + cuantas);\n/* */ }", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "@Override\r\n\tpublic String select() {\n\t\tList<Object> paramList=new ArrayList<Object>();\r\n\t\tparamList.add(numPerPage*(pageIndex-1));\r\n\t\tparamList.add(numPerPage);\r\n\t\tthis.setResultMesg(adminDao.doCount(), adminDao.doSelect(paramList));\r\n\t\treturn SUCCESS;\r\n\t}", "private void consultPluviometer() {\r\n\t\tResourceBundle bundle = ControladorContexto.getBundle(\"mensaje\");\r\n\t\tResourceBundle bundleLifeCycle = ControladorContexto\r\n\t\t\t\t.getBundle(\"messageLifeCycle\");\r\n\t\tValidacionesAction validate = ControladorContexto\r\n\t\t\t\t.getContextBean(ValidacionesAction.class);\r\n\t\tpluviometerPojoSubList = new ArrayList<PluviometerPojo>();\r\n\t\tList<SelectItem> parameters = new ArrayList<SelectItem>();\r\n\t\tStringBuilder consult = new StringBuilder();\r\n\t\tStringBuilder unionSearchMessages = new StringBuilder();\r\n\t\tString searchMessages = \"\";\r\n\t\ttry {\r\n\t\t\tadvancedSearch(consult, parameters, bundle, unionSearchMessages);\r\n\t\t\tList<Pluviometer> pluviometerList = pluviometerDao\r\n\t\t\t\t\t.consultPluviometer(consult, parameters);\r\n\t\t\tpluviometerPojoList = new ArrayList<PluviometerPojo>();\r\n\t\t\tif (pluviometerList != null) {\r\n\t\t\t\tfor (Pluviometer pluviometer : pluviometerList) {\r\n\t\t\t\t\tDate date = pluviometer.getDateRecord();\r\n\t\t\t\t\tif (pluviometerPojo == null\r\n\t\t\t\t\t\t\t|| !((date.after(pluviometerPojo.getStartWeek()) && date\r\n\t\t\t\t\t\t\t\t\t.before(pluviometerPojo.getEndWeek())))) {\r\n\t\t\t\t\t\tpluviometerPojo = new PluviometerPojo();\r\n\t\t\t\t\t\tpluviometerPojo.setWeek(ControladorFechas\r\n\t\t\t\t\t\t\t\t.getNumberWeek(pluviometer.getDateRecord()));\r\n\t\t\t\t\t\tpluviometerPojo.setStartWeek(ControladorFechas\r\n\t\t\t\t\t\t\t\t.diaInicialSemana(pluviometer.getDateRecord()));\r\n\t\t\t\t\t\tpluviometerPojo.setEndWeek(ControladorFechas\r\n\t\t\t\t\t\t\t\t.diaFinalSemana(pluviometer.getDateRecord()));\r\n\t\t\t\t\t\tpluviometerPojo.setTotal(0);\r\n\t\t\t\t\t\tpluviometerPojo.setVector(new int[7]);\r\n\t\t\t\t\t\tpluviometerPojoList.add(pluviometerPojo);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint numberDay = ControladorFechas.getNumberDay(date);\r\n\t\t\t\t\tif (numberDay != 1) {\r\n\t\t\t\t\t\tnumberDay = numberDay - 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnumberDay = 7;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpluviometerPojo.setVectorPos(numberDay - 1,\r\n\t\t\t\t\t\t\tpluviometer.getReading());\r\n\t\t\t\t\tpluviometerPojo.setTotal(pluviometerPojo.getTotal()\r\n\t\t\t\t\t\t\t+ pluviometer.getReading());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlong amount = (long) pluviometerPojoList.size();\r\n\t\t\tpagination.paginar(amount);\r\n\t\t\tint totalReg = pagination.getRango();\r\n\t\t\tint start = pagination.getInicio();\r\n\t\t\tint rank = start + totalReg;\r\n\t\t\tif (pluviometerPojoList.size() < rank) {\r\n\t\t\t\trank = pluviometerPojoList.size();\r\n\t\t\t}\r\n\t\t\tthis.pluviometerPojoSubList = pluviometerPojoList.subList(start,\r\n\t\t\t\t\trank);\r\n\t\t\tif ((pluviometerPojoList == null || pluviometerPojoList.size() <= 0)\r\n\t\t\t\t\t&& !\"\".equals(unionSearchMessages.toString())) {\r\n\t\t\t\tsearchMessages = MessageFormat\r\n\t\t\t\t\t\t.format(bundle\r\n\t\t\t\t\t\t\t\t.getString(\"message_no_existen_registros_criterio_busqueda\"),\r\n\t\t\t\t\t\t\t\tunionSearchMessages);\r\n\t\t\t} else if (pluviometerPojoList == null\r\n\t\t\t\t\t|| pluviometerPojoList.size() <= 0) {\r\n\t\t\t\tControladorContexto.mensajeInformacion(null,\r\n\t\t\t\t\t\tbundle.getString(\"message_no_existen_registros\"));\r\n\t\t\t} else if (!\"\".equals(unionSearchMessages.toString())) {\r\n\t\t\t\tsearchMessages = MessageFormat\r\n\t\t\t\t\t\t.format(bundle\r\n\t\t\t\t\t\t\t\t.getString(\"message_existen_registros_criterio_busqueda\"),\r\n\t\t\t\t\t\t\t\tbundleLifeCycle.getString(\"rain_gauge_label_s\"),\r\n\t\t\t\t\t\t\t\tunionSearchMessages);\r\n\t\t\t}\r\n\t\t\tvalidate.setMensajeBusqueda(searchMessages);\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}", "public DanielPatricio() throws SQLException {\n initComponents();\n //limpiar();\n recargarDropDownCarros();\n recargarTextArea();\n recargarDataTable();\n \n \n }", "public FacturaCompra pagoPSE(String userName,TipoMoneda tipoMoneda);", "private void yas(){\n System.out.println(namn);\n \n try{\n String fraga = \"SELECT TEXT FROM INLAGG WHERE RUBRIK = 'Borttappad strumpa'\";\n String XD = db.fetchSingle(fraga);\n System.out.println(XD);\n txtInlagg.append(XD);\n }\n catch(InfException e){\n JOptionPane.showMessageDialog(null, \"Kunde ej hämta inlägg\");\n }\n }", "public void buscarPessoa(){\n\t\tstrCelular = CareFunctions.limpaStrFone(strCelular);\n\t\t System.out.println(\"Preparar \" + strCelular);//\n\t\t \n\t\tif (strCelular.trim().length() > 0){\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tList<Usuario> lstusuario = usuarioDAO.listPorcelular(strCelular);\n\t\t\tSystem.out.println(\"Buscou \" + lstusuario.size());\n\t\t\tsetBooIdentifiquese(false);\n\t\t\tif (lstusuario.size() > 0){\n\t\t\t\tusuario = lstusuario.get(0);\n\t\t\t\tsetBooSelecionouUsuario(true);\n\t\t\t}else{\n\t\t\t\tsetBooSelecionouUsuario(false);\t\t\t\t\n\t\t\t\tsetBooCadastrandose(true);\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setUsu_celular(strCelular);\n\t\t\t}\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Ahoe\", \"Bem Vindo\"));\t\n\t\t}else{\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Você deve informar o Celular\", \"Não foi possível pesquisar\"));\t\t\t\n\t\t}\n\t}", "protected String createFindBy(String nume) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" WHERE \");\n\t\treturn sb.toString();\n\t}", "private void advanceSearch(StringBuilder consult,\r\n\t\t\tList<SelectItem> parameters, ResourceBundle bundle,\r\n\t\t\tStringBuilder unionMessagesSearch) {\r\n\t\tResourceBundle bundleOrg = ControladorContexto\r\n\t\t\t\t.getBundle(\"messageOrganizations\");\r\n\t\tboolean messageAdd = false;\r\n\t\tString comaEspacio = \", \";\r\n\r\n\t\tconsult.append(\"WHERE ppe.person.id=:idPerson \");\r\n\t\tSelectItem itemPer = new SelectItem(person.getId(), \"idPerson\");\r\n\t\tparameters.add(itemPer);\r\n\r\n\t\tif (Constantes.NOT.equals(vigencia)) {\r\n\t\t\tconsult.append(\"AND (ppe.dateEndValidity IS NOT NULL \");\r\n\t\t\tconsult.append(\"AND ppe.dateEndValidity <= :actualDate) \");\r\n\t\t} else if (Constantes.SI.equals(vigencia)) {\r\n\t\t\tconsult.append(\"AND (ppe.dateEndValidity IS NULL \");\r\n\t\t\tconsult.append(\"OR ppe.dateEndValidity > :actualDate) \");\r\n\t\t}\r\n\t\tSelectItem itemVig = new SelectItem(new Date(), \"actualDate\");\r\n\t\tparameters.add(itemVig);\r\n\r\n\t\tif (idSearchBranchOffice != 0) {\r\n\t\t\tSelectItem item = new SelectItem(idSearchBranchOffice,\r\n\t\t\t\t\t\"idSearchBranchOffice\");\r\n\t\t\tconsult.append(\"AND ppe.sucursal.id=:idSearchBranchOffice \");\r\n\t\t\tparameters.add(item);\r\n\t\t\tString branchOfficeName = (String) ValidacionesAction.getLabel(\r\n\t\t\t\t\titemsBranchOffices, idSearchBranchOffice);\r\n\t\t\tunionMessagesSearch.append(bundleOrg.getString(\"branch_label\")\r\n\t\t\t\t\t+ \": \" + '\"' + branchOfficeName + '\"');\r\n\t\t\tmessageAdd = true;\r\n\t\t}\r\n\t\tif (idFarmSearch != 0) {\r\n\t\t\tSelectItem item = new SelectItem(idFarmSearch, \"idFarm\");\r\n\t\t\tconsult.append(\"AND ppe.farm.idFarm=:idFarm \");\r\n\t\t\tparameters.add(item);\r\n\t\t\tString farmName = (String) ValidacionesAction.getLabel(itemsFarms,\r\n\t\t\t\t\tidFarmSearch);\r\n\t\t\tunionMessagesSearch.append((messageAdd ? comaEspacio : \"\")\r\n\t\t\t\t\t+ bundleOrg.getString(\"farm_label\") + \": \" + '\"' + farmName\r\n\t\t\t\t\t+ '\"');\r\n\t\t\tmessageAdd = true;\r\n\t\t}\r\n\t\tif (this.searchCompanyManage != null\r\n\t\t\t\t&& !\"\".equals(this.searchCompanyManage)) {\r\n\t\t\tSelectItem item = new SelectItem(\"%\" + searchCompanyManage + \"%\",\r\n\t\t\t\t\t\"keyword\");\r\n\t\t\tconsult.append(\"AND UPPER(ppe.business.name) LIKE UPPER(:keyword) \");\r\n\t\t\tparameters.add(item);\r\n\t\t\tunionMessagesSearch.append((messageAdd ? comaEspacio : \"\")\r\n\t\t\t\t\t+ bundle.getString(\"label_name\") + \": \" + '\"'\r\n\t\t\t\t\t+ this.searchCompanyManage + '\"');\r\n\t\t}\r\n\t}", "public ConsultBean() {\n \t annees= new ArrayList<String>(); \n int a = Integer.parseInt(cenServ.getCentre().getAnneeRegistre());\n \t\t\n \t\tfor(int i = anneeCourant ; i >= a; i--){\n \t\t\tannees.add(i+\"\"); \n \t\t} \n \t\t\n \t\t\t\t\n }", "public int buscarCuenta (String cuenta){// busca el dni de los jugadores pasando un parametro cuenta valido\r\n\t\tString cadena=\"SELECT Dni_Jugador FROM jugadores where Cuenta_Bancaria='\"+cuenta+\"'\";\r\n\t\ttry{\r\n\t\t\tthis.abrir();\r\n\t\t\ts=c.createStatement(); // similar al anterior\r\n\t\t\treg=s.executeQuery(cadena);\r\n\t\t\twhile(reg.next()){ //mientras exista un próximo registro, retorna 1 o 0 si no hay mas registros\r\n\t\t\t\ts.close();\r\n\t\t\t\tthis.cerrar();\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\ts.close();\r\n\t\t\tthis.cerrar();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tcatch ( SQLException e){\r\n\t\t\tthis.cerrar();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "private void mostraPesquisa(List<Livro> livros) {\n // Limpa a tabela sempre que for solicitado uma nova pesquisa\n limparTabela();\n\n if (livros.isEmpty()) {\n JOptionPane.showMessageDialog(rootPane, \"Nenhum registro encontrado.\");\n } else {\n // Linha em branco usada no for, para cada registro é criada uma nova linha \n String[] linha = new String[]{null, null, null, null, null, null, null, null, null};\n // P/ cada registro é criada uma nova linha, cada linha recebe os campos do registro\n for (int i = 0; i < livros.size(); i++) {\n tmLivro.addRow(linha);\n tmLivro.setValueAt(livros.get(i).getId(), i, 0);\n tmLivro.setValueAt(livros.get(i).getId_genero(), i, 1);\n tmLivro.setValueAt(livros.get(i).getExemplar(), i, 2);\n tmLivro.setValueAt(livros.get(i).getAutor(), i, 3);\n tmLivro.setValueAt(livros.get(i).getEdicao(), i, 4);\n tmLivro.setValueAt(livros.get(i).getAno(), i, 5);\n tmLivro.setValueAt(livros.get(i).getDisponibilidade(), i, 6);\n }\n }\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public int consultaMesa(int mesa){\n \n int val;\n if(mesas[mesa-1] == 0){\n System.out.println(\"¡¡¡mesa disponible!!!\");\n \n System.out.println(\"¿desea asignar esta mesa a algun comensal?\\n1.-si\\n2.-no \"); //pregunta si quiere agregar comensal \n val = num.nextInt();\n \n if(val < 1 || val > 2){\n System.out.println(\"el valor es invalido\");\n }else if(val == 1){ //ingresa si es necesario\n //llamar funcion\n \n System.out.println(\"ingrese nombre de comensal: \");\n num.nextLine();\n comensal = num.nextLine();\n asignaMesa(comensal,mesa);\n }else if(val == 2){\n System.out.println(\"estas son las mesas disponibles: \");\n for(int i=0;i<mesas.length;i++){ \n System.out.print(\" \"+mesas[i]);\n }\n }\n }else if(mesas[mesa-1] == 1){\n System.out.println(\"mesa ocupada\");\n System.out.println(\"estas son las mesas disponibles: \");\n for(int i=0;i<10;i++){\n System.out.print(\" \"+mesas[i]);\n }\n }\n return 0;\n }", "public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }", "void Consulta(String consulta){\n if(numUsuario2.getText().equals(\"\") || numUsuario2.getText().length() < 3){\n JOptionPane.showMessageDialog(null,\"Ingresa un Núm. de usuario\");\n numUsuario2.requestFocus();\n }else{//si ya hay numero de usuario\n Double ant = Double.parseDouble(jLabelLecturaAnterior.getText());\n Double act = Double.parseDouble(jTextLectura.getText());\n \n if(reinicio.isSelected()!=false){ \n //si ha seleccionado reinciar registro\n ant = 0.0; //poner lectura anterior = 0\n }\n if(act < ant){\n JOptionPane.showMessageDialog(null,\"LECTURA INVALIDA. \\n La lectura actual es menor a la anterior:\"\n + \"\\n\" + jTextLectura.getText() + \" < \" + jLabelLecturaAnterior.getText());\n jTextLectura.requestFocus();\n }else{\n int seleccion;\n if(consulta.equals(\"guardar\")){\n seleccion = JOptionPane.showConfirmDialog(null, \"¿Guardar cambios?\", \"Confirmar cambios\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n }else{\n seleccion = JOptionPane.showConfirmDialog(null, \"¿Actualizar cambios?\", \"Confirmar cambios\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); \n }\n \n if(seleccion == 0){//Si la respuesta fue SÍ\n\n consumoLectura = act - ant;\n try { \n conn = conecionBD.conexion();\n consumoDAOImpl daoConsumo = new consumoDAOImpl(conn);\n consumo c = new consumo();\n\n String numUser = numUsuario2.getText(); \n\n lecturaAct = Double.valueOf(jTextLectura.getText());\n Double recargo = Double.valueOf(jTextRecargo1.getText());\n Double cooperacion = Double.valueOf(jTextCooperacion1.getText());\n Double bonificacion = Double.valueOf(jTextBonificaciones1.getText());\n Double sanciones = Double.valueOf(jTextSanciones1.getText());\n Double varios = Double.valueOf(jTextVarios1.getText());\n String fecha = null;\n String notas = jTextAreaMotivo1.getText();\n String aviso = \"Sin aviso\";\n int status = 0;\n \n if(estadoUser == 3 || estadoUser == 4){//si usuario no paga status =1 o es pago anual\n status = 1;\n SimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd\");\n String fechaformateada = formato.format(new Date());\n fecha = fechaformateada;\n }\n if(consumoLectura > 10){\n importe = consumoLectura*precio;\n }else{\n importe = 0.0;\n cuota = 40.0;\n }\n Double total = importe+cuota+recargo+cooperacion+bonificacion+sanciones+varios;\n\n c.setNumUsuario(numUser);\n c.setPeriodo(periodo);\n c.setAnio(anio);\n c.setLecturaActual(lecturaAct);\n c.setConsumoMedidor(consumoLectura);\n c.setPrecio(precio);\n c.setImporteConsumo(importe);\n c.setCoutaFija(cuota);\n c.setRecargos(recargo);\n c.setCooperacion(cooperacion);\n c.setBonificaciones(bonificacion);\n c.setSanciones(sanciones);\n c.setVarios(varios);\n c.setTotalPagar(total);\n c.setFechaPAgo(fecha);\n c.setNotas(notas);\n c.setAviso(aviso);\n\n c.setStatus(status);\n\n if(consulta.equals(\"guardar\")){ \n daoConsumo.insertar(c);\n }else{\n daoConsumo.actualizar(c);\n }\n\n numUsuario2.setText(\"\");\n numUsuario2.requestFocus();\n limpiarCampos();\n } catch (DAOException ex) {\n JOptionPane.showMessageDialog(null,\"Este registro ya EXISTE\");\n }\n }\n }\n } \n }", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "private void mostraPesquisa(List<BeansLivro> livros) {\n // Limpa a tabela sempre que for solicitado uma nova pesquisa\n limparTabela();\n \n if (livros.isEmpty()) {\n JOptionPane.showMessageDialog(rootPane, \"Nenhum registro encontrado.\");\n } else { \n // Linha em branco usada no for, para cada registro é criada uma nova linha \n String[] linha = new String[] {null, null, null, null, null, null, null};\n // P/ cada registro é criada uma nova linha, cada linha recebe os campos do registro\n for (int i = 0; i < livros.size(); i++) {\n tmLivro.addRow(linha);\n tmLivro.setValueAt(livros.get(i).getId(), i, 0);\n tmLivro.setValueAt(livros.get(i).getExemplar(), i, 1);\n tmLivro.setValueAt(livros.get(i).getAutor(), i, 2);\n tmLivro.setValueAt(livros.get(i).getEdicao(), i, 3);\n tmLivro.setValueAt(livros.get(i).getAno(), i, 4);\n tmLivro.setValueAt(livros.get(i).getDisponibilidade(), i, 5); \n } \n }\n }", "public void buscarDatos()throws Exception{\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue().toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\t\t\t\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\"limit 25 offset 0\");\n\t\t\t\n\t\t\tList<Ficha_epidemiologia_n13> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n13.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\t\t\t\n\t\t\tfor (Ficha_epidemiologia_n13 ficha_epidemiologia_n13 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(ficha_epidemiologia_n13, this));\n\t\t\t}\n\t\t\t\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\t\t\t\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public void dataView(String nom, String apell1, String apell2, String dni,\n String num, String inttype){\n\n System.out.println(\"Datos personales\");\n System.out.println(\"\");\n System.out.println(\"Nombre: \"+nom);\n System.out.println(\"Primer Apellido: \"+apell1);\n System.out.println(\"Segundo Apellido: \"+apell2);\n System.out.println(\"Dni: \"+dni);\n System.out.println(\"Numero de cuenta: \"+num);\n System.out.println(\"Tipo de interes: \"+inttype);\n System.out.println(\"\");\n}", "public ResultBusca(int pontFolha, int pos, boolean encontrou) {\n this.pontFolha = pontFolha;\n this.pos = pos;\n this.encontrou = encontrou;\n }", "void query9InterativaPrint(List<ParQuery9> pares);", "public TableModel GetPagineOpera (int cod, String Opera) throws SQLException {\n\t\t\n Connection dbConnection = model.connectionDataBase.ConnectionDB.Connect();\n\n // Execute the query and get the ResultSet\n PreparedStatement stmt = dbConnection.prepareStatement(\"SELECT * FROM pagine_opera INNER JOIN opera ON pagine_opera.cod_opera = opera.cod WHERE opera.cod = ? AND opera.nome = ?\");\n stmt.setInt(1, cod);\n stmt.setString(2, Opera);\n \n ResultSet rs = stmt.executeQuery();\n TableModel tm = DbUtils.resultSetToTableModel(rs);\n dbConnection.close();\n\n return tm;\n\t\t\n\t}", "private void solicitarDatos() {\n Intent intent = Henson.with(this).gotoAlumnoActivity().edad(mAlumno.getEdad()).nombre(\n mAlumno.getNombre()).build();\n startActivityForResult(intent, RC_ALUMNO);\n }", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public Usuarios(String Cedula){ //método que retorna atributos asociados con la cedula que recibamos\n conexion = base.GetConnection();\n PreparedStatement select;\n try {\n select = conexion.prepareStatement(\"select * from usuarios where Cedula = ?\");\n select.setString(1, Cedula);\n boolean consulta = select.execute();\n if(consulta){\n ResultSet resultado = select.getResultSet();\n if(resultado.next()){\n this.Cedula= resultado.getString(1);\n this.Nombres= resultado.getString(2);\n \n this.Sexo= resultado.getString(3);\n this.Edad= resultado.getInt(4);\n this.Direccion= resultado.getString(5);\n this.Ciudad=resultado.getString(6);\n this.Contrasena=resultado.getString(7);\n this.Estrato=resultado.getInt(8);\n this.Rol=resultado.getString(9);\n }\n resultado.close();\n }\n conexion.close();\n } catch (SQLException ex) {\n System.err.println(\"Ocurrió un error: \"+ex.getMessage().toString());\n }\n}", "public int obtenerRegistrosBusqueda(String nombre){\n int registros = 0;\n //SE INTENTA HACE LA CONEXION Y OBTENER LOS RSULTDOS\n try{\n //METODOS DE CONEXION\n Connection connect = getConnection();\n PreparedStatement ps;\n ResultSet res;\n \n //QUERY PARA OBTENER LOS VALORES\n ps = connect.prepareStatement(\"SELECT COUNT(*) AS registros FROM personal WHERE nombre = ?\");\n ps.setString(1, nombre);\n res = ps.executeQuery();\n \n while(res.next()){\n System.out.println(\"numero de registros en tabla personal\"+res.getInt(\"registros\"));\n registros = res.getInt(\"registros\");\n if (registros == 0) {\n JOptionPane.showMessageDialog(null,\"No hay registro con ese nombre\"); \n }\n } \n }\n catch(Exception e){\n System.out.println(\"No fue posible obtener el numero de registros de personal error\"+e);\n JOptionPane.showMessageDialog(null, \"Hubo un error:\"+e); \n }\n return registros;\n }", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "private String armarQueryPaginandoNoPorOid(String consultaOri, DTOSiccPaginacion dto) {\n Long ultLineaPresentada = dto.getIndicadorSituacion();\n Integer cantidadLineas = dto.getTamanioPagina();\n \n if ((ultLineaPresentada == null) || (cantidadLineas == null)) {\n return consultaOri;\n } else { \n StringBuffer salida = new StringBuffer();\n \n salida.append(\"SELECT auxi2.* FROM ( SELECT auxi.*, \");\n salida.append(\"CASE WHEN ((\"+ cantidadLineas + \" - COUNT(*) OVER (PARTITION BY 1)) < 0) THEN 0 ELSE 1 END SICC_ES_ULTIMA_PAGINA \");\n salida.append(\"FROM (\" + consultaOri + \") auxi WHERE ROWNUM <= \" +(cantidadLineas.intValue()+1)+ \" AND linea > \" +ultLineaPresentada+ \") auxi2 \");\n salida.append(\" WHERE ROWNUM <= \" + cantidadLineas);\n salida.append(\" and linea > \" + ultLineaPresentada);\n\n return salida.toString();\n }\n }", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "private void armarQuery(String filtro) throws DatabaseErrorException {\n String query = null;\n if (filtro != null && filtro.length() > 0) {\n query = \"SELECT * FROM \" + CLASS_NAME + \" o WHERE o.nombre ILIKE '\" + filtro + \"%' ORDER BY o.nombre\";\n }\n cargarContenedorTabla(query);\n }", "public String validarResponsableYaAsignado (DTOResponsable dtoe) throws MareException { \n UtilidadesLog.info(\"DAOZON.validarResponsableYaAsignado(DTOResponsable dtoe): Entrada\");\n StringBuffer consulta = new StringBuffer();\n Vector parametros = new Vector();\n RecordSet rs = new RecordSet();\n \n String asignado = null;\n String unidadAdministrativa = null;\n Long marca = null;\n Long canal = null;\n Long pais = null;\n\n //Recuperamos el pais, marca y canal de la Unidad Administrativa \n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n\n /*if (dtoe.getIndUA().intValue() == 1) { \n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_sub_geren_venta \");\n consulta.append(\" WHERE oid_subg_vent = ? \");\n unidadAdministrativa = \"Subgerencia\";\n }*/\n if (dtoe.getIndUA().intValue() == 2){\n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_regio \");\n consulta.append(\" WHERE oid_regi = ? \");\n unidadAdministrativa = \"Region\";\n }\n if (dtoe.getIndUA().intValue() == 3){\n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_zona \");\n consulta.append(\" WHERE oid_zona = ? \");\n unidadAdministrativa = \"Zona\";\n }\n /*if (dtoe.getIndUA().intValue() == 4){\n consulta.append(\" SELECT zon.pais_oid_pais PAIS, zon.marc_oid_marc MARCA, zon.cana_oid_cana canal \");\n consulta.append(\" FROM zon_zona zon, zon_secci sec \");\n consulta.append(\" WHERE sec.zzon_oid_zona = zon.oid_zona \"); \n consulta.append(\" AND sec.oid_secc = ? \");\n unidadAdministrativa = \"Seccion\"; \n }*/\n parametros.add(dtoe.getOidUA());\n \n try {\n rs = bs.dbService.executePreparedQuery(consulta.toString(), parametros);\n UtilidadesLog.debug(\"rs: \" + rs);\n } catch (Exception e) {\n codigoError = CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(codigoError));\n }\n\n if (rs.esVacio()) {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: No existe Unidad Administrativa \");\t\t\t\t\n String sCodigoError = CodigosError.ERROR_DE_PETICION_DE_DATOS_NO_EXISTENTE;\n throw new MareException(new Exception(), UtilidadesError.armarCodigoError(sCodigoError));\n } else {\n pais = new Long(((BigDecimal)rs.getValueAt(0,\"PAIS\")).longValue());\n marca = new Long(((BigDecimal)rs.getValueAt(0,\"MARCA\")).longValue());\n canal = new Long(((BigDecimal)rs.getValueAt(0,\"CANAL\")).longValue());\n }\n\n //Buscamos si el cliente es responsable en otra unidad administrativa\n //para el pais, marca y canal de la unidad administrativa a asignar\n parametros = new Vector(); \n consulta = new StringBuffer();\n /*consulta.append(\" SELECT 'SubGerencia: ' || zon_sub_geren_venta.des_subg_vent DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, mae_clien \");\n consulta.append(\" WHERE mae_clien.oid_clie = zon_sub_geren_venta.clie_oid_clie \"); \n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n\n consulta.append(\" UNION \");*/\n \n consulta.append(\" SELECT 'Region: ' || zon_regio.des_regi DESCUNIDADADMIN \");\n consulta.append(\" FROM mae_clien, zon_sub_geren_venta, zon_regio \");\n consulta.append(\" WHERE mae_clien.oid_clie = zon_regio.clie_oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");\n \n consulta.append(\" UNION \");\n \n consulta.append(\" SELECT 'Zona: ' || zon_zona.des_zona DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, zon_regio, zon_zona, mae_clien \");\n consulta.append(\" WHERE zon_zona.clie_oid_clie = mae_clien.oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_zona.zorg_oid_regi = zon_regio.oid_regi \");\n consulta.append(\" AND zon_zona.ind_borr = 0 \");\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");\n \n /*consulta.append(\" UNION \");\n \n consulta.append(\" SELECT 'Seccion: ' || zon_secci.des_secci DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, zon_regio, \");\n consulta.append(\" zon_zona, zon_secci, mae_clien \");\n consulta.append(\" WHERE zon_secci.clie_oid_clie = mae_clien.oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_zona.zorg_oid_regi = zon_regio.oid_regi \");\n consulta.append(\" AND zon_secci.zzon_oid_zona = zon_zona.oid_zona \"); \n consulta.append(\" AND zon_secci.ind_borr = 0 \");\n consulta.append(\" AND zon_zona.ind_borr = 0 \");\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");*/\n\n try {\n rs = bs.dbService.executePreparedQuery(consulta.toString(), parametros);\n UtilidadesLog.debug(\"rs: \" + rs);\n } catch (Exception e) {\n codigoError = CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(codigoError));\n }\n\n if (rs.esVacio()) {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: No hay datos \");\t\t\t\t\n }\n else {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: se encontro al menos un cliente \");\t\t\t\t\n asignado = rs.getValueAt(0,\"DESCUNIDADADMIN\").toString();\n }\n \n UtilidadesLog.info(\"DAOZON.validarResponsableYaAsignado(DTOResponsable dtoe): Salida\"); \n \n return asignado;\n }", "public void setConsultaPaginada(String consultaPaginada) {\r\n\t\tthis.consultaPaginada = consultaPaginada;\r\n\t}", "protected String getTitoloPaginaMadre() {\n return VUOTA;\n }", "public void consultaRadicacionesSegumiento() {\r\n try {\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(2, mBsesion.codigoMiSesion());\r\n Conexion.Conexion.CloseCon();\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".consultaRadicacionesSegumiento()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "private void enviarRequisicaoPalpite() {\n if (servidor.verificarPalpitar(nomeJogador)) {\n String palpite = NomeDialogo.nomeDialogo(null, \"Informe o seu palpite\", \"Digite o seu palpite:\", false);\n if (palpite != null && !servidor.palpitar(nomeJogador, Integer.parseInt(palpite))) {\n JanelaAlerta.janelaAlerta(null, \"Este palpite já foi dado!\", null);\n }\n }\n }", "List<Videogioco> retriveByNome(String nome);", "public void colocarComentariosResultado()\r\n\t{\r\n\t\tresultadoprueba.colocarTextoComentarios(\"\");\r\n\t}", "@Override\r\n\tpublic int buscarIndice(String nomeEmpresa) {\n\t\treturn 0;\r\n\t}", "private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}", "private void mbushetabelen() {\n try {\n Statement stmt = LidhjaMeDb.hapelidhjen();\n //CallableStatement stmt = conn.prepareCall(\"{call procedura1(?)}\");\n //stmt.setInt(1, 1);\n //ResultSet rs=stmt.executeQuery();\n String sql = \"SELECT kerkesat.kompania AS 'Kompania', llojet_lejes.lloji_lejes AS 'Lloji i Lejes'\"\n + \" ,kerkesat.adresa AS 'Adresa', kerkesat.tel AS 'Tel',kerkesat.data_pranimit AS 'Data e Pranimit'\"\n + \" ,kerkesat.nr_protokollit AS 'Numri i Protokollit', aktivitetet.aktiviteti AS 'Aktiviteti'\"\n + \" ,komunat.komuna AS 'Komuna', kerkesat.taksa AS 'Taksa', kerkesat.statusi_lendes AS 'Statusi i Lendes'\"\n + \" ,kerkesat.data_leshimit AS 'Data e Leshimit'\"\n + \" ,pergjigjjet_komisionit.pergjigjja AS 'Pergjigjja e Komisionit' FROM kerkesat \"\n + \" JOIN llojet_lejes ON kerkesat.idlloji = llojet_lejes.idlloji \"\n + \" JOIN aktivitetet ON kerkesat.idaktiviteti = aktivitetet.idaktiviteti \"\n + \" JOIN pergjigjjet_komisionit ON kerkesat.idpergjigjja = pergjigjjet_komisionit.idpergjigjja \"\n + \" JOIN komunat ON kerkesat.idkomuna=komunat.idkomuna \"\n + \"WHERE kompania LIKE '%\" + txtkompania.getText() + \"%' \"\n + \"AND aktiviteti like '%\" + (String) kmbaktiviteti.getSelectedItem() + \"%' \"\n + \"AND komuna like '%\" + (String) kmbkomunat.getSelectedItem() + \"%' \"\n + \"AND pergjigjja like '%\" + (String) kmbpergjigjja.getSelectedItem() + \"%' \"\n + \"AND data_pranimit >= '\" + new java.sql.Date(jdataprej.getDate().getTime()) + \"' AND data_pranimit <= '\" + new java.sql.Date(jdataderi.getDate().getTime()) + \"' \";\n System.out.println(sql);\n ResultSet rs = stmt.executeQuery(sql);\n tblkerkesat.setModel(DBUtils.resultSetToTableModel(rs));\n//boolean Zgjedhur=false;jTable1.addColumn(Zgjedhur);\n LidhjaMeDb.mbyllelidhjen();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public java.sql.ResultSet consultaporespecialidadhorafecha(String CodigoEspecialidad,String hora,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.horas='\"+hora+\"' and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas \");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadhorafecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "VentaJPA obtenerVenta(int comprobante);", "private void cargarFichaLepra_inicio() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_INICIO_TRATAMIENTO_LEPRA,\r\n\t\t\t\tIRutas_historia.LABEL_INICIO_TRATAMIENTO_LEPRA, parametros);\r\n\t}", "public void iniciar(String numCaso) {\n pantalla.setTitle(\"Consultar Avance de Reclamo\");\n pantalla.setLocationRelativeTo(null);\n pantalla.setVisible(true);\n pantalla.setRetorno(OTRO);\n pantalla.getTxtNumeroCaso().setText(numCaso);\n pantalla.getTxtNumeroCaso().setEnabled(false);\n pantalla.getRadioBtnDenuncia().setEnabled(false);\n pantalla.getRadioBtnReclamo().setEnabled(false);\n pantalla.getBotonConsultar().setEnabled(false);\n pantalla.getBtnSalir().setText(\"Regresar\");\n pantalla.getBtnSalir().setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Utilidades/Imagenes/iconos/dialog-apply.png\")));\n\n\n ConsultarEstadoCaso(numCaso, ExpertoConsultarAvanceDeReclamo.DENUNCIA);\n }" ]
[ "0.7037161", "0.66319335", "0.65171295", "0.6497654", "0.6399679", "0.63231623", "0.6232964", "0.6193185", "0.6183523", "0.6179034", "0.6143405", "0.6134854", "0.61124593", "0.6097397", "0.60811925", "0.60782045", "0.6059051", "0.60399055", "0.6036681", "0.6034706", "0.6026903", "0.5996173", "0.59879625", "0.5979542", "0.59712404", "0.5958047", "0.594337", "0.5933706", "0.58979976", "0.5894188", "0.58898145", "0.58742446", "0.58583355", "0.58577913", "0.58441454", "0.58376116", "0.58344585", "0.5830361", "0.58240473", "0.58235055", "0.5819576", "0.58165765", "0.581177", "0.58076227", "0.5772826", "0.5765384", "0.57649136", "0.57616305", "0.57516736", "0.5748078", "0.5743306", "0.5736889", "0.5733373", "0.5732508", "0.5727026", "0.5715289", "0.57133776", "0.5712086", "0.5704551", "0.5704307", "0.5703548", "0.570086", "0.56897867", "0.56866074", "0.56851053", "0.5681361", "0.56811696", "0.5679562", "0.56759214", "0.56626105", "0.5654656", "0.5648616", "0.56484336", "0.564513", "0.5639039", "0.56296504", "0.56156105", "0.5611097", "0.5610232", "0.56088066", "0.56058633", "0.56043094", "0.5601682", "0.5601678", "0.55990976", "0.5598226", "0.55906945", "0.55873877", "0.5579868", "0.55776024", "0.5576322", "0.5574389", "0.5572593", "0.55706775", "0.5570058", "0.5568808", "0.55645454", "0.5561096", "0.5558007", "0.5555232" ]
0.61060447
13
Bind certain fields regardless.
protected void onBind(HttpServletRequest request, Object command, BindException errors) throws Exception { RoleWrapperBean roleWrapperBean = (RoleWrapperBean) command; switch (getCurrentPage(request)) { case SELECT_ROLE_TYPE_IDX: String roleType = roleWrapperBean.getType(); Role role; List activeRolePermits; if (Role.isResourceRole(roleType)) { role = new ResourceRole(); activeRolePermits = getRoleManager().getActiveDomainObjectPermits(); } else { role = new AccessRole(); activeRolePermits = getRoleManager().getActiveAccessPermits(); } roleWrapperBean.setRole(role); roleWrapperBean.setAllPermits(activeRolePermits); roleWrapperBean.initSelectedPermitIds(); break; case ADD_ROLE_IDX: roleWrapperBean.setActive(RequestUtils.getBooleanParameter(request, ParameterConstants.ACTIVE, false)); break; case ADD_PERMISSIONS_IDX: if (RequestUtils.getStringParameters(request, "selectedPermitIds").length == 0) roleWrapperBean.setSelectedPermitIds(new String[0]); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void bindParameters() {\n\n\t}", "protected abstract void bindAttributes();", "@Override\n\tpublic void bindData() {\n\t\t\n\t}", "private void registerBindings(){\n\t\tdataBinder.registerBinding(\"supplier.supplierBusinessMode.name\", String.class, this.txtBusinessMode, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.inviteType.name\", String.class, this.txtInviteType, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.name\", String.class, this.txtSupplierName, \"text\");\n\t\tdataBinder.registerBinding(\"supplier\", com.kingdee.eas.fdc.invite.supplier.SupplierStockInfo.class, this.prmtSupplier, \"data\");\n\t\tdataBinder.registerBinding(\"number\", String.class, this.txtNumber, \"text\");\n\t\tdataBinder.registerBinding(\"evaluationType\", com.kingdee.eas.fdc.invite.supplier.SupplierEvaluationTypeInfo.class, this.prmtEvaluationType, \"data\");\n\t\tdataBinder.registerBinding(\"template\", com.kingdee.eas.fdc.invite.supplier.SupplierAppraiseTemplateInfo.class, this.prmtTemplate, \"data\");\n\t\tdataBinder.registerBinding(\"description\", String.class, this.txtRemark, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.purchaseOrgUnit.name\", String.class, this.txtOrg, \"text\");\n\t\tdataBinder.registerBinding(\"lygcScore\", java.math.BigDecimal.class, this.txtLYGCScore, \"value\");\n\t\tdataBinder.registerBinding(\"lyhRate\", java.math.BigDecimal.class, this.txtLYHScore, \"value\");\n\t\tdataBinder.registerBinding(\"isOver\", boolean.class, this.cbIsOver, \"selected\");\n\t\tdataBinder.registerBinding(\"srcGrade\", com.kingdee.eas.fdc.invite.supplier.GradeSetUpInfo.class, this.prmtSrcGrade, \"data\");\n\t\tdataBinder.registerBinding(\"srcLevel\", com.kingdee.eas.fdc.invite.supplier.LevelSetUpInfo.class, this.prmtSrcLevel, \"data\");\n\t\tdataBinder.registerBinding(\"creator\", com.kingdee.eas.base.permission.UserInfo.class, this.prmtCreator, \"data\");\n\t\tdataBinder.registerBinding(\"createTime\", java.sql.Timestamp.class, this.pkCreateTime, \"value\");\n\t\tdataBinder.registerBinding(\"lygcRate\", java.math.BigDecimal.class, this.txtLYGCRate, \"value\");\n\t\tdataBinder.registerBinding(\"lyhScroe\", java.math.BigDecimal.class, this.txtLYHRate, \"value\");\n\t\tdataBinder.registerBinding(\"amount\", java.math.BigDecimal.class, this.txtAmount, \"value\");\n\t\tdataBinder.registerBinding(\"supplier.storageNumber\", String.class, this.txtStorageNumber, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.storageDate\", java.util.Date.class, this.pkStorageDate, \"value\");\n\t\tdataBinder.registerBinding(\"supplier.manager\", String.class, this.txtManager, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.contractor\", String.class, this.txtContractor, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.authorizePerson\", String.class, this.txtLinkPerson, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.authorizePhone\", String.class, this.txtLinkPhone, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.contractorPhone\", String.class, this.txtContractorPhone, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.managerPhone\", String.class, this.txtManagerPhone, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.partProject\", String.class, this.txtPartProject, \"text\");\n\t\tdataBinder.registerBinding(\"supplier.authorizeJob\", String.class, this.txtLinkJob, \"text\");\n\t\tdataBinder.registerBinding(\"bizDate\", java.util.Date.class, this.pkBizDate, \"value\");\n\t\tdataBinder.registerBinding(\"grade\", com.kingdee.eas.fdc.invite.supplier.GradeSetUpInfo.class, this.prmtGrade, \"data\");\n\t\tdataBinder.registerBinding(\"level\", com.kingdee.eas.fdc.invite.supplier.LevelSetUpInfo.class, this.prmtLevel, \"data\");\n\t\tdataBinder.registerBinding(\"isPass\", boolean.class, this.cbIsPass, \"selectedItem\");\t\t\n\t}", "private void registerBindings(){\n\t\tdataBinder.registerBinding(\"number\", String.class, this.txtNumber, \"text\");\n\t\tdataBinder.registerBinding(\"changeDate\", java.util.Date.class, this.pkChangeDate, \"value\");\n\t\tdataBinder.registerBinding(\"srcRoom\", com.kingdee.eas.fdc.sellhouse.RoomInfo.class, this.f7Room, \"data\");\n\t\tdataBinder.registerBinding(\"bizType\", com.kingdee.eas.fdc.sellhouse.ChangeBizTypeEnum.class, this.comboBizType, \"selectedItem\");\n\t\tdataBinder.registerBinding(\"changeReason\", com.kingdee.eas.fdc.sellhouse.ChangeReasonInfo.class, this.f7ChangeReson, \"data\");\n\t\tdataBinder.registerBinding(\"handler\", com.kingdee.eas.base.permission.UserInfo.class, this.f7Handler, \"data\");\n\t\tdataBinder.registerBinding(\"attachEntry\", com.kingdee.eas.fdc.sellhouse.ChangeManageAttachEntryInfo.class, this.kdtAttachEntry, \"userObject\");\n\t\tdataBinder.registerBinding(\"attachEntry.property\", com.kingdee.eas.fdc.sellhouse.PropertyEnum.class, this.kdtAttachEntry, \"property.text\");\n\t\tdataBinder.registerBinding(\"attachEntry.context\", String.class, this.kdtAttachEntry, \"context.text\");\n\t\tdataBinder.registerBinding(\"description\", String.class, this.txtRemark, \"text\");\n\t\tdataBinder.registerBinding(\"customerPhone\", String.class, this.txtTel, \"text\");\n\t\tdataBinder.registerBinding(\"isSignChangeName\", boolean.class, this.cbIsSignChangeName, \"selected\");\n\t\tdataBinder.registerBinding(\"quitAmount\", java.math.BigDecimal.class, this.txtQuitAmount, \"value\");\n\t\tdataBinder.registerBinding(\"bizDate\", java.util.Date.class, this.pkBizDate, \"value\");\n\t\tdataBinder.registerBinding(\"payType\", com.kingdee.eas.fdc.sellhouse.SHEPayTypeInfo.class, this.f7PayType, \"data\");\n\t\tdataBinder.registerBinding(\"agioScheme\", com.kingdee.eas.fdc.sellhouse.AgioSchemeInfo.class, this.f7AgioScheme, \"data\");\n\t\tdataBinder.registerBinding(\"agioDesc\", String.class, this.txtAgioDes, \"text\");\n\t\tdataBinder.registerBinding(\"lastAgio\", java.math.BigDecimal.class, this.txtAgio, \"value\");\n\t\tdataBinder.registerBinding(\"dealTotalAmount\", java.math.BigDecimal.class, this.txtDealTotalAmount, \"value\");\n\t\tdataBinder.registerBinding(\"contractTotalAmount\", java.math.BigDecimal.class, this.txtContractTotalAmount, \"value\");\n\t\tdataBinder.registerBinding(\"sellAmount\", java.math.BigDecimal.class, this.txtSellAmount, \"value\");\n\t\tdataBinder.registerBinding(\"planningCompensate\", java.math.BigDecimal.class, this.txtPlanningCompensate, \"value\");\n\t\tdataBinder.registerBinding(\"cashSalesCompensate\", java.math.BigDecimal.class, this.txtCashSalesCompensate, \"value\");\n\t\tdataBinder.registerBinding(\"areaCompensate\", java.math.BigDecimal.class, this.txtAreaCompensate, \"value\");\n\t\tdataBinder.registerBinding(\"dealBuildPrice\", java.math.BigDecimal.class, this.txtDealBuildPrice, \"value\");\n\t\tdataBinder.registerBinding(\"contractBuildPrice\", java.math.BigDecimal.class, this.txtContractBuildPrice, \"value\");\n\t\tdataBinder.registerBinding(\"planningArea\", java.math.BigDecimal.class, this.txtPlanningArea, \"value\");\n\t\tdataBinder.registerBinding(\"preArea\", java.math.BigDecimal.class, this.txtPreArea, \"value\");\n\t\tdataBinder.registerBinding(\"actualArea\", java.math.BigDecimal.class, this.txtActualArea, \"value\");\n\t\tdataBinder.registerBinding(\"contractRoomPrice\", java.math.BigDecimal.class, this.txtContractRoomPrice, \"value\");\n\t\tdataBinder.registerBinding(\"dealRoomPrice\", java.math.BigDecimal.class, this.txtDealRoomPrice, \"value\");\n\t\tdataBinder.registerBinding(\"valuationType\", com.kingdee.eas.fdc.sellhouse.CalcTypeEnum.class, this.comboValuationType, \"selectedItem\");\n\t\tdataBinder.registerBinding(\"accFundAmount\", java.math.BigDecimal.class, this.txtAFundAmount, \"value\");\n\t\tdataBinder.registerBinding(\"loanAmount\", java.math.BigDecimal.class, this.txtLoanAmount, \"value\");\n\t\tdataBinder.registerBinding(\"sellType\", com.kingdee.eas.fdc.sellhouse.SellTypeEnum.class, this.comboSellType, \"selectedItem\");\n\t\tdataBinder.registerBinding(\"strdBuildingPrice\", java.math.BigDecimal.class, this.txtBuildingPrice, \"value\");\n\t\tdataBinder.registerBinding(\"strdRoomPrice\", java.math.BigDecimal.class, this.txtRoomPrice, \"value\");\n\t\tdataBinder.registerBinding(\"srcRoom.roomModel.name\", String.class, this.txtRoomModel, \"text\");\n\t\tdataBinder.registerBinding(\"strdTotalAmount\", java.math.BigDecimal.class, this.txtStandardTotalAmount, \"value\");\n\t\tdataBinder.registerBinding(\"attachmentAmount\", java.math.BigDecimal.class, this.txtAttachPropertyTotalAmount, \"value\");\n\t\tdataBinder.registerBinding(\"fitmentTotalAmount\", java.math.BigDecimal.class, this.txtFitmentAmount1, \"value\");\n\t\tdataBinder.registerBinding(\"isFitmentToContract\", boolean.class, this.chkIsFitmentToContract, \"selected\");\n\t\tdataBinder.registerBinding(\"fitmentStandard\", com.kingdee.eas.fdc.sellhouse.DecorationStandardInfo.class, this.f7FitmentStandard, \"data\");\n\t\tdataBinder.registerBinding(\"fitmentPrice\", java.math.BigDecimal.class, this.txtFitmentPrice, \"value\");\n\t\tdataBinder.registerBinding(\"fitmentTotalAmount\", java.math.BigDecimal.class, this.txtFitmentAmount, \"value\");\n\t\tdataBinder.registerBinding(\"creator\", com.kingdee.eas.base.permission.UserInfo.class, this.prmtCreator, \"data\");\n\t\tdataBinder.registerBinding(\"createTime\", java.sql.Timestamp.class, this.pkCreateTime, \"value\");\n\t\tdataBinder.registerBinding(\"auditTime\", java.util.Date.class, this.pkAuditDate, \"value\");\n\t\tdataBinder.registerBinding(\"auditor\", com.kingdee.eas.base.permission.UserInfo.class, this.prmtAuditor, \"data\");\n\t\tdataBinder.registerBinding(\"lastUpdateUser\", com.kingdee.eas.base.permission.UserInfo.class, this.prmtModifier, \"data\");\n\t\tdataBinder.registerBinding(\"lastUpdateTime\", java.sql.Timestamp.class, this.pkModifyDate, \"value\");\n\t\tdataBinder.registerBinding(\"details\", String.class, this.details, \"text\");\n\t\tdataBinder.registerBinding(\"changeType\", com.kingdee.eas.fdc.sellhouse.ChangeTypeEnum.class, this.cbChangeType, \"selectedItem\");\t\t\n\t}", "public void bindTextFields() {\n // bind character stats with TestFields\n healthTxt.textProperty().bind(world.getCharacterHealth());\n goldTxt.textProperty().bindBidirectional(world.getCharacterGold(), new NumberStringConverter() {\n });\n expTxt.textProperty().bindBidirectional(world.getCharacterExp(), new NumberStringConverter() {\n });\n }", "protected void fixateBindings()\r\n\t\t\t\tthrows IllegalArgumentException, IllegalAccessException,\r\n\t\t\t\tNoSuchFieldException, SecurityException {\n\t\t\tfor (Field field : getClass().getDeclaredFields()) {\r\n\t\t\t\t// relax private fields for reflection only\r\n\t\t\t\tfield.setAccessible(true);\r\n\t\t\t\t// search local -> global -> default for set value\r\n\t\t\t\tfield.set(this, evaluateField(field));\r\n\t\t\t}\r\n\t\t}", "private void registerBindings(){\n\t\tdataBinder.registerBinding(\"name\", String.class, this.name, \"text\");\n\t\tdataBinder.registerBinding(\"creator\", com.kingdee.eas.base.permission.UserInfo.class, this.creator, \"data\");\n\t\tdataBinder.registerBinding(\"relateTask\", com.kingdee.eas.fdc.schedule.FDCScheduleTaskInfo.class, this.relationTask, \"data\");\n\t\tdataBinder.registerBinding(\"createTime\", java.sql.Timestamp.class, this.creatorTime, \"value\");\n\t\tdataBinder.registerBinding(\"imgDescription\", String.class, this.txtDescription, \"text\");\n\t\tdataBinder.registerBinding(\"entries.size\", String.class, this.kdtEntries, \"size.text\");\n\t\tdataBinder.registerBinding(\"entries.sizeInByte\", int.class, this.kdtEntries, \"sizeInByte.text\");\n\t\tdataBinder.registerBinding(\"entries.fileName\", String.class, this.kdtEntries, \"fileName.text\");\n\t\tdataBinder.registerBinding(\"entries.name\", String.class, this.kdtEntries, \"name.text\");\n\t\tdataBinder.registerBinding(\"entries\", com.kingdee.eas.fdc.schedule.ProjectImageEntryInfo.class, this.kdtEntries, \"userObject\");\t\t\n\t}", "private void registerBindings(){\n\t\tdataBinder.registerBinding(\"month\", int.class, this.kDSpinnerMonth, \"value\");\n\t\tdataBinder.registerBinding(\"creator\", com.kingdee.eas.base.permission.UserInfo.class, this.prmtCreator, \"data\");\n\t\tdataBinder.registerBinding(\"createTime\", java.sql.Timestamp.class, this.kdpCreateTime, \"value\");\n\t\tdataBinder.registerBinding(\"number\", String.class, this.txtNumber, \"text\");\n\t\tdataBinder.registerBinding(\"auditor\", com.kingdee.eas.base.permission.UserInfo.class, this.prmtAuditor, \"data\");\n\t\tdataBinder.registerBinding(\"orgUnit\", com.kingdee.eas.basedata.org.FullOrgUnitInfo.class, this.prmtOrgUnit, \"data\");\n\t\tdataBinder.registerBinding(\"name\", String.class, this.txtName, \"text\");\n\t\tdataBinder.registerBinding(\"auditTime\", java.util.Date.class, this.pkAuditTime, \"value\");\n\t\tdataBinder.registerBinding(\"description\", String.class, this.txtDescription, \"text\");\n\t\tdataBinder.registerBinding(\"year\", int.class, this.kDSpinnerYear, \"value\");\t\t\n\t}", "@Override\n\tpublic void bind() {\n\t\t\n\t}", "void addFieldBinding( FieldBinding binding );", "@Override\r\n\tpublic String getBind_permits_ind() {\n\t\treturn super.getBind_permits_ind();\r\n\t}", "@Override\r\n protected void setFieldValues (Object ... fields)\r\n {\n \r\n }", "void bindTplData(Map<String, Object> binding, String[] params);", "protected abstract void bind();", "protected abstract void bind();", "private void setupOptionalFields() {\n // Optional fields <-> labels\n Map<AutoCompleteTextView, TextView> map = new HashMap<>();\n map.put(mBind.backgroundEdit, mBind.backgroundLabel);\n map.put(mBind.maxWidthEdit, mBind.maxWidthLabel);\n map.put(mBind.maxHeightEdit, mBind.maxHeightLabel);\n\n for (Map.Entry<AutoCompleteTextView, TextView> e : map.entrySet()) {\n // On every keystroke, check if field is empty, and if yes, strike through its label\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n int mode = e.getValue().getPaintFlags();\n if (e.getKey().getText().toString().equals(\"\"))\n mode = Util.setFlag(mode, Paint.STRIKE_THRU_TEXT_FLAG);\n else\n mode = Util.unsetFlag(mode, Paint.STRIKE_THRU_TEXT_FLAG);\n e.getValue().setPaintFlags(mode);\n }\n });\n }\n }", "private void addExtraBindings() {\n }", "protected void bind(PreparedStatement preparedStatement, ParameterBinding[] bindings)\n throws SQLException, Exception {\n // bind parameters\n if (bindings.length > 0) {\n int len = bindings.length;\n for (int i = 0; i < len; i++) {\n adapter.bindParameter(\n preparedStatement,\n bindings[i].getValue(),\n i + 1,\n bindings[i].getJdbcType(),\n bindings[i].getPrecision());\n }\n }\n }", "@Override\n\tprotected void bindAttributes() {\n\t\tsuper.bindAttribute(0, \"position\");\n\t\t\n\t}", "private void registerBindings(){\r\n\t\tdataBinder.registerBinding(\"isEnabled\", boolean.class, this.chkIsEnabled, \"selected\");\r\n\t\tdataBinder.registerBinding(\"isDevPrj\", boolean.class, this.chkIsDevPrj, \"selected\");\r\n\t\tdataBinder.registerBinding(\"isWholeAgeStage\", boolean.class, this.chkisWholeAgeStage, \"selected\");\r\n\t\tdataBinder.registerBinding(\"SplitProject.seq\", int.class, this.kdtSplitProject, \"seq.text\");\r\n\t\tdataBinder.registerBinding(\"SplitProject\", com.kingdee.eas.fdc.basedata.CurProjectSplitProjectInfo.class, this.kdtSplitProject, \"userObject\");\r\n\t\tdataBinder.registerBinding(\"SplitProject.splitProject\", java.lang.Object.class, this.kdtSplitProject, \"splitProject.text\");\r\n\t\tdataBinder.registerBinding(\"projectEnd\", boolean.class, this.chkprojectEnd, \"selected\");\r\n\t\tdataBinder.registerBinding(\"qk\", boolean.class, this.chqk, \"selected\");\r\n\t\tdataBinder.registerBinding(\"name\", String.class, this.txtName, \"_multiLangItem\");\r\n\t\tdataBinder.registerBinding(\"number\", String.class, this.txtNumber, \"text\");\r\n\t\tdataBinder.registerBinding(\"landDeveloper\", com.kingdee.eas.fdc.basedata.LandDeveloperInfo.class, this.bizLandDeveloper, \"data\");\r\n\t\tdataBinder.registerBinding(\"sortNo\", int.class, this.txtSortNo, \"value\");\r\n\t\tdataBinder.registerBinding(\"startDate\", java.util.Date.class, this.pkStartDate, \"value\");\r\n\t\tdataBinder.registerBinding(\"description\", String.class, this.txtDescription, \"_multiLangItem\");\r\n\t\tdataBinder.registerBinding(\"projectAddress\", String.class, this.txtProjectAddress, \"text\");\r\n\t\tdataBinder.registerBinding(\"longNumber\", String.class, this.txtLongNumber, \"text\");\r\n\t\tdataBinder.registerBinding(\"projectStatus\", com.kingdee.eas.fdc.basedata.ProjectStatusInfo.class, this.bizProjectStatus, \"data\");\r\n\t\tdataBinder.registerBinding(\"projectType\", com.kingdee.eas.fdc.basedata.ProjectTypeInfo.class, this.bizProjectType, \"data\");\r\n\t\tdataBinder.registerBinding(\"landInfomation\", com.kingdee.eas.fdc.basedata.LandInfomationInfo.class, this.landInfomationF7, \"data\");\t\t\r\n\t}", "private void registerBindings(){\r\n\t\tdataBinder.registerBinding(\"entry.programmingContract.programming.project.name\", String.class, this.kdtEntrys, \"curProject.text\");\r\n\t\tdataBinder.registerBinding(\"entry\", com.kingdee.eas.fdc.contract.contractsplit.ContractPCSplitBillEntryInfo.class, this.kdtEntrys, \"userObject\");\r\n\t\tdataBinder.registerBinding(\"entry.programmingContract.longNumber\", String.class, this.kdtEntrys, \"pcNumber.text\");\r\n\t\tdataBinder.registerBinding(\"entry.programmingContract.name\", String.class, this.kdtEntrys, \"pcName.text\");\r\n\t\tdataBinder.registerBinding(\"entry.scale\", java.math.BigDecimal.class, this.kdtEntrys, \"scale.text\");\r\n\t\tdataBinder.registerBinding(\"entry.amount\", java.math.BigDecimal.class, this.kdtEntrys, \"amount.text\");\r\n\t\tdataBinder.registerBinding(\"entry.programmingContract.amount\", java.math.BigDecimal.class, this.kdtEntrys, \"pcAmount.text\");\r\n\t\tdataBinder.registerBinding(\"amount\", java.math.BigDecimal.class, this.txtAmount, \"value\");\r\n\t\tdataBinder.registerBinding(\"creator\", com.kingdee.eas.base.permission.UserInfo.class, this.prmtCreator, \"data\");\r\n\t\tdataBinder.registerBinding(\"createTime\", java.sql.Timestamp.class, this.pkCreateTime, \"value\");\t\t\r\n\t}", "@Override\n\tprotected void initializeFields() {\n\n\t}", "public void bindArguments() {\n\n\t\tif (this.arguments != null) {\n\t\t\t// by default arguments in abstract/native methods are considered to be used (no complaint is expected)\n\t\t\tif (this.binding == null) {\n\t\t\t\tfor (int i = 0, length = this.arguments.length; i < length; i++) {\n\t\t\t\t\tthis.arguments[i].bind(this.scope, null, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tboolean used = this.binding.isAbstract() || this.binding.isNative();\n\t\t\tfor (int i = 0, length = this.arguments.length; i < length; i++) {\n\t\t\t\tArgument argument = this.arguments[i];\n\t\t\t\targument.bind(this.scope, this.binding.parameters[i], used);\n\t\t\t\tif (argument.annotations != null) {\n\t\t\t\t\tthis.binding.tagBits |= TagBits.HasParameterAnnotations;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void registerBindings(){\t\t\n\t}", "private void registerBindings(){\t\t\n\t}", "private void prepKeyBindings() { \r\n prepNumberKeys();\r\n prepOperatorKeys();\r\n prepSupplementalKeys();\r\n }", "public bind_args(bind_args other) {\n __isset_bitfield = other.__isset_bitfield;\n if (other.isSetBindingParams()) {\n this.bindingParams = new com.moseeker.thrift.gen.employee.struct.BindingParams(other.bindingParams);\n }\n this.bindSource = other.bindSource;\n }", "protected void onBind()\n\t{\n\t}", "private void bind(final BindToBeanProperty beanBinding, final Field jfxComponentField){\n \t\tfinal Class<? extends StringConverter<?>> converter = beanBinding.converter();\n \t\tfinal boolean dummyConverter = converter.isAssignableFrom(DummyConverter.class);\n \t\tfinal String bindPropertyName = beanBinding.bindPropertyName();\n\t\t\n \t\tfinal Object objectFromField = objectFromField(jfxComponentField, owner);\n \t\tif(objectFromField == null) {\n \t\t\tthrow new RuntimeException(\"property to bind is null, forgot to initiate field \" + jfxComponentField.getName() + \"?\");\n \t\t}\n \t\t\n \t\tif(dummyConverter) {\n \t\t\tfinal Property<Object> jfxComponentProp = jfxProperty(bindPropertyName, objectFromField);\n \t\t\tfinal Property<Object> modelObjectProp = jfxProperty(jfxComponentField.getName(), modelObject);\n \t\t\tbind(jfxComponentProp, modelObjectProp);\n \t\t\tbindedProperties.add(new Pair<Property<?>, Property<?>>(jfxComponentProp, modelObjectProp));\n \t\t} else {\n \t\t\tfinal Property<String> jfxComponentProp = jfxProperty(bindPropertyName, objectFromField);\n \t\t\tfinal Property<Object> modelObjectProp = jfxProperty(jfxComponentField.getName(), modelObject);\n \t\t\tbind(jfxComponentProp, modelObjectProp, converter(beanBinding));\n \t\t\tbindedProperties.add(new Pair<Property<?>, Property<?>>(jfxComponentProp, modelObjectProp));\n \t\t}\n \t}", "private void updateBinding(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(txtBinding.getText().trim().length() == 0)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof PageDef){\n\t\t\ttry{\n\t\t\t\t((PageDef)propertiesObj).setPageNo(Integer.parseInt(txtBinding.getText()));\n\t\t\t}catch(Exception ex){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t}", "void bind( final ModelData model );", "private void bindObject() {\n }", "protected void bindRequestParameters(WebDataBinder binder, NativeWebRequest request) {\n ServletRequest servletRequest = request.getNativeRequest(ServletRequest.class);\n Assert.state(servletRequest != null, \"No ServletRequest\");\n ExtendedServletRequestDataBinder servletBinder = (ExtendedServletRequestDataBinder) binder;\n servletBinder.bind(servletRequest);\n }", "public void setBindings(Binding[] binds) {\n this.binds = binds;\n }", "public void setBindings(Binding[] binds) {\n this.binds = binds;\n }", "void setBind() {\n for (int i = 1; i < size(); i++) {\n Exp f = get(i);\n if (f.isFilter() && f.size() > 0) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND\n // no bind (?x = ?y) in case of JOIN\n && (!Query.testJoin || bind.isBindCst())) {\n int j = i - 1;\n while (j > 0 && get(j).isFilter()) {\n j--;\n }\n if (j >= 0) {\n Exp g = get(j);\n if ((g.isEdge() || g.isPath())\n && (bind.isBindCst() ? g.bind(bind.first().getNode()) : true)) {\n bind.status(true);\n g.setBind(bind);\n }\n }\n }\n }\n }\n }", "public void updateNonDynamicFields() {\n\n\t}", "@Override\n\tpublic View bindView() {\n\t\treturn null;\n\t}", "private void fillMandatoryFields() {\n\n }", "private Properties prepareBindConnectionProperties(Properties connectionProperties) {\n\t\tProperties bindProperties = (Properties) connectionProperties.clone();\n\t\tbindProperties.remove(\"bindDN\");\n\t\tbindProperties.remove(\"bindPassword\");\n\n\t\treturn bindProperties;\n\t}", "protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }", "FieldBinding getBinding( Field< ? > field );", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "public void bind() {\n\t\tview.setAdapter(adapter);\n\t}", "public void bind() {\n }", "public static void bindTypes(Binder binder) {\n //array converter\n binder.convertToTypes(new ArrayMatcher(String.class), STRING_ARRAY_CONVERTER);\n binder.convertToTypes(new ArrayMatcher(int.class), INT_ARRAY_CONVERTER);\n binder.convertToTypes(new ArrayMatcher(boolean.class), BOOLEAN_ARRAY_CONVERTER);\n binder.convertToTypes(new ArrayMatcher(double.class), DOUBLE_ARRAY_CONVERTER);\n //files\n binder.convertToTypes(new ClazzMatcher(File.class), new FileTypeConverter());\n //URL\n binder.convertToTypes(new ClazzMatcher(URL.class), new URLTypeConverter());\n //URI\n binder.convertToTypes(new ClazzMatcher(URI.class), new URITypeConverter());\n //DateFormat\n binder.convertToTypes(new ClazzMatcher(DateFormat.class), new DateFormatTypeConverter());\n //Date\n binder.convertToTypes(new ClazzMatcher(Date.class), new DateTypeConverter());\n }", "@ZAttr(id=254)\n public Map<String,Object> unsetAuthLdapSearchBindPassword(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAuthLdapSearchBindPassword, \"\");\n return attrs;\n }", "@InitBinder\n public void initBinder(WebDataBinder binder) {\n binder.setAllowedFields(new String[] {\n \"type\", \"title\", \"description\", \"terms\", \"currencyCode\", \"price\"\n });\n binder.setValidator (new OfferValidator());\n }", "void setPersonalInfoBooleanBinding() {\r\n\t\tBooleanBinding booleanBind;\r\n\t\tbooleanBind = (tfFirstName.textProperty().isEmpty()).or(tfLastName.textProperty().isEmpty()).or(tfEmail.textProperty().isEmpty()).or(tfphone.textProperty().isEmpty());\r\n\t\tbtnSave.disableProperty().bind(booleanBind);\r\n\t}", "private void bindValues(SQLiteStatement stmt, JSArray values) throws JSONException {\n for (int i = 0; i < values.length(); i++) {\n if (values.get(i) instanceof Float || values.get(i) instanceof Double) {\n stmt.bindDouble(i + 1, values.getDouble(i));\n } else if (values.get(i) instanceof Number) {\n stmt.bindLong(i + 1, values.getLong(i));\n } else if (values.isNull(i)) {\n stmt.bindNull(i + 1);\n } else {\n String str = values.getString(i);\n if (str.toUpperCase().equals(\"NULL\")) {\n stmt.bindNull(i + 1);\n } else {\n stmt.bindString(i + 1, str);\n }\n }\n }\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n //Find fields to populate in inflated template\n TextView sportClubFirstName = (TextView)view.findViewById(R.id.firstNameTextView);\n TextView sportClubLastName = (TextView)view.findViewById(R.id.lastNameTextView);\n TextView sportClubSport = (TextView)view.findViewById(R.id.sportTextView);\n //Extract properties from cursor\n String firstName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_FIRST_NAME));\n String lastName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_LAST_NAME));\n String sportName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_SPORT));\n //Populate fields with extracted properties\n sportClubFirstName.setText(firstName);\n sportClubLastName.setText(lastName);\n sportClubSport.setText(sportName);\n }", "@Override\n protected String getBindingKey() {return _parms.bindingKey;}", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n\n TextView name = (TextView) view.findViewById(R.id.label3nazwa);\n TextView date = (TextView) view.findViewById(R.id.label1data);\n TextView type = (TextView) view.findViewById(R.id.label2typ);\n TextView value = (TextView) view.findViewById(R.id.label4wartosc);\n // Extract properties from cursor\n String nazwa = cursor.getString(cursor.getColumnIndexOrThrow(\"nazwa\"));\n String typ_id = cursor.getString(cursor.getColumnIndexOrThrow(\"typ_id\"));\n String data = cursor.getString(cursor.getColumnIndexOrThrow(\"data\"));\n String wartosc = cursor.getString(cursor.getColumnIndexOrThrow(\"wartosc\"));\n // Populate fields with extracted properties\n name.setText(nazwa);\n date.setText(data);\n type.setText(typ_id);\n value.setText(wartosc);\n }", "@Override\n public void onBind(Cursor cursor) {\n this.inspectFormViewID = cursor.getInt(cursor.getColumnIndex(COL_INSPECT_FORM_VIEW_ID));\n this.inspectFormViewNo = cursor.getInt(cursor.getColumnIndex(COL_INSPECT_FORM_VIEW_NO ));\n this.jobRequestID = cursor.getInt(cursor.getColumnIndex(COL_JOBREQUEST_ID ));\n this.taskCode = cursor.getString(cursor.getColumnIndex(COL_TASK_CODE));\n try{\n this.isAudit = Boolean.parseBoolean(cursor.getString(cursor.getColumnIndex(COL_IS_AUDIT )));\n }catch(Exception ex){}\n this.colsInvokeForPhotoEntryItemDisplay = cursor.getString(cursor.getColumnIndex(COL_UNIVERSAL_PHOTO_ENTRY));\n }", "@Override\n\tprotected <T> AnnotatedBindingBuilder<T> bind(Class<T> clazz) {\n\t\treturn super.bind(clazz);\n\t}", "void bindings() {\n this.categoryComboBoxEdit.setItems(this.bookModelToEdit.getCategoryFxObservableList());\n authorComboBoxEdit.setItems(this.bookModelToEdit.getAuthorFxObservableList());\n\n categoryComboBoxEdit.valueProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().categoryFxProperty());\n authorComboBoxEdit.valueProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().authorFxProperty());\n bookTitleTextFieldEdit.textProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().titleProperty());\n bookDescriptionTextAreaEdit.textProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().descriptionProperty());\n bookIsbnTextFieldEdit.textProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().isbnProperty());\n bookNoteSliderEdit.valueProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().ratingProperty());\n bookReleaseDatePickerEdit.valueProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().releaseDateProperty());\n\n }", "public boolean needsBinding(){\n\t\tArrayList<String> bindVars = getNeedBindingVars();\n\t\tif(bindVars.isEmpty())\n\t\t\treturn false;\n\t\telse return true;\n\t}", "public InputParamBindingAdapter( String paramName, String bindingExpr )\n \t{\n \t\tsuper( paramName, \n \t\t\t\tnew ExpressionAdapter( bindingExpr, DataType.ANY_TYPE ) );\n \t}", "public void executeBindings() {\n long j;\n String str;\n boolean z;\n synchronized (this) {\n j = this.mDirtyFlags;\n this.mDirtyFlags = 0;\n }\n BodyUpdates bodyUpdates = this.mBodyupdate;\n String str2 = null;\n int i = 0;\n int i2 = ((j & 3) > 0 ? 1 : ((j & 3) == 0 ? 0 : -1));\n if (i2 != 0) {\n if (bodyUpdates != null) {\n str2 = bodyUpdates.getDisplayDate();\n z = bodyUpdates.isCurrentUser();\n str = bodyUpdates.getBody();\n } else {\n str = null;\n z = false;\n }\n if (i2 != 0) {\n j |= z ? 8 : 4;\n }\n if (!z) {\n i = 4;\n }\n } else {\n str = null;\n }\n if ((j & 3) != 0) {\n this.consultEdit.setVisibility(i);\n TextViewBindingAdapter.setText(this.displayTime, str2);\n TextViewBindingAdapter.setText(this.postBody, str);\n }\n }", "@InitBinder\n public void setDisallowedFields(final WebDataBinder dataBinder) {\n dataBinder.setDisallowedFields(\"id\");\n }", "private void fillFields() {\n\t\tInteger owner = this.contractor.getOwner();\n\n\t\tnameField.setText(getTrimmedValue(this.contractor.getName()));\n\t\tlocationField.setText(getTrimmedValue(this.contractor.getLocation()));\n\t\townerField.setText(owner == null ? \"\" : owner.toString());\n\t\tsizeField.setText(contractor.getSize().toString());\n\t\trateField.setText(Contractor.RATE_FORMAT.format(this.contractor\n\t\t\t\t.getRate()));\n\t\tspecialtiesList.setListData(this.contractor.getSpecialties());\n\t}", "public static MemberMemberBinding memberBind(Member member, Iterable<MemberBinding> bindings) { throw Extensions.todo(); }", "protected void onInitDataBindings()\n\t{\n IObservableValue serverNameTargetObservable = WidgetProperties.text(SWT.Modify).observe(this.txtServerName);\n IObservableValue serverNameModelObservable = BeanProperties.value(\"serverName\").observeDetail(value);\n\t\t\n IObservableValue vendorNameTargetObservable = ViewerProperties.singleSelection().observe(cboVendorName);\n IObservableValue vendorNameModelObservable = BeanProperties.value(\"vendorNameLookup\").observeDetail(value);\n \n IObservableValue isExpressTargetObservable = WidgetProperties.selection().observe(this.chkIsExpress);\n IObservableValue isExpressModelObservable = BeanProperties.value(\"isExpress\").observeDetail(value);\n\n IObservableValue userNameTargetObservable = WidgetProperties.text(SWT.Modify).observe(this.txtUserName);\n IObservableValue userNameModelObservable = BeanProperties.value(\"userName\").observeDetail(value);\n \n IObservableValue passwordTargetObservable = WidgetProperties.text(SWT.Modify).observe(this.txtPassword);\n IObservableValue passwordModelObservable = BeanProperties.value(\"password\").observeDetail(value);\n \n \n //IObservableValue portTargetObservable = ViewerProperties.singleSelection().observe(spPort); // WidgetProperties.text(SWT.Modify).observe(this.spPort.get);\n IObservableValue portTargetObservable = WidgetProperties.selection().observe(spPort);\n IObservableValue portModelObservable = BeanProperties.value(\"port\").observeDetail(value);\n \n \n sidTargetObservable = WidgetProperties.text(SWT.Modify).observe(this.txtSid);\n sidModelObservable = BeanProperties.value(\"sid\").observeDetail(value);\n \n IValidator serverNameValidator = this.viewHelper.getRequiredStringValidator(\"Host Name must be entered\");\n IValidator userNameValidator = this.viewHelper.getRequiredStringValidator(\"User name must be entered\");\n IValidator passwordValidator = this.viewHelper.getRequiredStringValidator(\"Password must be entered\");\n IValidator vendorNameValidator = this.viewHelper.getRequiredStringValidator(\"Vendor must be entered\");\n IValidator portValidator = this.viewHelper.getRequiredStringValidator(\"Port must be entered\");\n \n serverNameBinding = ctx.bindValue(serverNameTargetObservable, serverNameModelObservable, \n \t\tnew UpdateValueStrategy().setAfterConvertValidator(serverNameValidator), null);\n \n vendorNameBinding = ctx.bindValue(vendorNameTargetObservable, vendorNameModelObservable, \n \t\tnew UpdateValueStrategy().setAfterConvertValidator(vendorNameValidator), null);\n \n userNameBinding = ctx.bindValue(userNameTargetObservable, userNameModelObservable, \n \t\tnew UpdateValueStrategy().setAfterConvertValidator(userNameValidator), null);\n \n passwordBinding = ctx.bindValue(passwordTargetObservable, passwordModelObservable, \n \t\tnew UpdateValueStrategy().setAfterConvertValidator(passwordValidator), null);\n \n IConverter portConverter = IConverter.create(Integer.class, Integer.class, x -> (x == null) ? 0 : x);\n // new UpdateValueStrategy().setAfterConvertValidator(portValidator);\n\t\tportBinding = ctx.bindValue(portTargetObservable, portModelObservable, \n \t\t//UpdateValueStrategy.create(portConverter).setAfterConvertValidator(portValidator),\n\t\t\t\tnew UpdateValueStrategy().setAfterConvertValidator(portValidator),\n \t\tUpdateValueStrategy.create(portConverter));\n \t\n \n sidBinding = ctx.bindValue(sidTargetObservable, sidModelObservable);\n \n isExpressBinding = ctx.bindValue(isExpressTargetObservable, isExpressModelObservable);\n \n ControlDecorationSupport serverNameDecorator = ControlDecorationSupport.create(serverNameBinding, SWT.TOP | SWT.LEFT);\n ControlDecorationSupport vendorNameDecorator = ControlDecorationSupport.create(vendorNameBinding, SWT.TOP | SWT.LEFT);\n ControlDecorationSupport userNameDecorator = ControlDecorationSupport.create(userNameBinding, SWT.TOP | SWT.LEFT);\n ControlDecorationSupport passwordDecorator = ControlDecorationSupport.create(passwordBinding, SWT.TOP | SWT.LEFT);\n ControlDecorationSupport portDecorator = ControlDecorationSupport.create(portBinding, SWT.TOP | SWT.LEFT);\n \n \n final IObservableValue errorObservable = WidgetProperties.text().observe(lblError);\n Binding allValidationBinding = ctx.bindValue(errorObservable, new AggregateValidationStatus(ctx.getBindings(), AggregateValidationStatus.MAX_SEVERITY), null, null);\n IObservableList bindings = ctx.getValidationStatusProviders();\n\t}", "@Override\n\tprotected String getParameterizedFields()\n\t{\n\t\tString fields = \" HBLNM=?, HBCFR=?, HBCFL=?, HBRNM=?, HBDLM=? \";\n\t\treturn fields;\n\t}", "@ZAttr(id=253)\n public Map<String,Object> setAuthLdapSearchBindDn(String zimbraAuthLdapSearchBindDn, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAuthLdapSearchBindDn, zimbraAuthLdapSearchBindDn);\n return attrs;\n }", "@InitBinder\n protected void setupBinder(final DataBinder dataBinder) {\n dataBinder.addValidators(customerDTOValidator);\n }", "@ZAttr(id=254)\n public Map<String,Object> setAuthLdapSearchBindPassword(String zimbraAuthLdapSearchBindPassword, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAuthLdapSearchBindPassword, zimbraAuthLdapSearchBindPassword);\n return attrs;\n }", "private void setFields() {\n\t\tfirstname.setText(guest.getFirstName());\n\t\tlastname.setText(guest.getLastName());\n\t\tpassport.setText(guest.getPassportNumber());\n\t\ttelephone.setText(guest.getTelephoneNumber());\n\t\tarrival.setText(arrivalDate.toString());\n\t\tdeparture.setText(departureDate.toString());\n\n\t\tif (hotelChoice.getName() != null && hotelChoice.getName() != \"\"\n\t\t\t\t&& !(hotelChoice.getName() == Controller.DEFAULT_HOTEL_CHOICE)) {\n\t\t\thotel.setText(hotelChoice.getName());\n\t\t} else {\n\t\t\thotelChoice = new Hotel();\n\t\t\thotelChoice.setName(\"\");\n\t\t\thotel.clear();\n\t\t}\n\t\tif (roomQualityChoice.getQuality() != null && roomQualityChoice.getQuality() != \"\"\n\t\t\t\t&& !(roomQualityChoice.getQuality() == Controller.DEFAULT_QUALITY_CHOICE)) {\n\t\t\tquality.setText(roomQualityChoice.getQuality());\n\t\t} else {\n\t\t\troomQualityChoice = new RoomQuality();\n\t\t\troomQualityChoice.setQuality(\"\");\n\t\t\tquality.clear();\n\t\t}\n\t\tif (discountChoice > 0) {\n\t\t\tdiscount.setText(\"(-\" + discountChoice + \"%)\");\n\t\t}\n\n\t\tloadAvailableRooms();\n\n\t}", "protected void initControls() {\n\t\tbind(true);\n\t}", "@ZAttr(id=253)\n public Map<String,Object> unsetAuthLdapSearchBindDn(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAuthLdapSearchBindDn, \"\");\n return attrs;\n }", "@Override\n public void bindView() {\n this.addSearchBtnClickHandler();\n this.addAdvanceSearchBtnClickHandler();\n this.addSearchContentBoxClickHandler();\n }", "protected void initBinder(HttpServletRequest request,\n\t\t\tServletRequestDataBinder binder) {\n\t\tsuper.initBinder(request, binder);\n\t}", "protected void initBinder(HttpServletRequest request,\n\t\t\tServletRequestDataBinder binder) {\n\t\tsuper.initBinder(request, binder);\n\t}", "protected void initBinder(HttpServletRequest request,\n\t\t\tServletRequestDataBinder binder) {\n\t\tsuper.initBinder(request, binder);\n\t}", "protected void initBinder(HttpServletRequest request,\n\t\t\tServletRequestDataBinder binder) {\n\t\tsuper.initBinder(request, binder);\n\t}", "private void bindMessages(RepletRequest req)\n {\n setCommonMessages(req);\n TextElement txtReportTitle = (TextElement) theReport\n .getElement(\"txtReportTitle\");\n txtReportTitle.setText(ReportsPackage.getMessage(m_bundle,\n \"txtReportTitle\"));\n }", "public void bind(NameValue that) {\n for( Entry<String, Object> e: that) {\n String key=e.getKey();\n if (this.containsKey(key))\n this.getStringProperty(key).set(that.getString(key));\n else\n put(key, that.getStringProperty(key));\n }\n }", "@InitBinder(\"b\")\n public void init(WebDataBinder binder) {\n binder.setFieldDefaultPrefix(\"b.\");\n }", "private void initFields(){\n labels.put(\"patientID\", new JLabel(\"Patient ID:\"));\n labels.put(\"newOwed\", new JLabel(\"New Owed:\"));\n \n fields.put(\"patientID\", new JTextField());\n fields.put(\"newOwed\", new JTextField());\n }", "protected abstract void bindingView();", "@ZAttr(id=50)\n public Map<String,Object> unsetGalLdapBindPassword(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalLdapBindPassword, \"\");\n return attrs;\n }", "@InitBinder\n public void dataBinding(WebDataBinder binder) {\n \tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tSimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n \ttimeFormat.setLenient(false);\n \tdateFormat.setLenient(false);\n \tbinder.registerCustomEditor(Date.class, \"reserveTime\", new CustomDateEditor(timeFormat, true));\n \tbinder.registerCustomEditor(Date.class, \"date\", new CustomDateEditor(dateFormat, true));\n \t\n \tbinder.setBindingErrorProcessor(new DefaultBindingErrorProcessor() {\n \t\t@Override\n \t public void processPropertyAccessException(PropertyAccessException ex, \n \t \t\t BindingResult bindingResult) {\n \t\t\t if (ex.getPropertyName().equals(\"date\") || ex.getPropertyName().equals(\"reserveTime\")) {\n \t\t\t\t FieldError fieldError = new FieldError(\n \t\t bindingResult.getObjectName(),\n \t\t ex.getPropertyName(),\n \t\t \"Invalid format\");\n\n \t\t bindingResult.addError(fieldError);\n \t\t } else {\n \t\t super.processPropertyAccessException(ex, bindingResult);\n \t\t } \n \t\t}\n \t});\n }", "private void configureFields() {\n\t\ttargetDiastolic.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(LOWER_DIASTOLIC_LIMIT,UPPER_DIASTOLIC_LIMIT));\n\t\ttargetDiastolic.setEditable(true);\n\t\ttargetSystolic.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(LOWER_SYSTOLIC_LIMIT,UPPER_SYSTOLIC_LIMIT));\n\t\ttargetSystolic.setEditable(true);\n\t\tdiastolicAlarm.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(DIASTOLIC_ALARM_LOWER, DIASTOLIC_ALARM_HIGHER));\n\t\tdiastolicAlarm.setEditable(true);\n\t\tsystolicAlarm.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(SYSTOLIC_ALARM_LOWER, SYSTOLIC_ALARM_HIGHER));\n\t\tsystolicAlarm.setEditable(true);\n\t\tSpinnerValueFactory.DoubleSpinnerValueFactory rateFactory=new SpinnerValueFactory.DoubleSpinnerValueFactory(MIN_FLOW_RATE, MAX_FLOW_RATE);\n\t\trateFactory.setAmountToStepBy(0.1);\n\t\tinfusionRate.setValueFactory(rateFactory);\n\t\t\n\t\t/*\n\t\t * We use bindBidirectional here because systolicProperty and diastolicProperty and numbers,\n\t\t * but the text field is a String, and bindBidrectional allows us to specify a converter\n\t\t * to handle the change between the two.\n\t\t */\n\t\tcurrentSystolic.textProperty().bindBidirectional(systolicProperty, new NumberStringConverter());\n\t\tcurrentDiastolic.textProperty().bindBidirectional(diastolicProperty, new NumberStringConverter());\n\t\t\n\t\tcurrentSystolic.setEditable(false);\n\t\tcurrentDiastolic.setEditable(false);\n\t\t\n\n\t\toperatingMode.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {\n\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Toggle> ov, Toggle oldToggle, Toggle newToggle) {\n\t\t\t\tif(newToggle.equals(openRadio)) {\n\t\t\t\t\tbpVBox.setVisible(false);\n\t\t\t\t\tbpVBox.setManaged(false);\n\t\t\t\t} else {\n\t\t\t\t\tbpVBox.setManaged(true);\n\t\t\t\t\tbpVBox.setVisible(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t}", "protected void bindData(ResultSet resultSet) throws SQLException {\n buildColNamesSet(resultSet);\n if (checkColNameSet()) {\n data.clear();\n for (String colName : colNames) {\n data.put(colName.toUpperCase(), resultSet.getObject(colName));\n }\n }\n }", "public static MemberMemberBinding memberBind(Method method, Iterable<MemberBinding> bindings) { throw Extensions.todo(); }", "protected void bindViews(){\n ButterKnife.bind(this);\n }", "protected void fillAdditionalFields(U user, Map<String, Object> map) {\n\t}", "@ZAttr(id=44)\n public Map<String,Object> unsetAuthLdapBindDn(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAuthLdapBindDn, \"\");\n return attrs;\n }", "public void bind(SupportSQLiteStatement fVar, PageGCEntity iVar) {\n fVar.mo6226a(1, iVar.mo63589a());\n }", "private void clearAdditionalBindings() {\n additionalBindings_ = emptyProtobufList();\n }", "private void parseFormBinds(XMLTag tag)\n {\n tag.forEachChild(new CallBack() {\n @Override\n public void execute(XMLTag arg0)\n {\n if (arg0.getCurrentTagName().equals(\"bind\"))\n mBindState.add(new Bind(arg0, mInstanceRoot)); \n }\n });\n }", "void updateParamMap (List<BindParameter> bindParams);", "@ZAttr(id=44)\n public Map<String,Object> setAuthLdapBindDn(String zimbraAuthLdapBindDn, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAuthLdapBindDn, zimbraAuthLdapBindDn);\n return attrs;\n }", "public void bind(ItemHandler handler) {\n if (handler.getOption().equals(Option.ALL)) {\n for (Map.Entry<Option, List<ItemHandler>> entry : handlerLists.entrySet()) {\n entry.getValue().add(handler);\n }\n } else {\n List<ItemHandler> list = handlerLists.get(handler.getOption());\n list.add(handler);\n }\n }", "public void bind(Credential view) {\n\n if(view.getWebsiteName().isEmpty() || view.getSavedUsername().isEmpty() || view.getSavedPassword().isEmpty() || view.getURL().isEmpty())\n {\n Log.d(TAG, \"Unable to extract view from server\");\n }\n else\n {\n tvWebsiteName.setText(view.getWebsiteName());\n tvUsername.setText(view.getSavedUsername());\n tvPassword.setText(view.getSavedPassword());\n tvURL.setText(view.getURL());\n }\n\n }", "public static void bind(ServiceBinder binder)\r\n {\n \tbinder.bind(Authenticator.class, BasicAuthenticator.class);\r\n \tbinder.bind(UserDAO.class,UserDAOImplements.class);\r\n \tbinder.bind(TrainingDAO.class,TrainingDAOImplements.class);\r\n \tbinder.bind(EvidenceExerciseDAO.class, EvidenceExerciseDAOImplements.class);\r\n \tbinder.bind(ExerciseDAO.class, ExerciseDAOImplements.class);\r\n \tbinder.bind(MyTrainingsDAO.class, MyTrainingsDAOImplements.class);\r\n \tbinder.bind(MembershipDAO.class, MembershipDAOImplements.class);\r\n \tbinder.bind(TimetableDAO.class,TimetableDAOImplements.class);\r\n \tbinder.bind(MoreInformationDao.class,MoreInformationDAOImplements.class);\r\n \tbinder.bind(PresenceDao.class,PresenceDAOImplements.class);\r\n }", "private void populateFields() {\n\t\ttypeNameTF.setText(\"\");\n\t\tunitsTF.setText(\"\");\n\t\tunitMeasureTF.setText(\"\");\n\t\tvalidityDaysTF.setText(\"\");\n\t\treorderPointTF.setText(\"\");\n\t\tnotesTF.setText(\"\");\n\t\tstatusCB.getItems().addAll(\"Active\", \"Inactive\");\n\t\tstatusCB.setValue(\"Active\");\n\t}", "public InputParamBindingAdapter( String paramName, ExpressionAdapter bindingExpr )\n\t{\n\t\tsuper( paramName, bindingExpr );\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (bindingParams != null) {\n bindingParams.validate();\n }\n }" ]
[ "0.68398464", "0.6770927", "0.6679339", "0.61201525", "0.6104499", "0.60580766", "0.5933005", "0.5877775", "0.5835359", "0.58232784", "0.580883", "0.5757864", "0.5751203", "0.57298076", "0.5701195", "0.5701195", "0.5653487", "0.56513745", "0.5638385", "0.5634393", "0.56094617", "0.5580812", "0.55635387", "0.55598694", "0.5555009", "0.5555009", "0.55532265", "0.55407524", "0.55191565", "0.5462249", "0.54267174", "0.5423799", "0.54171365", "0.5400424", "0.5321765", "0.5321765", "0.5318616", "0.53120416", "0.52904886", "0.52898264", "0.5230488", "0.5222975", "0.5217452", "0.5209666", "0.5209666", "0.51931167", "0.51916784", "0.5180259", "0.5170825", "0.5168421", "0.5166451", "0.5138832", "0.51083595", "0.50974804", "0.50938475", "0.5077888", "0.5073335", "0.5069584", "0.50603664", "0.5059764", "0.5040645", "0.5033916", "0.5031852", "0.50293255", "0.5020626", "0.50169855", "0.5004977", "0.5003939", "0.4991246", "0.49882466", "0.49817356", "0.49644133", "0.49626586", "0.4962411", "0.4962411", "0.4962411", "0.4962411", "0.4954182", "0.4951141", "0.49489245", "0.49398065", "0.49369335", "0.4934556", "0.49159938", "0.4914072", "0.49110946", "0.49110103", "0.49067864", "0.4902879", "0.490284", "0.48945346", "0.48917282", "0.48740947", "0.48608613", "0.48531547", "0.485146", "0.48476955", "0.48470694", "0.48441413", "0.48396787", "0.48346272" ]
0.0
-1
Informs the caller whether this symbol can match an empty string. This method always return false for terminals. For nonterminals the result depends on whether at least one of the rules can match an empty string.
abstract boolean canMatchEmptyString();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canMatchEmptyString() {\n return false;\n }", "public abstract boolean canMatchEmpty();", "private static boolean isEmpty(CharSequence str) {\n if (str == null || str.length() == 0) {\n return true;\n } else {\n return false;\n }\n }", "public static boolean isEmpty(CharSequence str) {\r\n\t\tif (str == null || str.length() == 0) return true;\r\n\t\telse return false;\r\n\t}", "private static boolean isEmpty(CharSequence str) {\n return str == null || str.length() == 0;\n }", "public static boolean isEmpty(CharSequence str) {\r\n if (str == null || str.length() == 0)\r\n return true;\r\n else\r\n return false;\r\n }", "public boolean isEmpty()\r\n {\r\n return getCharacters().isEmpty();\r\n }", "private boolean isEmpty(String str) {\n return (str == null) || (str.equals(\"\"));\n }", "public boolean isEmpty() {\n\t\tString v = getValue();\n\t\treturn v == null || v.isEmpty();\n\t}", "public boolean isEmpty() {\n return strings.isEmpty();\n }", "public static boolean isEmpty(final CharSequence chars) {\r\n\t\treturn chars == null || chars.length() == 0;\r\n\t}", "public static boolean isEmpty(CharSequence str) {\n return str == null || str.length() == 0;\n }", "protected boolean isEmpty(String s) {\n return s == null || s.trim().isEmpty();\n }", "public boolean empty() {\n return s.isEmpty();\n }", "protected boolean notEmpty(String s) {\n return s != null && s.length() != 0;\n }", "public boolean isEmpty() {\r\n\t\treturn this.strings != null ? this.strings.isEmpty() : true;\r\n\t}", "public static boolean isEmpty(CharSequence str) {\n\t\treturn (str == null || str.toString().trim().length() == 0);\n\t}", "private static boolean isEmpty(String str) {\n return str == null || str.trim().isEmpty();\n }", "public static boolean isEmpty(CharSequence str) {\n if (str == null || str.length() == 0 || \"null\".equals(str))\n return true;\n else\n return false;\n }", "public static boolean isNotEmpty(final CharSequence chars) {\r\n\t\treturn !isEmpty(chars);\r\n\t}", "public boolean empty() {\n\t return s.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\tif (lettersInPlay.size() > 0)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "private boolean isEmpty(String s) {\n return s == null || \"\".equals(s);\n }", "public boolean matchAnyString() { return false; }", "public boolean isEmpty() {\n return (this.text == null);\n }", "public boolean isNonTerminal(String symbol) {\r\n if (symbol == null || symbol.isEmpty()) {\r\n throw new IllegalArgumentException();\r\n }\r\n return this.bnfRuleMap.containsKey(symbol);\r\n }", "public boolean isEmpty() { return this.filterExpression.length()==0; }", "protected boolean isEmpty(String text) {\r\n if (text == null) {\r\n return true;\r\n }\r\n\r\n if (text.trim().length() == 0) {\r\n return true;\r\n }\r\n return false;\r\n }", "public static boolean isBlank(final CharSequence chars) {\r\n\t\tif (isEmpty(chars)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tint stringLength = chars.length();\r\n\t\tfor (int i = 0; i < stringLength; i++) {\r\n\t\t\tif (!Character.isWhitespace(chars.charAt(i))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static boolean isEmpty(String str) {\n return StringUtils.isEmpty(str);\n }", "private boolean checkForEmpty(String str){\r\n\t\tString sourceStr = str;\r\n\t\tif(StringUtils.isBlank(sourceStr)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isEmpty() {\n\t\t\t\t\n\t\treturn length() == 0;\n\t}", "public static boolean isEmpty(String str) {\r\n return str == null || str.length() == 0;\r\n }", "private final boolean emptyVal(String val) {\n return ((val == null) || (val.length() == 0));\n }", "public static boolean checkEmptiness(String str) {\r\n return str != null && !str.trim().equals(\"\");\r\n }", "public boolean empty() {\n return s1.empty() && s2.empty();\n }", "public boolean empty() {\n return s1.isEmpty() && s2.isEmpty();\n }", "public boolean isZeroLength() {\r\n return value.length() == 0;\r\n }", "public static boolean isEmpty(String s) {\n return s == null || s.isEmpty();\n }", "public static boolean isEmpty(String s) {\n\t\treturn s != null && s.length() == 0;\n\t}", "private static boolean isBlank(CharSequence str) {\n int strLen;\n if (str == null || (strLen = str.length()) == 0) {\n return true;\n }\n for (int i = 0; i < strLen; i++) {\n if ((Character.isWhitespace(str.charAt(i)) == false)) {\n return false;\n }\n }\n return true;\n }", "public boolean isEmpty(String pValue) {\r\n\t\treturn StringUtils.isEmpty(pValue);\r\n\t}", "public static boolean isEmpty(String value)\n {\n return (isNull(value)) || value.trim().length() == 0;\n }", "public static boolean isEmpty(String value)\n {\n return (isNull(value)) || value.trim().length() == 0;\n }", "public boolean isEmpty() {\n if (length == 0) {\n return true;\n } else {\n return false;\n }\n }", "public boolean empty() {\n return s1.isEmpty() && s2.isEmpty();\n }", "static boolean isNullOrEmpty(String str){\n if(str == null){\n return true;\n }\n if(str.isEmpty()){\n return true;\n }\n if(str.length() == 0){\n return true;\n }\n if(str.equalsIgnoreCase(\" \")){\n return true;\n }\n return false;\n }", "public boolean isEmpty() {\n\t\treturn (op == null && dval == null);\n\t}", "public static boolean isEmpty(String s) {\r\n return (s == null) || (s.length() == 0);\r\n }", "public boolean isEmpty() {\n\t\treturn length == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn length == 0;\n\t}", "public boolean hasDefaultStringEmpty() {\n return fieldSetFlags()[1];\n }", "public static boolean isNullOrEmpty(String content){\n return (content !=null && !content.trim().isEmpty() ? false :true);\n }", "public static boolean isEmpty(String s) {\n return s == null || s.length() == 0;\n }", "public abstract boolean IsEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();" ]
[ "0.7431366", "0.72422653", "0.6685332", "0.66248447", "0.6597389", "0.6595952", "0.6583928", "0.65458894", "0.650351", "0.64903533", "0.6467551", "0.64649427", "0.6440644", "0.6426434", "0.64186984", "0.6393094", "0.6367335", "0.6363939", "0.6350581", "0.634398", "0.6333947", "0.6300102", "0.6296668", "0.62807566", "0.62260246", "0.62173504", "0.6213833", "0.62004906", "0.61936504", "0.619234", "0.61629385", "0.61617696", "0.61608386", "0.6160635", "0.615652", "0.61391336", "0.613676", "0.6131809", "0.6123867", "0.6119054", "0.6108565", "0.6104468", "0.6101333", "0.6101333", "0.60999995", "0.6097972", "0.60944825", "0.6076636", "0.607434", "0.6073954", "0.6073954", "0.60692304", "0.60652286", "0.60486585", "0.6044675", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121", "0.6040121" ]
0.7691604
0
Informs the caller whether this symbol represents a keyword.
public abstract boolean isKeyword();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasKeyword();", "public boolean isKeyword(String keyword) {\n return this.keyword.equals(keyword); \n }", "public abstract boolean isKeyword(@Nullable String text);", "private boolean isKeyword(String value) {\n return Keywords.isKeyword(value);\n }", "@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean hasKeyword() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasKeyword() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public static boolean isKeyword(ISession session, String data) {\n return Compat.isKeyword(session, data);\n }", "public static boolean isKeyword(String s) {\n return keywords.containsKey(s.toLowerCase());\n }", "boolean isKeywordExact() {\n return exactRadioButton.isSelected();\n }", "boolean hasSymbol();", "boolean hasSymbol();", "boolean hasKeywordView();", "java.lang.String getKeyword();", "boolean hasKeywordPlan();", "public boolean containsKeyword(String keyword) {\n String lcKeyword = keyword.toLowerCase();\n String lcDescription = description.toLowerCase();\n return lcDescription.contains(lcKeyword);\n }", "private boolean is(TK tk) {\n return tk == tok.kind;\n }", "public boolean containsWord(String keyword){\n /* to be implemented in part(b) */\n if(description.indexOf(\" \"+ keyword+ \" \")!==-1){\n return true; \n }\n else if(description.indexOf(\" \"+keyword)=0){\n return true \n }\n else return false;\n }", "private boolean is(TK tk)\n {\n return tk == tok.kind;\n }", "public String getKeyword() {\r\n return keyword;\r\n }", "boolean isNotKeyWord(String word);", "String getKeyword();", "public String getKeyword() {\n return keyword;\n }", "public abstract boolean isStopWord(String term);", "public java.lang.String getKeyword()\n {\n return keyword;\n }", "public String getKeyword() {\n return keyword; \n }", "public boolean isMark(){\n for (Character mark: PunctuationMark.marks){\n if (this.partOfSentence.contains(mark.toString())){\n return true;\n }\n }\n return false;\n }", "boolean isKeywordRegex() {\n return regexRadioButton.isSelected();\n }", "public String getKeyword()\r\n {\r\n return this.keyword;\r\n }", "public String getKeyword() {\n return this.keyword;\n }", "public boolean matches(String keyword) {\n\t\tif (keyword.equals(\"CRTE\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isLexical(){\n\t\treturn lexical;\n\t}", "boolean hasDisplayKeywordView();", "boolean hasKeywordPlanCampaignKeyword();", "public boolean isSymbolDefined(String s) {\n return slexic.containsKey(s);\n }", "private Keyword basicType()\r\n {\r\n Keyword x = Keyword.NONESY;\r\n\r\n if (typeKW.contains(nextSymbol))\r\n {\r\n x = nextSymbol;\r\n lookAhead();\r\n }\r\n\r\n return x;\r\n }", "@Override\r\n\t\t\tpublic boolean isStopWord(String term) {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n public boolean isKeywordMultiField() {\n return !isKeyword() && fieldMap.containsKey(ES_MAPPING_TYPE_KEYWORD)\n && fieldMap.get(ES_MAPPING_TYPE_KEYWORD).isKeyword();\n }", "public void setKeyword(String keyword) {\r\n this.keyword = keyword;\r\n }", "public String getKeyword()\n {\n switch (keywordType)\n {\n case ASTokenTypes.TOKEN_KEYWORD_FUNCTION:\n return IASKeywordConstants.FUNCTION;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_EXTENDS:\n return IASKeywordConstants.EXTENDS;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_IMPLEMENTS:\n return IASKeywordConstants.IMPLEMENTS;\n \n case ASTokenTypes.TOKEN_KEYWORD_VAR:\n return IASKeywordConstants.VAR;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_GET:\n return IASKeywordConstants.GET;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_SET:\n return IASKeywordConstants.SET;\n \n case ASTokenTypes.TOKEN_KEYWORD_NEW:\n return IASKeywordConstants.NEW;\n \n case ASTokenTypes.TOKEN_KEYWORD_CONST:\n return IASKeywordConstants.CONST;\n \n case ASTokenTypes.TOKEN_KEYWORD_CLASS:\n return IASKeywordConstants.CLASS;\n \n case ASTokenTypes.TOKEN_KEYWORD_INTERFACE:\n return IASKeywordConstants.INTERFACE;\n \n case ASTokenTypes.TOKEN_DIRECTIVE_DEFAULT_XML:\n return IASKeywordConstants.DEFAULT_XML_NAMESPACE;\n }\n\n assert false : \"Unknown keyword type \" + keywordType;\n return \"\";\n }", "public void setKeyword(String keyword) {\n this.keyword = keyword;\n }", "public boolean checkFirstKeyword(String strKeyword) {\n return strKeyword.contains(keywords[0]);\n }", "void setTypeKeyword(String keyword) {\n this.fTypeKeyword = keyword;\n }", "default boolean isStopWord() {\n return meta(\"nlpcraft:nlp:stopword\");\n }", "boolean isSetCapitalInKind();", "private boolean matchedKeyword(String keyword, String[] tokens) {\n\t\tfor (int i = 0; i < tokens.length; i++)\n\t\t\tif (keyword.equalsIgnoreCase(tokens[i]))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "public void setKeyword(java.lang.String _keyword)\n {\n keyword = _keyword;\n }", "private boolean isPlural(String keyword) {\n return keyword.endsWith(\"s\");\n }", "boolean hasWord();", "public static boolean isMetaTracker(CharSequence text, Object what) {\n return what == CAP || what == ALT || what == SYM;\n }", "boolean hasKeywordPlanAdGroupKeyword();", "@Override\n public String getKeyword() {\n return null;\n }", "@Override\n public String getKeyword() {\n return null;\n }", "public String getKeyword() {\n return (String)getAttributeInternal(KEYWORD);\n }", "private boolean isTypeMark() throws IOException\n\t{\n\t\t// Initialize return value to false.\n\t\tboolean isValid = false;\n\t\t\n\t\t// Check if current token is of \"type mark\" type.\n\t\tswitch(theCurrentToken.TokenType)\n\t\t{\n\t\t\tcase INTEGER: case BOOL: case FLOAT: case CHAR: case STRING:\n\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tisValid = false;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "private boolean isWord(String word) {\n\t\treturn dict.isWord(word);\n\t}", "@Override\n\tprotected boolean isStopword(String word) {\n\t\treturn this.stopwords.contains(word);\n\t}", "public void checkForInvalidKeyword(String strKeyword) throws KeywordException {\n boolean match = false;\n for (String s : keywords) {\n if (strKeyword.contains(s))\n match = true;\n }\n if (!match)\n throw new KeywordException();\n }", "public boolean isTerm() {\n\t\treturn isTerm;\n\t}", "public boolean isStopWord(String word);", "boolean isCodeMixed(String text) {\n String[] tokens = text.split(\"\\\\s+\");\r\n for (String word : tokens) {\r\n String nword = word.toLowerCase();\r\n if (keywords.containsKey(nword))\r\n return true;\r\n }\r\n return false;\r\n }", "void createKeyword(String name);", "public java.lang.String getKeyword() {\n java.lang.Object ref = keyword_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n keyword_ = s;\n }\n return s;\n }\n }", "private boolean isTermAppearInQuery(String term) {\n boolean isTermAppear = false;\n query thisQuery = listDocumentRetrievedForThisQuery.getQuery();\n StringTokenizer token = new StringTokenizer(thisQuery.getQueryContent(), \" %&\\\"*#@$^_<>|`+=-1234567890'(){}[]/.:;?!,\\n\");\n while (token.hasMoreTokens()) {\n String keyTerm = token.nextToken();\n if (invertedFile.isStemmingApplied()) {\n keyTerm = StemmingPorter.stripAffixes(keyTerm);\n }\n if (term.equals(keyTerm.toLowerCase())) {\n isTermAppear = true;\n break;\n }\n }\n return isTermAppear;\n }", "public java.lang.String getKeyword() {\n java.lang.Object ref = keyword_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n keyword_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public boolean contains_switch(String symbol);", "public boolean isActivationString(String word);", "public boolean ignoreWord(String word) {\n\t\t// By default we ignore all keywords that are defined in the syntax\n\t\treturn org.emftext.sdk.concretesyntax.resource.cs.grammar.CsGrammarInformationProvider.INSTANCE.getKeywords().contains(word);\n\t}", "boolean isTypeKey(String key);", "Keyword findKeywordByName(String name);", "public boolean newKeyword(String designation) {\n boolean addedKeyword = false;\n updateKeywordsList();\n\n return addedKeyword;\n\n }", "public boolean hasName() {\n return typeDeclaration.hasName();\n }", "boolean isWord(String potentialWord);", "private boolean name() {\r\n return (\r\n (letter() && alphas()) ||\r\n (CHAR('`') && nobquotes() && MARK(QUOTE) && CHAR('`'))\r\n );\r\n }", "public boolean match(String keyword) {\n assert(keyword != null);\n boolean matchesCuisine = StringUtil\n .containsWordIgnoreCase(cuisine.map(content -> content.value).orElse(\"\"), keyword);\n boolean matchesOccasion = StringUtil\n .containsWordIgnoreCase(occasion.map(content -> content.value).orElse(\"\"), keyword);\n boolean matchesPriceRange = StringUtil\n .containsWordIgnoreCase(priceRange.map(content -> content.value).orElse(\"\"), keyword);\n return matchesCuisine || matchesOccasion || matchesPriceRange;\n }", "public void setKeyword(String newKeyword)\r\n {\r\n this.keyword = newKeyword;\r\n }", "protected boolean isModifier( String word )\r\n\t{\r\n\t\treturn m_listModifiers.contains(word);\r\n\t}", "public boolean isHasSword() {\n return hasSword;\n\t}", "public static void keywordHit()\r\n\t{\r\n\t\tkeywordHits++;\r\n\t}", "public Keyword() {\n\t}", "public boolean isStopword(String str) {\n\n return m_Stopwords.containsKey(str.toLowerCase());\n }", "public boolean isOp(){\n return opSet.contains(symbol());\n }", "public boolean isSmartKey(String key);", "public boolean isNonTerminal(String symbol) {\n\t\treturn this.grammarRules.containsKey(symbol);\n\t}", "public com.google.protobuf.ByteString\n getKeywordBytes() {\n java.lang.Object ref = keyword_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n keyword_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public boolean isSymbolic() throws PDFNetException {\n/* 583 */ return IsSymbolic(this.a);\n/* */ }", "boolean isIdentifierChar(char c);", "public KEYWORD keyWord(){\n\n if (currentTokenType == TYPE.KEYWORD){\n\n return keyWordMap.get(currentToken);\n\n }else {\n\n throw new IllegalStateException(\"Current token is not a keyword!\");\n }\n }", "public boolean checkCollection(String Keyword)\n\t{\n\n\t\t//#CM708975\n\t\t// Refer to Key-Table by the item name. \n\t\tKey ky = getKeyCut(Keyword) ;\n\t\tif (ky == null)\n\t\t\treturn false ;\n\n\t\tif (ky.getTableCollect() == null)\n\t\t\treturn false ;\n\n\t\treturn true ;\n\t}", "public void setKeyword(String value) {\n setAttributeInternal(KEYWORD, value);\n }", "public boolean isVoid() {\n boolean hasVoid = getKeywords().stream()\n .filter(keyword -> keyword == BuiltinTypeKeyword.VOID)\n .findAny()\n .isPresent();\n\n if (getKeywords().size() > 1) {\n SpecsLogs.msgInfo(\"'void' type has more than one keyword, check if ok: \" + getKeywords());\n }\n\n return hasVoid;\n }", "boolean hasSymbolId();", "com.google.protobuf.ByteString\n getKeywordBytes();", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Keyword)) {\r\n return false;\r\n }\r\n Keyword other = (Keyword) object;\r\n if ((this.keywordPK == null && other.keywordPK != null) || (this.keywordPK != null && !this.keywordPK.equals(other.keywordPK))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isMaybeObjectOrSymbol() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null;\n }", "boolean isSyn();", "@Override\r\n\tpublic boolean keyTyped(char character) {\n\t\treturn false;\r\n\t}", "public abstract boolean isIdentifier(@Nullable String text);" ]
[ "0.7672841", "0.7537996", "0.7521649", "0.7287209", "0.7249502", "0.7249502", "0.7249502", "0.7193548", "0.7169915", "0.7098903", "0.6809181", "0.6578892", "0.65412986", "0.65412986", "0.6460717", "0.6374446", "0.63323784", "0.631234", "0.6164432", "0.61519647", "0.6141873", "0.60763144", "0.60639024", "0.60591084", "0.60494286", "0.6040785", "0.6038929", "0.6014532", "0.5985913", "0.5961929", "0.5953408", "0.5909504", "0.5880712", "0.5857243", "0.58522725", "0.5837437", "0.5821756", "0.5799093", "0.57935417", "0.57554847", "0.5747591", "0.5743708", "0.5733218", "0.5705016", "0.5703598", "0.5697997", "0.5694023", "0.56917095", "0.56837547", "0.5677969", "0.56414944", "0.5634177", "0.5597615", "0.55903924", "0.55903924", "0.55698746", "0.5560611", "0.5560293", "0.55494106", "0.5507072", "0.5495907", "0.54870003", "0.5457217", "0.54433036", "0.5412267", "0.54076874", "0.5405401", "0.5375892", "0.53730863", "0.5362062", "0.5360702", "0.5355027", "0.5344296", "0.5337055", "0.53077936", "0.5307213", "0.5306046", "0.53024334", "0.5297171", "0.5281903", "0.52793205", "0.5251725", "0.5226729", "0.52259076", "0.52171797", "0.5215563", "0.52149516", "0.5211941", "0.52087176", "0.52066195", "0.5204165", "0.5198833", "0.5197814", "0.5193218", "0.5189796", "0.51821125", "0.5169033", "0.51654625", "0.51653063", "0.51650834" ]
0.8308562
0
Terminals cannot match an empty string.
boolean canMatchEmptyString() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract boolean canMatchEmptyString();", "public abstract boolean canMatchEmpty();", "@Test\n\tpublic void nonEmptyString() {\n\t\tString s = \" H \";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}", "public boolean matchAnyString() { return false; }", "@Test\n\tpublic void testJustEmptyChars() {\n\t\tSmartScriptLexer lexer = new SmartScriptLexer(\" \\r\\n\\t \");\n\t\t\n\t\tSmartScriptToken expected = new SmartScriptToken(SmartScriptTokenType.TEXT, \" \\r\\n\\t \");\n\t\tassertEquals(lexer.nextToken().getType(), SmartScriptTokenType.TEXT);\n\t\tassertEquals(lexer.getToken().getValue(), expected.getValue());\n\t}", "public boolean isNonTerminal(){\n return false;\n }", "static boolean isBlank(Token t) {\n return t.getText().isBlank(); // trim().length() == 0\n }", "@Test\n\tpublic void testEmpty() throws LexicalException, SyntaxException {\n\t\tString input = \"\"; // The input is the empty string. This is not legal\n\t\tshow(input); // Display the input\n\t\tScanner scanner = new Scanner(input).scan(); // Create a Scanner and initialize it\n\t\tshow(scanner); // Display the Scanner\n\t\tSimpleParser parser = new SimpleParser(scanner); // Create a parser\n\t\tthrown.expect(SyntaxException.class);\n\t\ttry {\n\t\t\tparser.parse(); // Parse the program\n\t\t} catch (SyntaxException e) {\n\t\t\tshow(e);\n\t\t\tthrow e;\n\t\t}\n\t}", "@Test\n\tpublic void zeroLength() {\n\t\tString s = \"\";\n\t\tassertTrue(\"Zero length string\", StringUtil.isEmpty(s));\n\t}", "@Test\n\t\tpublic void testEmpty() throws LexicalException, SyntaxException {\n\t\t\tString input = \"\"; //The input is the empty string. \n\t\t\tthrown.expect(SyntaxException.class);\n\t\t\tPLPParser parser = makeParser(input);\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tProgram p = parser.parse();\n\t\t}", "private void checkEmptyLine(String line) {\n if (line.substring(5).replace('\\t', ' ')\n .replace('\\n', ' ').trim().length() != 0) {\n throw new IllegalArgumentException(\"Invalid characters after tag.\");\n }\n }", "private boolean isNoSpace(final String message) {\n\t\treturn message.contains(\"0 space\"); //$NON-NLS-1$\n\t}", "@Test public void gracefullyEndsForEmptyInputs() {\n\t\tAssert.assertNotNull(parser.parse(new String[0], new CliOptions()));\n\t}", "@Test\n\tpublic void nonEmptyMultiLine() {\n\t\tString s = \" \\n\" + \"Nothing\";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}", "private static boolean isEmpty(CharSequence str) {\n return str == null || str.length() == 0;\n }", "private static boolean isBlank(CharSequence str) {\n int strLen;\n if (str == null || (strLen = str.length()) == 0) {\n return true;\n }\n for (int i = 0; i < strLen; i++) {\n if ((Character.isWhitespace(str.charAt(i)) == false)) {\n return false;\n }\n }\n return true;\n }", "@Test\n\tpublic void testEmptyString() {\n\t\tString s = \" \\t \";\n\t\tassertTrue(\"Empty string with tab\", StringUtil.isEmpty(s));\n\t}", "@Test\r\n\tpublic void testEmpty() throws LexicalException, SyntaxException {\r\n\t\tString input = \"\"; //The input is the empty string. \r\n\t\tParser parser = makeParser(input);\r\n\t\tthrown.expect(SyntaxException.class);\r\n\t\tparser.parse();\r\n\t}", "private boolean isEmpty(String str) {\n return (str == null) || (str.equals(\"\"));\n }", "public boolean isEmpty()\r\n {\r\n return getCharacters().isEmpty();\r\n }", "private boolean isBlank() {\n\t\tchar currentChar = data[index];\n\t\tif (currentChar == '\\r' || currentChar == '\\n' || currentChar == '\\t' || currentChar == ' ') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean terminal (String x) {\n if (x.equals(\"Q\") || x.equals(\"A\") || x.equals(\"B\") || x.equals(\"D\") || x.equals(\"C\") || x.equals(\"E\") || x.equals(\"F\") || x.equals(\"H\") || x.equals(\"G\") || x.equals(\"I\") || x.equals(\"J\") || x.equals(\"K\") || x.equals(\"V\") || x.equals(\"L\") || x.equals(\"M\") || x.equals(\"N\") || x.equals(\"O\") || x.equals(\"P\") || x.equals(\"R\") || \n x.equals(\"T\")) {\n return false;\n } else {\n return true;\n }\n }", "public boolean isEmpty() { return this.filterExpression.length()==0; }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume(2033);\n Token token0 = xPathLexer0.whitespace();\n assertEquals((-2), token0.getTokenType());\n assertEquals(\"\", token0.getTokenText());\n }", "private static final boolean isEmpty(String s) {\n return s == null || s.trim().length() < 1;\n }", "public boolean isTerminal(){\n for(int row=0; row<8; row++)\n {\n for(int col=0; col<8; col++)\n {\n if(gameboard[row][col] == EMPTY)\n {\n return false;\n }\n }\n }\n return true;\n\n }", "public boolean isValidCommandWord(String commandWord) {\n if (commandWord.equals(\"\")) {\n return false;\n } else {\n return true;\n }\n }", "private static boolean isEmpty(String str) {\n return str == null || str.trim().isEmpty();\n }", "public boolean empty() {\r\n if (text.equals(\"\") ||\r\n MoreString.indexOfIgnoreCase(text, \"<title>404 Not Found\") >= 0)\r\n return true;\r\n return false;\r\n }", "public void testIsMacAddress_invalidInput() {\n assertFalse(mTestDevice.isMacAddress(\"\"));\n assertFalse(mTestDevice.isMacAddress(\"00-15-E9-2B-99-3C\")); // Invalid delimiter\n }", "Rule WhiteSpace() {\n return ZeroOrMore(AnyOf(\" \\n\\r\\t\\f\"));\n }", "protected boolean isEmpty(String s) {\n return s == null || s.trim().isEmpty();\n }", "private static boolean isEmpty(CharSequence str) {\n if (str == null || str.length() == 0) {\n return true;\n } else {\n return false;\n }\n }", "@Test\n\tpublic void testEmptyLine() {\n\t\tString s = \" \\n\";\n\t\tassertTrue(\"Empty string with line ending\", StringUtil.isEmpty(s));\n\t}", "private final boolean emptyVal(String val) {\n return ((val == null) || (val.length() == 0));\n }", "boolean isNoChar() {\n return array[0] == -1;\n }", "private boolean checkForEmpty(String str){\r\n\t\tString sourceStr = str;\r\n\t\tif(StringUtils.isBlank(sourceStr)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isNonTerminal(String symbol) {\r\n if (symbol == null || symbol.isEmpty()) {\r\n throw new IllegalArgumentException();\r\n }\r\n return this.bnfRuleMap.containsKey(symbol);\r\n }", "static boolean IS_NOMINAL(String t) {\n\n return (t.equals(Feature.NOMINAL));\n }", "protected boolean checkEmpty(String line) {\n return line == null || line.isBlank();\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\" Bir string giriniz =\");\n String text = sc.nextLine();\n\n boolean boslukVarmi = text.contains(\" \");\n System.out.println(\"boslukVarmi = \" + boslukVarmi);\n \n boolean bosMU=text.isEmpty();\n System.out.println(\"bosMU = \" + bosMU);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "static boolean containsNoData(String str) {\n return \"\".equals(str) || \"-\".equals(str);\n }", "protected void noMatch() {\n Token[] tokens = m_errorHandler.noMatch(m_current, m_prev);\n m_current = tokens[0];\n m_prev = tokens[1];\n }", "private String parseTerminal(){\n int start = index;\n while(index < input.length()){\n char c = input.charAt(index);\n if(Character.isWhitespace(c) || terminalMap.containsKey(input.substring(start, index))){\n break;\n }\n\n index++;\n }\n\n return input.substring(start, index);\n }", "public boolean isEmpty(String line){\n char[] lineChars = line.toCharArray();\n if(lineChars.length == 0){return true;}\n\n boolean lineIsEmpty = true;\n for (char c : lineChars){\n if (!Character.isWhitespace(c)){\n return false;\n }\n }\n return lineIsEmpty;\n }", "public void Verify_Home_error_msg_displayed_on_Empty_Search()\r\n\t{\r\n\t\tString Runtime_text=Home_error_msg.getText();\r\n\t\tif(Runtime_text.contains(Exp_home_err_msg))\r\n\t\t\tSystem.out.println(\"As expected error msg displayed at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected home error message displayed at webpage\");\r\n\t}", "private boolean checkForEmptyString(Object value)\n\t{\n\t\tif (value == null || value.toString().isEmpty()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "public final ANTLRv3Parser.notTerminal_return notTerminal() throws RecognitionException {\r\n ANTLRv3Parser.notTerminal_return retval = new ANTLRv3Parser.notTerminal_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token set117=null;\r\n\r\n CommonTree set117_tree=null;\r\n\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:278:2: ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n set117=(Token)input.LT(1);\r\n\r\n if ( input.LA(1)==CHAR_LITERAL||input.LA(1)==STRING_LITERAL||input.LA(1)==TOKEN_REF ) {\r\n input.consume();\r\n if ( state.backtracking==0 ) adaptor.addChild(root_0, \r\n (CommonTree)adaptor.create(set117)\r\n );\r\n state.errorRecovery=false;\r\n state.failed=false;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n throw mse;\r\n }\r\n\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "private boolean isEmpty(String s) {\n return s == null || \"\".equals(s);\n }", "public void testFieldMatchCriteriaEmptyField() {\r\n try {\r\n new FieldMatchCriteria(\" \", \"str\");\r\n fail(\"testFieldMatchCriteriaEmptyField is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testFieldMatchCriteriaEmptyField is failure.\");\r\n }\r\n }", "private final static boolean isEmpty(String field) {\n return field == null || field.trim().length() == 0;\n }", "@Test\n public void testEmptyString() {\n assertEquals(\"Should return false\", false, val.validateTransportationModes(\"\"));\n }", "@Test\n public void testIsEmptyValidRoman() {\n FieldVerifier service = new FieldVerifier();\n boolean result = service.isValidRoman(\"\");\n assertEquals(false, result);\n }", "private boolean isComboBoxEmpty(String entry){\n return entry == null || entry.isBlank();\n }", "public static boolean isEmptyOrNull(String content){\n if(content == null){\n return true;\n }else return content.trim().equals(\"\");\n }", "private static boolean isBlank(String str)\r\n/* 254: */ {\r\n/* 255: */ int length;\r\n/* 256:300 */ if ((str == null) || ((length = str.length()) == 0)) {\r\n/* 257:301 */ return true;\r\n/* 258: */ }\r\n/* 259: */ int length;\r\n/* 260:302 */ for (int i = length - 1; i >= 0; i--) {\r\n/* 261:303 */ if (!Character.isWhitespace(str.charAt(i))) {\r\n/* 262:304 */ return false;\r\n/* 263: */ }\r\n/* 264: */ }\r\n/* 265:306 */ return true;\r\n/* 266: */ }", "private static Boolean errorCheck(String Buffer){\n if(Buffer.matches(\"Y\")) return true;\n if(Buffer.matches(\"N\")) return false;\n screenClear(); //Clears the screen and applies an error message.\n return moreInput(); //Recursive repeat upon error.\n }", "public abstract boolean isBlank() throws Exception;", "private boolean hasValue (String s) { return s != null && s.length() != 0; }", "protected boolean isEmpty(String text) {\r\n if (text == null) {\r\n return true;\r\n }\r\n\r\n if (text.trim().length() == 0) {\r\n return true;\r\n }\r\n return false;\r\n }", "private static boolean noWhiteSpace(String password) {\n\t\tint whitespaces = 0;\n\t\tfor (int i = 0; i < password.length(); i++) {\n\t\t char c = password.charAt(i);\n\t\t if ( Character.isWhitespace(c) ) {\n\t\t \t whitespaces++;\n\t\t }\n\t\t}\n\t\tif (whitespaces >= 1) {\n\t\t\tSystem.out.println(\"no whitespaces!\");\n\t\t\treturn false;\n\t\t} else return true;\n\t}", "public boolean isEmpty() {\n return (this.text == null);\n }", "public void testRegEx(){\n\t\tString emptyLineRegEx = \"\\\\s*\";\r\n\t\t\r\n\t\tassertTrue(\"\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\" \".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\n\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\t\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\r\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\n \\t \".matches(emptyLineRegEx));\r\n\t\tassertTrue(\" \\n \\t \\n\\n\\n \".matches(emptyLineRegEx));\r\n\t\tassertFalse(\" . \\n \".matches(emptyLineRegEx));\r\n\t\t\r\n\t\t// space or tab any number of times\r\n\t\tString spaceTabRegEx = \"[ \\t]*\";\r\n\t\t\r\n\t\tassertTrue(\"\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \".matches(spaceTabRegEx));\r\n\t\tassertTrue(\"\\t\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \".matches(spaceTabRegEx));\r\n\t\tassertTrue(\"\\t\\t\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \\t \\t \\t \".matches(spaceTabRegEx));\r\n\t\tassertFalse(\"\\n\".matches(spaceTabRegEx));\r\n\t\tassertFalse(\" l \".matches(spaceTabRegEx));\r\n\t\tassertFalse(\"\\t\\n\".matches(spaceTabRegEx));\r\n\t\t\r\n\t\t\r\n\t\t//Nucleotide sequence\r\n\t\tString ntRegEx = \"[ACGTacgt]+\";\r\n\t\t\r\n\t\tassertTrue(\"CAGTATGCATACC\".matches(ntRegEx));\r\n\t\tassertTrue(\"CTTATTTCAGGAAAATTTTTTCAAAACTGTAAAACAAAAACCATTTTTCACAGAATCTAAGGGTATCTGAAAGCTTAAAATAACTTCAGAAAGATATCAATTCCAGCTGTTTAGTACCTGAACTGTCTGTAAACGTTTCTTCTCGAATTATAGAAAATTTTCCACTTTTTCAAGTTCAGGTTTTCAAGAAACCCCACGATTTCCACTCATCGTTTCCAATGTCCAATTTCCCATCCAATTTGCCGCACTCTGACCCAATGACTTGTTCCTTTGCCAATCAATGCTACCTAATAAATTTAAAAGTTTAACACGCATCCAATTGACACACAGGTAACCGCCCTTTCTTCTTTTACATAATTCGGAAACTTCAAAGAGCCGAAGGTGTCGGTTGTAGCAGCAGCGGAGGAACGGATGCCAATTGCGCAACTCTCGGCTCAACTCTTTTAGTGCTCCGAGAGCAGGAAGAAGAATACTGTTGGGTTGTAATAAAGACGGATGTTTTTGTTCAGAGTAGATTAGCTCGTGTTTGATTGGATTTGACCGGATCAAGAGGGGAATGTCCTGGTGGAATTAAATTTTATTAGAATAAATTGTATTTGGTGTTTAAATTCGAATCAATAATATTTATGAGCTTTAATGAATAAGTGTTAGATTATATAATTCTATAATTTTTGAACAAGCAATTCAAAAAGAAAACAAATTTTAGTAACCTCCGAAATCAAGCTGGGTGGCCTCTAGAAGTTTTGAAAAAACTTTTTTTATATTCTGTTGGAGTTTTTTTAAGTTTTATAATTATAGGTTAATCTTTCTAATTTGTAAGCTTTTTCTTAACCAATTTTTTTTGTTAACATTTTTTTGGAATTATGCTATATGACCTATACCTAAAACAGTTTAAAAGTTTAAAAAAATTTTCTATATTTTTCACTTCGTATTGAACCTCCTGGGTACATATATTGACAGCACATATCTTGTTTGTCTCAGATTTTATCAAATAAGTTTAACAAGTAAACCATGCACCAAATATTTTTCTAGGTCTCTGTAGTTAGGAAATATTTAATAAAAATAAAAATAACCGAGATATGAGCCATCAAAGTAGATCAATTAAGGCACAGGAAAAAAGATCTGAATAAAATCGAAGTTCTTAAAAATATAAATCAAACAAAATTTTTTCCAGAATTTCAGCCGAGAATTTCCAGCCGATTTGTTTATATTTTCCACATCACTCCCCACACTTCTCTCACACAAACACGATAAAATCTTGAGAAGCAATTAGCGCCAATCAACTCAACACAAAAACGAAAAGCCAACGAAAAGCTAAAGCTATCATCGTTGTCGCGTCTATGAGCAACTCAATCGTTCATCATCCTCATCTTCAGAGTGCTCAAACCTACCGTAACCCGAATTGGGCGGAGCCAAAGGGTCCGAAACAGTGCACCAGGGCGGGGAGGGACCCTGAGAAACGAGAGGGAAGTGAGCAATTGTTGAAGTGTCAGTTGTGCTCATCGAGGTCCGATGAAGAGACGCGCCTGCTCACCTACACAACTGACTTCCCCCATATACCTTTTTCTAGAATTTCCTTTTTTAGATTTATACGGTCAGGTAAAAAGGTAGAGTTTTACAGTGTAGAAATTAGGAAATTGCTCAAAAAGCCGAGCAGAATGCATATAAGAAGTACCATAGCCCCAAAGATTCGATTTTCCAGGGTTCAATCAATTTTTGTACTTTGACAGCGTATATCTCAGTTTTCTTTGATTTTATCAAAAACTAGTCAACTGACAAAATACTTGAAAAGTATTCCTTTATATTTTGGTAGCTGACCATTGTTTGTTAAAATATAAGGGAATCGAAATGTCGGTTATCAAAGTAGAACCTAACCTAAATCGCTATATATGCTATTTTTCAAAAAAAAAAACACGTTTTACTTTGTCTCAACTTATTAATATTCTTTAATATTTTTTCTATTTCTACCATTTTCCAAATTTTCCAATAATTTTCCAGAA\".matches(ntRegEx));\r\n\t\tassertTrue(\"cagtagta\".matches(ntRegEx));\r\n\t\tassertTrue(\"aCgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"aCXtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a.CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a1CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"aNCgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"AGTATAATGACAACTTACAAAzTTGGGAAATCTGGAAAACCGAGC\".matches(ntRegEx));\r\n\t\t\r\n\t\t//PWM line \r\n\t\t// unicode for | is \\u007C\r\n\t\t// space: \\u0020\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"\\u007C\");\r\n\r\n\t\tString pwmRexEx = \"[ACGT][\\\\t ]+\\\\|([\\\\t ]+[0-9]+)+\";\r\n\t\t\r\n\t\tassertTrue(\"G\t|\t12 \t2\t 2343\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A | 1 2 3\".matches(pwmRexEx));\r\n\t\tassertTrue(\"C | 11 2234 3\".matches(pwmRexEx));\r\n\t\tassertTrue(\"T |\t1\t12\t3123\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A\t|\t49\t0\t288\t26\t77\t67\t45\t50\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A\\t|\\t49\\t0\\t288\\t26\\t77\\t67\\t45\\t50\".matches(pwmRexEx));\r\n\t\tassertFalse(\"a | 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A |\\n 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A |\t1 C 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"C |1 2 3\".matches(pwmRexEx));\r\n\t\t\r\n\t\t\r\n\t\t// fasta sequence name\r\n\t\t\r\n\t\tString fastaNameSeqRegEx = \">[ \\t]*\\\\w+.*\"; \r\n\t\t\r\n\t\tassertTrue(\"> name \".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">name\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">\\t name\\t\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\"> name123 stuf\\t12342 \\t\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">check sda\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\".matches(fastaNameSeqRegEx));\r\n\t\t\r\n\t\tassertFalse(\"\".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\" > name \".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\">\\tname\\t\\n\".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\">\\t\".matches(fastaNameSeqRegEx));\r\n\t\t\r\n\t\t\r\n\t\t//fasta file sequence\r\n\t\t\r\n\t\tString oneFastaSection = \"\\\\s*\" + fastaNameSeqRegEx + \"\\\\s*\\n+\" + \"[ACGTacgt]+\" ;\r\n\t\tString fastaSeqRegEx = \"(\" + oneFastaSection + \"[ \\t\\r]*\\n\" + \")*\" + oneFastaSection + \"\\\\s*\" ;\r\n\t\t\r\n\t\tassertTrue(\"> Y105E8B.1c\\nacgtacgtacggttacCTTACAAAATTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGA\\n\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n>C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"\\t\\t\\t\\t\\t\\n> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\t\\t\\t\\t\\n> C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAAA\\n\\t\\t \\n \\t\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"\\t\\t\\t\\t\\r\\n> negExSeq_0_B0304.1\\r\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\t\\t\\t\\t\\n> C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAAA\\n\\t\\t \\n \\t\".matches(fastaSeqRegEx));\r\n\t\tString realOutput = \"\\t\\t\\t\\t\\t\\r\\n> B0304.1\\r\\nCTTATTTCAGGGAA\\r\\n\\r\\n> F29F11.5\\r\\nGCCACATGG\\r\\n\\r\\n\\t\\t\\t\";\r\n\t\tassertTrue(realOutput.matches(fastaSeqRegEx));\r\n\t\r\n\t\t\r\n\t\t\r\n\t\tassertFalse(\"\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c\\n\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c\\nAGTATAATGACAACTTACAAAzTTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c acgtacgtacggttacCTTACAAAATTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC >C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"\".matches(fastaSeqRegEx));\r\n\t\t\r\n\t\t\r\n\t\t// pwm line: \r\n\r\n\t\tString pwmLineRegEx1 = \"[ACGTacgt][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\";\r\n\t\t\r\n\t\tassertTrue(\"A | 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A |2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A| 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A\\t| \\t2 \\t\\t\\t26 7\\t\\t \".matches(pwmLineRegEx1));\r\n\r\n\t\tassertFalse(\"\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\" \\t \\t \".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"abra-cadabra\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"> test A | 1 2 3\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A | 2 A 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A [ 2 26 7]\".matches(pwmLineRegEx1));\r\n\t\t\r\n\t\t\r\n\t\tString pwmLineRegEx2 = \"[ACGTacgt][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\";\r\n\r\n\t\tassertTrue(\"A [ 2 26 7]\".matches(pwmLineRegEx2));\r\n\t\tassertTrue(\"A\\t[\\t2\\t26\\t7\\t]\".matches(pwmLineRegEx2));\r\n\t\tassertTrue(\"A[ 2 26 7]\".matches(pwmLineRegEx2));\r\n\t\t\r\n\t\tassertFalse(\"\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\" \\t \\t \".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"abra-cadabra\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"> test A | 1 2 3\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A | 2 A 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A [ ]\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A | 2 26 7\".matches(pwmLineRegEx2));\r\n\t\t\r\n\t\tString pwmRegEx1 = \"[Aa][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Cc][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Gg][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Tt][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\";\r\n\t\t\r\n\t\tassertTrue(\"A | 2 26 7\\nC | 2 26 7\\nG | 2 26 7\\nT | 2 26 7\".matches(pwmRegEx1));\r\n\t\tassertTrue(\"A | 2 26 7\\nC | 2 26 7\t\\nG | 2 26 7\\nT |\t2\t\t26 7\\r\\n\".matches(pwmRegEx1));\r\n\r\n\t\tassertFalse(\"\".matches(pwmRegEx1));\r\n\t\tassertFalse(\"A | 2 26 7\\nC | 2 26 7\\nG | 2 26 7\".matches(pwmRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\\nC | 2 26 7\t\\nG | 2 26 7\\nT |\t2\t\t26 7\\r\\n\".matches(pwmRegEx1));\r\n\r\n\t\r\n\t\tString pwmRegEx2 = \"[Aa][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Cc][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Gg][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Tt][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\";\r\n\r\n\t\tassertTrue(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertTrue(\"A [\\t2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\\n\".matches(pwmRegEx2));\r\n\r\n\t\tassertFalse(\"\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]G [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nA [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"\\tA [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\t\r\n\t}", "protected boolean notEmpty(String s) {\n return s != null && s.length() != 0;\n }", "private static Matcher<View> comprobarListView() {\n return new TypeSafeMatcher<View>() {\n @Override\n protected boolean matchesSafely(View item) {\n if (((TextView) item).getText().equals(\"\")) {\n return true;\n }\n return false;\n }\n\n @Override\n public void describeTo(Description description) {\n }\n };\n }", "public boolean isNonTerminal(String symbol) {\n\t\treturn this.grammarRules.containsKey(symbol);\n\t}", "@BeforeEach\n\tvoid setUpInvalidRE(){\n\t\tinvalidRE= new String[lengthInvalid];\n\t\t// (ab\n\t\tinvalidRE[0] = \"(ab\";\n\t\t// ab)\n\t\tinvalidRE[1] = \"ab)\";\n\t\t// *\n\t\tinvalidRE[2] = \"*\";\n\t\t// ?\n\t\tinvalidRE[3] = \"?\";\n\t\t// +\n\t\tinvalidRE[4] = \"+\";\n\t\t// a | b | +c\n\t\tinvalidRE[5] = \"a | b | +c\";\n\t\t// a | b | *c\n\t\tinvalidRE[6] = \"a | b | *c\";\n\t\t// a | b | ?c\n\t\tinvalidRE[7] = \"a | b | ?c\";\n\t\t// a | b | | c\n\t\tinvalidRE[8] = \"a | b | | c\";\n\t\t// uneven parenthesis\n\t\tinvalidRE[9] = \"(a(b(c(d)*)+)*\";\n\t\t// a | b |\n\t\tinvalidRE[10] = \"a | b | \";\n\t\t// invalid symbols\n\t\tinvalidRE[11] = \"a | b | $ | -\";\n\t\t// (*)\n\t\tinvalidRE[12] = \"(*)\";\n\t\t// (|a)\n\t\tinvalidRE[13] = \"(|a)\";\n\t\t// (.b)\n\t\tinvalidRE[14] = \"(.b)\";\n\t}", "@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }", "private static boolean hasString(String value) {\n if (!value.trim().equals(\"\") && value.length() > 0) {\n return true;\n }\n\n return false;\n\n }", "private Boolean nonEmptyQuery(String query){\n\t\tBoolean isCorrect = false;\n\t\tString [] queryElements = query.split(\"--\");\n\t\tif(queryElements.length==2 && !queryElements[0].isEmpty() && !queryElements[1].isEmpty())\n\t\t\tisCorrect = true;\n\t\treturn isCorrect;\n\t}", "public boolean isTerminal() {\n\t\tif(this.getSuccessors('1').length == 0 && this.getSuccessors('2').length == 0)\r\n\t\t\treturn true;\r\n\r\n\t\t//Else the baord is not a terminal node\r\n\t\treturn false;\r\n\t}", "public static boolean isBlank(final CharSequence chars) {\r\n\t\tif (isEmpty(chars)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tint stringLength = chars.length();\r\n\t\tfor (int i = 0; i < stringLength; i++) {\r\n\t\t\tif (!Character.isWhitespace(chars.charAt(i))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\r\n void not_matches() {\n assertMatcherFalse(asList(\"1\", \"2\"), size(3));\r\n }", "public void testInvalidInput(){\n\t\tString input = \"bye\";\n\t\tString actual = operation.processOperation(input);\n\t\tString expected = \"bye bye could not be performed\";\n\t\tassertEquals(expected,actual);\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\") (\");\n Token token0 = xPathLexer0.whitespace();\n assertEquals(\"\", token0.getTokenText());\n assertEquals((-2), token0.getTokenType());\n }", "public EmptyCommandException() {\n super(\"Input is empty! Please enter something into the chat\");\n }", "public final boolean hasTerminalValue ()\r\n {\r\n return isSpecialForm() && specialForm().isValue();\r\n }", "private static Matcher<View> comprobarListEstimaciones() {\n return new TypeSafeMatcher<View>() {\n @Override\n protected boolean matchesSafely(View item) {\n if (((TextView) item).getText().equals(\"\")) {\n return true;\n }\n return false;\n }\n\n @Override\n public void describeTo(Description description) {\n }\n };\n }", "public static boolean isEmpty( String input )\n {\n if ( input == null || \"\".equals( input ) )\n return true;\n\n for ( int i = 0; i < input.length(); i++ )\n {\n char c = input.charAt( i );\n if ( c != ' ' && c != '\\t' && c != '\\r' && c != '\\n' )\n {\n return false;\n }\n }\n return true;\n }", "private boolean emptyText(String itemType, String building,String room,String brand, String os, String serialNumber){\n if(TextUtils.isEmpty(serialNumber) || serialNumber.equals(\"\")){\n return true;\n }else if(TextUtils.isEmpty(building) || building.equals(\"\")){\n return true;\n }else if(TextUtils.isEmpty(room) || room.equals(\"\")){\n return true;\n }else if(TextUtils.isEmpty(brand) || brand.equals(\"\")) {\n return true;\n }else if(itemType.equals(\"Computer\")){\n if(TextUtils.isEmpty(os) || os.equals(\"\")){\n return true;\n }else{\n return false;\n }\n }else{\n return false;\n }\n }", "public boolean noSeparator(){\n return separator == EMPTY_CHAR;\n }", "@Override\n public boolean isEmpty() { return true; }", "@Then(\"^I can view \\\"([^\\\"]*)\\\" message$\")\n public void iCanViewMessage(String arg0) throws Throwable {\n String actual=addingAndDeletingAProduct.cartEmptyMessage();\n assertThat(\"Summary page message doesn't match\",actual,Matchers.equalToIgnoringWhiteSpace(\"(empty)\"));\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n boolean boolean0 = xPathLexer0.hasMoreChars();\n assertFalse(boolean0);\n }", "public boolean eos()\n \t{\n \t\tMatcherContext ctx = (MatcherContext) getContext();\n \t\tif (ctx == null)\n \t\t{\n \t\t\treturn false;\n \t\t}\n \t\t// geting after potential spacing first\n \t\tOptionalMatcher opt=new OptionalMatcher(spacing());\n \t\topt.match(ctx);\n \n \t\t// First check if we just passed a '\\n' (in spacing)\n \t\t//System.out.println(\"EOS> checking afterNL\");\n \t\tif (isAfterNL())\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t//System.out.println(\"EOS> checking '}'\");\n \t\t// '}' is eos too, but we should not consume it, so using a test\n \t\tSequenceMatcher seq = (SequenceMatcher) sequence(OPT_SP, test(eoi()));\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t// test foe end of input, that qualifies too\n \t\tseq = (SequenceMatcher) sequence(OPT_SP, test('}'));\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t// Otherwise look for upcoming statement ending chars: ';' or '}'\n \t\t//System.out.println(\"EOS> checking ';'\");\n \t\tseq = (SequenceMatcher) sequence(OPT_SP, ';');\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t//System.out.println(\"EOS> False\");\n \t\treturn false;\n \t}", "@Test(expected = SuperCsvCellProcessorException.class)\n\tpublic void testWithEmptyString() {\n\t\tprocessor.execute(\"\", ANONYMOUS_CSVCONTEXT);\n\t}", "@Test\n\tpublic void ifYouEncounterEqualsThenThatsNotAPattern() {\n\t\tfinal Tokenizable line = line(\"=\");\n\t\tcontext.checking(new Expectations() {{\n\t\t}});\n\t\tTDAPatternParser parser = new TDAPatternParser(errors, vnamer, builder, topLevel);\n\t\tTDAParsing nested = parser.tryParsing(line);\n\t\tassertNull(nested);\n\t\tassertEquals(0, line.at());\n\t}", "@Test\n public void allowedEmptyType() throws Exception {\n Query query = Query.parse(\"/allow-empty-type\");\n doAllowedEmptyTest(query);\n }", "public static boolean isNotBlank(final CharSequence chars) {\r\n\t\treturn !isBlank(chars);\r\n\t}", "public void testCheckString_EmptyArg() {\n try {\n Util.checkString(\" \", \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testCheckString_EmptyArg() {\n try {\n Util.checkString(\" \", \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public static boolean isEmpty(CharSequence target) {\n\t\treturn isEmpty(target, false);\n\t}", "private boolean noangles() {\r\n return OPT(GO() && NOT(GO() && CHAR('>')) && literal() && noangles());\r\n }", "public boolean isEmpty() {\n\t\tString v = getValue();\n\t\treturn v == null || v.isEmpty();\n\t}", "public boolean isEmpty() {\n return strings.isEmpty();\n }", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.consume((-3572));\n // Undeclared exception!\n try { \n xPathLexer0.whitespace();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public static boolean isBlank(CharSequence seq) {\n if (seq == null || seq.length() == 0) {\n return true;\n }\n return is(seq, Character::isWhitespace);\n }", "public boolean isFilled() {\n return(!this.getText().trim().equals(\"\"));\n }", "public static boolean isEmpty(final CharSequence chars) {\r\n\t\treturn chars == null || chars.length() == 0;\r\n\t}", "public void testEmpty () throws IOException\n {\n Stream stream;\n\n stream = new Stream (new ByteArrayInputStream (new byte[0]));\n assertTrue (\"erroneous character\", -1 == stream.read ());\n }" ]
[ "0.6783679", "0.6497611", "0.625346", "0.6213155", "0.5970202", "0.5952449", "0.5802201", "0.57204264", "0.56874347", "0.56805444", "0.56692195", "0.5654445", "0.5648734", "0.5636783", "0.56310326", "0.56115115", "0.5610524", "0.5599653", "0.5589505", "0.55781037", "0.5577281", "0.55645525", "0.55552185", "0.55481035", "0.552695", "0.5526216", "0.55164665", "0.5496143", "0.5494366", "0.5489875", "0.5489086", "0.54666704", "0.5437289", "0.54336494", "0.5433264", "0.5422661", "0.5419847", "0.54169214", "0.54089814", "0.5406408", "0.5384704", "0.53756285", "0.5373152", "0.5364227", "0.5360222", "0.53579473", "0.53512293", "0.53407216", "0.5334124", "0.5332714", "0.5321859", "0.531648", "0.53137034", "0.53067166", "0.52967817", "0.52947295", "0.52869296", "0.5285673", "0.5281219", "0.5276285", "0.5270865", "0.526843", "0.52641755", "0.5258954", "0.52427554", "0.5239231", "0.5232357", "0.52312905", "0.52251834", "0.5224642", "0.5224411", "0.52226734", "0.5220736", "0.5218121", "0.5203216", "0.51986635", "0.5190684", "0.5188792", "0.5187199", "0.5187138", "0.5179061", "0.5176611", "0.51571566", "0.5155005", "0.5154263", "0.51467", "0.514668", "0.5144912", "0.5135393", "0.5133729", "0.5133729", "0.51281685", "0.51242435", "0.5121791", "0.51216346", "0.5116535", "0.51079476", "0.5090727", "0.5088328", "0.5084032" ]
0.7044513
0
Constructs a Credentials object from the given user name and password.
public Credentials(String user, String password) { this.user = user; this.password = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BasicAuthenticationCredentials(String userName, String password) {\n this.userName = userName;\n this.password = password;\n }", "public AuthCredentials(String scheme,String name,String password)\n {\n this.scheme = scheme;\n this.name = name;\n this.password = password;\n }", "public Credentials()\n {\n this(null, null, null, null);\n }", "protected static Credentials getServiceCredentials() throws AnaplanAPIException {\n if (authType == AUTH_TYPE.CERT) {\n try {\n return new Credentials(getCertificate(), getPrivateKey());\n } catch (Exception e) {\n throw new AnaplanAPIException(\"Could not initialise service credentials\", e);\n }\n } else if (authType == AUTH_TYPE.OAUTH) {\n return new Credentials(clientId);\n }\n return new Credentials(getUsername(), getPassphrase());\n }", "GoogleAuthenticatorKey createCredentials(String userName);", "public User(String name, String password) {\r\n this.name = name;\r\n this.password = password;\r\n }", "public User(String name, String password) {\n this.name = name;\n this.password = password;\n }", "public User(String username, String nPassword)\n {\n userName = username;\n password = nPassword;\n }", "AbstractCredentialModel createBasicCredential(String username, String password);", "public User(String username, String password) {\n this.username = username;\n this.password = password;\n }", "public Authentication(String user, char[] password) {\n this.user = user;\n this.password = password;\n }", "public ClientCredentials() {\n }", "public User(String username, String password) {\r\n this.username = username;\r\n this.password = password;\r\n }", "public static synchronized Credentials authenticate(String userName, String password){\n\t\t\tConnection connection;\n\t\t \tCredentials credentials=null;\n\t\t \t\n\t\t \tPreparedStatement statement=null;\n\t\t\tString preparedSQL = \"SELECT * FROM Credential WHERE Email = ? and Pass = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection=DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, userName);\n\t\t \tstatement.setString(2, password);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\tif(rs.next()){\n\t\t\t\t\tcredentials = new Credentials();\n\t\t\t\t\tcredentials.setCredID(rs.getInt(1));\n\t\t\t\t\tcredentials.setUserID(rs.getInt(2));\n\t\t\t\t\tcredentials.setEmail(rs.getString(3));\n\t\t\t\t\tcredentials.setPass(rs.getString(4));\n\t\t\t\t\tcredentials.setRole(rs.getString(5));\n\t\t\t\t\tcredentials.setValid(rs.getInt(6));\n\t\t\t\t\tcredentials.setRegKey(rs.getString(7));\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t\tcredentials = null;\n\t\t\t\t}\t\n\t\t\treturn credentials;\n\t}", "User(String username, String pwd) {\n\t\tthis(username);\n\t\tthis.pwd = pwd;\n\t}", "public AuthToken login(UserCreds credentials) throws ResourceNotFoundException, UnauthorizedException {\n User user = getByName(credentials);\n // Check if user is authorized\n if (!user.getUserCreds().equals(credentials)) throw new UnauthorizedException();\n // Generate auth token\n AuthToken token = new AuthToken(user);\n // Return the token\n return token;\n }", "public Builder credentials(String credentials) {\n this.credentials = credentials;\n return this;\n }", "public User(String username, String password){\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t}", "public User(String username, String password) {\n this.userID = UUID.randomUUID();\n this.username = username;\n this.password = password;\n this.isTechAgent = false;\n }", "public UserApiClient(String username, String password)\r\n {\r\n client = HttpClientFactory.getUserClient();\r\n configureClient(username, password);\r\n }", "public User(String name, String password) {\n this.userName = name;\n this.password = password;\n this.roles = new ArrayList<>();\n this.id = new ObjectId();\n }", "protected User(String username,String password,AccessLevel accessLevel){\n this.username = username;\n this.password = encryptPassword(password);\n this.accessLevel = accessLevel;\n this.name = DEFAULT_NAME;\n this.telephone = DEFAULT_TELEPHONE;\n this.email = DEFAULT_EMAIL;\n checkRep();\n }", "public ToLAuthenticator(String user, String pw) {\n username = user;\n password = pw;\n }", "protected static Credentials getProxyCredentials() {\n if (!proxyUsernameSet) {\n return null;\n }\n String[] parts = getProxyUsername().split(\"\\\\\\\\\");\n if (parts.length > 1) {\n String domain = parts[0];\n String workstation = null;\n String user = parts[1];\n if (parts.length > 2) {\n workstation = user;\n user = parts[2];\n }\n return new Credentials(user, getProxyPassphrase(), domain, workstation);\n }\n return new Credentials(parts[0], getProxyPassphrase());\n }", "public static Builder builder(String host, String name, String password) {\n\t\treturn new Builder(host, name, password);\n\t}", "public Login(String name, String password) {\n this.name = name;\n this.password = password;\n }", "public UserDTO(String username, String password){\n this.username = username;\n this.password = password;\n }", "public UserPasswordAuthentication(String userName, String password) {\r\n\t\tthis._userName = userName;\r\n\t\tthis._password = password;\r\n\t\tformRequest();\r\n\t}", "public Account(final String localUsername, final String password,\n\t\t\tfinal UserId userId, final Set<DistributionRole> distributionRoles) {\n\t\tsuper();\n\t\tthis.localUsername = localUsername;\n\t\tthis.password = password;\n\t\tthis.userId = userId;\n\t\tthis.distributionRoles = distributionRoles;\n\t}", "static Service create(String hostIp, String user, String password) {\n return new ServiceImpl(hostIp, user, password);\n }", "public static CredentialsProvider basicAuthentication(String userName,String password) {\r\n\r\n\r\n\r\n\t\tCredentialsProvider provider = new BasicCredentialsProvider();\r\n\r\n\t\tUsernamePasswordCredentials credentials= new UsernamePasswordCredentials(userName,password);\r\n\r\n\t\tprovider.setCredentials(AuthScope.ANY, credentials);\r\n\r\n\r\n\r\n\t\treturn provider;\r\n\r\n\r\n\r\n\t}", "public User(String name, String password, int token_length) {\n if(password.length() > token_length)\n throw new IllegalArgumentException(\n \"password length may not be greater than token length\");\n\n encryptor = new Encryptor();\n encryptor.setAlphabet(AlphabetType.ALPHA_NUMERIC);\n encryptFunction = (a, b) -> a+b;\n decryptFunction = (a, b) -> a-b;\n\n uid = name;\n tlen = token_length;\n token = encryptor.createToken(password, tlen);\n dataMap = new HashMap<>();\n }", "public Customer(String username, String firstname, String lastname, String password) {\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.password = password;\n }", "public UserPass(String username, String password) {\n\t\tsuper();\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\trole = \"user\";\n\t}", "public UserPass(String username, String password, String role) {\n\t\tsuper();\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.role = role;\n\t}", "public User(String user_name_id, String user_pw) {\r\n\t\tsuper();\r\n\t\tthis.user_name_id = user_name_id;\r\n\t\tthis.user_pw = user_pw;\r\n\t}", "public static interface Credentials extends Serializable {\n\t\tpublic String getUserName();\n\t\t/**\n\t\t* The password is encrypted.\n\t\t*/\n\t\tpublic String getPassword();\n\t}", "public ClientLogin(String username, String password) {\n\t\tthis.username= username;\n\t\tthis.password= password;\n\t}", "public User(String name, String email, String password){\n this.name = name;\n this.email = email;\n this.password = password;\n }", "public User(String username, String password) {\r\n\t if (username == null || username.isEmpty() || password == null || password.isEmpty()) {\r\n\t throw new IllegalArgumentException(\"User : username or password passed can not be null.\"); \r\n\t }\r\n this.email = new Email(EmailType.PERSONAL, username);\r\n\t\tthis.username = username;\r\n\t\tthis.password = encrypt(password);\r\n\t\tthis.displayname = username;\r\n this.type = UserType.USER;\r\n\t\tthis.status = InstanceStatus.TRANSCIENT;\r\n\t}", "public LoginUser(String username, String password) {\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t}", "public User getUser(String userName, String password);", "Employee(String name, String password) {\n if (checkName()) {\n setUsername(name);\n setEmail(name);\n } else {\n this.username = \"default\";\n this.email = \"[email protected]\";\n }\n\n if (isValidPassword()) {\n this.password = password;\n } else {\n this.password = \"pw\";\n }\n\n }", "public void propagateCredentials( User user, String password );", "public DefaultCredentialsProvider() {\n // nothing\n }", "private Authentication createAuthenticationToken(String userName, String password)\n\t\t\tthrows RemoteException, ServiceException {\n\t\tAuthentication authToken = null;\n\t\tList<String> roles = this.userRoleService.findByUserName(userName);\n\t\tif (roles.isEmpty()) {\n\t\t\tErrorDetail err = new ErrorDetail(HttpStatus.INTERNAL_SERVER_ERROR, Constants.LOGIN_ERR_MSG_1);\n\t\t\tauthToken = new CustomUsernamePasswordAuthenticationToken(err);\n\t\t} else {\n\t\t\tList<GrantedAuthority> grantedAuthorities = roles.stream().map(role -> new SimpleGrantedAuthority(role.trim())).collect(Collectors.toList());\n\t\t\t\tauthToken = new CustomUsernamePasswordAuthenticationToken(userName, password, grantedAuthorities);\n\t\t}\n\t\treturn authToken;\n\t}", "boolean isValidCredential(String username, String password);", "public User(int userID, String name, String password) {\n this.userID = userID;\n this.name = name;\n this.password = password;\n }", "public User(String username, String password, String name, String imageLocation) {\n\t this.username = username;\n\t this.password = password;\n\t this.name = name;\n\t this.imageLocation = imageLocation;\n }", "public User(String userName, String vaultPassword) {\n this.userName = userName;\n this.vaultPassword = vaultPassword;\n failedLogins = 0;\n }", "UserToken login(String username, String password) throws WorkspaceException;", "public User(String userName, String password, String email) {\n this.userName = userName;\n this.password = password;\n this.email = email;\n }", "CloudCredentialStatus create(@Nonnull AuthenticatedContext authenticatedContext);", "protected Manager(String name, String password){\r\n super(name);\r\n this.password = password;\r\n }", "public Session(String username, String pwd, String hostname){\n this.username = username;\n this.pwd = pwd;\n this.hostname = hostname;\n }", "public static Credential fromProtoBytes(byte[] credentialProtoBytes) throws IOException {\n return new Credential.Builder(\n org.openyolo.proto.Credential.ADAPTER.decode(credentialProtoBytes))\n .build();\n }", "public Authentication(String email, String password) {\n this.email = email;\n this.password = password;\n }", "User authenticate(String username, String password);", "public User(String name) {\n this(UUID.randomUUID().toString(), name, String.format(\"User account for %s\", name) );\n }", "public AuthenticationJob(String username, String password, Context context) {\n super(new Params(Priority.HIGH).requireNetwork());\n\n this.id = jobCounter.incrementAndGet();\n\n this.username = username;\n this.password = password;\n this.context = context;\n }", "public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;", "public LoginService() {\n users.put(\"johndoe\", \"John Doe\");\n users.put(\"janedoe\", \"Jane Doe\");\n users.put(\"jguru\", \"Java Guru\");\n }", "public User login(String username, String password) throws InvalidLoginCredentialException {\n try {\n User user = retrieveUserByUsername(username);\n if (user.getPassword().equals(password)) {\n return user;\n } else {\n throw new InvalidLoginCredentialException(\"Username does not exist or invalid password!\");\n }\n } catch (UserNotFoundException ex) {\n throw new InvalidLoginCredentialException(\"Username does not exist or invalid password!\");\n }\n }", "public User (String username, String password, String fname, String lname) {\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.FirstName = fname;\n\t\tthis.LastName = lname;\n\t}", "public User(String username, String password, String firstName, String lastName, String mail, Role role) {\r\n\t\tthis.username = username;\r\n\t\tthis.password = password;\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\r\n\t\tthis.mail = mail;\r\n\t\tthis.role = role;\r\n\t}", "GoogleAuthenticatorKey createCredentials();", "public User login(String loginName, String password) throws UserBlockedException;", "public CustomerEntity login(String username, String password) {\n return customerPersistencePort.getUser(username);\n }", "public UserEntity(String name, String email, String password) {\n\t\tthis.name = name;\n\t\tthis.email = email;\n\t\tthis.password = password;\n\t}", "public PropertiesCredentials(InputStream inputStream) throws IOException {\n\t\tProperties accountProperties = new Properties();\n\t\ttry {\n\t\t\taccountProperties.load(inputStream);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tinputStream.close();\n\t\t\t} catch (Exception e) {\n\t\t\t}\n\t\t}\n\n\t\tif (accountProperties.getProperty(\"consumerKey\") == null\n\t\t\t\t|| accountProperties.getProperty(\"consumerSecret\") == null\n\t\t\t\t|| accountProperties.getProperty(\"accessToken\") == null\n\t\t\t\t|| accountProperties.getProperty(\"accessTokenSecret\") == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"The specified file or stream doesn't contain the expected properties: 'consumerKey' \"\n\t\t\t\t\t\t\t+ \"'consumerSecret' 'accessToken' and 'accessTokenSecret'.\");\n\t\t}\n\n\t\ttwitterCredentials = new TwitterCredentials(\n\t\t\t\taccountProperties.getProperty(\"consumerKey\"),\n\t\t\t\taccountProperties.getProperty(\"consumerSecret\"),\n\t\t\t\taccountProperties.getProperty(\"accessToken\"),\n\t\t\t\taccountProperties.getProperty(\"accessTokenSecret\"));\n\t}", "public User(String nom, String prenom, String email, String pwd) {\r\n\t\tsuper();\r\n\t\tthis.nom = nom;\r\n\t\tthis.prenom = prenom;\r\n\t\tthis.email = email;\r\n\t\tthis.pwd = pwd;\r\n\t}", "User login(String username, String password);", "public User(String _username, String _password, String _employeeType) {\n // TODO implement here\n username = _username;\n password = _password;\n employeeType = _employeeType;\n// String taskId = UUID.randomUUID().toString();\n }", "public DatabaseOptions auth(String username, String password) {\n this.username = username;\n this.password = password;\n return this;\n }", "@Override\n\tpublic Authentication authenticate(Authentication auth) throws AuthenticationException {\n\t\t username = auth.getName();\n\t\tString pass = auth.getCredentials().toString();\n\t\t\n\t\tif(AppController.users.containsKey(username))\n\t\t{\n\t\tString password = AppController.users.get(username); \n\t\t\t\n\t\tif(password.equals(pass))\n\t\t\treturn new UsernamePasswordAuthenticationToken(username,pass,Collections.EMPTY_LIST);\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t\t\n\t\t}\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t}", "public User(String userType, String userName, String password) {\n this.userType = userType;\n this.userName = userName;\n this.password = password;\n\n }", "public User(String firstName, String lastName, String userName, String email, String password) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.userName = userName;\n this.email = email;\n this.password = password;\n }", "public User(String email, String username, String password)\n\t{\n\t\tthis.email = email;\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t}", "public User(String username, String password, UserType userType) {\n this.username.set(username);\n this.password.set(password);\n this.userType.set(userType);\n }", "public ClientSecretCredential() {\n this(new IdentityClientOptions());\n }", "public abstract boolean checkCredentials (String username, String password);", "public AppUser login(String username, String password) {\n\n if (username == null || username.trim().equals(\"\") || password == null || password.trim().equals(\"\")) {\n throw new InvalidRequestException(\"Invalid user credentials provided!\");\n }\n\n AppUser authUser = userRepo.findUserByCredentials(username, password);\n\n if (authUser == null) {\n throw new AuthenticationException(\"Invalid credentials provided!\");\n }\n\n\n return authUser;\n\n }", "public User(String firstName, String lastName, String email, String password, String userName) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.email = email;\n this.password = password;\n this.userName = userName;\n\n createContributorPrivilege();\n }", "public User(String username, String password, String firstName, String lastName, String mail, Role role,\r\n\t\t\tint collegeNum, String department, int organization) {\r\n\t\tthis.username = username;\r\n\t\tthis.password = password;\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\r\n\t\tthis.mail = mail;\r\n\t\tthis.role = role;\r\n\t\tthis.collegeNum = collegeNum;\r\n\t\tthis.department = department;\r\n\t\tthis.organization = organization;\r\n\t}", "public static GitHub getConnection(String aUser, String aPwd) {\n\t\ttry {\n\t\t\t// check if a token already exists\n\t\t\treturn GitHub.connect();\n\t\t} catch (IOException e) {\n\t\t\t// the normal connect did not work\n\t\t\tLog.out(GHConnectionBuilder.class, \"No auth token could be found.\");\n\t\t\treturn createToken(aUser, aPwd);\n\t\t}\n\t}", "public static CloudbrokerClient getInstance(String username,\n\t\t\tString password, String host, int port) {\n\t\treturn new CloudbrokerClient(username, password, host, port);\n\t}", "public OwSimpleUserInfo(String user_p, String password_p)\r\n {\r\n m_username = user_p;\r\n }", "public User(String name, String email, String passwordHash, String confPasswordHash) {\r\n this.name = name;\r\n this.email = email;\r\n this.passwordHash = passwordHash;\r\n this.confPasswordHash = confPasswordHash;\r\n }", "public void setCredentials(Credentials credentials) {\n mCredentials = credentials;\n }", "public Credentials getCredentials(AuthScope authscope)\n {\n return credentials;\n }", "public Credential getUsercredentialwithAccessToken(String accessToken) {\n\t\treturn new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(new JacksonFactory())\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setAccessToken(accessToken);\n\t}", "public UserAccount(String userName,\n int ID,\n String password,\n String firstName,\n String lastName,\n String dateOfBirth,\n\t\t\t\t\t int permLevel){\n this.userName = userName;\n this.ID = ID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n this.dateOfBirth = dateOfBirth;\n\t\tthis.permLevel = permLevel;\n }", "public LoginUser(String username, String password, String uniqueId) {\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.uniqueId = uniqueId;\n\t}", "public User(int userid, String firstname, String lastname, String email, String password) {\n\t\tsuper();\n\t\tthis.userid = userid;\n\t\tthis.firstname = firstname;\n\t\tthis.lastname = lastname;\n\t\tthis.email = email;\n\t\tthis.password = password;\n\t}", "public User logIn(String username, String password) {\n\t\tUser user = null;\n\t\ttry {\n\t\t\tTypedQuery<User> query = em.createNamedQuery(\"User.findByCredentials\", User.class);\n\t\t\tquery.setParameter(\"inUsername\", username);\n\t\t\tquery.setParameter(\"inPassword\", password);\n\t\t\tuser = query.getSingleResult();\n\t\t\tif (user != null) {\n\t\t\t\tuser.setToken(generateToken());\n\t\t\t\tem.merge(user);\n\t\t\t}\n\t\t\treturn user;\n\t\t} catch (Exception e) {\n\t\t\tlogger.log(Level.WARNING, \"User not found\", e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public PropertiesCredentials(File file) throws FileNotFoundException,\n\t\t\tIOException, IllegalArgumentException {\n\t\tthis(new FileInputStream(file));\n\t}", "public BasicUserDetails(BasicUser user) {\n this.username = user.getUsername();\n this.bCryptHash = user.getBcrypthash();\n }", "RemoteConnectionImpl(String user, String password) throws RemoteException, IllegalArgumentException{\r\n\t if(user.equals(\"dba\") && password.equals(\"dba\")) {\t \r\n\t\t this.tx = new Transaction();\r\n\t }\r\n\t else {\r\n\t\t throw new IllegalArgumentException(\"can't connect, wrong username or password.\");\r\n\t }\r\n }", "User(String userID, String password, String firstName, String lastName) {\n this.userID = userID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public User logInUser(final String login, final String password);" ]
[ "0.7017165", "0.697871", "0.68900734", "0.6527128", "0.6463574", "0.6430392", "0.63986737", "0.63841194", "0.6373476", "0.6356686", "0.63195115", "0.63078535", "0.62380546", "0.61598444", "0.61018395", "0.5960485", "0.59485066", "0.5945105", "0.5936676", "0.5900106", "0.58712214", "0.5818692", "0.5792906", "0.57844913", "0.57842064", "0.5764651", "0.5748205", "0.5726646", "0.57230556", "0.5689588", "0.5678682", "0.56781065", "0.56764525", "0.56748575", "0.5646023", "0.5638476", "0.56382555", "0.5611019", "0.56027645", "0.55970263", "0.5567268", "0.5529396", "0.5489532", "0.54853827", "0.5478386", "0.5475865", "0.547316", "0.54694164", "0.5466096", "0.54460734", "0.5435058", "0.54165787", "0.54098666", "0.54017013", "0.5388459", "0.5386856", "0.5384302", "0.53585577", "0.5352321", "0.53430235", "0.5332748", "0.5331432", "0.53186506", "0.5314309", "0.5297964", "0.5297243", "0.52958053", "0.5270548", "0.5268354", "0.52573395", "0.5256344", "0.5256241", "0.5251335", "0.5250339", "0.52489465", "0.52484965", "0.5229303", "0.5210849", "0.52100664", "0.5182976", "0.51715434", "0.5167391", "0.5153842", "0.51522577", "0.5152129", "0.51405954", "0.5135614", "0.5131059", "0.51039493", "0.51039445", "0.5096068", "0.509375", "0.508487", "0.508083", "0.5079877", "0.5070407", "0.5070036", "0.5069502", "0.5052457", "0.5031753" ]
0.806244
0
Returns the user name from the credentials.
public String getUser() { return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "String getUserUsername();", "String getUserName();", "String getUserName();", "public final String getUsername() {\n return properties.get(USERNAME_PROPERTY);\n }", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "public static String getUserName() {\n\t\treturn readTestData.getkeyData(\"SignUpDetails\", \"Key\", \"Value\", \"userName\");\n\t}", "private String getLoggedInUserName() {\n try {\n /*\n * Get the user information.\n */\n String userName = ServerUtilities.getServerUserInfo().getName();\n\n if(userName.isEmpty()) {\n return new String(\"Anonymous User\");\n }\n return userName;\n } catch (Exception ignore) {\n }\n\n return new String(\"Anonymous User\");\n }", "public String getUserName() {\n if (passCred != null)\n return passCred.getUserName();\n else\n return null;\n }", "public final String getUser() {\n return username;\n }", "public String getUserName() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"USERNAME\", null);\n\t}", "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "public String getUserName();", "java.lang.String getUser();", "public String getUsername() {\n Object ref = username_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n username_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getUsername() {\n Object ref = username_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n username_ = s;\n return s;\n }\n }", "protected static String getUsername() {\n if (username == null || username.isEmpty()) {\n Console console = System.console();\n if (console != null) {\n username = console.readLine(\"Username:\");\n } else {\n throw new UnsupportedOperationException(\n \"Username must be specified\");\n }\n }\n return username;\n }", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUserName();\n\t}", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private String getLoggedUser() {\n\t\torg.springframework.security.core.userdetails.User user2 = \n\t\t\t\t(org.springframework.security.core.userdetails.User) \n\t\t\t\tSecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\tString name = user2.getUsername();\n\t\treturn name;\n\t}", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n username_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n username_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n username_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n username_ = s;\n }\n return s;\n }\n }", "private String getUsername(AuthenticationContext context) {\n String username = null;\n for (Integer stepMap : context.getSequenceConfig().getStepMap().keySet())\n if (context.getSequenceConfig().getStepMap().get(stepMap).getAuthenticatedUser() != null\n && context.getSequenceConfig().getStepMap().get(stepMap).getAuthenticatedAutenticator()\n .getApplicationAuthenticator() instanceof LocalApplicationAuthenticator) {\n username = String.valueOf(context.getSequenceConfig().getStepMap().get(stepMap).getAuthenticatedUser());\n break;\n }\n return username;\n }", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userName_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n username_ = s;\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n username_ = s;\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n username_ = s;\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getUserName(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_NAME, null);\n }", "public String getUserName() {\n Object ref = userName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n }\n }", "public final String getUsername() {\n\t\treturn username.trim();\n\t}", "public String getUserName() {\n Object ref = userName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n username_ = s;\n return s;\n }\n }", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUsername();\n\t}", "@Override\r\n\tpublic String getCurrentUserName() {\r\n\t\tString currentUserName = SecurityContextHolder.getContext().getAuthentication().getName();\r\n\t\treturn currentUserName;\r\n\t}", "String getUser();", "String getUser();", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n }\n }", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n }\n }", "public String getUsernameFieldName() {\n return getStringProperty(USERNAME_FIELD_NAME_KEY);\n }", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _second.getUserName();\n\t}", "public String getUserName() {\n return sessionData.getUserName();\n }", "public static String getUserName() {\r\n\t\tHttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t\treturn session.getAttribute(\"username\").toString();\r\n\t}", "public static String getUserName() {\r\n\t\tHttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t\treturn session.getAttribute(\"username\").toString();\r\n\t}", "public String getUser() {\r\n\t\treturn _userName;\r\n\t}", "@Override\n\tpublic String getUserName() {\n\t\t\n\t\ttry {\n\t\t\treturn UserLocalServiceUtil.getUser(_dataset.getUserId()).getScreenName();\n\t\t} catch (PortalException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SystemException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treturn \"ERROR\";\n\t\t}\n\t}", "public final String getUsername() {\n return username;\n }", "private String getPrincipalUsername()\n\t{\n\t\tString userName = null;\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n\t\tif (principal instanceof UserDetails)\n\t\t{\n\t\t\tuserName = ((UserDetails) principal).getUsername();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tuserName = principal.toString();\n\t\t}\n\t\treturn userName;\n\t}", "public String getUsername() {\n return username.get();\n }", "static String getUserName() {\n return System.getProperty(\"user.name\");\n }", "public String getUsername() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n return txtUserName().getText();\n }", "public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}", "@Override\n\tpublic String getUserName() {\n\t\treturn super.getUserName();\n\t}", "@Override\n\tpublic String getUserName() {\n\t\treturn super.getUserName();\n\t}", "public String getName() {\n return (String) getObject(\"username\");\n }", "@Override\n public java.lang.String getUserName() {\n return _partido.getUserName();\n }", "String getUserName() {\r\n\t\t\treturn username;\r\n\t\t}", "public String getName() {\n return user.getName();\n }", "private String getLoggedInUser() {\r\n\t\tOptional<Authentication> authentication = Optional\r\n\t\t\t\t.ofNullable(SecurityContextHolder.getContext().getAuthentication());\r\n\t\treturn authentication.map(Authentication::getPrincipal).map(obj -> (UserDetails) obj)\r\n\t\t\t\t.map(UserDetails::getUsername).orElse(null);\r\n\t}", "public String getName() {\r\n\t\treturn username;\r\n\t}", "@AutoEscape\n\t@Override\n\tpublic String getUserName();", "@AutoEscape\n\t@Override\n\tpublic String getUserName();", "public String getUserName() {\r\n return userName;\r\n }", "public String getUserName() {\r\n return userName;\r\n }", "public String getUserName() {\r\n return userName;\r\n }", "public String getUserName() {\r\n return userName;\r\n }", "public String getUserName() {\n\t\treturn this.username;\r\n\t}", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }" ]
[ "0.8020829", "0.8020829", "0.8020829", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7624974", "0.75287974", "0.75287974", "0.74504584", "0.73039156", "0.73039156", "0.73039156", "0.73039156", "0.73039156", "0.73039156", "0.73006415", "0.7288368", "0.7270417", "0.72566175", "0.7222465", "0.7217823", "0.71798235", "0.7091685", "0.7074184", "0.7063997", "0.70638", "0.7049512", "0.7009227", "0.7009227", "0.7009227", "0.70000756", "0.70000756", "0.70000756", "0.70000756", "0.69945073", "0.69905305", "0.69905305", "0.69905305", "0.69905305", "0.6990388", "0.6970268", "0.6964271", "0.6964271", "0.6964271", "0.6950234", "0.69409585", "0.6926722", "0.69231886", "0.6907606", "0.68918127", "0.6882164", "0.6863365", "0.6863365", "0.6844578", "0.6842347", "0.6841386", "0.6841386", "0.68206", "0.68206", "0.6820394", "0.6818044", "0.68051237", "0.67962253", "0.67962253", "0.67824006", "0.6780993", "0.6776703", "0.67691404", "0.67627084", "0.6752052", "0.67513525", "0.67496395", "0.6729361", "0.6728895", "0.6728895", "0.6728165", "0.6725192", "0.6709527", "0.66995484", "0.66968876", "0.66850376", "0.66718805", "0.66718805", "0.667131", "0.667131", "0.667131", "0.667131", "0.6659776", "0.66564375", "0.66564375", "0.66564375", "0.66564375", "0.66564375", "0.66564375" ]
0.0
-1
Returns the password from the credentials.
public String getPassword() { return password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "public java.lang.String getPassword();", "protected String getPassword(final String username) {\n return credentials.get(username);\n }", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "public String getPassword() throws RemoteException;", "public PasswordCredential getPasswordCredential() {\n return passCred;\n }", "public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}", "public String getPassword();", "public String getPassword();", "public final String getPassword() {\n return properties.get(PASSWORD_PROPERTY);\n }", "public String getPassword() {\n return (String) getObject(\"password\");\n }", "String getUserPassword();", "public String getPassword() {\n Object ref = password_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n password_ = s;\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n password_ = s;\n }\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n password_ = s;\n }\n return s;\n }\n }", "public String getPassword() {\n Object ref = password_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n password_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n password_ = s;\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n password_ = s;\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n password_ = s;\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n password_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n password_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getPassword() {\n return getProperty(PASSWORD);\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPasswd() {\n java.lang.Object ref = passwd_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n passwd_ = s;\n }\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n password_ = s;\n return s;\n }\n }", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "String password();", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\r\n return password;\r\n }", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "public String getPassword() {return password;}", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public java.lang.String getPasswd() {\n java.lang.Object ref = passwd_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n passwd_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getPassword() {\n return password;\r\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword()\n \t{\n \t\treturn password;\n \t}", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword(){\r\n\t\treturn password;\r\n\t}", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }" ]
[ "0.80181736", "0.80181736", "0.80181736", "0.80181736", "0.80181736", "0.80181736", "0.80181736", "0.7820969", "0.7630859", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.75720257", "0.75429827", "0.7542006", "0.752779", "0.752779", "0.7513685", "0.7485512", "0.7468754", "0.74682474", "0.7445242", "0.7445242", "0.7441473", "0.73943526", "0.73943526", "0.73943526", "0.73827815", "0.73827815", "0.73788357", "0.73788357", "0.73788357", "0.73746103", "0.7332205", "0.73231137", "0.73138696", "0.7295223", "0.7295223", "0.72647816", "0.7240862", "0.72363776", "0.7222436", "0.7222436", "0.722228", "0.72122186", "0.72122186", "0.72122186", "0.72122186", "0.72122186", "0.72122186", "0.72122186", "0.7202547", "0.72007453", "0.72007453", "0.72006917", "0.7187075", "0.71854556", "0.71854556", "0.7179444", "0.7175221", "0.7175146", "0.7175146", "0.7175146", "0.7175146", "0.7175146", "0.7175146", "0.7175146", "0.7175146", "0.7175146", "0.7175146", "0.7175146", "0.71537447", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257", "0.7147257" ]
0.0
-1
for set the calender date
@Override public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) { Calendar c = Calendar.getInstance(); c.set(Calendar.YEAR,year); c.set(Calendar.MONTH,month); c.set(Calendar.DAY_OF_MONTH,dayOfMonth); String dateString = new SimpleDateFormat("YYYY-MM-d").format(c.getTime()); // String dateString = DateFormat.getDateInstance(DateFormat.LONG).format(c.getTime()); showDate.setText(dateString); // Toast.makeText(this, , Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}", "private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }", "private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }", "public void setDate(Calendar date) {\n\tthis.date = date;\n }", "void setDate(Date data);", "public void setDate(Calendar date)\n {\n this.date = date;\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n currentDate.set(Calendar.YEAR, year);\n currentDate.set(Calendar.MONTH, monthOfYear);\n currentDate.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n //updateLabel();\n SimpleDateFormat sdf1 = new SimpleDateFormat(DATE_FORMAT_calender);\n Log.e(\"data123456789\",sdf1.format(currentDate.getTime()));\n updateAttendanceDetails();\n }", "@Override\n\tprotected void setDate() {\n\n\t}", "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n\t\tminMonth = mMonth;\r\n\t\tminDay = mDay;\r\n\t\t// display the current date (this method is below)\r\n\t\t// updateDisplay();\r\n\t\t updateDisplay(maxYear, maxMonth, maxDay);\r\n\t}", "public void SetDate(Date date);", "public void setDate(java.util.Calendar value) {\r\n\t\tBase.set(this.model, this.getResource(), DATE, value);\r\n\t}", "public void setFechaFacturado(java.util.Calendar param){\n \n this.localFechaFacturado=param;\n \n\n }", "private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }", "@RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n\n String myFormat = \"dd/MM/yy\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n start_Journey_Date_ET.setText(sdf.format(myCalendar.getTime()));\n\n }", "public void setDate(Calendar date) {\r\n\t\tthis.date = date;\r\n\t}", "@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}", "public void setDate(int dt) {\n date = dt;\n }", "public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}", "public void setDate(View view) {\n new DatePickerDialog(\n AddEvent.this, dateSet,\n myCalendar.get(Calendar.YEAR),\n myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)\n ).show();\n }", "public void setSysDate()\r\n\t{\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n txtPDate.setText(sdf.format(new java.util.Date()));\r\n\t}", "@Override\n public void onDateSet(android.widget.DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n //melakukan set calendar untuk menampung tanggal yang dipilih\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n //textview berubah menyesuaikan ketika sudah memilih tanggal\n txtview_date_result.setText(\"Date : \"+date_format.format(newDate.getTime()));\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n cal.set(Calendar.YEAR, year);\n cal.set(Calendar.MONTH, monthOfYear);\n cal.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n String myFormat = \"yyyy/MM/dd\";\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.KOREA);\n dateEt.setText(sdf.format(cal.getTime()));\n }", "private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t\t//set current date to FCRA registration button\n\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t}", "public void setDate() {\n DatePickerDialog dateDialog = new DatePickerDialog(this, myDateListener,\n calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));\n //set the date limits so user cannot pick a date outside of game scope\n dateDialog.getDatePicker().setMinDate(System.currentTimeMillis() + MILLIS_IN_DAY);\n dateDialog.getDatePicker().setMaxDate(System.currentTimeMillis() + (MILLIS_IN_DAY * MAX_END_DAY_COUNT));\n dateDialog.show();\n }", "public void setFechaSolicitud(java.util.Calendar param){\n \n this.localFechaSolicitud=param;\n \n\n }", "@RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n\n String myFormat = \"dd/MM/yy\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n end_Journey_Date_ET.setText(sdf.format(myCalendar.getTime()));\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n purCalen.set(year, monthOfYear, dayOfMonth);\n purDateBtn.setText(year+\"년 \"+(monthOfYear+1)+\"월 \"+ dayOfMonth+\"일\");\n setShelfCalen();\n// String msg = String.format(\"%d / %d / %d\", year,monthOfYear+1, dayOfMonth);\n// Toast.makeText(FoodInputActivity.this, msg, Toast.LENGTH_SHORT).show();\n }", "void setDate(int index, Date value, Calendar cal)\n throws SQLException;", "public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}", "@Override\r\n public void onDateSet(DatePicker view, int year, int monthOfYear,\r\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\r\n myCalendar.set(Calendar.MONTH, monthOfYear);\r\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\r\n\r\n int s=monthOfYear+1;\r\n txt_date.setText(dayOfMonth+\"-\"+s+\"-\"+year);\r\n\r\n\r\n\r\n\r\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel1();\n }", "public void setDate() {\n this.date = new Date();\n }", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n cal.set(year, monthOfYear, dayOfMonth);\n\n edt.setText(dateFormatter.format(cal.getTime()));\n\n }", "@Override\n public void onDateSet(DatePicker arg0, int year_n, int month_n, int day_n) {\n year = year_n;\n month = month_n;\n day = day_n;\n cal.set(year, month, day);\n week = getWeekDay(cal);\n date.setText(year+\"年\"+(month+1)+\"月\"+day+\"日\" +\" \"+week); //将选择的日期显示到TextView中,因为之前获取month直接使用,所以不需要+1,这个地方需要显示,所以+1\n }", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_eDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }", "public void setDate(int day,int month,int year){\n this.day=day;\n this.month=month;\n this.year=year;\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(btnStartDate, myCalendar);\n\n //set hasCheckDate to true\n hasCheckDate = true;\n }", "public void setDateTime(@NonNull final Calendar date) {\n onView(viewMatcher).perform(click());\n onView(withClassName(equalTo(DatePicker.class.getName())))\n .perform(PickerActions.setDate(date.get(Calendar.YEAR), date.get(Calendar.MONTH) + 1, date.get(Calendar.DAY_OF_MONTH)));\n new Dialog().confirmDialog();\n onView(withClassName(equalTo(TimePicker.class.getName())))\n .perform(PickerActions.setTime(date.get(Calendar.HOUR_OF_DAY), date.get(Calendar.MINUTE)));\n new Dialog().confirmDialog();\n }", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_sDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }", "private void setCurrentDate(Date date)\n {\n date.setTime(System.currentTimeMillis());\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n// myCalendar.set(Calendar.MONTH, monthOfYear);\n// myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(0);\n cal.set(year, month, day, 0, 0, 0);\n Date chosenDate = cal.getTime();\n\n // Format the date using style and locale\n DateFormat df = DateFormat.getDateInstance();\n String formattedDate = df.format(chosenDate);\n\n // Display the chosen date to app interface\n C_birthdate.setText(formattedDate);\n //C_reg_date.setText(formattedDate);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(to_date);\n }", "public void setDate(Date date) {\r\n this.date = date;\r\n }", "void setCreateDate(Date date);", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDateArrival();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n\n String myFormat = \"dd/MM/yy\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n date_text.setText(sdf.format(myCalendar.getTime()));\n }", "public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n Calendar calendarNow = Calendar.getInstance();\n calendarNow.set(selectedYear, selectedMonth, selectedDay);\n if (calendarNow.getTimeInMillis() < view.getMinDate()) {\n begdaShowDatePickerDialog();\n Toast.makeText(getActivity(), getResources().getString(R.string.createOrder_datePicker_selectFutureDate), Toast.LENGTH_SHORT).show();\n view.updateDate(begCalendar.get(Calendar.YEAR), begCalendar.get(Calendar.MONTH), begCalendar.get(Calendar.DAY_OF_MONTH));\n }\n\n begYear = selectedYear;\n begMonth = selectedMonth;\n begDay = selectedDay;\n begCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvBegda.setText(new StringBuilder().append(char2(begDay))\n .append(\".\").append(char2(begMonth + 1)).append(\".\").append(begYear));\n if (tvEndda.getText().toString().equals(getResources().getString(R.string.leave_dmy))) {\n endYear = selectedYear;\n endMonth = selectedMonth;\n endDay = selectedDay;\n endCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvEndda.setText(new StringBuilder().append(char2(endDay))\n .append(\".\").append(char2(endMonth + 1)).append(\".\").append(endYear));\n }\n }", "public void setStartDate(Date s);", "public void setDate(int date){\n this.date = date;\n }", "@SuppressLint(\"SetTextI18n\")\n private void setTransactionDate() {\n // used to get the name of the month from the calendar\n HashMap<String, String> months = new HashMap<>();\n String[] mnths = {\"\", \"Jan\", \"Feb\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"Sept\", \"Oct\", \"Nov\", \"Dec\"};\n for (int i = 1; i <= 12; i++) {\n if (i < 10) {\n months.put(mnths[i], Integer.toString(i));\n } else {\n\n months.put(mnths[i], Integer.toString(i));\n }\n }\n\n // set the date when somehting is selected from the DatePicker\n dateText.setText(months.get(transaction.getMonth()) + '-' + Integer.toString(transaction.getDay()) + '-' + transaction.getYear());\n findViewById(R.id.transaction_date).setOnClickListener(new View.OnClickListener() {\n @Override\n // show DatePicker on field click\n public void onClick(View v) {\n showDatePickerDialog();\n }\n });\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n int mMonth = month + 1;\n String bydate = year + \"-\" + mMonth + \"-\" + day;\n mIdTvMoonatCenterShortLine.setText(bydate);\n\n List<SleepDataInfo> all = manager.findAllSleep();\n SleepDataInfo sleepDataInfo_total = manager.findSleepDataInfo(SPUtil.getUserName(getApplication()), bydate);\n RefreshView(sleepDataInfo_total); /*选择日期后刷新ui*/\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n Calendar calendar = new GregorianCalendar();\n //calendar.set(Calendar.MILLISECOND, 0);\n calendar.set(year, month, dayOfMonth, 0, 0, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n //Set the milliseconds to 0 because java.util.Date is not accurate on milliseconds\n mDate = calendar.getTime();\n updateDateText();\n updateText();\n }", "public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n txtDate.setText(dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year);}", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n date.setText(year+\"/\"+(month+1)+ \"/\"+ day);\n hDate = year+\"/\"+(month+1)+ \"/\"+ day;\n check(hDate, status);\n }", "public void setDate(java.util.Calendar date) {\n this.date = date;\n }", "public void setDate(java.util.Calendar date) {\n this.date = date;\n }", "@Override\n public void onDateSet(DatePicker view, int mYear, int mMonth, int mDay)\n {\n uDate = mDay+\"/\"+(mMonth+1)+\"/\"+mYear;\n Year = mYear;\n Month = mMonth+1;\n Day = mDay;\n editTextDate.setText(uDate);\n }", "public void SetCurrentDate(CalendarWidget kCal) {\n\t\tfor(int i = 0; i < 42; ++i)\n\t\t{\n\t\t\tif(kCal.cell[i].date.getText().toString().length() == 0)\n\t\t\t\tcontinue;\n\t\t\tkCal.checkForCurrentData(kCal.cell[i]);\n\t\t}\n\t}", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n String myFormat = \"yyyy-MM-dd\"; //In which you need put here\n\n\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n ed_date.setText(sdf.format(myCalendar.getTime()));\n sel_date=sdf.format(myCalendar.getTime());\n int dd=myCalendar.get(Calendar.DAY_OF_WEEK);\n switch (dd){\n case 1: sel_day=\"SUNDAY\";\n break;\n case 2: sel_day=\"MONDAY\";\n break;\n case 3: sel_day=\"TUESDAY\";\n break;\n case 4: sel_day=\"WEDNESDAY\";\n break;\n case 5: sel_day=\"THURSDAY\";\n break;\n case 6: sel_day=\"FRIDAY\";\n break;\n case 7: sel_day=\"SATURDAY\";\n break;\n }\n schedule_load();\n SharedPreferences sh=PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor ed=sh.edit();\n ed.putString(\"date\",ed_date.getText().toString());\n ed.commit();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, month);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n// updateLabel();\n updateLabel();\n// callTimeSlotService();\n\n }", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, dayOfMonth, 0, 0, 0);\n Date date = calendar.getTime();\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.getDefault());\n mBinding.date.setText(sdf.format(date));\n }", "public void onDateSet(DatePicker view, int year, int month, int day){\n TextView tv = getActivity().findViewById(R.id.textBornAdult);\n\n // Create a Date variable/object with user chosen date\n Calendar cal = Calendar.getInstance(SBFApplication.config.locale);\n cal.setTimeInMillis(0);\n cal.set(year, month, day, 0, 0, 0);\n Date chosenDate = cal.getTime();\n\n // Format the date using style and locale\n // DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, BaseActivity.getInstance().config.locale);\n String formattedDateShow = formatterBornShow.format(chosenDate);\n String formattedDate = formatterTrain.format(chosenDate);\n // formatter.format(date.getDate()\n\n\n // Display the chosen date to app interface\n tv.setText(formattedDateShow);\n dateBorn=formattedDate;\n // MemoryStore.set(getActivity(), \"adultBorn\", formattedDate);\n // MemoryStore.set(getActivity(), \"adultBornShow\", formattedDateShow);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(btnEndDate, myCalendar);\n\n //set hasCheckDate to true\n hasCheckDate = true;\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n ((EditText) findViewById(R.id.editTextRecipeLastEaten)).setText(dayOfMonth + \"/\" + (month+1) + \"/\" +year);\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, dayOfMonth);\n\n dateLastEaten = calendar.getTime();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDays();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n myCalendar.set(Calendar.HOUR_OF_DAY, 23);\n myCalendar.set(Calendar.MINUTE, 59);\n mDate1 = myCalendar.getTime();\n updateLabel(date1);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n startYear = year;\n startMonth = monthOfYear + 1;\n startDay = dayOfMonth;\n try {\n dateChoisie = df.parse(String.valueOf(startYear + \"-\" + startMonth + \"-\" + startDay));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Log.e(\"DATE CHOISIE\",df.format(dateChoisie));\n switch (v.getId()){\n case R.id.buttonDateDebut:\n editDateDebut.setText(df.format(dateChoisie));\n break;\n case R.id.buttonDateFin:\n editDateFin.setText(df.format(dateChoisie));\n break;\n }\n }", "private void setDateButtonActionPerformed(java.awt.event.ActionEvent evt) {\n Date newDate = calendario.getDate();\n if(newDate != null) {\n java.sql.Date date = new java.sql.Date(newDate.getTime());\n control.setDate(date);\n control.crearAlerta(\"Informacion\", \"La fecha \" + date + \" ha sido agregada\" , this);\n } else {\n control.crearAlerta(\"Advertencia\", \"Debe escoger una fecha\", this);\n }\n }", "public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(edtBirthday);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n String myFormat = \"MM/dd/yyyy\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n\n edtDateOfBirth.setText(sdf.format(myCalendar.getTime()));\n }", "public void setDate(int m, int d, int y){\n\t\tday = d;\n\t\tyear =y;\n\t\tmonth = m;\n\t}", "public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n\t\t\t\t\t\t \t\t\tstart_day = selectedday;\n\t\t\t\t\t\t \t\t\tstart_month = selectedmonth;\n\t\t\t\t\t\t \t\t\tstart_year = selectedyear;\n\t\t\t\t\t\t \t\t\t//final Date date = new Date(c.getTimeInMillis());\n\t\t\t\t\t\t \t\t\t//final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\t \t\t\t//harvestdate1.setText(dateFormat.format(date));\n\t\t\t\t\t\t harvestdate1.setText(new StringBuilder().append(start_day).append(\"-\").append(start_month+1)\n\t\t\t\t\t .append(\"-\").append(start_year)\n\t\t\t\t\t .append(\" \")); \t\n\t\t\t\t\t\t // set selected date into Date Picker\n\t\t\t\t\t\t datepicker.init(start_year, start_month, start_day, null);\n\n\t\t\t\t\t\t }", "private void setCurrentDay() {\n Calendar c = Calendar.getInstance();\n\n year = c.get(Calendar.YEAR);\n month = c.get(Calendar.MONTH);\n day = c.get(Calendar.DAY_OF_MONTH);\n hour = c.get(Calendar.HOUR_OF_DAY);\n minute = c.get(Calendar.MINUTE);\n }", "public void setTodayDate() {\r\n int oldMonthValue = getMonth();\r\n int oldYearValue = getYear();\r\n calendarTable.getCalendarModel().setTodayDate();\r\n updateControlsFromTable();\r\n // fire property change\r\n int newMonthValue = getMonth();\r\n if (oldMonthValue != newMonthValue) {\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, newMonthValue);\r\n }\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n // clear selection when changing the month in view\r\n if (oldMonthValue != newMonthValue && oldYearValue != newYearValue) {\r\n calendarTable.getSelectionModel().clearSelection();\r\n }\r\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void onDateSet(DatePicker view, int year, int month, int day)\t{\n\t\tDate d = null;\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.set(year, month, day);\n\t\td = cal.getTime();\n\n\t\tString strFecha = Convertir_de_date_a_string(d);\n\t\tTextView labelFecha = (TextView) getActivity().findViewById(this.idLabelFecha);\n\t\tif(labelFecha!=null){\n\t\t\tlabelFecha.setText(strFecha);\n\t\t}\n\n\t\tactivity.calculateNextPeriod(strFecha);\n\t}", "public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }", "public void setCalDay() {\n\t\tfloat goal_bmr;\n\t\tif(gender==\"male\") {\n\t\t\tgoal_bmr= (float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age + 5);\n\t\t}\n\t\telse {\n\t\t\tgoal_bmr=(float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age - 161);\n\t\t}\n\t\tswitch (gymFrequency) {\n\t\tcase 0:calDay = goal_bmr*1.2;\n\t\t\t\tbreak;\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:calDay = goal_bmr*1.375;\n\t\t\t\tbreak;\n\t\tcase 4:\n\t\tcase 5:calDay = goal_bmr*1.55;\n\t\t\n\t\t\t\tbreak;\n\t\tcase 6:\n\t\tcase 7:calDay = goal_bmr*1.725;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\t\t\tedtBasicDOB.setText(day + \"/\" + month + \"/\" + year);\n\t\t}", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel1();\n\n }", "public static void setDate(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.util.Calendar value) {\r\n\t\tBase.set(model, instanceResource, DATE, value);\r\n\t}", "private void initializeDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear = c.get(Calendar.YEAR);\n\t\tmMonth = c.get(Calendar.MONTH);\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\texpense.setDate(c.getTime());\n\n\t\t// display the current date\n\t\tupdateDateDisplay();\n\t}", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\",\r\n\t\t\t\t\tLocale.US);\r\n\t\t\ttry {\r\n\t\t\t\tngaysinh = dateFormat\r\n\t\t\t\t\t\t.format(Global.getDateFromDatePicket(view));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t}\r\n\t\t\tetBirthday.setText(ngaysinh);\r\n\r\n\t\t}", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n try{\n int month = monthOfYear + 1;\n String formattedMonth = \"\" + month;\n String formattedDayOfMonth = \"\" + dayOfMonth;\n\n if(month < 10){\n\n formattedMonth = \"0\" + month;\n }\n if(dayOfMonth < 10){\n\n formattedDayOfMonth = \"0\" + dayOfMonth;\n }\n stnkDate.setText(year + \"-\" + formattedMonth + \"-\" + formattedDayOfMonth);\n }catch (ParseException e1){\n e1.printStackTrace();\n }\n\n }" ]
[ "0.8000687", "0.77385324", "0.76336193", "0.76200175", "0.75840014", "0.75615597", "0.7517715", "0.750777", "0.74858606", "0.74580926", "0.7456949", "0.74235094", "0.7360789", "0.7360495", "0.73600835", "0.73504", "0.7344258", "0.73265857", "0.7322424", "0.7294543", "0.72657794", "0.7261534", "0.7260076", "0.7257186", "0.72448575", "0.7241193", "0.72339356", "0.7228296", "0.72153336", "0.72139", "0.71979433", "0.718857", "0.7173516", "0.7169223", "0.71648914", "0.71528125", "0.7152802", "0.715266", "0.7147678", "0.71427214", "0.7132304", "0.7118631", "0.7103777", "0.7103526", "0.7098911", "0.7098321", "0.70976305", "0.709404", "0.7092677", "0.70814306", "0.7078338", "0.70751524", "0.7069215", "0.70655686", "0.70653605", "0.7063968", "0.70589656", "0.7058546", "0.7058546", "0.7057901", "0.7055734", "0.7053027", "0.7051547", "0.70493084", "0.70461965", "0.70461965", "0.70461965", "0.704344", "0.7039723", "0.7033042", "0.7032094", "0.70216805", "0.70199454", "0.7014256", "0.70122194", "0.7010735", "0.7006683", "0.7006452", "0.70064473", "0.7004248", "0.7003253", "0.7002966", "0.70008236", "0.70008236", "0.70008236", "0.70008236", "0.70008236", "0.70008236", "0.70008236", "0.70008236", "0.70008236", "0.69980234", "0.6990547", "0.69863504", "0.69859433", "0.6985888", "0.69804233", "0.6979425", "0.69772655", "0.6972581", "0.69719326" ]
0.0
-1
for image cropping and set the image
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) { CropImage.ActivityResult result = CropImage.getActivityResult(data); if (resultCode == RESULT_OK) { //getting Image to show Uri resultUri = result.getUri(); profilePic.setImageURI(resultUri); //getting image to save bitmap formate try{ bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),resultUri); imageChanged = true; }catch (IOException e){ e.printStackTrace(); } } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) { Exception error = result.getError(); Toast.makeText(this, ""+error, Toast.LENGTH_SHORT).show(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startCropImage() {\n }", "protected void cropImage() {\n if (mOptions.noOutputImage) {\n setResult(null, null, 1);\n } else {\n Uri outputUri = getOutputUri();\n mCropImageView.saveCroppedImageAsync(\n outputUri,\n mOptions.outputCompressFormat,\n mOptions.outputCompressQuality,\n mOptions.outputRequestWidth,\n mOptions.outputRequestHeight,\n mOptions.outputRequestSizeOptions);\n }\n }", "private void cropImage() {\n\t\t// Use existing crop activity.\n\t\tIntent intent = new Intent(\"com.android.camera.action.CROP\");\n\t\tintent.setDataAndType(mImageCaptureUri, IMAGE_UNSPECIFIED);\n\n\t\t// Specify image size\n\t\tintent.putExtra(\"outputX\", 100);\n\t\tintent.putExtra(\"outputY\", 100);\n\n\t\t// Specify aspect ratio, 1:1\n\t\tintent.putExtra(\"aspectX\", 1);\n\t\tintent.putExtra(\"aspectY\", 1);\n\t\tintent.putExtra(\"scale\", true);\n\t\tintent.putExtra(\"return-data\", true);\n\n\t\t// REQUEST_CODE_CROP_PHOTO is an integer tag you defined to\n\t\t// identify the activity in onActivityResult() when it returns\n\t\tstartActivityForResult(intent, REQUEST_CODE_CROP_PHOTO);\n\t}", "private void setPic() {\n int targetW = img_clip.getWidth();\n int targetH = img_clip.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n img_clip.setImageBitmap(bitmap);\n }", "@Override\n public void onCropWindowChanged() {\n Bitmap cropped = imageView.getCroppedImage();\n BitmapHelper.getInstance().setBitmap(cropped);\n bitmap=cropped;\n\n }", "public native MagickImage cropImage(Rectangle chopInfo)\n\t\t\tthrows MagickException;", "private void performCrop() {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(picUri, \"image/*\");\r\n //set crop properties\r\n cropIntent.putExtra(\"crop\", \"true\");\r\n //indicate aspect of desired crop\r\n// cropIntent.putExtra(\"aspectX\", 1);\r\n// cropIntent.putExtra(\"aspectY\", 1);\r\n //indicate output X and Y\r\n// cropIntent.putExtra(\"outputX\", 256);\r\n// cropIntent.putExtra(\"outputY\", 256);\r\n //retrieve data on return\r\n cropIntent.putExtra(\"return-data\", true);\r\n //start the activity - we handle returning li_history onActivityResult\r\n startActivityForResult(cropIntent, 2);\r\n }\r\n //respond to users whose devices do not support the crop action\r\n catch (ActivityNotFoundException anfe) {\r\n //display an error message\r\n String errorMessage = \"Whoops - your device doesn't support the crop action!\";\r\n Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n }", "@Override\n protected void onImageLaidOut() {\n super.onImageLaidOut();\n final Drawable drawable = getDrawable();\n if (drawable == null) {\n return;\n }\n\n float drawableWidth = drawable.getIntrinsicWidth();\n float drawableHeight = drawable.getIntrinsicHeight();\n\n if (mTargetAspectRatio == SOURCE_IMAGE_ASPECT_RATIO) {\n mTargetAspectRatio = drawableWidth / drawableHeight;\n }\n\n int height = (int) (mThisWidth / mTargetAspectRatio);\n if (height > mThisHeight) {\n int width = (int) (mThisHeight * mTargetAspectRatio);\n int halfDiff = (mThisWidth - width) / 2;\n mCropRect.set(halfDiff, 0, width + halfDiff, mThisHeight);\n } else {\n int halfDiff = (mThisHeight - height) / 2;\n mCropRect.set(0, halfDiff, mThisWidth, height + halfDiff);\n }\n\n calculateImageScaleBounds(drawableWidth, drawableHeight);\n setupInitialImagePosition(drawableWidth, drawableHeight);\n\n if (mCropBoundsChangeListener != null) {\n mCropBoundsChangeListener.onCropAspectRatioChanged(mTargetAspectRatio);\n }\n if (mTransformImageListener != null) {\n// mTransformImageListener.onScale(getCurrentScale());\n// mTransformImageListener.onRotate(getCurrentAngle());\n mTransformImageListener.onBrightness(getCurrentBrightness());\n// mTransformImageListener.onContrast(getCurrentContrast());\n }\n }", "private void setPic() {\n\t\tint targetW = Constant.sRealWidth;\n\t\tint targetH = Constant.sRealHeight;\n\n\t\t/* Get the size of the image */\n\t\tBitmapFactory.Options bmOptions = new BitmapFactory.Options();\n\t\tbmOptions.inJustDecodeBounds = true;\n\t\tBitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\t\tint photoW = bmOptions.outWidth;\n\t\tint photoH = bmOptions.outHeight;\n\t\t\n\t\t/* Figure out which way needs to be reduced less */\n\t\tint scaleFactor = 1;\n\t\tif ((targetW > 0) || (targetH > 0)) {\n\t\t\tscaleFactor = Math.min(photoW/targetW, photoH/targetH);\t\n\t\t}\n\n\t\t/* Set bitmap options to scale the image decode target */\n\t\tbmOptions.inJustDecodeBounds = false;\n\t\tbmOptions.inSampleSize = scaleFactor;\n\t\tbmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n\t\tBitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\t\t\n\t\tint rotate = ViewUtils.handleRotateBitmap(mCurrentPhotoPath);\n\t\tif (rotate != 0) {\n\t\t\tbitmap = ViewUtils.rotaingBitmap(\n\t\t\t\t\trotate, bitmap);\n\t\t}\n\t\t/* Associate the Bitmap to the ImageView */\n\t\tmPictureView.setImageBitmap(bitmap);\n\t}", "private Bitmap setPic() {\n int targetH = 0; //mImageView.getHeight();\n int targetW = 0; //mImageView.getWidth();\n\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n if( photoH > photoW ){\n /*Se definen las dimensiones de la imagen que se desea generar*/\n targetH = Const.MedidasReduccionImagen.PEQUENA_PORTRAIT.heigh; // 640;\n targetW = Const.MedidasReduccionImagen.PEQUENA_PORTRAIT.width; //480;\n }else{\n targetH = Const.MedidasReduccionImagen.PEQUENA_LANDSCAPE.heigh; //480;\n targetW = Const.MedidasReduccionImagen.PEQUENA_LANDSCAPE.width; //640;\n }\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 0;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n return bitmap;\n }", "private void handleCrop(int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n Uri uri = Crop.getOutput(data);\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);\n mImageCaptureUri = uri;\n mImageView.setImageBitmap(bitmap);\n } catch (Exception e) {\n Log.d(TAG, e.getMessage());\n }\n\n } else if (resultCode == Crop.RESULT_ERROR) {\n Toast.makeText(this, Crop.getError(data).getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "private void performCrop(Uri img) {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(img, \"image/*\");\r\n //set crop properties\r\n cropIntent.putExtra(\"crop\", \"true\");\r\n //indicate aspect of desired crop\r\n // cropIntent.putExtra(\"aspectX\", 1);\r\n //cropIntent.putExtra(\"aspectY\", 1);\r\n //indicate output X and Y\r\n // cropIntent.putExtra(\"outputX\", 256);\r\n // cropIntent.putExtra(\"outputY\", 256);\r\n //retrieve data on return\r\n\r\n cropIntent.putExtra(\"return-data\", true);\r\n //start the activity - we handle returning in onActivityResult\r\n startActivityForResult(cropIntent, 2);\r\n }\r\n //respond to users whose devices do not support the crop action\r\n catch (ActivityNotFoundException anfe) {\r\n //display an error message\r\n String errorMessage = \"Whoops - your device doesn't support the crop action!\";\r\n Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n }", "private void handleCrop(int resultCode, Intent result) {\n if (resultCode == RESULT_OK) {\n try {\n Uri uri = Crop.getOutput(result);\n yourSelectedImage = MediaStore.Images.Media.getBitmap(this.getContentResolver(), Crop.getOutput(result));\n ivUserImage.setImageBitmap(yourSelectedImage);\n Uri tempUri = Util.getInstance().getImageUri(SignUp.this, yourSelectedImage);\n // createImageFromBitmap(yourSelectedImage);\n // tempFilePath = FileUtil.getPath(this,tempUri);\n tempFilePath = FileUtil.getPath(SignUp.this, tempUri);\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else if (resultCode == Crop.RESULT_ERROR) {\n // Toast.makeText(this, Crop.getError(result).getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "public void cropImage() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { // 마쉬멜로우 이상 버전일 때\n grantUriPermission(\"com.android.camera\", mImageCaptureUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n Intent intent = new Intent(\"com.android.camera.action.CROP\");\n intent.setDataAndType(mImageCaptureUri, \"image/*\");\n\n List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, 0);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n grantUriPermission(list.get(0).activityInfo.packageName, mImageCaptureUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n int size = list.size();\n if (size == 0) {\n Toast.makeText(ManualRegistActivity.this, \"취소 되었습니다.\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n Toast.makeText(ManualRegistActivity.this, \"용량이 큰 사진의 경우 시간이 오래 걸릴 수 있습니다.\", Toast.LENGTH_SHORT).show();\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n }\n intent.putExtra(\"crop\", \"true\");\n intent.putExtra(\"aspectX\", 1);\n intent.putExtra(\"aspectY\", 1);\n intent.putExtra(\"scale\", true);\n croppedFile = null;\n try {\n croppedFile = createImageFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n File folder = new File(Environment.getExternalStorageDirectory() + \"/BioCube/\");\n File tempFile = new File(folder.toString(), croppedFile.getName());\n\n mCurrentPhotoPath = tempFile.getAbsolutePath();\n mImageCaptureUri = FileProvider.getUriForFile(ManualRegistActivity.this,\n \"com.example.seongjun.biocube.provider\", tempFile);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n }\n\n intent.putExtra(\"return-data\", false);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, mImageCaptureUri);\n intent.putExtra(\"outputFormat\", Bitmap.CompressFormat.JPEG.toString());\n\n Intent i = new Intent(intent);\n ResolveInfo res = list.get(0);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n i.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n\n grantUriPermission(res.activityInfo.packageName, mImageCaptureUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n i.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n startActivityForResult(i, CROP_FROM_CAMERA);\n }\n }", "private void setPic() {\n int targetW = 210;\n int targetH = 320;\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(previewPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(previewPhotoPath, bmOptions);\n bitmap = RotateBitmap(bitmap,270);\n preview.setImageBitmap(bitmap);\n }", "private void manageCrops() {\r\n// System.out.println(\"\\nThis is manage the crops option\");\r\n CropView.runCropsView();\r\n }", "private void setPic()\n {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.min(photoW/384, photoH/512);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n imageCapture.setImageBitmap(bitmap);\n }", "public void cropImage() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n this.grantUriPermission(\"com.android.camera\", photoUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n Intent intent = new Intent(\"com.android.camera.action.CROP\");\n intent.setDataAndType(photoUri, \"image/*\");\n\n List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, 0);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n grantUriPermission(list.get(0).activityInfo.packageName, photoUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n int size = list.size();\n if (size == 0) {\n Toast.makeText(this, \"취소 되었습니다.\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n// Toast.makeText(this, \"용량이 큰 사진의 경우 시간이 오래 걸릴 수 있습니다.\", Toast.LENGTH_SHORT).show();\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n }\n intent.putExtra(\"crop\", \"true\");\n// intent.putExtra(\"aspectX\", 3);\n// intent.putExtra(\"aspectY\", 4);\n intent.putExtra(\"scale\", true);\n File croppedFileName = null;\n try {\n croppedFileName = createImageFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n File folder = new File(Environment.getExternalStorageDirectory() + \"/Body_Img/\");\n File tempFile = new File(folder.toString(), croppedFileName.getName());\n\n photoUri = FileProvider.getUriForFile(Body_Img.this,\n \"com.example.a1013c.body_sns.provider\", tempFile);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n }\n\n intent.putExtra(\"return-data\", false);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);\n intent.putExtra(\"outputFormat\", Bitmap.CompressFormat.JPEG.toString());\n\n Intent i = new Intent(intent);\n ResolveInfo res = list.get(0);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n i.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n\n grantUriPermission(res.activityInfo.packageName, photoUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n i.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n startActivityForResult(i, CROP_FROM_CAMERA);\n }\n }", "private void onSaveClicked() {\n if (mCropView == null) {\n return;\n }\n\n if (mSaving) return;\n mSaving = true;\n\n Bitmap croppedImage;\n\n // If the output is required to a specific size, create an new image\n // with the cropped image in the center and the extra space filled.\n if (outputX != 0 && outputY != 0 && !scale) {\n // Don't scale the image but instead fill it so it's the\n // required dimension\n croppedImage = Bitmap.createBitmap(outputX, outputY, Bitmap.Config.RGB_565);\n Canvas canvas = new Canvas(croppedImage);\n\n Rect srcRect = mCropView.getCropRect();\n Rect dstRect = new Rect(0, 0, outputX, outputY);\n\n int dx = (srcRect.width() - dstRect.width()) / 2;\n int dy = (srcRect.height() - dstRect.height()) / 2;\n\n // If the srcRect is too big, use the center part of it.\n srcRect.inset(Math.max(0, dx), Math.max(0, dy));\n\n // If the dstRect is too big, use the center part of it.\n dstRect.inset(Math.max(0, -dx), Math.max(0, -dy));\n\n // Draw the cropped bitmap in the center\n canvas.drawBitmap(mBitmap, srcRect, dstRect, null);\n\n // Release bitmap memory as soon as possible\n mImageView.clear();\n mBitmap.recycle();\n } else {\n Rect r = mCropView.getCropRect();\n\n int width = r.width();\n int height = r.height();\n\n // If we are circle cropping, we want alpha channel, which is the\n // third param here.\n croppedImage = Bitmap.createBitmap(width, height,\n circleCrop ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565);\n\n Canvas canvas = new Canvas(croppedImage);\n\n if (circleCrop) {\n final int color = 0xffff0000;\n final Paint paint = new Paint();\n final Rect rect = new Rect(0, 0, croppedImage.getWidth(), croppedImage.getHeight());\n final RectF rectF = new RectF(rect);\n\n paint.setAntiAlias(true);\n paint.setDither(true);\n paint.setFilterBitmap(true);\n canvas.drawARGB(0, 0, 0, 0);\n paint.setColor(color);\n canvas.drawOval(rectF, paint);\n\n paint.setColor(Color.BLUE);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth((float) 4);\n paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));\n canvas.drawBitmap(mBitmap, r, rect, paint);\n }\n else {\n Rect dstRect = new Rect(0, 0, width, height);\n canvas.drawBitmap(mBitmap, r, dstRect, null);\n }\n\n // Release bitmap memory as soon as possible\n mImageView.clear();\n mBitmap.recycle();\n\n // If the required dimension is specified, scale the image.\n if (outputX != 0 && outputY != 0 && scale) {\n croppedImage = BitmapUtils.transform(new Matrix(), croppedImage,\n outputX, outputY, scaleUp, BitmapUtils.RECYCLE_INPUT);\n }\n }\n\n mImageView.setImageBitmapResetBase(croppedImage, true);\n mImageView.center(true, true);\n mImageView.getHighlightViews().clear();\n\n // save it to the specified URI.\n final Bitmap b = croppedImage;\n new AsyncTask<Void, Integer, IImage>() {\n ProgressDialog pd;\n\n @Override\n protected void onPreExecute() {\n pd = ProgressDialog.show(CropPhotoActivity.this, null,\n getResources().getString(R.string.saving_image));\n }\n\n @Override\n protected IImage doInBackground(Void[] params) {\n return saveOutput(b);\n }\n\n @Override\n protected void onPostExecute(IImage image) {\n pd.dismiss();\n mImageView.clear();\n b.recycle();\n\n if (image != null) {\n ArrayList<IImage> images = new ArrayList<>();\n images.add(image);\n\n Intent data = new Intent();\n data.putParcelableArrayListExtra(\"data\", images);\n setResult(Activity.RESULT_OK, data);\n finish();\n }\n }\n }.execute();\n }", "private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n\t\t/* Associate the Bitmap to the ImageView */\n mImageView.setImageBitmap(bitmap);\n mTextView.setText(mCurrentPhotoPath);\n\n // SendImage(mCurrentPhotoPath);\n\n // AsyncCallWS task = new AsyncCallWS();\n // Call execute\n // task.execute();\n }", "private void setPic() {\n int targetW = mainImageView.getWidth();\n int targetH = mainImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n// bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mainImageView.setImageBitmap(bitmap);\n\n// bmOptions.inBitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n// mainImageView.setImageBitmap(bmOptions.inBitmap);\n }", "private void onSaveClicked() {\n if (mCrop == null || mIsSaving) {\n return;\n }\n mIsSaving = true;\n Bitmap croppedImage = null;\n Rect r = mCrop.getCropRect();\n int width = r.width();\n int height = r.height();\n\n int outWidth = width, outHeight = height;\n if (mMaxX > 0 && mMaxY > 0 && (width > mMaxX || height > mMaxY)) {\n float ratio = (float) width / (float) height;\n if ((float) mMaxX / (float) mMaxY > ratio) {\n outHeight = mMaxY;\n outWidth = (int) ((float) mMaxY * ratio + .5f);\n } else {\n outWidth = mMaxX;\n outHeight = (int) ((float) mMaxX / ratio + .5f);\n }\n }\n if (IN_MEMORY_CROP && mRotateBitmap != null) {\n croppedImage = inMemoryCrop( mRotateBitmap, croppedImage, r,\n width * sampleSize,\n height * sampleSize,\n outWidth * sampleSize,\n outHeight * sampleSize );\n if (croppedImage != null) {\n mImageView.setImageBitmapResetBase( croppedImage, true );\n mImageView.center( true, true );\n mImageView.mHighlightViews.clear();\n }\n } else {\n try {\n croppedImage = decodeRegionCrop( croppedImage, r );\n } catch (IllegalArgumentException e) {\n setResultException( e );\n finish();\n return;\n }\n\n if (croppedImage != null) {\n mImageView.setImageRotateBitmapResetBase( new RotateBitmap( croppedImage, mExifRotation ), true );\n mImageView.center( true, true );\n mImageView.mHighlightViews.clear();\n }\n }\n if(croppedImage.getWidth() > mMaxX || croppedImage.getHeight() > mMaxY) {\n croppedImage = getResizedBitmap(croppedImage, mMaxX, mMaxY);\n }\n\n saveImage(croppedImage);\n }", "private void setPic() {\n int targetW = imageView.getWidth();\n int targetH = imageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageView.setImageBitmap(bitmap);\n imageView.invalidate();\n }", "public void setCropRect(Rect cropRect) {\n this.cropRect = cropRect;\n //invalidate();\n }", "private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n// Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE && resultCode == RESULT_OK) {\n Uri imageUri = CropImage.getPickImageResultUri(this, data);\n// startCropImageActivity(AsyncBlackBackgrImage.createBackground(context, imageUri));\n startCropImageActivity(imageUri);\n }\n\n if ((requestCode == GALLERY_INTENT || requestCode == CAMERA_INTENT) && resultCode == RESULT_OK) {\n Uri imageUri = CropImage.getPickImageResultUri(context, data);\n Log.d(getLocalClassName() + \"pick image\", imageUri.toString());\n\n// startCropImageActivity(AsyncBlackBackgrImage.createBackground(context, imageUri));\n startCropImageActivity(imageUri);\n }\n\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n ((ImageView) findViewById(R.id.imageview_myactivity)).setImageURI(result.getUri());\n\n Log.d(\"CropResultUri\", result.getUri().toString());\n\n MyBmpInfo bmpinfo = getThumbnail(result.getUri());\n Bitmap b = bmpinfo.result;\n if (bmpinfo.warnUser) {\n textInfoImage.setText(\"Warning: \" + bmpinfo.warning + \" ( \" + b.getWidth() + \" x \" + b.getHeight() + \" ) \");\n textInfoImage.setTextColor(Color.parseColor(\"#FFFF0000\"));\n } else textInfoImage.setText(\"\");\n\n Toast.makeText(this, \"Cropping successful\", Toast.LENGTH_LONG).show();\n\n b = watermark(b);\n // Save image as .jpg file in phone public \"Picture\" directory\n selectedImageFilePath = saveFile(b);\n selectedImageFilePath = new String[]{selectedImageFilePath[0], selectedImageFilePath[1], result.getUri().toString()};\n Toast.makeText(this, \"Saved successfully\", Toast.LENGTH_LONG).show();\n\n\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n Toast.makeText(this, \"Cropping failed: \" + result.getError(), Toast.LENGTH_LONG).show();\n }\n }\n }", "private void setPic() {\n int targetW = imageIV.getWidth();\n int targetH = imageIV.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageIV.setImageBitmap(bitmap);\n }", "private void setPic() {\n int targetW = imageView.getMaxWidth();\n int targetH = imageView.getMaxHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n bitmap = Bitmap.createScaledBitmap(bitmap, 1280, 960,false);\n Log.d(\"demo\", \"setPic: \"+ bitmap.getWidth()+\" \"+bitmap.getHeight());\n Log.d(\"demo\", \"setPic: \"+ bitmap.getByteCount()/1000);\n imageView.setImageBitmap(bitmap);\n }", "public void setImg(){\n if(PicSingleton.getInstance().getPicToShape() != null){\n\n mResultImg.setImageDrawable(PicSingleton.getInstance().getPicShaped());\n }\n }", "public void savePicture() {\n\t\tLog.d(TAG, \"savePicture\");\n\t\t\n\t\tFile cropFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath() + \"/Lente/crop.jpg\");\n\t\tmCropView.setDrawingCacheEnabled(true);\n\t\tBitmap bm = Bitmap.createBitmap(mCropView.getDrawingCache());\n\t\tmCropView.setDrawingCacheEnabled(false);\n\t\t\n\t\ttry {\n\t\t FileOutputStream outputStream = new FileOutputStream(cropFile);\n\t\t Log.d(TAG, \"Compressing and saving...\");\n\t\t bm.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n\t\t outputStream.flush();\n\t\t outputStream.close();\n\t\t \n\t\t MediaScannerConnection.scanFile(getBaseContext(),\n\t new String[] { cropFile.toString() }, null,\n\t new MediaScannerConnection.OnScanCompletedListener() {\n\t public void onScanCompleted(String path, Uri uri) {\n\t Log.i(\"ExternalStorage\", \"Scanned \" + path + \":\");\n\t Log.i(\"ExternalStorage\", \"-> uri=\" + uri);\n\t //passUri(uri); //Pass the URI once obtained and move onto OCRopus\n\t }\n\t\t\t});\n\t }\n\t\t\n\t\tcatch (IOException e) {\n\t\t\tToast.makeText(ImageTextSelect.this, \"Failed to save selected image area.\", 2000).show();\n\t\t\tLog.e(TAG, \"IO Exception\");\n\t\t}\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == 1 && resultCode == RESULT_OK && data != null && data.getData() != null) {\n\n //Getting the uri from gallery\n\n fileImageUri = data.getData();\n imageUri = fileImageUri;\n CropImage.activity(fileImageUri) //cropping the image\n\n .setGuidelines(CropImageView.Guidelines.ON)\n .setCropShape(CropImageView.CropShape.RECTANGLE)\n .setFixAspectRatio(true)\n .setAspectRatio(1,1)\n .start(this);\n\n\n\n }\n\n\n //After image will crop again taking the image uri\n\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n resultUri = result.getUri();\n\n uploadUserImageView.setImageURI(resultUri);\n\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n Exception error = result.getError();\n Toast.makeText(this, \"Error While Getting uri\", Toast.LENGTH_SHORT).show();\n }\n }\n\n }", "private void getSetCropImage(Uri fileUri) {\n CropImage.activity(fileUri)\n .setGuidelines(CropImageView.Guidelines.ON)\n .setMinCropWindowSize(100, 100)\n .setAspectRatio(1, 1)\n .setFixAspectRatio(true)\n .setCropShape(CropImageView.CropShape.RECTANGLE)\n .start((Activity) mContext);\n }", "public void changeAction()\r\n {\r\n bufferedImage = imageCopy[0];\r\n edited = imageCopy[1];\r\n cropedPart = imageCopy[2];\r\n bufferedImage = imageCopy[3];\r\n\r\n isBlured = statesCopy[0];\r\n isReadyToSave = statesCopy[1];\r\n isChanged = statesCopy[2];\r\n isInverted = statesCopy[3];\r\n isRectangularCrop = statesCopy[4];\r\n isCircularCrop = statesCopy[5];\r\n isImageLoaded = statesCopy[6];\r\n }", "private void setPic() {\n int targetW =200;\n int targetH = 300;\n\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n bitmap1 = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n Log.e(\"bitmap\", \"\" + bitmap1);\n mAdapter = new MyAdapter(Goonlineactivity2.this,TITLES,ICONS,NAME,EMAIL,PROFILE); // Creating the Adapter of MyAdapter class(which we are going to see in a bit)\n // And passing the titles,icons,header view name, header view email,\n // and header view profile picture\n\n mRecyclerView.setAdapter(mAdapter);\n //profile11.setImageBitmap(bitmap1);\n\n \t\t/* Associate the Bitmap to the ImageView */\n\n }", "@Method(selector = \"crop:imagePath:width:height:x:ycompletionBlock:\")\n\tpublic native void crop(String name, String imagePath, int width, int height, int x, int y, @Block App42ResponseBlock completionBlock);", "private void beginCrop(Uri source) {\n Uri destination = Uri.fromFile(new File(getCacheDir(), \"cropped\"));\n Crop.of(source, destination).asSquare().start(this);\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n mImageUri = data.getData();\r\n if (requestCode == GALLERY_REQUEST && resultCode == Activity.RESULT_OK) {\r\n mImageUri = data.getData();\r\n if (data.getData() == null) {\r\n Toast.makeText(this, \"Failed to load Image,try again\", Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n try {\r\n outputUri =new getFileName(context).getDataFilesThumbnailUriPath(String.valueOf(System.currentTimeMillis()),context);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n CropImage.activity(mImageUri)\r\n .setGuidelines(CropImageView\r\n .Guidelines.ON)\r\n .setAspectRatio(1, 1)\r\n .setBackgroundColor(getApplicationContext().getResources().getColor(R.color.background))\r\n .setActivityMenuIconColor(getApplicationContext().getResources().getColor(R.color.colorPrimary))\r\n .setOutputUri(outputUri)\r\n .start(this);\r\n }\r\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\r\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\r\n if (resultCode == RESULT_OK) {\r\n resultUri =Uri.fromFile(new File(new CompressingImage5kb(String.valueOf(System.currentTimeMillis()),context).compressImage(String.valueOf(result.getUri()),\"\",true)));\r\n mCircleImageView.setImageURI(resultUri);\r\n } else if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\r\n Exception error = result.getError();\r\n }\r\n }\r\n }", "private void beginCrop(Uri source) {\n // pass URI as intent to the CROP Activity;\n if (mPhotoFile != null) {\n Uri destination = FileProvider.getUriForFile(this,\n BuildConfig.APPLICATION_ID,\n mPhotoFile);\n Log.d(TAG, \"URI: \" + destination.toString());\n Crop.of(source, destination).asSquare().start(this);\n }\n }", "private void setPic() {\n int targetW =20;// mImageView.getWidth();\n int targetH =20;// mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;//设置仅加载位图边界信息(相当于位图的信息,但没有加载位图)\n\n //返回为NULL,即不会返回bitmap,但可以返回bitmap的横像素和纵像素还有图片类型\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }", "@Method(selector = \"crop:imageData:width:height:x:y:completionBlock:\")\n\tpublic native void crop(String name, NSData imageData, int width, int height, int x, int y, @Block App42ResponseBlock completionBlock);", "private void cropEffect(int x, int y, int width, int height) {\n // int que estigui dins la imatge\n EffectFactory factory = effectContext.getFactory();\n effect = factory.createEffect(EffectFactory.EFFECT_CROP);\n effect.setParameter(\"xorigin\", x);\n effect.setParameter(\"yorigin\", y);\n effect.setParameter(\"width\", width);\n effect.setParameter(\"height\", height);\n effect.apply(textures[0], photoWidth, photoHeight, textures[1]);\n }", "public native MagickImage chopImage(Rectangle chopInfo)\n\t\t\tthrows MagickException;", "public void getCroppedBitmap(final OnResultListener onResultListener) {\n setProgressBarVisibility(VISIBLE);\n AsyncTask.execute(new Runnable() {\n @Override\n public void run() {\n try {\n ContentResolver resolver = getContext().getContentResolver();\n InputStream inputStream = resolver.openInputStream(imageUri);\n Bitmap bitmap = BitmapFactory.decodeStream(inputStream);\n\n //rotate image\n Matrix matrix = new Matrix();\n matrix.postRotate(getOrientation() + getRotation());\n\n bitmap = Bitmap.createBitmap(bitmap, 0, 0,\n bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 90, outputStream);\n byte[] bitmapData = outputStream.toByteArray();\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bitmapData);\n\n BitmapRegionDecoder decoder = BitmapRegionDecoder.\n newInstance(byteArrayInputStream, false);\n\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inSampleSize = 1;\n options.inJustDecodeBounds = false;\n\n Bitmap croppedBitmap = decoder.decodeRegion(cropRect, options);\n decoder.recycle();\n\n final Result result = new Result(imageUri, croppedBitmap);\n CropImageView.this.post(new Runnable() {\n @Override\n public void run() {\n onResultListener.onResult(result);\n setProgressBarVisibility(GONE);\n }\n });\n } catch (Exception | OutOfMemoryError e) {\n e.printStackTrace();\n CropImageView.this.post(new Runnable() {\n @Override\n public void run() {\n onResultListener.onResult(new Result(getImageUri(), null));\n setProgressBarVisibility(GONE);\n }\n });\n }\n }\n });\n }", "private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n croppedURI = result.getUri();\n\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), croppedURI);\n\n Intent intent = new Intent(UploadHonjouActivity.this, ConfirmActivity.class);\n\n SharedPrefManager.getInstance(this).saveHonjou(getStringImage(bitmap));\n\n intent.putExtra(\"edit_flag\", false);\n\n startActivity(intent);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n\n }\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t \t\n\t \tclass ToSaveCropped{\n\t \t\t\n\t \t\tfloat x=finalx;\n\t \t\tfloat y=finaly;\n\n\t\t\t\t\tprivate byte[] data = MainActivity.getbitmapData();\n\t\t\t Bitmap mImage = BitmapFactory.decodeByteArray(data, 0, data.length);\n\t\t\t \n\t\t\t Drawable myMask = getResources().getDrawable(R.drawable.mask);\n\t\t\t Bitmap mMask = ((BitmapDrawable) myMask).getBitmap();\n\t\t\t Bitmap mmImage = dv.bitmapRotate(mImage);\n\t\t\t \n\t\t\t Bitmap mmmImage = dv.getResizedBitmap(mmImage,height,width);\n\t\t\t \n\t\t\t Bitmap mmMask = dv.getResizedBitmap(mMask,wMask,wMask);\n\t\t\t\t\t\n\t\t\t\t\tpublic void onDraw(){\n\t\t\t\t\t\tCanvas canvas; \t\t\t\n\t \t\t\tint w = mmMask.getWidth(), h = mmMask.getHeight();\n\t \t\t\tBitmap.Config conf = Bitmap.Config.ARGB_8888; // see other conf types\n\t \t\t\tcroppedBitmap = Bitmap.createBitmap(w, h, conf); // this creates a MUTABLE bitmap\n\t \t\t\tcanvas = new Canvas(croppedBitmap);\n\t \t\t\t\n\t \t\t\tPaint maskPaint = new Paint();\n\t \t\t\tmaskPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));\n\n\t Paint imagePaint = new Paint();\n\t imagePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OVER));\n\t \t\t\t//Log.i(\"\"+x,\"\"+y);\n\t \t//canvas.drawBitmap(mMask,x,y,maskPaint);\n\t \tcanvas.drawBitmap(mmmImage,-x,-y,imagePaint);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t \t}\t \t\n\t \tToSaveCropped tsc = new ToSaveCropped();\n\t \ttsc.onDraw();\n\t \tByteArrayOutputStream stream = new ByteArrayOutputStream();\n\t \tcroppedBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);\n\t \tbitData = stream.toByteArray();\n\t\t\t\t\n\t\t\t\tSaveFile sv = new SaveFile();\n\t\t\t\tsv.save();\n\t\t\t\t\n\t\t\t\tMediaStore.Images.Media.insertImage(getContentResolver(), croppedBitmap, \"\", \"\");\n\t\t\t\t\n\t\t\t}", "@Override\n public void dataLoaded(Bitmap bitmap) {\n ivCrop.setImageToCrop(bitmap);\n Bitmap bm = null;\n if (ivCrop.canRightCrop()) bm = ivCrop.crop();\n if (bm != null) ivShow.setImageBitmap(bm);\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tLog.e(\"on success\", \"on success\");\n\t\tBitmap s = null;\n\n\t\tif (resultCode == getActivity().RESULT_OK) {\n\t\t\t// user is returning from capturing an image using the camera\n\t\t\tif (requestCode == CAMERA_CAPTURE) {\n\t\t\t\tLog.e(\"camera\", \"camera\");\n\t\t\t\tpicUri = data.getData();\n\t\t\t\tBundle extras = data.getExtras();\n\t\t\t\t// get the cropped bitmap\n\t\t\t\tBitmap thePic = extras.getParcelable(\"data\");\n\t\t\t\tsavetoaFileLocation(thePic);\n\t\t\t\tthePic = getResizedBitmap(thePic, 200, 200);\n\t\t\t\tcameraBitmap = thePic;\n\t\t\t\t// ImageView picView = (ImageView)\n\t\t\t\t// findViewById(R.id.img_userimage);\n\t\t\t\t// display the returned cropped image\n\t\t\t\tprofileimageeditflag=\"true\";\n\t\t\t\tGraphicsUtil graphicUtil = new GraphicsUtil();\n\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\t\n\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(thePic, 16));\n\t\t\t\t//picview1.setImageBitmap(cameraBitmap);\n\t\t\t} else if (requestCode == GALLERY_CAPTURE) {\n\n\n\n\n\t\t\t\tUri selectedImage = data.getData();\n\n\t\t\t\tString stringUri;\n\t\t\t\tstringUri = selectedImage.toString();\n\t\t\t\tif ((stringUri != \"\") || stringUri != null) {\n\n\t\t\t\t\tString selectedImagePath = getPath(selectedImage);\ntry {\n\tExifInterface exifInterface = new ExifInterface(selectedImagePath);\n\torientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n\n}\ncatch (Exception e){}\n\n\n\n\t\t\t\t\tString[] filePathColumn = { MediaStore.Images.Media.DATA };\n\t\t\t\t\tCursor cursor = getActivity().getContentResolver().query(\n\t\t\t\t\t\t\tselectedImage, filePathColumn, null, null, null);\n\t\t\t\t\tcursor.moveToFirst();\n\t\t\t\t\tint columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t\t\t\t\tString selectedimage_path = cursor.getString(columnIndex);\n\t\t\t\t\tLog.e(\"selected path\",selectedimage_path);\n\t\t\t\t\tcursor.close();\n\t\t\t\t\tif (selectedimage_path.startsWith(\"https://\")) {\n\t\t\t\t\t\tgetBiymapFromGoogleLocation(selectedimage_path);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts = getBitmapFromFile(selectedimage_path);\n\t\t\t\t\t}\n\t\t\t\t\ts = getResizedBitmap(s, 200, 200);\n\t\t\t\t\tcameraBitmap = s;\n\n\t\t\t\t\tswitch(orientation) {\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_90:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 90);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_180:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 180);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_270:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 270);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tcorrectedBitMap=cameraBitmap;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t// ImageView picView = (ImageView)\n\t\t\t\t\t// findViewById(R.id.img_userimage);\n\t\t\t\t\t// display the returned cropped image\nprofileimageeditflag=\"true\";\n\t\t\t\t\tGraphicsUtil graphicUtil = new GraphicsUtil();\n\n\n\t/*\t\t\t\tif(correctedBitMap!= null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpicView.setImageBitmap(graphicUtil.getCircleBitmap(\n\t\t\t\t\t\t\t\tcorrectedBitMap, 16));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\t\t\tpicView.setImageBitmap(graphicUtil.getCircleBitmap(\n\t\t\t\t\t\t\t\tcameraBitmap, 16));\n\t\t\t\t\t}\n\n*/\n\n\t\t\t\t\tif (correctedBitMap != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(correctedBitMap, 16));\n\t\t\t\t\t\tsavetoaFileLocation(correctedBitMap);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(s, 16));\n\t\t\t\t\t\tsavetoaFileLocation(s);\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\n\t\t\t\t//\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(s, 16));\n\t\t\t\t//\tpicview1.setImageBitmap(cameraBitmap);\n\t\t\t\t//\tsavetoaFileLocation(s);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n\tpublic void setImageBitmap(Bitmap bm) {\n\t\tif (mImage==mOriginal) {\n\t\t\tmOriginal=null;\n\t\t} else {\n\t\t\tmOriginal.recycle();\n\t\t\tmOriginal=null;\n\t\t}\n\t\tif (mImage != null) {\n\t\t\tmImage.recycle();\n\t\t\tmImage=null;\n\t\t}\n\t\tmImage = bm;\n\t\tmOriginal = bm;\n\t\ttry{\n\t\tmImageHeight = mImage.getHeight();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tmImageHeight=0;\n\t\t}\n\t\tmImageWidth = mImage.getWidth();\n\t\tmAspect = (float)mImageWidth / mImageHeight;\n\t\tsetInitialImageBounds();\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\n if (resultCode != RESULT_OK) {\n return;\n }\n\n switch (requestCode) {\n // Camera Implementation\n case REQUEST_CODE_CAMERA_PERMISSION:\n isPhotoTakenFromCamera = true;\n Bitmap rotatedBitmap = imageOrientationValidator(mPhotoFile); // check orientation\n if (rotatedBitmap != null) {\n try {\n FileOutputStream fOut = new FileOutputStream(mPhotoFile);\n rotatedBitmap.compress(Bitmap.CompressFormat.JPEG, 100, fOut);\n fOut.flush();\n fOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n // Send image taken from camera for cropping\n mImageCaptureUri = FileProvider.getUriForFile(this,\n BuildConfig.APPLICATION_ID,\n mPhotoFile);\n beginCrop(mImageCaptureUri);\n }\n break;\n\n // Gallery implementation here\n case REQUEST_CODE_GALLERY:\n isPhotoTakenFromCamera = false;\n if (data != null){\n beginCrop(data.getData());\n }\n break;\n\n //Crop implementation\n case Crop.REQUEST_CROP:\n // Update image view after image crop\n handleCrop(resultCode, data);\n // Delete temporary image taken by camera after crop.\n if (isPhotoTakenFromCamera) {\n File f = new File(Objects.requireNonNull(mImageCaptureUri.getPath()));\n if (f.exists()) {\n f.delete();\n }\n }\n break;\n\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public BufferedImage crop(int row,int col){\n\t\treturn imageSheet.getSubimage((col*64)-64, (row*64)-64, 64, 64);\n\t}", "private void cropCurrRect() {\n\t\tRectangle cropRec = currRect.getBounds();\n\t\tBufferedImage img = currImage.getSubimage(cropRec.x, cropRec.y, cropRec.width, cropRec.height);\n\t\tAffineTransform rotAT = AffineTransform.getRotateInstance(-currRect.getTheta(), cropRec.width, cropRec.height);\n\n\t\tBufferedImageOp bio;\n\t\tbio = new AffineTransformOp(rotAT, AffineTransformOp.TYPE_BICUBIC);\n\t\tBufferedImage rotImg = bio.filter(img, null);\n\t\tColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);\n\t\tColorConvertOp op = new ColorConvertOp(cs, null);\n\t\trotImg = op.filter(rotImg, null);\n\t\t\n\t\tocrExtraction(rotImg);\n\t}", "public interface Listener {\n void onCropImage(Bitmap original, Bitmap croppedBitmap);\n }", "public BufferedImage crop(int row,int col,int width,int height){\n\t\treturn imageSheet.getSubimage((col*32)-32, (row*32)-32, width, height);\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n Uri imageUri = CropImage.getPickImageResultUri(this, data);\n startCropImageActivity(imageUri);\n }\n\n // handle result of CropImageActivity\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n mCroppedImageUri = result.getUri();\n mImageView.setImageURI(mCroppedImageUri);\n }\n }\n }", "public void restore() {\n setOrientation(0);\n setCropRect(getMaxCenteredCropRect(), false);\n autoZoom(true);\n }", "private void setImage() {\n BitmapFactory.Options options = new BitmapFactory.Options();\n Bitmap originalBm = BitmapFactory.decodeFile(tempFile.getAbsolutePath(), options);\n // Log.d(TAG, \"setImage : \" + tempFile.getAbsolutePath());\n\n myImage.setImageBitmap(originalBm);\n\n /**\n * tempFile 사용 후 null 처리를 해줘야 합니다.\n * (resultCode != RESULT_OK) 일 때 tempFile 을 삭제하기 때문에\n * 기존에 데이터가 남아 있게 되면 원치 않은 삭제가 이뤄집니다.\n */\n System.out.println(\"setImage : \" + tempFile.getAbsolutePath());\n fileSource = tempFile.getAbsolutePath();\n myImageSource = fileSource;\n check++;\n tempFile = null;\n\n }", "void setCrouching(boolean crouching);", "@Override\n @SuppressLint(\"NewApi\")\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n Uri imageUri = CropImage.getPickImageResultUri(this, data);\n\n // For API >= 23 we need to check specifically that we have permissions to read external storage.\n if (CropImage.isReadExternalStoragePermissionsRequired(this, imageUri)) {\n // request permissions and handle the result in onRequestPermissionsResult()\n mCropImageUri = imageUri;\n requestPermissions(new String[]{android.Manifest.permission.READ_EXTERNAL_STORAGE}, CropImage.PICK_IMAGE_PERMISSIONS_REQUEST_CODE);\n } else {\n // no permissions required or already grunted, can start crop image activity\n startCropImageActivity(imageUri);\n }\n } else if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n mCropImageUri = result.getUri();\n InputStream imageStream = null;\n try {\n imageStream = getContentResolver().openInputStream(mCropImageUri);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n mCropImage = BitmapFactory.decodeStream(imageStream);\n imgRestaurant.setImageBitmap(mCropImage);\n\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n Exception error = result.getError();\n Toast.makeText(NewRestaurantActivity.this, error.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n }", "public void setPreviewBitmapWithCenterCrop(String previewPath)\n {\n if (previewPath != null) {\n // Set the preview image via Glide Library\n Glide.with(ITFImageView.this)\n .load(new File(previewPath)) // Uri of the picture\n .apply(new RequestOptions().transforms(new CropTransformation(300, 200, CropTransformation.CropType.CENTER)))\n .into(ITFImageView.this);\n }\n }", "BufferedImage cropDisplayedImage(double sliderValue,\n BufferedImage myBufferedImageStocked, ImageView myImage) {\n this.cropper.setCoef(sliderValue);\n this.cropper.setDirection(this.getDirection());\n BufferedImage myBufferedImage = this.cropper\n .process(myBufferedImageStocked);\n myImage.setImage(SwingFXUtils.toFXImage(myBufferedImage, null));\n return myBufferedImage;\n\n }", "public static void performCrop(Activity activity, Uri picUri) {\n try {\n // call the standard crop action intent (the user device may not\n // support it)\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\n // indicate image type and Uri\n cropIntent.setDataAndType(picUri, \"image/*\");\n // set crop properties\n cropIntent.putExtra(\"crop\", \"true\");\n // indicate aspect of desired crop\n cropIntent.putExtra(\"aspectX\", 2);\n cropIntent.putExtra(\"aspectY\", 1);\n // indicate output X and Y\n cropIntent.putExtra(\"outputX\", 256);\n cropIntent.putExtra(\"outputY\", 256);\n // retrieve data on return\n cropIntent.putExtra(\"return-data\", true);\n // start the activity - we handle returning in onActivityResult\n activity.startActivityForResult(cropIntent, CROP_IMAGE);\n }\n // respond to users whose devices do not support the crop action\n catch (ActivityNotFoundException anfe) {\n Toast toast = Toast\n .makeText(activity, \"This device doesn't support the crop action!\", Toast.LENGTH_SHORT);\n toast.show();\n }\n\n }", "@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t\tif (requestCode == CAMERA_REQUEST_CODE) {\r\n\t\t\tif (data == null) {\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tBundle extras = data.getExtras();\r\n\t\t\t\tif (extras != null) {\r\n\t\t\t\t\tBitmap bm = extras.getParcelable(\"data\");\r\n\t\t\t\t\tUri uri = saveBitmap(bm);\r\n\t\t\t\t\tstartImageZoom(uri);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (requestCode == GALLERY_REQUEST_CODE) {\r\n\t\t\tif (data == null) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tUri uri;\r\n\t\t\turi = data.getData();\r\n\t\t\tUri fileUri = convertUri(uri);\r\n\t\t\tstartImageZoom(fileUri);\r\n\t\t} else if (requestCode == CROP_REQUEST_CODE) {\r\n\t\t\tif (data == null) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tBundle extras = data.getExtras();\r\n\t\t\tif (extras == null) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tbm = extras.getParcelable(\"data\");\r\n\t\t\tiv_user_img.setImageBitmap(bm);\r\n\t\t\t// sendImage(bm);\r\n\t\t}\r\n\t}", "public static BufferedImage autoCrop(BufferedImage source, float threshold) {\n\n int rgb;\n int backlo;\n int backhi;\n int width = source.getWidth();\n int height = source.getHeight();\n int startx = width;\n int starty = height;\n int destx = 0;\n int desty = 0;\n\n rgb = source.getRGB(source.getWidth() - 1, source.getHeight() - 1);\n backlo = ((rgb >> 16) & 255) + ((rgb >> 8) & 255) + ((rgb) & 255) / 3;\n backlo = (int) (backlo - (backlo * threshold));\n if (backlo < 0) {\n backlo = 0;\n }\n backhi = ((rgb >> 16) & 255) + ((rgb >> 8) & 255) + ((rgb) & 255) / 3;\n backhi = (int) (backhi + (backhi * threshold));\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n rgb = source.getRGB(x, y);\n int sum = ((rgb >> 16) & 255) + ((rgb >> 8) & 255) + ((rgb) & 255) / 3;\n if (sum < backlo || sum > backhi) {\n if (y < starty) {\n starty = y;\n }\n if (x < startx) {\n startx = x;\n }\n if (y > desty) {\n desty = y;\n }\n if (x > destx) {\n destx = x;\n }\n }\n }\n }\n System.out.println(\"crop: [\"\n + startx + \", \" + starty + \", \"\n + destx + \", \" + desty + \"]\");\n\n BufferedImage result = new BufferedImage(\n destx - startx, desty - starty,\n source.getType());\n result.getGraphics().drawImage(\n Toolkit.getDefaultToolkit().createImage(\n new FilteredImageSource(source.getSource(),\n new CropImageFilter(startx, starty, destx, desty))),\n 0, 0, null);\n return result;\n }", "public void loadImagefromGallery(View view) {\n Intent intent = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n intent.putExtra(\"crop\", \"true\");\n intent.putExtra(\"aspectX\", 50);\n intent.putExtra(\"aspectY\", 50);\n intent.putExtra(\"outputX\", 100);\n intent.putExtra(\"outputY\", 100);\n\n try {\n // Start the Intent\n startActivityForResult(intent, PICK_FROM_GALLERY);\n } catch (ActivityNotFoundException ae) {\n\n } catch (Exception e) {\n\n }\n }", "private void setPicture(BufferedImage image) {\r\n if (image != null) {\r\n int newHeight;\r\n int newWidth;\r\n if (image.getWidth() > image.getHeight()) {\r\n newWidth = jScrollPane1.getWidth();\r\n newHeight = image.getHeight() * newWidth / image.getWidth();\r\n\r\n if (newHeight > jScrollPane1.getHeight()) {\r\n int tmpWidth = newWidth;\r\n int tmpHeight = newHeight;\r\n newHeight = jScrollPane1.getHeight();\r\n newWidth = tmpWidth * newHeight / tmpHeight;\r\n }\r\n } else {\r\n newHeight = jScrollPane1.getHeight();\r\n newWidth = image.getWidth() * newHeight / image.getHeight();\r\n\r\n if (newWidth > jScrollPane1.getWidth()) {\r\n int tmpWidth = newWidth;\r\n int tmpHeight = newHeight;\r\n newWidth = jScrollPane1.getWidth();\r\n newHeight = tmpHeight * newWidth / tmpWidth;\r\n }\r\n }\r\n Image scaled = image.getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);\r\n photoScrollPane.setIcon(new ImageIcon(scaled));\r\n } else {\r\n photoScrollPane.setIcon(null);\r\n }\r\n }", "public @NotNull Image crop(int x, int y, int width, int height)\n {\n if (this.data != null)\n {\n validateRect(x, y, width, height);\n \n Color.Buffer output = Color.malloc(this.format, width * height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(width) * this.format.sizeof;\n for (int j = 0; j < height; j++)\n {\n long src = srcPtr + Integer.toUnsignedLong((j + y) * this.width + x) * this.format.sizeof;\n long dst = dstPtr + Integer.toUnsignedLong(j * width) * this.format.sizeof;\n MemoryUtil.memCopy(src, dst, bytesPerLine);\n }\n \n this.data.free();\n \n this.data = output;\n this.width = width;\n this.height = height;\n this.mipmaps = 1;\n }\n return this;\n }", "public static Bitmap cropImageVer2(Bitmap img, Bitmap templateImage, int width, int height) {\n // Merge two images together.\n int x=5,y=5;\n Bitmap bm = Bitmap.createBitmap(img.getWidth(), img.getHeight(), Bitmap.Config.ARGB_8888);\n Canvas combineImg = new Canvas(bm);\n combineImg.drawBitmap(img, 0f, 0f, null);\n combineImg.drawBitmap(templateImage, 0f, 0f, null);\n \n // Create new blank ARGB bitmap.\n Bitmap finalBm = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n \n // Get the coordinates for the middle of bm.\n int hMid = bm.getHeight() / 2;\n int wMid = bm.getWidth() / 2;\n int hfMid = finalBm.getHeight() / 2;\n int wfMid = finalBm.getWidth() / 2;\n\n int y2 = hfMid;\n int x2 = wfMid;\n\n for ( y = hMid; y >= 0; y--) {\n // Check Upper-left section of combineImg.\n for ( x = wMid; x >= 0; x--) {\n if (x2 < 0) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n // Get out of loop once it hits the left side of the template.\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2--;\n }\n \n // Check upper-right section of combineImage.\n x2 = wfMid;\n for (x = wMid; x < bm.getWidth(); x++) {\n if (x2 >= finalBm.getWidth()) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n // Get out of loop once it hits the right side of the template.\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2++;\n }\n \n // Get out of loop once it hits top most part of the template.\n int px = bm.getPixel(wMid, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } \n x2 = wfMid;\n y2--;\n }\n\n x2 = wfMid;\n y2 = hfMid;\n for (y = hMid; y <= bm.getHeight(); y++) {\n // Check bottom-left section of combineImage.\n for ( x = wMid; x >= 0; x--) {\n if (x2 < 0) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n // Get out of loop once it hits the left side of the template.\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2--;\n }\n\n // Check bottom-right section of combineImage.\n x2 = wfMid;\n for (x = wMid; x < bm.getWidth(); x++) {\n if (x2 >= finalBm.getWidth()) {\n break;\n }\n \n int px = bm.getPixel(x, y);\n // Get out of loop once it hits the right side of the template.\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2++;\n }\n \n // Get out of loop once it hits bottom most part of the template.\n int px = bm.getPixel(wMid, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } \n x2 = wfMid;\n y2++;\n }\n \n // Get rid of images that we finished with to save memory.\n img.recycle();\n templateImage.recycle();\n bm.recycle();\n return finalBm;\n }", "private void setupInitialImagePosition(float drawableWidth, float drawableHeight) {\n float cropRectWidth = mCropRect.width();\n float cropRectHeight = mCropRect.height();\n\n float widthScale = mCropRect.width() / drawableWidth;\n float heightScale = mCropRect.height() / drawableHeight;\n\n float initialMinScale = Math.max(widthScale, heightScale);\n\n float tw = (cropRectWidth - drawableWidth * initialMinScale) / 2.0f + mCropRect.left;\n float th = (cropRectHeight - drawableHeight * initialMinScale) / 2.0f + mCropRect.top;\n\n mCurrentImageMatrix.reset();\n mCurrentImageMatrix.postScale(initialMinScale, initialMinScale);\n mCurrentImageMatrix.postTranslate(tw, th);\n setImageMatrix(mCurrentImageMatrix);\n }", "public boolean isRectangularCrop() {\r\n return isRectangularCrop;\r\n }", "private javaxt.io.Image _transform_simple(javaxt.io.Image src_img, \n double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n double[] src_quad = new double[]{0, 0, src_img.getWidth(), src_img.getHeight()};\n SRS.transf to_src_px =SRS.make_lin_transf(src_bbox, src_quad);\n\n //minx, miny = to_src_px((dst_bbox[0], dst_bbox[3]));\n double[] min = to_src_px.transf(dst_bbox[0], dst_bbox[3]);\n double minx = min[0];\n double miny = min[1];\n\n //maxx, maxy = to_src_px((dst_bbox[2], dst_bbox[1]));\n double[] max = to_src_px.transf(dst_bbox[2], dst_bbox[1]);\n double maxx = max[0];\n double maxy = max[1];\n\n double src_res = (src_bbox[0]-src_bbox[2])/src_img.getWidth();\n double dst_res = (dst_bbox[0]-dst_bbox[2])/dst_size[0];\n\n double tenth_px_res = Math.abs(dst_res/(dst_size[0]*10));\n javaxt.io.Image img = new javaxt.io.Image(src_img.getBufferedImage());\n if (Math.abs(src_res-dst_res) < tenth_px_res){\n img.crop(cint(minx), cint(miny), dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(minx)+dst_size[0], cint(miny)+dst_size[1]);\n return img; //src_img;\n }\n else{\n img.crop(cint(minx), cint(miny), cint(maxx)-cint(minx), cint(maxy)-cint(miny));\n img.resize(dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(maxx), cint(maxy));\n //src_img.resize(dst_size[0], dst_size[1]);\n return img; //src_img;\n }\n //ImageSource(result, size=dst_size, transparent=src_img.transparent)\n }", "static private Fits common_crop(ImageHDU h, Header old_header,\n int xCenter, int yCenter, int xSize, int ySize)\n throws FitsException, IOException {\n if (SUTDebug.isDebug()) {\n System.out.println(\"entering common_crop: xCenter = \" + xCenter +\n \" yCenter = \" + yCenter + \" xSize = \" + xSize + \" ySize = \" + ySize);\n }\n\n\n\t /* first, do the header */\n Header newHeader = getNewHeader(h,old_header, xCenter, yCenter, xSize, ySize);\n int newNaxis1 = newHeader.getIntValue(\"NAXIS1\");\n int newNaxis2 = newHeader.getIntValue(\"NAXIS2\");\n\n\t /* now do the pixels */\n int[] tileOffset;\n int[] tileSize;\n int naxis3 = 0;\n ImageTiler tiler = h.getTiler();\n int naxis = old_header.getIntValue(\"NAXIS\");\n int minX = xCenter - xSize / 2;\n int maxX = xCenter + xSize / 2;\n int minY = yCenter - ySize / 2;\n int maxY = yCenter + ySize / 2;\n\n if (naxis == 2) {\n tileOffset = new int[]{minY, minX};\n tileSize = new int[]{maxY - minY, maxX - minX};\n\n } else if (naxis == 3) {\n naxis3 = newHeader.getIntValue(\"NAXIS3\");\n tileOffset = new int[]{0, minY, minX};\n tileSize = new int[]{naxis3, maxY - minY, maxX - minX};\n } else {\n throw new FitsException(\n \"Cannot crop images with NAXIS other than 2 or 3\");\n }\n\n int dims2[] = new int[]{newNaxis1, newNaxis2};\n int dims3[] = new int[]{newNaxis1, newNaxis2, naxis3};\n\n ImageData neImageData = null;\n //convert the data to float\n float[] objm32 = (float[]) ArrayFuncs.convertArray(tiler.getTile(tileOffset, tileSize), Float.TYPE, true);\n if (naxis == 2) {\n // make 2dim\n float[][] float2d = (float[][]) ArrayFuncs.curl(objm32, dims2);\n //convert back to original type\n neImageData = new ImageData(ArrayFuncs.convertArray(float2d, FitsRead.getDataType(newHeader.getIntValue(\"BITPIX\")), true) );\n } else {\n\n // make 3dim\n float[][][] float3d = (float[][][]) ArrayFuncs.curl(objm32, dims3);\n neImageData = new ImageData(ArrayFuncs.convertArray(float3d, FitsRead.getDataType(newHeader.getIntValue(\"BITPIX\")), true) );\n }\n\n ImageHDU newImageHDU = new ImageHDU(newHeader, neImageData);\n Fits outFits = new Fits();\n outFits.addHDU(newImageHDU);\n return (outFits);\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (resultCode != RESULT_OK) {\n\t\t\tLog.d(\"CS65\", \"Camera error: result not ok.\");\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (requestCode) {\n\t\tcase REQUEST_CODE_CHOOSE_FROM_GALLERY:\n\t\t\t// Allow user to choose image from internal gallery.\n\t\t\tLog.d(\"CS65\", \"entered choose from gallery request\");\n\t\t\tmImageCaptureUri = data.getData();\n\t\t\tcropImage();\n\t\t\tbreak;\n\n\t\tcase REQUEST_CODE_TAKE_FROM_CAMERA:\n\t\t\t// Allow user to take a photo from the camera.\n\t\t\t// Send image taken from camera for cropping\n\t\t\tcropImage();\n\t\t\tbreak;\n\n\t\tcase REQUEST_CODE_CROP_PHOTO:\n\t\t\t// Update image view after image crop.\n\t\t\tBundle extras = data.getExtras();\n\t\t\t// Set the picture image in UI\n\t\t\tif (extras != null) {\n\t\t\t\t// Convert bitmap to a byte array and load.\n\t\t\t\tBitmap photo = (Bitmap) extras.getParcelable(\"data\");\n\t\t\t\tbitToByte(photo);\n\t\t\t\tloadImage();\n\t\t\t}\n\n\t\t\t// Delete temporary image taken by camera after crop.\n\t\t\tif (isTakenFromCamera) {\n\t\t\t\tFile f = new File(mImageCaptureUri.getPath());\n\t\t\t\tif (f.exists())\n\t\t\t\t\tf.delete();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void setIndividualWallpaper(final WallpaperInfo wallpaper, Asset asset,\n @Nullable Rect cropRect, float scale, @Destination final int destination,\n final SetWallpaperCallback callback) {\n if (cropRect == null && asset instanceof StreamableAsset) {\n ((StreamableAsset) asset).fetchInputStream(new StreamReceiver() {\n @Override\n public void onInputStreamOpened(@Nullable InputStream inputStream) {\n if (inputStream == null) {\n callback.onError(null /* throwable */);\n return;\n }\n setIndividualWallpaper(wallpaper, inputStream, destination, callback);\n }\n });\n return;\n }\n\n // If no crop rect is specified but the wallpaper asset is not streamable, then fall back to\n // using the device's display size.\n if (cropRect == null) {\n Display display = ((WindowManager) mAppContext.getSystemService(Context.WINDOW_SERVICE))\n .getDefaultDisplay();\n Point screenSize = ScreenSizeCalculator.getInstance().getScreenSize(display);\n asset.decodeBitmap(screenSize.x, screenSize.y, new BitmapReceiver() {\n @Override\n public void onBitmapDecoded(@Nullable Bitmap bitmap) {\n if (bitmap == null) {\n callback.onError(null /* throwable */);\n return;\n }\n setIndividualWallpaper(wallpaper, bitmap, destination, callback);\n }\n });\n return;\n }\n\n BitmapCropper bitmapCropper = InjectorProvider.getInjector().getBitmapCropper();\n bitmapCropper.cropAndScaleBitmap(asset, scale, cropRect, new Callback() {\n @Override\n public void onBitmapCropped(Bitmap croppedBitmap) {\n setIndividualWallpaper(wallpaper, croppedBitmap, destination, callback);\n }\n\n @Override\n public void onError(@Nullable Throwable e) {\n callback.onError(e);\n }\n });\n }", "private void previewCapturedImage() {\n try {\n imageProfile.setVisibility(View.VISIBLE);\n Log.d(\"preview\", currentPhotoPath);\n final Bitmap bitmap = CameraUtils.scaleDownAndRotatePic(currentPhotoPath);\n imageProfile.setImageBitmap(bitmap);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }", "@Override public Bitmap transform(Bitmap source) {\n int width = source.getWidth(); //Width of source\n int height = source.getHeight(); //Height of source\n\n Bitmap result = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n\n Drawable mask = getMaskDrawable(mContext, mMaskId); //Init mask from resources\n\n //Using mask\n Canvas canvas = new Canvas(result);\n mask.setBounds(0, 0, width, height);\n mask.draw(canvas);\n canvas.drawBitmap(source, 0, 0, mMaskingPaint);\n\n source.recycle();\n\n //Return bitmap of cropped image\n return result;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n\n //this checks the checked imaged,so there should be no null image...\n if(requestCode== GalleryPic && resultCode == RESULT_OK && data != null) {\n Uri ImageUri = data.getData(); //here we getting the image.....in ImageUri\n\n //When the user Select the image he will be redirected to the Image Cropping Activity...\n CropImage.activity(ImageUri)\n .setAspectRatio(1,1)\n .setCropShape(CropImageView.CropShape.OVAL)\n .start(this);\n }\n //THIS CHECKS WHETHER WE SELECT THE CROP OPTION...\n if(requestCode==CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE)\n {\n //HERE WE GETTING CROPPED IMAGE...\n CropImage.ActivityResult result= CropImage.getActivityResult(data);\n\n if(resultCode == RESULT_OK) //IF CROPPING SUCCESSFULL...\n {\n loadingBar.setTitle(\"Saving Information\");\n loadingBar.setMessage(\"Please wait until we update your Profile Image\");\n loadingBar.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n loadingBar.show();\n loadingBar.setCanceledOnTouchOutside(true);\n\n //THIS OBJECTS CONTAINS THE CROPPED IMAGE....\n Uri resultUri =result.getUri();\n\n //WE STORING THE STORAGE REFERENCE AS A USERID.JPG.....\n StorageReference filePath = UserProfileImageRef.child(CurrentUserId + \".jpg\");\n\n //HERE STORING THE FILE IN filePath OBJECT..\n filePath.putFile(resultUri).addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {\n if(task.isSuccessful())\n {\n Toast.makeText(SetupActivity.this,\"Profile Image Stored to Database Successfully\",Toast.LENGTH_SHORT).show();\n\n //FINALLY STORING THE IMAGE IN DATABASE IN FIREBASE STORAGE...\n final String downloadUrl = task.getResult().getDownloadUrl().toString();\n UsersRef.child(\"profileImage\").setValue(downloadUrl).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful())\n {\n //REDIRECTING TO SETUP ACTIVITY FROM CROPPING ACTIVITY....\n Intent selfIntent = new Intent(SetupActivity.this,SetupActivity.class);\n startActivity(selfIntent);\n Toast.makeText(SetupActivity.this, \"Profile Image is Stored Successfully\", Toast.LENGTH_SHORT).show();\n loadingBar.dismiss();\n }\n else{\n String message =task.getException().getMessage();\n Toast.makeText(SetupActivity.this, \"Error Occurred :\" +message, Toast.LENGTH_SHORT).show();\n loadingBar.dismiss();\n }\n }\n });\n }\n }\n });\n\n }\n\n else{\n //IF THE IMAGE IS UNABLE TO CROP...\n Toast.makeText(SetupActivity.this, \"Error Occurred : Image can't be Cropped,Try Again.\" , Toast.LENGTH_SHORT).show();\n loadingBar.dismiss();\n }\n\n }\n //else if(requestCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE)\n }", "public BufferedImage crop(int x, int y, int width, int height){\n return sheet.getSubimage(x, y, width, height);\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (resultCode == RESULT_OK) {\n\n\t\t\tif (requestCode == Constants.REQUEST_CODE_PROFILE_IMAGE_CAMERA) {\n\n\t\t\t\tUri imageUri = Utilities.createImage();\n\t\t\t\tUtilities.startCropImage(ProfileActivity.this,\n\t\t\t\t\t\tConstants.REQUEST_CODE_PROFILE_IMAGE_CROP, imageUri);\n imageUriUpload = imageUri;\n\t\t\t} else if (requestCode == Constants.REQUEST_CODE_PROFILE_IMAGE_GALLERY) {\n\n\t\t\t\tUri imageUri = data.getData();\n\t\t\t\tUtilities.startCropImage(ProfileActivity.this,\n\t\t\t\t\t\tConstants.REQUEST_CODE_PROFILE_IMAGE_CROP, imageUri);\n imageUriUpload = imageUri;\n\t\t\t} else if (requestCode == Constants.REQUEST_CODE_PROFILE_IMAGE_CROP) {\n\n\t\t\t\tBundle extras = data.getExtras();\n\t\t\t\tBitmap imgBmp = extras.getParcelable(\"data\");\n\t\t\t\tmProfileImg.setImageBitmap(imgBmp);\n\t\t\t\tmProfileImg.setTag(imgBmp);\n\t\t\t\tisImageChanged = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "protected void setPic() {\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n // choose a image\n if (requestCode == RequestCode.CHOOSE_IMAGE) {\n if (resultCode == RESULT_OK) {\n if (data != null) {\n Uri dataUri = data.getData();\n if (dataUri != null) {\n // get a random name\n File imgFile = SpaceUtils.newUsableFile();\n mSelectPath = imgFile.getPath();\n Log.v(\"path\",mSelectPath);\n // the image intent just return a simple image\n // the Ucrop(裁剪) is solved after the image intent\n UCrop.Options options = new UCrop.Options();\n options.setCompressionQuality(100);\n UCrop.of(dataUri, Uri.fromFile(imgFile))\n .withOptions(options)\n .withMaxResultSize(mImageSize.x, mImageSize.y)\n .withAspectRatio(3, 4)\n .start(this, RequestCode.CROP_IMAGE);\n }\n }\n }\n } else if (requestCode == RequestCode.CROP_IMAGE) {\n // crop a image\n if (resultCode == RESULT_OK) {\n if (data != null) {\n Glide.with(this).load(mSelectPath).into(mImageViews.get(mCurrentIndex));\n startDetectFaceInfo();\n }\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK)\n {\n //------------Received image from camera in device serial number------------------------\n if (requestCode == CAMERA_DEVICE_SERIAL_NUMBER)\n {\n Uri picUri = pictureUri;\n startCropImageActivity(picUri, CROP_CAMERA_SERIAL_NUMBER);\n Toast.makeText(UserAreaActivity.this, \"Serial Number Image Saved!\", Toast.LENGTH_SHORT).show();\n }\n\n //---------------Cropped image from camera in device serial number----------------------\n if (requestCode == CROP_CAMERA_SERIAL_NUMBER)\n {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n Croppedimage(result, ivDeviceSerialNumber, etDeviceSerialNumber);\n }\n\n //------------Received image from gallery in device serial number-----------------------\n if (requestCode == GALLERY_DEVICE_SERIAL_NUMBER)\n {\n startCropImageActivity(data.getData(), CROP_GALLERY_SERIAL_NUMBER);\n Toast.makeText(UserAreaActivity.this, \"Image from gallery\", Toast.LENGTH_SHORT).show();\n }\n\n //--------------Cropped image from gallery in device serial number----------------------\n if(requestCode == CROP_GALLERY_SERIAL_NUMBER)\n {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n Croppedimage(result, ivDeviceSerialNumber, etDeviceSerialNumber);\n }\n\n }\n\n }", "private void changecoverimage() {\n\n Category c = categoryFactory.getCategory(category);\n int drawableId = getResources().getIdentifier(\"cover_\"+c.getCategory_name().toLowerCase().replace(\" \",\"\"), \"drawable\", getPackageName());\n if(drawableId == 0){\n drawableId = getResources().getIdentifier(\"cover_default\", \"drawable\", getPackageName());\n }\n Glide.with(this).load(drawableId).into((ImageView) findViewById(R.id.backdrop));\n\n\n }", "public void doScaling() {\n try {\n int orientation = getExifOrientation(file);\n System.out.println(file.getName());\n //Dimension d = Imaging.getImageSize(file);\n ImageInputStream imageInputStream = ImageIO.createImageInputStream(file);\n // Use a subsampled image from the original, avoids read images too large to fit in memory\n BufferedImage bufferedImage = subsampleImage(imageInputStream, TARGET_WIDTH * 2, TARGET_HEIGHT * 2);\n ImageInformation ii=new ImageInformation(orientation, bufferedImage.getWidth(), bufferedImage.getHeight());\n AffineTransform transform=getExifTransformation(ii);\n bufferedImage=transformImage(bufferedImage, transform); \n Scalr.Mode mode;\n // calculate which side will be largest/smaller\n // this works with any image size\n double scaleX=(TARGET_WIDTH*1.0)/(bufferedImage.getWidth()*1.0);\n double scaleY=(TARGET_HEIGHT*1.0)/(bufferedImage.getHeight()*1.0);\n if (scaleX<scaleY) {\n mode = Scalr.Mode.FIT_TO_WIDTH;\n } else {\n mode = Scalr.Mode.FIT_TO_HEIGHT;\n } \n \n BufferedImage thumbnail = Scalr.resize(bufferedImage,\n Scalr.Method.QUALITY,\n mode, TARGET_WIDTH, TARGET_HEIGHT,\n Scalr.OP_ANTIALIAS);\n BufferedImage combined = new BufferedImage(TARGET_WIDTH, TARGET_HEIGHT, BufferedImage.TYPE_INT_ARGB);\n int x = 0, y = 0;\n if (mode == Scalr.Mode.FIT_TO_HEIGHT) {\n x = (TARGET_WIDTH - thumbnail.getWidth()) / 2;\n }\n if (mode == Scalr.Mode.FIT_TO_WIDTH) {\n y = (TARGET_HEIGHT - thumbnail.getHeight()) / 2;\n }\n Graphics g = combined.getGraphics();\n g.setColor(new java.awt.Color(0.0f, 0.0f, 0.0f, 0.0f));\n g.fillRect(0, 0, combined.getWidth(), combined.getHeight());\n g.drawImage(thumbnail, x, y, null);\n g.dispose();\n //Writes test subsampled image taken from original\n if (saveSubSampled) {\n ImageIO.write(bufferedImage, OUTPUT_EXTENSION, new File(output));\n }\n //Writes thumbnail, created from the subsampled image.\n ImageIO.write(combined, OUTPUT_EXTENSION, new File(output_thumb));\n\n } catch (IOException ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void resizePhoto() {\n if (photoPath.length() == 0) {\n return;\n }\n Log.d(LOG_TAG, \"Path dell' immagine: \" + photoPath);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(photoPath, options);\n\n options = new BitmapFactory.Options();\n\n options.inJustDecodeBounds = true;\n photoBM = BitmapFactory.decodeFile(photoPath, options);\n Log.d(LOG_TAG, \"Width:\" + bitmapWidth + \" height:\" + bitmapHeight);\n\n options.inSampleSize = calculateInSampleSize(options, bitmapWidth, bitmapHeight);\n\n options.inJustDecodeBounds = false;\n //halfHorizontal = bitmapWidth / 2;\n photoBM = BitmapFactory.decodeFile(photoPath, options);\n\n }", "public void setState(CropState state) {\n setData(state.getData());\n }", "@SuppressWarnings(\"unused\")\n\tprivate void cloneImage() {\n//\t\tColorModel cm = offimg.getColorModel();\n//\t\t boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();\n//\t\t WritableRaster raster = offimg.copyData(null);\n//\t\t offimg2 = new BufferedImage(cm, raster, isAlphaPremultiplied, null);\n//\t\t BufferedImage currentImage = new BufferedImage(width,height,BufferedImage.TYPE_3BYTE_BGR);\n\n\t//Fastest method to clone the image (DOES NOT WORK for MACOS)\n//\t\t int[] frame = ((DataBufferInt)offimg.getRaster().getDataBuffer()).getData();\n//\t\t int[] imgData = ((DataBufferInt)offimg2.getRaster().getDataBuffer()).getData();\n//\t\t System.arraycopy(frame,0,imgData,0,frame.length);\n\t}", "private void setPhotoAttcher() {\n\n }", "@Override\n @SuppressLint(\"NewApi\")\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n Uri imageUri = CropImage.getPickImageResultUri(this, data);\n\n // For API >= 23 we need to check specifically that we have permissions to read external storage.\n if (CropImage.isReadExternalStoragePermissionsRequired(this, imageUri)) {\n // request permissions and handle the result in onRequestPermissionsResult()\n cropImageUri = imageUri;\n Log.d(TAG, \"onActivityResult PICK_IMAGE_CHOOSER_REQUEST_CODE:\" + cropImageUri);\n requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, CropImage.PICK_IMAGE_PERMISSIONS_REQUEST_CODE);\n } else {\n // no permissions required or already grunted, can start crop image activity\n Log.d(TAG, \"onActivityResult PICK_IMAGE_CHOOSER_REQUEST_CODE no permission:\" + imageUri);\n startCropImageActivity(imageUri);\n\n }\n } else if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n Uri resultUri = result.getUri();\n Log.d(TAG, \"CROP_IMAGE_ACTIVITY_REQUEST_CODE ok:\" + resultUri);\n cropImageUri = resultUri;\n if (optionFragment == null) {\n vpSubArea.setAdapter(new TabsAdapter(getSupportFragmentManager()));\n }\n optionFragment.setVoteImage(resultUri);\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n Exception error = result.getError();\n }\n }\n }", "void setImage(Bitmap bitmap);", "private void setImage(Bitmap image) {\n }", "private void setProfileImage() {\n if(mCurrentUser!= null && mCurrentUser.getProfileImageUrl() != null) {\n //Glide.with(getContext()).load(mCurrentUser.getProfileImageUrl())\n // .placeholder(R.drawable.ic_photo)\n // .error(R.drawable.ic_camera)\n // .fitCenter()\n // .into(mIvComposeUserProfilePicture);\n\n Picasso.with(getContext()).load(mCurrentUser.getProfileImageUrl())\n .transform(new RoundedCornersTransformation(2,2))\n .placeholder(R.drawable.ic_photo)\n .error(R.drawable.ic_camera)\n .into(mIvComposeUserProfilePicture);\n }\n }", "private void updateImage() {\r\n\r\n final BufferedImage image = imageCanvas.getImage();\r\n\r\n //\r\n // no image, no size\r\n\r\n if (image == null) {\r\n imageCanvas.setPreferredSize(new Dimension(0, 0));\r\n }\r\n\r\n else {\r\n\r\n final int imageWidth = image.getWidth();\r\n final int imageHeight = image.getHeight();\r\n\r\n //\r\n // if zoom is set to real size there is no need for calculations\r\n\r\n if (zoom == ZOOM_REAL_SIZE) {\r\n imageCanvas.setPreferredSize(new Dimension(imageWidth, imageWidth));\r\n }\r\n\r\n //\r\n // apply the zoom ratio to the image size\r\n\r\n else {\r\n\r\n final double ratio = ((double) zoom) / ((double) ZOOM_REAL_SIZE);\r\n\r\n final double imageCanvasMaxWidth = ((double) imageWidth) * ratio;\r\n final double imageCanvasMaxHeight = ((double) imageHeight) * ratio;\r\n\r\n imageCanvas.setPreferredSize(new Dimension((int) imageCanvasMaxWidth, (int) imageCanvasMaxHeight));\r\n }\r\n }\r\n\r\n //\r\n // revalidation\r\n // do not use #revaliade() method, validation will occur after all currently\r\n // pending events have been dispatched, use invalidate/validate/repaint\r\n\r\n imageCanvas. invalidate();\r\n imageCanvas.validate();\r\n imageCanvas.repaint();\r\n \r\n// imageCanvas.revalidate();\r\n \r\n invalidate();\r\n validate();\r\n repaint();\r\n\r\n// revalidate();\r\n \r\n //\r\n // this is the best place to update the cursor\r\n // since all actions on the image will call this method\r\n\r\n updateCursor(false);\r\n }", "private void previewCapturedImage(){\n \ttry{\n \t\timgPreview.setVisibility(View.VISIBLE);\n \t\t\n \t\t//Bitmap Factory\n \t\tBitmapFactory.Options options = new BitmapFactory.Options();\n \t\t\n \t\t//Downsizing image as it throws OutOfMemory Exception for large images\n \t\toptions.inSampleSize = 4;\n \t\t\n \t\tfinal Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(), options);\n \t\t\n \t\timgPreview.setImageBitmap(bitmap);\n \t}catch(NullPointerException e){\n \t\te.printStackTrace();\n \t}catch(OutOfMemoryError e){\n \t\te.printStackTrace();\n \t}\n }", "private Rect checkRectBounds(Rect cropRect, boolean resize) {\n Rect image = getImageRect();\n Rect newCropRect = cropRect;\n //check if inside image\n int width = newCropRect.width();\n int height = newCropRect.height();\n\n if (!image.contains(newCropRect)) {\n if (aspectRatio >= 0.0) {\n if (resize) {\n // new cropRect to big => try and fix size\n // check corners\n if (touchedCorner == TOP_LEFT) {\n if (image.left > newCropRect.left) {\n int delta = (int) ((image.left - newCropRect.left) / aspectRatio);\n newCropRect = new Rect(image.left, newCropRect.top + delta,\n newCropRect.right, newCropRect.bottom);\n }\n if (image.top > newCropRect.top) {\n int delta = (int) ((image.top - newCropRect.top) * aspectRatio);\n newCropRect = new Rect(newCropRect.left + delta, image.top,\n newCropRect.right, newCropRect.bottom);\n }\n } else if (touchedCorner == TOP_RIGHT) {\n if (image.right < newCropRect.right) {\n int delta = (int) ((newCropRect.right - image.right) / aspectRatio);\n newCropRect = new Rect(newCropRect.left, newCropRect.top + delta,\n image.right, newCropRect.bottom);\n }\n if (image.top > newCropRect.top) {\n int delta = (int) ((image.top - newCropRect.top) * aspectRatio);\n newCropRect = new Rect(newCropRect.left, image.top,\n newCropRect.right - delta, newCropRect.bottom);\n }\n } else if (touchedCorner == BOTTOM_RIGHT) {\n if (image.right < newCropRect.right) {\n int delta = (int) ((newCropRect.right - image.right) / aspectRatio);\n newCropRect = new Rect(newCropRect.left, newCropRect.top,\n image.right, newCropRect.bottom - delta);\n }\n if (image.bottom < newCropRect.bottom) {\n int delta = (int) ((newCropRect.bottom - image.bottom) * aspectRatio);\n newCropRect = new Rect(newCropRect.left, newCropRect.top,\n newCropRect.right - delta, image.bottom);\n }\n } else if (touchedCorner == BOTTOM_LEFT) {\n if (image.left > newCropRect.left) {\n int delta = (int) ((image.left - newCropRect.left) / aspectRatio);\n newCropRect = new Rect(image.left, newCropRect.top,\n newCropRect.right, newCropRect.bottom - delta);\n }\n if (image.bottom < newCropRect.bottom) {\n int delta = (int) ((newCropRect.bottom - image.bottom) * aspectRatio);\n newCropRect = new Rect(newCropRect.left + delta, newCropRect.top,\n newCropRect.right, image.bottom);\n }\n }\n } else {\n // check edges\n // left edges\n if (image.left > newCropRect.left) {\n newCropRect = new Rect(image.left, newCropRect.top,\n image.left + width, newCropRect.bottom);\n }\n // top edge\n if (image.top > newCropRect.top) {\n newCropRect = new Rect(newCropRect.left, image.top,\n newCropRect.right, image.top + height);\n }\n // right edge\n if (image.right < newCropRect.right) {\n newCropRect = new Rect(image.right - width, newCropRect.top,\n image.right, newCropRect.bottom);\n }\n // bottom edge\n if (image.bottom < newCropRect.bottom) {\n newCropRect = new Rect(newCropRect.left, image.bottom - height,\n newCropRect.right, image.bottom);\n }\n }\n } else {\n // cropRect not inside => try to fix it\n if (image.left > newCropRect.left) {\n newCropRect = new Rect(image.left, newCropRect.top,\n resize ? newCropRect.right : image.left + width,\n newCropRect.bottom);\n }\n\n if (image.top > newCropRect.top) {\n newCropRect = new Rect(newCropRect.left, image.top, newCropRect.right,\n resize ? newCropRect.bottom : image.top + height);\n }\n\n if (image.right < newCropRect.right) {\n newCropRect = new Rect(resize ? newCropRect.left : image.right - width,\n newCropRect.top, image.right, newCropRect.bottom);\n }\n\n if (image.bottom < newCropRect.bottom) {\n newCropRect = new Rect(newCropRect.left,\n resize ? newCropRect.top : image.bottom - height,\n newCropRect.right, image.bottom);\n }\n }\n }\n\n Rect minRect = getMinCropRect();\n //check min size\n width = newCropRect.width();\n if (width < minRect.width()) {\n if (touchedCorner == TOP_LEFT) {\n newCropRect = new Rect(newCropRect.right - minRect.width(),\n newCropRect.top, newCropRect.right, newCropRect.bottom);\n } else if (touchedCorner == TOP_RIGHT) {\n newCropRect = new Rect(newCropRect.left, newCropRect.top,\n newCropRect.left + minRect.width(),\n newCropRect.bottom);\n } else if (touchedCorner == BOTTOM_RIGHT) {\n newCropRect = new Rect(newCropRect.left, newCropRect.top,\n newCropRect.left + minRect.width(),\n newCropRect.bottom);\n } else if (touchedCorner == BOTTOM_LEFT) {\n newCropRect = new Rect(newCropRect.right - minRect.width(),\n newCropRect.top, newCropRect.right, newCropRect.bottom);\n }\n }\n\n height = newCropRect.height();\n if (height < minRect.height()) {\n if (touchedCorner == TOP_LEFT) {\n newCropRect = new Rect(newCropRect.left,\n newCropRect.bottom - minRect.height(),\n newCropRect.right, newCropRect.bottom);\n } else if (touchedCorner == TOP_RIGHT) {\n newCropRect = new Rect(newCropRect.left,\n newCropRect.bottom - minRect.height(),\n newCropRect.right, newCropRect.bottom);\n } else if (touchedCorner == BOTTOM_RIGHT) {\n newCropRect = new Rect(newCropRect.left, newCropRect.top,\n newCropRect.right,\n newCropRect.top + minRect.height());\n } else if (touchedCorner == BOTTOM_LEFT) {\n newCropRect = new Rect(newCropRect.left,\n newCropRect.top, newCropRect.right,\n newCropRect.top + minRect.height());\n }\n }\n\n return newCropRect;\n }", "private void saveAvatar(Intent picData) {\n if(cropFilePath != null) {\n File cropFile = new File(cropFilePath);\n if(cropFile.exists()) {\n HjtApp.getInstance().getAppService().uploadAvatar(cropFilePath);\n } else {\n onAvatarUploadEvent(new AvatarUploadEvent(false, \"Crop file not exist\"));\n }\n } else {\n onAvatarUploadEvent(new AvatarUploadEvent(false, \"no Extras back from scale image\"));\n }\n }", "public static Bitmap cropImage(Bitmap img, Bitmap templateImage, int width, int height) {\n // Merge two images together.\n \t int x=5;\n\t\tint y=5;\n Bitmap bm = Bitmap.createBitmap(img.getWidth(), img.getHeight(), Bitmap.Config.ARGB_8888);\n Canvas combineImg = new Canvas(bm);\n combineImg.drawBitmap(img, 0f, 0f, null);\n combineImg.drawBitmap(templateImage, 0f, 0f, null);\n \n // Create new blank ARGB bitmap.\n Bitmap finalBm = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n \n // Get the coordinates for the middle of combineImg.\n int hMid = bm.getHeight() / 2;\n int wMid = bm.getWidth() / 2;\n int hfMid = finalBm.getHeight() / 2;\n int wfMid = finalBm.getWidth() / 2;\n\n int y2 = hfMid;\n int x2 = wfMid;\n\n for ( y = hMid; y >= 0; y--) {\n boolean template = false;\n // Check Upper-left section of combineImg.\n for ( x = wMid; x >= 0; x--) {\n if (x2 < 0) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n template = true;\n finalBm.setPixel(x2, y2, Color.TRANSPARENT);\n } else if (template) {\n finalBm.setPixel(x2, y2, Color.TRANSPARENT);\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2--;\n }\n // Check upper-right section of combineImage.\n x2 = wfMid;\n template = false;\n for ( x = wMid; x < bm.getWidth(); x++) {\n if (x2 >= finalBm.getWidth()) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n template = true;\n finalBm.setPixel(x2, y2, Color.TRANSPARENT);\n } else if (template) {\n finalBm.setPixel(x2, y2, Color.TRANSPARENT);\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2++;\n }\n\n // Once we reach the top-most part on the template line, set pixel value transparent\n // from that point on.\n int px = bm.getPixel(wMid, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n for (int y3 = y2; y3 >= 0; y3--) {\n for (int x3 = 0; x3 < finalBm.getWidth(); x3++) {\n finalBm.setPixel(x3, y3, Color.TRANSPARENT);\n }\n }\n break;\n }\n\n x2 = wfMid;\n y2--;\n }\n\n x2 = wfMid;\n y2 = hfMid;\n for (y = hMid; y <= bm.getHeight(); y++) {\n boolean template = false;\n // Check bottom-left section of combineImage.\n for (x = wMid; x >= 0; x--) {\n if (x2 < 0) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n template = true;\n finalBm.setPixel(x2, y2, Color.TRANSPARENT);\n } else if (template) {\n finalBm.setPixel(x2, y2, Color.TRANSPARENT);\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2--;\n }\n\n // Check bottom-right section of combineImage.\n x2 = wfMid;\n template = false;\n for (x = wMid; x < bm.getWidth(); x++) {\n if (x2 >= finalBm.getWidth()) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n template = true;\n finalBm.setPixel(x2, y2, Color.TRANSPARENT);\n } else if (template) {\n finalBm.setPixel(x2, y2, Color.TRANSPARENT);\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2++;\n }\n\n // Once we reach the bottom-most part on the template line, set pixel value transparent\n // from that point on.\n int px = bm.getPixel(wMid, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n for (int y3 = y2; y3 < finalBm.getHeight(); y3++) {\n for (int x3 = 0; x3 < finalBm.getWidth(); x3++) {\n finalBm.setPixel(x3, y3, Color.TRANSPARENT);\n }\n }\n break;\n }\n\n x2 = wfMid;\n y2++;\n }\n \n // Get rid of images that we finished with to save memory.\n img.recycle();\n templateImage.recycle();\n bm.recycle();\n return finalBm;\n }", "@Override\r\n\tpublic void setImageBitmap(Bitmap source) {\n//\r\n//\t\tMatrix matrix = new Matrix();\r\n//\t\tmatrix.postScale(ratio, ratio);\r\n//\t\tsource = Bitmap.createBitmap(source, 0, 0, width, height, matrix, true);\r\n//\r\n//\t\twidth = source.getWidth();\r\n//\t\theight = source.getHeight();\r\n//\r\n//\t\tx = (width - ConfigSize.SIZE_THUMB) / 2;\r\n//\t\ty = (height - ConfigSize.SIZE_THUMB) / 2;\r\n//\r\n//\t\tsource = Bitmap.createBitmap(source, x, y, ConfigSize.SIZE_THUMB,\r\n//\t\t\t\tConfigSize.SIZE_THUMB);\r\n\r\n\t\tsuper.setImageBitmap(source);\r\n\t}", "private void setProfilePic() {\n ParseFile image = (ParseFile) user.get(User.KEY_PROFILE_PIC);\n\n if (image != null)\n Glide.with(getContext()).load(image.getUrl()).circleCrop().into(mProfilePicImageView);\n else\n Glide.with(getContext()).load(R.drawable.no_profile_pic)\n .circleCrop().into(mProfilePicImageView);\n }", "public static BufferedImage cropImage(BufferedImage image, int topX,\r\n\t\t\tint topY, int width, int height) {\r\n\t\t// create cropping rectangle\r\n\t\tBufferedImage dest = image.getSubimage(topX, topY, width, height);\r\n\t\t// return cropped image\r\n\t\treturn dest;\r\n\t}" ]
[ "0.77436864", "0.73960006", "0.72638065", "0.72053003", "0.7177328", "0.69454193", "0.6859116", "0.6769853", "0.6678344", "0.6675411", "0.6666623", "0.66623986", "0.6652028", "0.66408855", "0.6607674", "0.65730417", "0.6558339", "0.6542494", "0.6540304", "0.6514923", "0.65122694", "0.6488413", "0.64327645", "0.64031535", "0.6380156", "0.63758236", "0.6335698", "0.63272035", "0.6322186", "0.6316397", "0.63057125", "0.6299568", "0.6276555", "0.62445384", "0.62001383", "0.61989325", "0.619431", "0.61542773", "0.6145995", "0.6133379", "0.61260194", "0.61210585", "0.6077612", "0.6043009", "0.6030373", "0.6012354", "0.6010786", "0.59869367", "0.5975189", "0.5949201", "0.59466094", "0.5946024", "0.59267616", "0.58858204", "0.5879826", "0.5879738", "0.58720237", "0.58563524", "0.5855181", "0.5834126", "0.5800331", "0.5799806", "0.5789339", "0.5787888", "0.57722765", "0.5768787", "0.5761286", "0.57465047", "0.574562", "0.57407606", "0.57404566", "0.5737365", "0.5728857", "0.57174915", "0.5715775", "0.5705838", "0.5705401", "0.5703976", "0.5686724", "0.56780136", "0.5666511", "0.5662039", "0.565552", "0.5641578", "0.5636846", "0.5601331", "0.5599871", "0.5599355", "0.5594957", "0.55892915", "0.55854416", "0.5581883", "0.5575982", "0.557467", "0.5570702", "0.55656105", "0.5562184", "0.55603915", "0.5554901", "0.5550743" ]
0.62947166
32
TODO Autogenerated method stub
public static void main(String[] args) { String number="48982"; String number1=""; for(int i=number.length()-1;i>=0;i--) { number1=number1+number.charAt(i); } if(number.equalsIgnoreCase(number1)) { System.out.println("yes"); } else System.out.println("No"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static MenuFragment newInstance(String param1, String param2) { MenuFragment fragment = new MenuFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n }", "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "public CuartoFragment() {\n }", "public StintFragment() {\n }", "public ExploreFragment() {\n\n }", "public RickAndMortyFragment() {\n }", "public FragmentMy() {\n }", "public LogFragment() {\n }", "public FeedFragment() {\n }", "public HistoryFragment() {\n }", "public HistoryFragment() {\n }", "public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }", "public WkfFragment() {\n }", "public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment(){}", "public WelcomeFragment() {}", "public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }", "public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public progFragment() {\n }", "public HeaderFragment() {}", "public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }", "public EmployeeFragment() {\n }", "public Fragment_Tutorial() {}", "public NewShopFragment() {\n }", "public FavoriteFragment() {\n }", "public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }", "public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }", "public CreateEventFragment() {\n // Required empty public constructor\n }", "public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}", "public NoteActivityFragment() {\n }", "public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }", "public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public EventHistoryFragment() {\n\t}", "public HomeFragment() {}", "public PeopleFragment() {\n // Required empty public constructor\n }", "public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public VantaggiFragment() {\n // Required empty public constructor\n }", "public AddressDetailFragment() {\n }", "public ArticleDetailFragment() { }", "public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }", "public RegisterFragment() {\n }", "public EmailFragment() {\n }", "public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }", "public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }", "public ForecastFragment() {\n }", "public FExDetailFragment() {\n \t}", "public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }", "public TripNoteFragment() {\n }", "public ItemFragment() {\n }", "public NoteListFragment() {\n }", "public CreatePatientFragment() {\n\n }", "public DisplayFragment() {\n\n }", "public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment() {\n\n }", "public BackEndFragment() {\n }", "public CustomerFragment() {\n }", "public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public static Fragment newInstance() {\n return new SettingsFragment();\n }", "public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }", "public PeersFragment() {\n }", "public TagsFragment() {\n }", "public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }", "public HomeSectionFragment() {\n\t}", "public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }", "public PersonDetailFragment() {\r\n }", "public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }", "public RegisterFragment() {\n // Required empty public constructor\n }", "public VehicleFragment() {\r\n }", "public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}", "public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}", "public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }", "public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }", "public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public PlaylistFragment() {\n }", "public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }", "public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }" ]
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.6646188", "0.66410166", "0.6640725", "0.6634425", "0.66188246", "0.66140765", "0.6608169", "0.66045964", "0.65977716", "0.6592119", "0.659137", "0.65910816", "0.65830594", "0.65786606", "0.6562876", "0.65607685", "0.6557126", "0.65513307", "0.65510213", "0.65431285", "0.6540448", "0.65336084", "0.6532555", "0.6528302", "0.6524409", "0.652328", "0.6523149", "0.6516528", "0.65049976", "0.6497274", "0.6497235", "0.64949715", "0.64944136", "0.6484968", "0.6484214", "0.64805835", "0.64784926", "0.64755154", "0.64710265", "0.6466466", "0.6457089", "0.645606", "0.6454554", "0.6452161", "0.64520335", "0.6450325", "0.64488834", "0.6446765", "0.64430225", "0.64430225", "0.64430225", "0.64420956", "0.6441306", "0.64411277", "0.6438451", "0.64345145", "0.64289486", "0.64287597", "0.6423755", "0.64193285", "0.6418699", "0.6414679", "0.6412867", "0.6402168", "0.6400724", "0.6395624", "0.6395109", "0.6391252", "0.63891554", "0.63835025", "0.63788056", "0.63751805", "0.63751805", "0.63751805", "0.6374796", "0.63653135", "0.6364529", "0.6360922", "0.63538784", "0.6351111", "0.635067" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment_menu, container, false); loadingProgress = view.findViewById(R.id.loading_progress); recycler_menu = view.findViewById(R.id.recycler_menu); recycler_menu.setHasFixedSize(true); layoutManager = new GridLayoutManager(getContext(),2); recycler_menu.setLayoutManager(layoutManager); recycler_recommendation = view.findViewById(R.id.recycler_recommendation); recycler_recommendation.setHasFixedSize(true); recomLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false); recycler_recommendation.setLayoutManager(recomLayoutManager); menuRef.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { getAllMenus(dataSnapshot); } @Override public void onCancelled(DatabaseError databaseError) { } }); adsBanner.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { getBannerSlider(view, dataSnapshot); } @Override public void onCancelled(DatabaseError databaseError) { } }); recomRef.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { getAllRecommendation(dataSnapshot); } @Override public void onCancelled(DatabaseError databaseError) { } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6740785", "0.6725086", "0.6722221", "0.66993004", "0.66919166", "0.6689273", "0.6687578", "0.6685118", "0.66772324", "0.66754", "0.66668403", "0.6666252", "0.6665723", "0.66613716", "0.6654354", "0.6651048", "0.6643431", "0.66391444", "0.6638131", "0.6634899", "0.6625316", "0.66205376", "0.66181904", "0.66089374", "0.6597826", "0.65932095", "0.6586007", "0.6585328", "0.6574693", "0.6572763", "0.65700436", "0.65698993", "0.6569793", "0.65681505", "0.6565488", "0.6554118", "0.6553708", "0.65449727", "0.6544898", "0.65417415", "0.65386266", "0.65375817", "0.65369165", "0.65354055", "0.6533704", "0.6533607", "0.65312874", "0.6529298", "0.652816", "0.65259904", "0.6525467", "0.6525304", "0.65243685", "0.65241206", "0.6518711", "0.65140015", "0.6513598", "0.65132636", "0.65130734", "0.65115976", "0.6510978", "0.6510839", "0.6510069", "0.65095323", "0.6508685", "0.6503938", "0.6502202", "0.65021586", "0.65021336", "0.6498748", "0.6494393", "0.6492889", "0.6491053", "0.64884686", "0.6487787", "0.6487678", "0.64876366", "0.64873576", "0.64873457", "0.64852375", "0.6484978", "0.6483313", "0.64824414", "0.64821523", "0.6481227", "0.64809513", "0.6478158", "0.6476682", "0.6476581", "0.64752257", "0.64747113", "0.6471779", "0.6471697", "0.647106", "0.6470168", "0.6467907", "0.6467049", "0.6462844", "0.64627945", "0.6462318", "0.6462241" ]
0.0
-1
TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}", "public abstract void update(UIReader event);", "@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}", "@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}", "@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}", "@Override\n\tpublic void update(Event e) {\n\t}", "public abstract void onInvoked(CommandSender sender, String[] args);", "@Override\r\n public void updateUI() {\r\n }", "@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}", "@Override\n\tpublic void inputChanged( Viewer arg0, Object arg1, Object arg2 ) {\n\t}", "@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}", "public void updateUI(){}", "private synchronized void updateScreen(String arg){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n setChanged();\n notifyObservers(arg);\n }\n });\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "Event () {\n // Nothing to do here.\n }", "void onArgumentsChanged();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "void eventChanged();", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override public void handle(ActionEvent e)\n\t {\n\t }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }", "@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n }", "public abstract void onCommand(MessageEvent context) throws Exception;", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "private void addParameterEventHandler(){\n\t\t\n\t\tgetParameterNameListBox().addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tparameterAceEditor.clearAnnotations();\n\t\t\t\tparameterAceEditor.removeAllMarkers();\n\t\t\t\tparameterAceEditor.redisplay();\n\t\t\t\tSystem.out.println(\"In addParameterEventHandler on DoubleClick isPageDirty = \" + getIsPageDirty() + \" selectedIndex = \" + getParameterNameListBox().getSelectedIndex());\n\t\t\t\tsetIsDoubleClick(true);\n\t\t\t\tsetIsNavBarClick(false);\n\t\t\t\tif (getIsPageDirty()) {\n\t\t\t\t\tshowUnsavedChangesWarning();\n\t\t\t\t} else {\n\t\t\t\t\tint selectedIndex = getParameterNameListBox().getSelectedIndex();\n\t\t\t\t\tif (selectedIndex != -1) {\n\t\t\t\t\t\tfinal String selectedParamID = getParameterNameListBox().getValue(selectedIndex);\n\t\t\t\t\t\tcurrentSelectedParamerterObjId = selectedParamID;\n\t\t\t\t\t\tif(getParameterMap().get(selectedParamID) != null){\n\t\t\t\t\t\t\tgetParameterNameTxtArea().setText(getParameterMap().get(selectedParamID).getParameterName());\n\t\t\t\t\t\t\tgetParameterAceEditor().setText(getParameterMap().get(selectedParamID).getParameterLogic());\n\t\t\t\t\t\t\tSystem.out.println(\"In Parameter DoubleClickHandler, doing setText()\");\n\t\t\t\t\t\t\t//disable parameterName and Logic fields for Default Parameter\n\t\t\t\t\t\t\tboolean isReadOnly = getParameterMap().get(selectedParamID).isReadOnly();\n\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setTitle(\"Delete\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(MatContext.get().getMeasureLockService()\n\t\t\t\t\t\t\t\t\t.checkForEditPermission()){\n\t\t\t\t\t\t\t\tsetParameterWidgetReadOnly(!isReadOnly);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// load most recent used cql artifacts\n\t\t\t\t\t\t\tMatContext.get().getMeasureService().getUsedCQLArtifacts(MatContext.get().getCurrentMeasureId(), new AsyncCallback<GetUsedCQLArtifactsResult>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\t\tWindow.alert(MatContext.get().getMessageDelegate().getGenericErrorMessage());\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onSuccess(GetUsedCQLArtifactsResult result) {\n\t\t\t\t\t\t\t\t\tif(result.getUsedCQLParameters().contains(getParameterMap().get(selectedParamID).getParameterName())) {\n\t\t\t\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setEnabled(false);\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tsuccessMessageAlert.clearAlert();\n\t\t\t\t\terrorMessageAlert.clearAlert();\n\t\t\t\t\twarningMessageAlert.clearAlert();\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void handle(Event event) {\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void actionPerformed(AnActionEvent e) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}", "public void ImageView(ActionEvent event) {\n\t}", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "public void runInUi(ElexisEvent ev){}", "@Override\n public void delta() {\n \n }", "@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent ev) {\n }", "@Override\n public void actionPerformed(ActionEvent e)\n {\n \n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\n public void update(Observable o, Object arg)\n {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t}", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }" ]
[ "0.6619185", "0.65246344", "0.6473144", "0.6473144", "0.64351684", "0.6325494", "0.62368196", "0.6189416", "0.6158721", "0.61455715", "0.6123594", "0.6107332", "0.6101038", "0.6092755", "0.6049496", "0.6049496", "0.60442764", "0.604003", "0.604003", "0.6007846", "0.59999037", "0.59848183", "0.59776366", "0.59587413", "0.5940049", "0.5925668", "0.5925668", "0.59208333", "0.5915737", "0.5915737", "0.5915737", "0.5915737", "0.5915737", "0.5915554", "0.5909643", "0.5895144", "0.58947057", "0.589277", "0.58885247", "0.58885247", "0.58885247", "0.58671176", "0.58671176", "0.58671176", "0.58636886", "0.5862447", "0.5862447", "0.58613557", "0.5855828", "0.5846504", "0.5846504", "0.5846504", "0.5846504", "0.5837475", "0.58366984", "0.5820788", "0.58068436", "0.58022934", "0.5772422", "0.57714665", "0.5770862", "0.5765655", "0.5763872", "0.57544947", "0.57542855", "0.57542855", "0.57450074", "0.57441026", "0.57441026", "0.57441026", "0.5741053", "0.574037", "0.5739314", "0.57367086", "0.57367086", "0.57367086", "0.57322264", "0.57322264", "0.57322264", "0.57322264", "0.57322264", "0.57322264", "0.57322264", "0.57235956", "0.57232994", "0.5721006", "0.571978", "0.571978", "0.57187414", "0.57177836", "0.57133436", "0.57110935", "0.57110935", "0.57110935", "0.57110935", "0.57110935", "0.57110935", "0.5707859", "0.5707546", "0.5704973", "0.57016516" ]
0.0
-1
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}", "public interface IFragmentView {\n public Activity getActivity();\n public void onItemClick(int position);\n}", "public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }", "void onFragmentInteraction();", "void onFragmentInteraction();", "void onFragmentInteraction();", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }", "public interface OnFragmentInteractionListener {\n void onReceiverAcceptRequest(int nextState, String requestId);\n }", "public interface FragMainLife\n{\n\tpublic void onResumeFragMainLife();\n}", "public interface OnFragmentListener {\n\n void onAction(Intent intent);\n}", "public interface IBaseFragmentActivity {\n void onFragmentExit(BaseFragment fragment);\n\n void onFragmentStartLoading(BaseFragment fragment);\n\n void onFragmentFinishLoad(BaseFragment fragment);\n}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String string);\n }", "void onFragmentInteraction(Object ref);", "public interface OnParametersFragmentInteractionListener {\n public void startTask();\n }", "public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }", "public interface FragmentInterface {\r\n void fragmentBecameVisible();\r\n}", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }", "public interface OnFragmentInteractionListener {\n void newList();\n\n void searchList();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void pasarALista();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }", "public interface MainGameActivityCallBacks {\n public void onMsgFromFragmentToMainGame(String sender, String strValue);\n}", "public interface IFragment {\n void onFragmentRefresh();\n\n void onMenuClick();\n}", "public interface FragmentInterface {\n\n void onCreate();\n\n void initLayout();\n\n void updateLayout();\n\n void sendInitialRequest();\n}", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(String accessToken, String network);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }", "public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }", "public interface OnFragmentInteractionListener {\n\t\tvoid restUp(IGameState gameState);\n\t\tvoid restartGame();\n\t}", "public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface PersonalFragmentView extends BaseMvpView {\n\n}", "public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "void onFragmentInteraction(View v);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList<Recepie> recepieList);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }", "void onFragmentInteractionMain();", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void showRestaurantDetail(Map<String, Object> objectMap);\n\n public void showAddRestaurantFragment(String location);\n }", "public interface FragmentNavigator {\n\n void SwitchFragment(Fragment fragment);\n}", "public interface FragmentModellnt {\n void FragmentM(OnFinishListener onFinishListener,String dataId);\n}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }", "void onFragmentInteraction(String id);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList naleznosci, String KLUCZ);\n }", "public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onEditFragmentInteraction(Student student);\r\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(String id);\n}", "public interface IBaseFragment extends IBaseView {\n /**\n * 出栈到目标fragment\n * @param targetFragmentClass 目标fragment\n * @param includeTargetFragment 是否包涵目标fragment\n * true 目标fragment也出栈\n * false 出栈到目标fragment,目标fragment不出栈\n */\n void popToFragment(Class<?> targetFragmentClass, boolean includeTargetFragment);\n\n /**\n * 跳转到新的fragment\n * @param supportFragment 新的fragment继承SupportFragment\n */\n void startNewFragment(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并出栈当前fragment\n * @param supportFragment\n */\n void startNewFragmentWithPop(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并返回结果\n * @param supportFragment\n * @param requestCode\n */\n void startNewFragmentForResult(@NonNull SupportFragment supportFragment,int requestCode);\n\n /**\n * 设置fragment返回的result\n * @param requestCode\n * @param bundle\n */\n void setOnFragmentResult(int requestCode, Bundle bundle);\n\n /**\n * 跳转到新的Activity\n * @param clz\n */\n void startNewActivity(@NonNull Class<?> clz);\n\n /**\n * 携带数据跳转到新的Activity\n * @param clz\n * @param bundle\n */\n void startNewActivity(@NonNull Class<?> clz,Bundle bundle);\n\n /**\n * 携带数据跳转到新的Activity并返回结果\n * @param clz\n * @param bundle\n * @param requestCode\n */\n void startNewActivityForResult(@NonNull Class<?> clz,Bundle bundle,int requestCode);\n\n /**\n * 当前Fragment是否可见\n * @return true 可见,false 不可见\n */\n boolean isVisiable();\n\n /**\n * 获取当前fragment绑定的activity\n * @return\n */\n Activity getBindActivity();\n\n}", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onSocialLoginInteraction();\n }", "public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentListener {\n void onClick(Fragment fragment);\n}", "public interface OnFragmentInteractionListener {\n void playGame(Uri location);\n }", "public interface LoginFragmentListener {\n public void OnRegisterClicked();\n public void OnLoginClicked(String User, String Pass);\n}", "public interface MoveFragment {\n\n\n public void moveFragment(Fragment selectedFragment);\n\n}", "public interface ChangeFragmentListener {\n void changeFragment();\n}", "public interface FragmentInterface {\n public void fragmentResult(Fragment fragment, String title);\n}", "public interface OnProductItemFragmentInteraction{\r\n public void itemSelected(Producto product);\r\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }", "void onFragmentInteraction(int position);", "public interface AddFarmFragmentView extends BaseView {\n\n\n}", "void OpenFragmentInteraction();", "public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}", "public interface FragmentDataObserver {\n void getDataFromActivity(String data);\n\n}", "public interface OnFragInteractionListener {\n\n // replace top fragment with this fragment\n interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }\n\n // interface for WifiPresenterFragment\n interface OnWifiScanFragInteractionListener {\n void onGetDataAfterScanWifi(ArrayList<WifiLocationModel> list);\n void onAllowToSaveWifiHotspotToDb(String ssid, String pass, String encryption, String bssid);\n }\n\n // interface for HistoryPresenterFragment\n interface OnHistoryFragInteractionListener {\n // get wifi info\n void onGetWifiHistoryCursor(Cursor cursor);\n // get mobile network generation\n void onGetMobileHistoryCursor(Cursor cursor);\n // get wifi state and date\n void onGetWifiStateAndDateCursor(Cursor cursor);\n }\n\n interface OnMapFragInteractionListerer {\n void onGetWifiLocationCursor(Cursor cursor);\n }\n}", "public interface PesonageFragmentView extends MvpView {\n\n}", "public interface OnUsersFragmentInteractionListener {\n void onListFragmentInteraction(User item);\n }", "public interface MainScreeInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteractionMain();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onClickNextTurn();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n\n void changeBottomNavSelection(int menuItem);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n}", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onSignoutClicked();\n\n void onExtraScopeRequested();\n }", "interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }", "public interface OnListFragmentInteractionListener {\n void onListFragmentInteraction(Note note);\n}" ]
[ "0.73252225", "0.7209547", "0.7136359", "0.71252084", "0.7123544", "0.7015349", "0.69774413", "0.69774413", "0.69774413", "0.6974346", "0.69687444", "0.6966675", "0.6961056", "0.69545686", "0.6944112", "0.69353503", "0.6930745", "0.69285405", "0.6923585", "0.69112146", "0.6904007", "0.6897808", "0.6894953", "0.6883205", "0.6882197", "0.6875803", "0.6864972", "0.68616736", "0.68607754", "0.68592894", "0.6856257", "0.68452096", "0.68404716", "0.6830954", "0.6818982", "0.68176526", "0.6810556", "0.6787207", "0.6770303", "0.6770303", "0.6770303", "0.6770303", "0.6770303", "0.6770303", "0.6770303", "0.6770303", "0.6770303", "0.67700946", "0.67666644", "0.676235", "0.67566675", "0.67536783", "0.6699538", "0.66817844", "0.66744393", "0.66717505", "0.6670075", "0.6662478", "0.6661828", "0.6656121", "0.66530067", "0.6645687", "0.66449016", "0.66449016", "0.66449016", "0.66449016", "0.66449016", "0.66449016", "0.66449016", "0.66449016", "0.66449016", "0.66449016", "0.66449016", "0.6639033", "0.66366607", "0.6632456", "0.662643", "0.6625949", "0.66188306", "0.6610513", "0.6609246", "0.6608896", "0.6605383", "0.6598735", "0.65972257", "0.65881157", "0.6573141", "0.6569208", "0.65618837", "0.65607905", "0.6555499", "0.6550801", "0.65495986", "0.6543998", "0.6539958", "0.6535078", "0.6535078", "0.6535078", "0.65202725", "0.6518559", "0.65167886" ]
0.0
-1
TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "@Override\n public int getNumberArguments() {\n return 1;\n }", "java.lang.String getArg();", "@Override\n public int getArgLength() {\n return 4;\n }", "Argument createArgument();", "@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}", "@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }", "@Override\n\tpublic void traverseArg(UniArg node) {\n\t}", "@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}", "Object[] getArguments();", "Object[] getArguments();", "String getArguments();", "@Override\n\tpublic void handleArgument(ArrayList<String> argument) {\n\t\t\n\t}", "@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }", "ArgList createArgList();", "public Object[] getArguments() { return args;}", "@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }", "@Override\n protected String getName() {return _parms.name;}", "private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }", "uicargs createuicargs();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}", "@Override\r\n\tpublic int getSecondArg() {\n\t\treturn 0;\r\n\t}", "public getType_args(getType_args other) {\n }", "Object[] args();", "protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }", "@Test\n void getArgString() {\n }", "@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "int getArgIndex();", "@Override\n\tpublic void addArg(FormulaElement arg){\n\t}", "public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }", "@Override\n public Object[] getArguments() {\n return null;\n }", "public login_1_argument() {\n }", "Optional<String[]> arguments();", "private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }", "@Override\n\tprotected GATKArgumentCollection getArgumentCollection() {\n\t\treturn argCollection;\n\t}", "protected void sequence_Argument(ISerializationContext context, Argument semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.ARGUMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.ARGUMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getArgumentAccess().getNameSTRINGTerminalRuleCall_0_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}", "void setArguments(String arguments);", "@Override\n\tpublic List<String> getArgumentDesc() {\n\t\treturn desc;\n\t}", "OpFunctionArgAgregate createOpFunctionArgAgregate();", "protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);", "void visitArgument(Argument argument);", "public Thaw_args(Thaw_args other) {\r\n }", "@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}", "private static String getArgumentString(Object arg) {\n if (arg instanceof String) {\n return \"\\\\\\\"\"+arg+\"\\\\\\\"\";\n }\n else return arg.toString();\n }", "public interface Param {\n\n int[] args();\n String exec(ExecutePack pack);\n String label();\n}", "@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }", "public abstract ValidationResults validArguments(String[] arguments);", "public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }", "public String getArgumentString() {\n\t\treturn null;\n\t}", "@Override\n public String kind() {\n return \"@param\";\n }", "@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerationType src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}", "public void addArgumentTypeSerialization(String functionName, String argumentName, TensorType type) {\n wrappedSerializationContext.addArgumentTypeSerialization(functionName, argumentName, type);\n }", "void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }", "@Override\n\tprotected byte[] getArgByte() {\n\t\treturn paramsJson.getBytes();\n\t}", "void onArgumentsChanged();", "com.google.protobuf.ByteString\n\t\tgetArgBytes();", "@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }", "MyArg(int value){\n this.value = value;\n }", "public ArgList(Object arg1) {\n super(1);\n addElement(arg1);\n }", "public Clear_args(Clear_args other) {\r\n }", "private ParameterInformation processArgumentReference(Argument argument,\n List<NameDescriptionType> argTypeSet,\n SequenceEntryType seqEntry,\n int seqIndex)\n {\n ParameterInformation argumentInfo = null;\n\n // Initialize the argument's attributes\n String argName = argument.getName();\n String dataType = null;\n String arraySize = null;\n String bitLength = null;\n BigInteger argBitSize = null;\n String enumeration = null;\n String description = null;\n UnitSet unitSet = null;\n String units = null;\n String minimum = null;\n String maximum = null;\n\n // Step through each command argument type\n for (NameDescriptionType argType : argTypeSet)\n {\n // Check if this is the same command argument referenced in the argument list (by\n // matching the command and argument names between the two)\n if (argument.getArgumentTypeRef().equals(argType.getName()))\n {\n boolean isInteger = false;\n boolean isUnsigned = false;\n boolean isFloat = false;\n boolean isString = false;\n\n // Check if this is an array parameter\n if (seqEntry instanceof ArrayParameterRefEntryType)\n {\n arraySize = \"\";\n\n // Store the reference to the array parameter type\n ArrayDataTypeType arrayType = (ArrayDataTypeType) argType;\n argType = null;\n\n // Step through each dimension for the array variable\n for (Dimension dim : ((ArrayParameterRefEntryType) seqEntry).getDimensionList().getDimension())\n {\n // Check if the fixed value exists\n if (dim.getEndingIndex().getFixedValue() != null)\n {\n // Build the array size string\n arraySize += String.valueOf(Integer.valueOf(dim.getEndingIndex().getFixedValue()) + 1)\n + \",\";\n }\n }\n\n arraySize = CcddUtilities.removeTrailer(arraySize, \",\");\n\n // The array parameter type references a non-array parameter type that\n // describes the individual array members. Step through each data type in the\n // parameter type set in order to locate this data type entry\n for (NameDescriptionType type : argTypeSet)\n {\n // Check if the array parameter's array type reference matches the data\n // type name\n if (arrayType.getArrayTypeRef().equals(type.getName()))\n {\n // Store the reference to the array parameter's data type and stop\n // searching\n argType = type;\n break;\n }\n }\n }\n\n // Check if a data type entry for the parameter exists in the parameter type set\n // (note that if the parameter is an array the steps above locate the data type\n // entry for the individual array members)\n if (argType != null)\n {\n long dataTypeBitSize = 0;\n\n // Check if the argument is an integer data type\n if (argType instanceof IntegerArgumentType)\n {\n IntegerArgumentType icmd = (IntegerArgumentType) argType;\n\n // Get the number of bits occupied by the argument\n argBitSize = icmd.getSizeInBits();\n\n // Get the argument units reference\n unitSet = icmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (icmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n // Get the argument alarm\n IntegerArgumentType.ValidRangeSet alarmType = icmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<IntegerRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Store the minimum alarm value\n minimum = alarmRange.get(0).getMinInclusive();\n\n // Store the maximum alarm value\n maximum = alarmRange.get(0).getMaxInclusive();\n }\n }\n\n isInteger = true;\n }\n // Check if the argument is a floating point data type\n else if (argType instanceof FloatArgumentType)\n {\n // Get the float argument attributes\n FloatArgumentType fcmd = (FloatArgumentType) argType;\n dataTypeBitSize = fcmd.getSizeInBits().longValue();\n unitSet = fcmd.getUnitSet();\n\n // Get the argument alarm\n FloatArgumentType.ValidRangeSet alarmType = fcmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<FloatRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Get the minimum value\n Double min = alarmRange.get(0).getMinInclusive();\n\n // Check if a minimum value exists\n if (min != null)\n {\n // Get the minimum alarm value\n minimum = String.valueOf(min);\n }\n\n // Get the maximum value\n Double max = alarmRange.get(0).getMaxInclusive();\n\n // Check if a maximum value exists\n if (max != null)\n {\n // Get the maximum alarm value\n maximum = String.valueOf(max);\n }\n }\n }\n\n isFloat = true;\n }\n // Check if the argument is a string data type\n else if (argType instanceof StringDataType)\n {\n // Get the string argument attributes\n StringDataType scmd = (StringDataType) argType;\n dataTypeBitSize = Integer.valueOf(scmd.getStringDataEncoding()\n .getSizeInBits()\n .getFixed()\n .getFixedValue());\n unitSet = scmd.getUnitSet();\n isString = true;\n }\n // Check if the argument is an enumerated data type\n else if (argType instanceof EnumeratedDataType)\n {\n EnumeratedDataType ecmd = (EnumeratedDataType) argType;\n EnumerationList enumList = ecmd.getEnumerationList();\n\n // Check if any enumeration parameters are defined\n if (enumList != null)\n {\n // Step through each enumeration parameter\n for (ValueEnumerationType enumType : enumList.getEnumeration())\n {\n // Check if this is the first parameter\n if (enumeration == null)\n {\n // Initialize the enumeration string\n enumeration = \"\";\n }\n // Not the first parameter\n else\n {\n // Add the separator for the enumerations\n enumeration += \", \";\n }\n\n // Begin building this enumeration\n enumeration += enumType.getValue() + \" | \" + enumType.getLabel();\n }\n\n argBitSize = ecmd.getIntegerDataEncoding().getSizeInBits();\n unitSet = ecmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (ecmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n isInteger = true;\n }\n }\n\n // Get the name of the data type from the data type table that matches the base\n // type and size of the parameter\n dataType = getMatchingDataType(dataTypeBitSize / 8,\n isInteger,\n isUnsigned,\n isFloat,\n isString,\n dataTypeHandler);\n\n // Check if the description exists\n if (argType.getLongDescription() != null)\n {\n // Store the description\n description = argType.getLongDescription();\n }\n\n // Check if the argument bit size exists\n if (argBitSize != null && argBitSize.longValue() != dataTypeBitSize)\n {\n // Store the bit length\n bitLength = argBitSize.toString();\n }\n\n // Check if the units exists\n if (unitSet != null)\n {\n List<UnitType> unitType = unitSet.getUnit();\n\n // Check if the units is set\n if (!unitType.isEmpty())\n {\n // Store the units\n units = unitType.get(0).getContent();\n }\n }\n\n argumentInfo = new ParameterInformation(argName,\n dataType,\n arraySize,\n bitLength,\n enumeration,\n units,\n minimum,\n maximum,\n description,\n 0,\n seqIndex);\n }\n\n break;\n }\n }\n\n return argumentInfo;\n }", "public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}", "@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }", "@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }", "@Override\n\tprotected Collection<ArgumentTypeDescriptor> getArgumentTypeDescriptors() {\n\t\treturn Arrays.asList(new VCFWriterArgumentTypeDescriptor(engine, System.out, bisulfiteArgumentSources), new SAMReaderArgumentTypeDescriptor(engine),\n\t\t\t\tnew SAMFileWriterArgumentTypeDescriptor(engine, System.out), new OutputStreamArgumentTypeDescriptor(engine, System.out));\n\t}", "@Override\n public int getArgent() {\n return _argent;\n }", "private static @NonNull String resolveInputName(@NonNull Argument<?> argument) {\n String inputName = argument.getAnnotationMetadata().stringValue(Bindable.NAME).orElse(null);\n if (StringUtils.isEmpty(inputName)) {\n inputName = argument.getName();\n }\n return inputName;\n }", "private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}", "PermissionSerializer (GetArg arg) throws IOException, ClassNotFoundException {\n\tthis( \n\t create(\n\t\targ.get(\"targetType\", null, Class.class),\n\t\targ.get(\"type\", null, String.class),\n\t\targ.get(\"targetName\", null, String.class),\n\t\targ.get(\"targetActions\", null, String.class) \n\t )\n\t);\n }", "public Type getArgumentDirection() {\n return direction;\n }", "public String argTypes() {\n return \"I\";//NOI18N\n }", "public static void main(String arg[]) {\n\n }", "godot.wire.Wire.Value getArgs(int index);", "@Override\n protected String[] getArguments() {\n String[] args = new String[1];\n args[0] = _game_file_name;\n return args;\n }", "public void setArgs(java.lang.String value) {\n this.args = value;\n }", "private Argument(Builder builder) {\n super(builder);\n }", "@Override\n public void execute(String[] args) {\n\n }", "@Override\n\tprotected final void setFromArgument(CommandContext<ServerCommandSource> context, String name) {\n\t}", "UUID createArgument(ArgumentCreateRequest request);", "@Override\n public void initialise(String[] arguments) {\n\n }", "public static ParameterExpression parameter(Class type, String name) { throw Extensions.todo(); }", "protected abstract void parseArgs() throws IOException;" ]
[ "0.7164074", "0.6946075", "0.6714363", "0.65115863", "0.63969076", "0.6375468", "0.63481104", "0.63162106", "0.6260299", "0.6208487", "0.6208487", "0.62070644", "0.6197276", "0.61806154", "0.6177103", "0.61530507", "0.61472267", "0.61243707", "0.60771817", "0.6054482", "0.59906125", "0.59906125", "0.5984017", "0.59791875", "0.5977681", "0.59532714", "0.5946838", "0.59457266", "0.59452903", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.5909717", "0.5889277", "0.588111", "0.5871162", "0.5866624", "0.58613646", "0.58519953", "0.58381283", "0.58083445", "0.58059824", "0.5795826", "0.57816726", "0.57670826", "0.57556796", "0.57471323", "0.57418406", "0.5729463", "0.57291526", "0.5716928", "0.5713024", "0.56974274", "0.56782854", "0.56723106", "0.5664594", "0.5664104", "0.5660337", "0.5652865", "0.5647883", "0.5642134", "0.5635645", "0.5634968", "0.562251", "0.56210977", "0.56167537", "0.56138444", "0.56044126", "0.56044126", "0.5602371", "0.56012225", "0.55986875", "0.55893147", "0.5588273", "0.5583255", "0.5582767", "0.55681497", "0.55626017", "0.55577534", "0.55524325", "0.5549442", "0.55378276", "0.5536797", "0.5527675", "0.5511817", "0.55099154", "0.550257" ]
0.0
-1
REST API CALL TO GET ALL REVIEWS //
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> getReviews(HttpServletResponse response) { response.addHeader("Date", new Date().toString()); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate"); response.setHeader("Pragma","no-cache"); response.setHeader("Version","Mechanic API V-2.0"); response.setDateHeader("Expires", 0); return new ResponseEntity<>( reviewService.getReviews(), HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET\n\t@Path(\"{id}/reviews\")\n\t@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n\tpublic Response getApplicationReviews(\n\t\t\t@HeaderParam(\"ORSKey\") String orsKey,\n\t\t\t@HeaderParam(\"ShortKey\") String shortKey,\n\t\t\t@PathParam(\"id\") String id) {\n\t\tif (!Security.instance.isInternalUser(orsKey, shortKey)) {\n\t\t\tthrow new ForbiddenException(\"User does not have permission\");\n\t\t}\n\t\tList<Review> list = ReviewsDao.instance.getByApplication(id);\n\t\tif (list == null) {\n\t\t\tthrow new NotFoundException(\"Review list not found\");\n\t\t} else {\n\t\t\tGenericEntity<List<Review>> returnList = new GenericEntity<List<Review>>(list) {};\n\t\t\treturn Response.ok(returnList).build();\n\t\t}\n\t}", "@RequestMapping(value=\"reviews\", method=RequestMethod.GET,\n\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\t\t@ResponseBody\n\t\tpublic ResponseEntity<List<ReviewBean>> getReviews(){\n\t\t\t//Call on session to get current user's reviews\n\t\t\t//For now it just grabs hardcoded user's reviews\n\t\t\treturn new ResponseEntity<List<ReviewBean>>(this.dao.getAllReviewsByUserId(72), HttpStatus.OK);\n\t\t}", "public ArrayList<ReviewDTO> getAll(){\n\t\tArrayList<ReviewDTO> all = new ArrayList<>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tResourceSet result = dbManagement.executeXPath(REVIEW_COLLECTION_ID, \"data(//review)\", TARGET_NAMESPACE_PUBLICATION);\r\n\t\t\tif (result == null) {\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tResourceIterator i = result.getIterator();\r\n\t\t\tResource res = null;\r\n\t\t\tReviewDTO dto = new ReviewDTO();\r\n\t\t\twhile (i.hasMoreResources()) {\r\n\t\t\t\tSystem.out.println(\"******\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tres = i.nextResource();\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(res.getContent().toString());\r\n\t\t\t\t\t// TODO svaki xml pretvoriti u dto i dodati u listu\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t// don't forget to cleanup resources\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t((EXistResource) res).freeResources();\r\n\t\t\t\t\t} catch (XMLDBException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn all;\r\n\t}", "@GET(\"genre/movie/list\")\n Call<GenreResponse> getGenreList(@Query(\"api_key\") String apikey);", "@GET(\"/v1/genres\")\r\n void getGenres( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n Callback<Collection<GenreData>> callBack);", "@GET(\"user-relation?expand=userOne,userTwo&per-page=333\")\n Call<UserRelationVisitsResponse>getUsersRelationForVisits();", "@GET\n\t@Produces({ MediaType.APPLICATION_JSON })\n\tpublic Response getRestaurantes() {\n\t\tRotondAndesTM tm = new RotondAndesTM(getPath());\n\t\tList<Restaurante> restaurantes;\n\t\ttry\n\t\t{\n\t\t\trestaurantes = tm.darRestaurantes();\n\t\t\treturn Response.status( 200 ).entity( restaurantes ).build( );\t\t\t\n\t\t}catch( Exception e )\n\t\t{\n\t\t\treturn Response.status( 500 ).entity( doErrorMessage( e ) ).build( );\n\t\t}\n\t}", "Page getList(ViewResourceSearchVO viewResourceSearchVO) throws Exception;", "public static Collection<BookReview> getALL() {\n }", "@GET(\"list_movies.json\")\n Call<MoviesResponse> getMoviesList(\n @Query(\"genre\") String genre,\n @Query(\"sort_by\") String sortBy,\n @Query(\"page\") int page);", "@GET(Url.END_POINT)\n Call<ArrayList<Recipe>> getRecipes();", "@GET\r\n @Produces(\"text/plain\")\r\n public Response getResearchObjectList() {\r\n UserProfile user = (UserProfile) request.getAttribute(Constants.USER);\r\n \r\n Set<URI> list;\r\n if (user.getRole() == Role.PUBLIC) {\r\n list = ROSRService.SMS.get().findResearchObjects();\r\n } else {\r\n list = ROSRService.SMS.get().findResearchObjectsByCreator(user.getUri());\r\n }\r\n StringBuilder sb = new StringBuilder();\r\n for (URI id : list) {\r\n sb.append(id.toString());\r\n sb.append(\"\\r\\n\");\r\n }\r\n \r\n ContentDisposition cd = ContentDisposition.type(\"text/plain\").fileName(\"ROs.txt\").build();\r\n \r\n return Response.ok().entity(sb.toString()).header(\"Content-disposition\", cd).build();\r\n }", "@RequestMapping(value = \"/shopressources\", method = RequestMethod.GET)\n List<ShopRessource> getAllShopRessources();", "@GET\r\n public List<DocumentoDTO> obtenerDocumento(){\r\n List<DocumentoEntity> documento= logic.obtenerDocumento(); \r\n return DocumentoDTO.toZooList(documento);\r\n }", "public void listAllReview() throws ServletException, IOException {\r\n\t\tlistAllReview(null);\r\n\t}", "public void reviews(Parameters parameters, final onSuccessCallback callback){\n getJSONArray(parameters.buildQuery(Endpoint.REVIEWS), new onSuccessCallback() {\n @Override\n public void onSuccess(JSONArray result) {\n callback.onSuccess(result);\n }\n\n @Override\n public void onError(VolleyError error) {\n callback.onError(error);\n }\n });\n }", "List<Receta> getAllWithUSer();", "@Override\r\n\tpublic List<ReviewVO> reviewListAll() {\n\t\treturn sqlSession.selectList(namespace + \".reviewListAll\");\r\n\t}", "@GET\n @Produces(\"application/json\")\n public List<Photos> getPhotos() {\n \tPhotosDAO dao = new PhotosDAO();\n List photos = dao.getPhotos();\n return photos;\n }", "@GetMapping(\"/recommendations\")\n public ResponseEntity<?> getMovies() {\n Movie[] result = restTemplate.getForObject(\"http://movie-service/movies\", Movie[].class);\n System.out.println(result);\n return new ResponseEntity<>(result, HttpStatus.OK);\n }", "@GetMapping(\"task/{taskId}/allReviewers\")\n\tpublic ResponseEntity<Collection<ReviewerDTO>> getAllReviewers(@PathVariable String taskId) {\n\t\tTaskDto task = rspe.findTask(taskId);\n\t\tString magazine = (String) rspe.getVariable(task.getProcessInstanceId(), \"magazine\");\n\t\tString paper = (String) rspe.getVariable(task.getProcessInstanceId(), \"filename\");\n\n\t\tCollection<ReviewerDTO> reviewers = appTaskService.getAllReviewers(magazine);\n\t\tCollection<ReviewerDTO> reviewersData = new ArrayList<ReviewerDTO>();\n\n\t\tCollection<Review> reviews = reviewService.getByPaper(paper);\n\t\tfor(ReviewerDTO rew : reviewers) {\n\t\t\tboolean flag = false;\n\t\t\tfor(Review review : reviews) {\n\t\t\t\tSystem.out.println(\"evo me odje6666666666666666666666666666666 \"+rew.getUsername()+\" \"+review.getReviewer());\n\t\t\t\tif(rew.getUsername().equals(review.getReviewer())) {\n\t\t\t\t\tSystem.out.println(\"evo me odje6666666666666666666666666666666\");\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!flag && !reviewersData.contains(rew)) {\n\t\t\t\t\n\t\t\t\treviewersData.add(rew);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"ispisujem task id: \" + task.getId());\n\t\treturn ResponseEntity.ok(reviewersData);\n\t}", "private void getReviewListData() {\n final ProgressDialog progressDialog = new ProgressDialog(getActivity());\n progressDialog.setCancelable(false); // set cancelable to false\n progressDialog.setMessage(\"Please Wait\"); // set message\n progressDialog.show(); // show progress dialog\n\n\n (RetrofitClient.getInstance().getResponse().getReviewsByJob(JobName)).enqueue(new Callback<List<ReviewDTO>>() {\n @Override\n public void onResponse(Call<List<ReviewDTO>> call, Response<List<ReviewDTO>> response) {\n //Log.d(\"responseGET\", response.body().get(0).getName());\n progressDialog.dismiss(); //dismiss progress dialog\n reviewListResponseData = response.body();\n setDataInRecyclerView();\n }\n\n @Override\n public void onFailure(Call<List<ReviewDTO>> call, Throwable t) {\n // if error occurs in network transaction then we can get the error in this method.\n Toast.makeText(getActivity(), t.toString(), Toast.LENGTH_LONG).show();\n progressDialog.dismiss(); //dismiss progress dialog\n }\n });\n }", "@GET(\"rest/emprego\")\n Call<List<Posto>> callListPostoSINE();", "@GET(\"posts/\")\n Call<List<Post>>getPosts();", "@GetMapping(\"/films/title/{title}/{reviewId}/comments\")\n public @ResponseBody\n List<Comment> getAllCommentsFromReview(@PathVariable String reviewId){\n Review review = reviewService.getReviewByReviewId(Integer.parseInt(reviewId));\n return commentService.getAllCommentsByReview(review);\n }", "public List<Review> getAllReview() \n\t{\n\t\tList<Review> reviews = new ArrayList<Review>();\n\t\treviewRepository.findAll().forEach(review -> reviews.add(review));\n\t\treturn reviews;\n\t}", "FetchRequest<Review> byId(String id);", "@GET\n public List<JsonGenre> getAll() {\n \tList<Genre> genres = genreDao.getGenres();\n \tLOGGER.info(\"find \"+genres.size()+\" genres in the database\");\n \tArrayList<JsonGenre> ls = new ArrayList<JsonGenre>();\n \tfor (Genre s:genres) {\n \t\tls.add(new JsonGenre(s.getId(), s.getName()));\n \t}\n \treturn ls;\n }", "public GetMovieReviewsResponse getMovieReviews(int movieId, String language, Integer page) {\n // /movie/{movie_id}/reviews\n String path = String.format(\"/movie/%s/reviews\", movieId);\n Map<String, Object> requestParams = new HashMap<>();\n requestParams.put(\"language\", language);\n requestParams.put(\"page\", page);\n return restClient.get(path, requestParams, new TypeReference<>() {\n\n\n }\n );\n }", "List<OrderDTORest> getAllOrdersDTORest();", "public interface Service {\n @GET(\"/orama-media/json/fund_detail_full.json?limit=1000&offset=0&serializer=fund_detail_full\")\n Call<List<Example>> getExample();\n\n}", "@RequestMapping(\"/{userId}\")\n public List<CatalogItem> getCatalog(@PathVariable(\"userId\") String userId){\n\n List<Rating> ratings = Arrays.asList(\n new Rating( \"1234\", 4),\n new Rating( \"5678\", 5)\n );\n\n //For each movieId, call movie info Service and get details\n /*return ratings.stream().map(rating -> new CatalogItem(\"Tranformers\", \"Test\", 4))\n .collect(Collectors.toList());*/\n return ratings.stream().map( rating -> {\n Movie movie = restTemplate.getForObject( \"http://localhost:8083/movies/\" + rating.getMovieId(), Movie.class);\n return new CatalogItem( movie.getName(), \"Test\", rating.getRating() );\n })\n .collect(Collectors.toList() );\n\n //Put them all together\n /*return Collections.singletonList(\n //new CatalogItem(\"Tranformers\", \"Test\", 4)\n );*/\n\n \n }", "@GET(\"/attractions/{attractionId}/reviews\")\n Call<List<Review>> getReviews(\n @Path(\"attractionId\") int attractionId\n );", "List<Receta> getAll(String filter);", "private void getBooks(){\n final ProgressDialog loading = ProgressDialog.show(this,\"Fetching Data\",\"Please wait...\",false,false);\n\n //Creating a rest adapter\n RestAdapter adapter = new RestAdapter.Builder()\n .setEndpoint(ROOT_URL)\n .build();\n\n //Creating an object of our api interface\n BooksAPI api = adapter.create(BooksAPI.class);\n\n //Defining the method\n api.getBooks(new Callback<List<Book>>() {\n @Override\n public void success(List<Book> list, Response response) {\n //Dismissing the loading progressbar\n loading.dismiss();\n Log.e(\"response\", response.getReason());\n //Storing the data in our list\n books = (ArrayList<Book>) list;\n lv.setAdapter(listAdapter);\n //Calling a method to show the list\n //showList();\n }\n\n @Override\n public void failure(RetrofitError error) {\n //you can handle the errors here\n Log.e(\"error\",error.getResponse().getReason());\n }\n });\n }", "void fetchRestaurantsListData(RepositoryContract.GetRestaurantsListCallback callback);", "@GetMapping(\"/rent\")\n public ResultEntity<List<ItemDTO>> getAllRent()\n {\n\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Rent\");\n }", "@GetMapping(\"/customer/reviews/{count}\")\n\tpublic Set<Customer> getCustomerByReviewsCount(@PathVariable(\"count\") Integer count){\n\t\tSet<Customer> set = customerRepository.getCustomerByReviewsCount(count);\n\t\treturn set;\n\t}", "@GetMapping(value = \"/{id}\", produces = MediaType.APPLICATION_JSON_VALUE)\n\t\tpublic ResponseEntity<Object> getReview(HttpServletResponse response, @PathVariable(\"id\") int id) {\n\t\t\t\n\t\t\tresponse.addHeader(\"Date\", new Date().toString());\n\t\t\tresponse.setHeader(\"Cache-Control\",\"no-cache,no-store,must-revalidate\");\n\t\t\tresponse.setHeader(\"Pragma\",\"no-cache\");\n\t\t\tresponse.setHeader(\"Version\",\"Mechanic API V-2.0\");\n\t\t\tresponse.setDateHeader(\"Expires\", 0);\n\t\t \n\t\t\treturn new ResponseEntity<>( reviewService.getReview(id), HttpStatus.OK);\n\t}", "@RequestMapping(value = \"/\")\n public Map<String, Object> showAll() {\n// Get all invoices\n List<Invoice> invoices = invoiceService.findAll();\n// Build response\n Map<String, Object> response = new LinkedHashMap<String, Object>();\n response.put(\"totalInvoices\", invoices.size());\n response.put(\"invoices\", invoices);\n// Send to client\n return response;\n }", "@RequestMapping(value=\"/treenit\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Treeni> treeniListaRest() {\t\n\t return (List<Treeni>) repository.findAll();\n\t}", "public Set<Review> getReviews() {\n return reviews;\n }", "QueryRequest<Review> query();", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public List<Officer> getOfficer() {\n return officerDao.listar(); \n }", "@GET(\"movie/{id}\")\n Call<PersonagemResponse> getMovieDetails(@Path(\"id\") int id, @Query(\"api_key\") String apiKey);", "@GetMapping(\"/movie/{name}\")\r\n public List<ReviewDetails> getReviewByMovieName(@PathVariable(\"name\") String name){\r\n return reviewRepository.getReviewByMovieName(name);\r\n }", "@GET(\"top_rated\")\n Call<MoviesClass> listTopRated(@Query(\"api_key\") String api_key);", "@GET(\"characters/\")\n Call<PersonagemResponse> getTopRatedMovies(@Query(\"api_key\") String apiKey);", "public interface Service {\n\n @GET(\"movie/{sub_type}\")\n Call<MovieResponse> getMovie(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"tv/{sub_type}\")\n Call<TvShowResponse> getTvShow(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"movie/{movie_id}/recommendations\")\n Call<MovieResponse> getMovieRecommendations(@Path(\"movie_id\")int movie_id,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"tv/{tv_id}/recommendations\")\n Call<TvShowResponse> getTvShowRecommendations(@Path(\"tv_id\")int tv_id, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"search/movie\")\n Call<MovieResponse> getMovieSearch(@Query(\"query\")String query,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"search/tv\")\n Call<TvShowResponse> getTvShowSearch(@Query(\"query\")String query, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n}", "public interface Api {\n @GET(\"ikds.do\")\n Call<List<Movie>> getMovies(@Query(\"since\") int since, @Query(\"pagesize\") int pagesize);\n}", "ListResponse<BonusResponse> getAll(int start, int size, Long customerId);", "public ArrayList<Review> getReviewsList() {\n return reviews;\n }", "@Get \n public JsonRepresentation getActivities(Variant variant) {\n \tlog.info(\"getActivities(@Get) entered ..... \");\n \tJSONObject jsonReturn = new JSONObject();\n\t\t\n\t\tString apiStatus = ApiStatusCode.SUCCESS;\n\t\tthis.setStatus(Status.SUCCESS_OK);\n\t\tUser currentUser = null;\n\t\tTimeZone tz = null;\n\t\t// teamId is provided only if getting activities for a single team. \n\t\tboolean isGetActivitiesForAllTeamsApi = this.teamId == null;\n try {\n \t\tcurrentUser = (User)this.getRequest().getAttributes().get(RteamApplication.CURRENT_USER);\n \t\tif(currentUser == null) {\n\t\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n \t\t\tlog.severe(\"user could not be retrieved from Request attributes!!\");\n \t\t}\n \t\t//::BUSINESSRULE:: user must be network authenticated to get activities\n \t\telse if(!currentUser.getIsNetworkAuthenticated()) {\n \t\t\tapiStatus = ApiStatusCode.USER_NOT_NETWORK_AUTHENTICATED;\n \t\t}\n \t\t//::BUSINESSRULE:: user must be a member of the team, if teamId was specified\n \t\telse if(this.teamId != null && !currentUser.isUserMemberOfTeam(this.teamId)) {\n\t\t\t\tapiStatus = ApiStatusCode.USER_NOT_MEMBER_OF_SPECIFIED_TEAM;\n\t\t\t\tlog.info(apiStatus);\n \t}\n \t\t// timeZone check \n \t\telse if(this.timeZoneStr == null || this.timeZoneStr.length() == 0) {\n \t\t\tlog.info(\"getActivities(): timeZone null or zero length\");\n \t \tapiStatus = ApiStatusCode.TIME_ZONE_REQUIRED;\n \t\t} else {\n \t\t\ttz = GMT.getTimeZone(this.timeZoneStr);\n \t\t\tif(tz == null) {\n \t\tapiStatus = ApiStatusCode.INVALID_TIME_ZONE_PARAMETER;\n \t\t\t}\n \t\t}\n\t\n \t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_OK)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n \t\t//////////////////////////////////////\n\t\t\t// verify and default input parameters\n \t\t//////////////////////////////////////\n\t\t\tboolean refreshFirst = false;\n\t\t\tif(this.refreshFirstStr != null) {\n\t\t\t\tif(refreshFirstStr.equalsIgnoreCase(\"true\")) {\n\t\t\t\t\trefreshFirst = true;\n\t\t\t\t} else if(refreshFirstStr.equalsIgnoreCase(\"false\")) {\n\t\t\t\t\trefreshFirst = false;\n\t\t\t\t} else {\n\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_REFRESH_FIRST_PARAMETER;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tboolean newOnly = false;\n\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\tif(this.newOnlyStr != null) {\n\t\t\t\t\tif(newOnlyStr.equalsIgnoreCase(\"true\")) {\n\t\t\t\t\t\tnewOnly = true;\n\t\t\t\t\t} else if(newOnlyStr.equalsIgnoreCase(\"false\")) {\n\t\t\t\t\t\tnewOnly = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_NEW_ONLY_PARAMETER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint maxCount = DEFAULT_MAX_COUNT;\n\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS) && maxCountStr != null) {\n\t\t\t\ttry {\n\t\t\t\t\tmaxCount = new Integer(maxCountStr);\n\t\t\t\t\tif(maxCount > MAX_MAX_COUNT) maxCount = MAX_MAX_COUNT;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_MAX_COUNT_PARAMETER;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t///////////////////////////////////\n\t\t\t// some parameters are API specific\n\t\t\t///////////////////////////////////\n\t\t\tLong maxCacheId = null;\n\t\t\tDate mostCurrentDate = null;\n\t\t\tInteger totalNumberOfDays = null;\n\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\t////////////////////////////////////////////////////////\n\t\t\t\t// Get Activity for All Teams: Parameters and Validation\n\t\t\t\t////////////////////////////////////////////////////////\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS) && mostCurrentDateStr != null) {\n\t\t\t\t\tmostCurrentDate = GMT.convertToGmtDate(mostCurrentDateStr, false, tz);\n\t\t\t\t\tif(mostCurrentDate == null) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_MOST_CURRENT_DATE_PARAMETER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS) && this.totalNumberOfDaysStr != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttotalNumberOfDays = new Integer(this.totalNumberOfDaysStr);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_TOTAL_NUMBER_OF_DAYS_PARAMETER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//::BUSINESSRULE:: if newOnly=true, then refreshFirst must also be true\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\t\tif(newOnly && !refreshFirst) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.REFRESH_FIRST_AND_NEW_ONLY_MUST_BE_SPECIFIED_TOGETHER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//::BUSINESSRULE:: if newOnly=false, date interval must be specified\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\t\tif(!newOnly && (mostCurrentDate == null || totalNumberOfDays == null)) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.DATE_INTERVAL_REQUIRED;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//::BUSINESSRULE:: newOnly=true is mutually exclusive with date interval\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\t\tif(newOnly && (mostCurrentDate != null || totalNumberOfDays != null)) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.NEW_ONLY_AND_DATE_INTERVAL_MUTUALLY_EXCLUSIVE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t///////////////////////////////////////////////////////////////////////\n\t\t\t\t// Get Activity for a Single, Specified Team: Parameters and Validation\n\t\t\t\t///////////////////////////////////////////////////////////////////////\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS) && maxCacheIdStr != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmaxCacheId = new Long(maxCacheIdStr);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_MAX_CACHE_ID_PARAMETER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//::BUSINESSRULE:: refreshFirst=true is mutually exclusive with maxCacheId\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\t\tif(refreshFirst && maxCacheId != null) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.REFRESH_FIRST_AND_MAX_CACHE_ID_MUTUALLY_EXCLUSIVE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_OK)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n\t\t\tList<Team> teams = new ArrayList<Team>();\n\t\t\tList<Key> teamKeys = null;\n\t\t\tEntityManager em = EMF.get().createEntityManager();\n\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\tteamKeys = currentUser.getTeams();\n\t\t\t\tif(teamKeys.size() > 0) {\n\t\t\t\t\t//::JPA_BUG:: ?? if I get all teams by passing in a list of keys, the list of teams is not in same order as keys!!!!\n//\t \t\t\tList<Team> teams = (List<Team>) em.createQuery(\"select from \" + Team.class.getName() + \" where key = :keys\")\n//\t\t\t\t\t\t.setParameter(\"keys\", teamKeys)\n//\t\t\t\t\t\t.getResultList();\n\t\t\t\t\t\n\t\t\t\t\tfor(Key tk : teamKeys) {\n\t\t\t\t\t\tTeam aTeam = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t aTeam = (Team)em.createNamedQuery(\"Team.getByKey\")\n\t\t\t\t\t\t\t\t.setParameter(\"key\", tk)\n\t\t\t\t\t\t\t\t.getSingleResult();\n\t\t\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t\t\tlog.severe(\"should never happen. Could not find team with the team key\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(aTeam != null) {teams.add(aTeam);}\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(\"number of teams retrieved for current user = \" + teams.size());\n\t\t\t\t} else {\n\t\t\t\t\tlog.info(\"user has no teams\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttry {\n \t\t\t\t\tTeam team = (Team)em.createNamedQuery(\"Team.getByKey\")\n \t\t\t\t\t\t.setParameter(\"key\", KeyFactory.stringToKey(this.teamId))\n \t\t\t\t\t\t.getSingleResult();\n \t\t\t\t\tlog.info(\"team retrieved = \" + team.getTeamName());\n \t\t\t\t\tteams.add(team);\n \t\t\t\t} catch (NoResultException e) {\n \t\t\t\t\tapiStatus = ApiStatusCode.TEAM_NOT_FOUND;\n \t\t\t\t\tlog.info(\"invalid team id\");\n \t\t\t\t} catch (NonUniqueResultException e) {\n \t\t\t\t\tlog.severe(\"should never happen - two teams have the same key\");\n \t\t\t\t}\n\t\t\t}\n \t\t\n\t\t\tList<Activity> allTeamsRequestedActivities = new ArrayList<Activity>();\n\t\t\t\n\t\t\t// All teams support activity so all teams are processed\n\t\t\tfor(Team userTeam : teams) {\n\t\t\t\tBoolean teamUsesTwitter = userTeam.getUseTwitter() != null && userTeam.getUseTwitter();\n\t\t\t\t\n\t\t\t\tList<Activity> teamRequestedActivities = null;\n\t\t\t\tLong cacheId = userTeam.getNewestCacheId();\n\t\t\t\t\n\t\t\t\t////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\t// If a refresh has been requested and team uses Twitter, get the latest activities from Twitter and store in cache\n\t\t\t\t////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\tif(teamUsesTwitter && refreshFirst) {\n\t\t\t\t\tlog.info(\"refreshFirst is true - updating the cache\");\n\t\t\t\t\t\n\t\t\t\t\tif(newOnly) {teamRequestedActivities = new ArrayList<Activity>();}\n\n\t\t\t\t\t// Twitter refresh is done at most once per minute, so see if the refresh has been done in the last minute.\n\t\t\t\t\tDate lastRefreshDate = userTeam.getLastTwitterRefresh();\n\t\t\t\t\tLong howLongSinceLastRefresh = null;\n\t\t\t\t\tDate now = new Date();\n\t\t\t\t\tif(lastRefreshDate != null) {\n\t\t\t\t\t\thowLongSinceLastRefresh = now.getTime() - lastRefreshDate.getTime();\n\t\t\t\t\t\tlog.info(\"howLongSinceLastRefresh = \" + howLongSinceLastRefresh);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"lastTwitterRefresh in User null, so refresh will proceed\"); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(lastRefreshDate == null || (howLongSinceLastRefresh > ONE_MINUTE_IN_MILLI_SECONDS)) {\n\t\t\t\t\t\tlog.info(\"has been over a minute so do a Twitter refresh\");\n\t\t\t\t\t\tLong newestTwitterId = userTeam.getNewestTwitterId();\n\t\t\t\t\t\tList<Activity> twitterActivities = TwitterClient.getTeamActivities(userTeam, newestTwitterId);\n\t\t\t\t\t\tif(twitterActivities == null) {\n\t\t\t\t\t\t\tapiStatus = ApiStatusCode.TWITTER_ERROR;\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_OK)) {\n\t\t\t\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// because twitterActivities doesn't have the cacheId set, this will get sorted by twitterId\n\t\t\t\t\t\tCollections.sort(twitterActivities);\n\t\t\t\t\t\t\n\t\t\t\t\t\t////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\t// persist the activities retrieved from Twitter that aren't already stored in the cache\n\t\t\t\t\t\t////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\tint requestedActivityCount = maxCount;\n\n\t\t\t\t\t\tLong largestTwitterId = newestTwitterId;\n\t\t\t\t\t\tlog.info(\"before processing activities, newestTwitterId = \" + newestTwitterId);\n\t\t\t\t\t\tEntityManager em0 = EMF.get().createEntityManager();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor(Activity a: twitterActivities) {\n\t\t\t\t\t\t\t\tem0.getTransaction().begin();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tActivity precachedActivity = (Activity)em0.createNamedQuery(\"Activity.getByTwitterId\")\n\t\t\t\t\t\t\t\t\t\t.setParameter(\"twitterId\", a.getTwitterId())\n\t\t\t\t\t\t\t\t\t\t.getSingleResult();\n\t\t\t\t\t\t\t\t\t// if already cached, there is no work to do ...\n\t\t\t\t\t\t\t\t} catch (NoResultException e) {\n\t\t\t\t\t \t// not an error - we have found a Twitter update that was a direct post to Twitter\n\t\t\t\t\t\t\t\t\tlog.info(\"uncached activity retrieved with twitter ID = \" + a.getTwitterId());\n\t\t\t\t\t\t\t\t\tif(newOnly && requestedActivityCount != 0) {\n\t\t\t\t\t\t\t\t\t\tteamRequestedActivities.add(a);\n\t\t\t\t\t\t\t\t\t\trequestedActivityCount--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcacheId += 1;\n\t\t\t\t\t\t\t\t\ta.setCacheId(cacheId);\n\t\t\t\t\t\t\t\t\tem0.persist(a);\n\t\t\t\t\t\t\t\t\tif(a.getTwitterId() > largestTwitterId) {largestTwitterId = a.getTwitterId();}\n\t\t\t\t\t \t\t} catch (NonUniqueResultException e) {\n\t\t\t\t\t \t\t\tlog.severe(\"should never happen - two or more activities have the same twitter ID\");\n\t\t\t\t\t \t\t}\n\t\t\t\t\t\t\t\tem0.getTransaction().commit();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlog.info(\"after processing activities, largestTwitterId = \" + largestTwitterId);\n\t\t\t\t\t\t\tnewestTwitterId = largestTwitterId;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tem0.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Update team in a separate transaction\n\t\t\t\t\t\t// at this point, newestTwitterId holds the largest, most recent Twitter Id\n\t\t\t\t\t\t// at this point, cachId holds the largest, most recent cache Id\n\t\t\t\t\t\tEntityManager em2 = EMF.get().createEntityManager();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tem2.getTransaction().begin();\n\t\t\t\t\t\t\tTeam teamInTransaction = (Team)em2.createNamedQuery(\"Team.getByKey\")\n\t\t\t\t\t\t\t\t.setParameter(\"key\", userTeam.getKey())\n\t\t\t\t\t\t\t\t.getSingleResult();\n\t\t\t\t\t\t\tlog.info(\"team2 retrieved = \" + teamInTransaction.getTeamName());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// update the activity IDs\n\t\t\t\t\t\t\tteamInTransaction.setNewestCacheId(cacheId);\n\t\t\t\t\t\t\tteamInTransaction.setNewestTwitterId(newestTwitterId);\n\t\t\t\t\t\t\tteamInTransaction.setLastTwitterRefresh(new Date());\n\t\t\t\t\t\t\tem2.getTransaction().commit();\n\t\t\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t\t\tlog.severe(\"Should never happen. Could not find team using teamKey from User entity.\");\n\t\t\t\t\t\t\t// no matter what, the teamsWithPossibleUpdates team list MUST be complete if this is a refresh!\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t if (em2.getTransaction().isActive()) {\n\t\t\t\t\t\t em2.getTransaction().rollback();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t em2.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // end of if(teamUsesTwitter && refreshFirst)\n\t\t\t\t\n\t\t\t\t// If this team uses Twitter and this is a refreshFirst with newOnly, then teamRequestedActivities \n\t\t\t\t// already initialized in the code above.\n\t\t\t\tif(!(teamUsesTwitter && refreshFirst && newOnly)) {\n\t\t\t\t\tif(refreshFirst && newOnly) {\n\t\t\t\t\t\t// teamUsesTwitter must be false. If no Twitter, then a refreshFirst-newOnly request has no work to do,\n\t\t\t\t\t\t// but must create a teamRequestedActivities for code below, so make the empty list.\n\t\t\t\t\t\tteamRequestedActivities = new ArrayList<Activity>();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// To get into this leg of code, newOnly must be FALSE\n\t\t\t\t\t\t\n\t\t\t\t\t\t//////////////////////////////////////////////////////////////\n\t\t\t\t\t\t// Build the teamRequestedActivities list from the local cache\n\t\t\t\t\t\t//////////////////////////////////////////////////////////////\n\t\t\t\t\t\tEntityManager em3 = EMF.get().createEntityManager();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tlog.info(\"getting activities from the cache ...\");\n\t\t\t\t\t\t\t//////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\t\t// return activities from cache (which may include some new stuff too)\n\t\t\t\t\t\t\t//////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\t\t\t\t\t// Since newOnly must be false (see comment above) the mostCurrentDate and totalNumberOfDays\n\t\t\t\t\t\t\t\t// must be specified according to the API business rules.\n\n\t\t\t\t\t\t\t\t//////////////////////////////////\n\t\t\t\t\t\t\t\t// get activities by date interval\n\t\t\t\t\t\t\t\t//////////////////////////////////\n\t\t\t\t\t\t\t\tDate leastCurrentDate = GMT.subtractDaysFromDate(mostCurrentDate, totalNumberOfDays-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tteamRequestedActivities = (List<Activity>)em3.createNamedQuery(\"Activity.getByTeamIdAndUpperAndLowerCreatedDates\")\n\t\t\t\t\t\t\t\t\t.setParameter(\"teamId\", KeyFactory.keyToString(userTeam.getKey()))\n\t\t\t\t\t\t\t\t\t.setParameter(\"mostCurrentDate\", GMT.setTimeToEndOfTheDay(mostCurrentDate))\n\t\t\t\t\t\t\t\t\t.setParameter(\"leastCurrentDate\", GMT.setTimeToTheBeginningOfTheDay(leastCurrentDate))\n\t\t\t\t\t\t\t\t\t.getResultList();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//////////////////////////////////\n\t\t\t\t\t\t\t\t// get activities by cacheId range\n\t\t\t\t\t\t\t\t//////////////////////////////////\n\t\t\t\t\t\t\t\tLong upperCacheId = null; // non-inclusive, upper cache ID used in activity query\n\t\t\t\t\t\t\t\tLong lowerCacheId = null; // \n\t\t\t\t\t\t\t\tif(maxCacheId != null) {\n\t\t\t\t\t\t\t\t\t// typically used to request activities that are not the most recent\n\t\t\t\t\t\t\t\t\tif(maxCacheId > cacheId + 1) {maxCacheId = cacheId + 1;}\n\t\t\t\t\t\t\t\t\tupperCacheId = maxCacheId;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// the most recent activities are being requested\n\t\t\t\t\t\t\t\t\t// make upper cache ID large enough so newest item in cache will be returned\n\t\t\t\t\t\t\t\t\tupperCacheId = cacheId + 1; \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlowerCacheId = upperCacheId - maxCount;\n\t\t\t\t\t\t\t\t// number of available activities might be less than maxCount\n\t\t\t\t\t\t\t\tif(lowerCacheId < 0) {lowerCacheId = 0L;}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tteamRequestedActivities = (List<Activity>)em3.createNamedQuery(\"Activity.getByTeamIdAndUpperAndLowerCacheIds\")\n\t\t\t\t\t\t\t\t\t.setParameter(\"teamId\", KeyFactory.keyToString(userTeam.getKey()))\n\t\t\t\t\t\t\t\t\t.setParameter(\"upperCacheId\", upperCacheId)\n\t\t\t\t\t\t\t\t\t.setParameter(\"lowerCacheId\", lowerCacheId)\n\t\t\t\t\t\t\t\t\t.getResultList();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlog.info(\"number of teamRequestedActivities found = \" + teamRequestedActivities.size());\n\t\t\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t\t\tlog.severe(\"Failed in getting Activity from cache. Exception = \" + e.getMessage());\n\t\t\t\t\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tem3.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tallTeamsRequestedActivities.addAll(teamRequestedActivities);\n\t\t\t} // end of for(Team userTeam : teams)\n\t\t\tlog.info(\"number of allTeamsRequestedActivities found = \" + allTeamsRequestedActivities.size());\n\t\t\t\n\t\t\t/////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t// Update newestCacheIds in User Entity. newestCacheIds are used to determine if a user\n\t\t\t// has any new activity. All the user's teams that were updated by this API call need\n\t\t\t// to be updated. Note that the team.newestCacheId may not have been updated in this\n\t\t\t// API but rather by the Create Activity API, but it doesn't matter. Any user team\n\t\t\t// that has had activity retrieved by this API call should the associated user.newestCacheId\n\t\t\t// updated.\n\t\t\t/////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\tif(teams.size() > 0) {\n\t \tEntityManager em4= EMF.get().createEntityManager();\n\t \ttry {\n\t \t\tem4.getTransaction().begin();\n\t \t\t// re-get the user inside this transaction\n\t\t\t\t\tUser withinTransactionUser = (User)em4.createNamedQuery(\"User.getByKey\")\n\t\t\t\t\t\t.setParameter(\"key\", currentUser.getKey())\n\t\t\t\t\t\t.getSingleResult();\n\t\t\t\t\tlog.info(\"updating newCachIds for User = \" + withinTransactionUser.getFullName() + \". Number of updated teams = \" + teams.size());\n\t\t\t\t\t\n\t\t\t\t\tList<Long> newestCacheIds = withinTransactionUser.getTeamNewestCacheIds();\n\t\t\t\t\t// If a teamId was specified in the API call, then only ONE TEAM will be in the teamsWithPossibleUpdates list\n\t\t\t\t\t// so we must find the 'matching' team in the User's team list and update just that one team.\n\t\t\t\t\tif(teams.size() == 1) {\n\t\t\t\t\t\tTeam specifiedTeam = teams.get(0);\n\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\tfor(Key teamKey : withinTransactionUser.getTeams()) {\n\t\t\t\t\t\t\tif(teamKey.equals(specifiedTeam.getKey())) {\n\t\t\t\t\t\t\t\tnewestCacheIds.set(index, specifiedTeam.getNewestCacheId());\n\t\t\t\t\t\t\t\tlog.info(\"updating cacheID for specified team = \" + specifiedTeam.getTeamName());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ALL the User's team could have been updated. In this case, the code above guarantees that\n\t\t\t\t\t\t// the teamsWithPossibleUpdates list will contain ALL the user's teams -- both updated\n\t\t\t\t\t\t// teams and teams not updated. For simplicity, just completely rebuild newestCacheIds list.\n\t\t\t\t\t\tnewestCacheIds = new ArrayList<Long>();\n\t\t\t\t\t\tfor(Team t : teams) {\n\t\t\t\t\t\t\t// even if Activity not active for this team, getNewestCacheId() guaranteed to return 0L\n\t\t\t\t\t\t\tlog.info(\"updating cacheID for team = \" + t.getTeamName());\n\t\t\t\t\t\t\tnewestCacheIds.add(t.getNewestCacheId());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\twithinTransactionUser.setTeamNewestCacheIds(newestCacheIds);\n\t\t\t\t\tem4.getTransaction().commit();\n\t \t} catch (NoResultException e) {\n\t \tlog.severe(\"user not found\");\n\t \te.printStackTrace();\n\t \t\t} catch (NonUniqueResultException e) {\n\t \t\t\tlog.severe(\"should never happen - two or more users have same key\");\n\t \t\t\te.printStackTrace();\n\t \t\t} finally {\n\t \t\t if (em4.getTransaction().isActive()) {\n\t \t\t \tem4.getTransaction().rollback();\n\t \t\t }\n\t \t\t em4.close();\n\t \t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// because cacheId has been set, this will get sorted by created date - reverse chronological order\n\t\t\tCollections.sort(allTeamsRequestedActivities);\n\t\t\t\n\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\t// enforce the maxCount for Date Interval algorithm\n\t\t\t\tif(allTeamsRequestedActivities.size() > maxCount) {\n\t\t\t\t\t// activity list needs to be truncated, but truncation only happens on full day boundaries\n\t\t\t\t\tDate dateBoundary = allTeamsRequestedActivities.get(maxCount-1).getCreatedGmtDate();\n\t\t\t\t\tdateBoundary = GMT.setTimeToTheBeginningOfTheDay(dateBoundary);\n\t\t\t\t\tlog.info(\"Activity list exceeded max size of \" + maxCount + \". List size = \" + allTeamsRequestedActivities.size() + \" Date boundary = \" + dateBoundary.toString());\n\t\t\t\t\t\n\t\t\t\t\t// find the index of the first activity with a date greater than the boundary date\n\t\t\t\t\tInteger truncateIndex = null;\n\t\t\t\t\tfor(int searchIndex = maxCount; searchIndex<allTeamsRequestedActivities.size(); searchIndex++) {\n\t\t\t\t\t\tDate activityDate = allTeamsRequestedActivities.get(searchIndex).getCreatedGmtDate();\n\t\t\t\t\t\tactivityDate = GMT.setTimeToTheBeginningOfTheDay(activityDate);\n\t\t\t\t\t\tif(activityDate.before(dateBoundary)) {\n\t\t\t\t\t\t\ttruncateIndex = searchIndex;\n\t\t\t\t\t\t\tlog.info(\"truncate index found and = \" + truncateIndex);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// possible that no activity exceeded the boundary date, so modify activity list only if appropriate\n\t\t\t\t\tif(truncateIndex != null) {\n\t\t\t\t\t\t// for subList call, first index is inclusive and second is exclusive\n\t\t\t\t\t\tallTeamsRequestedActivities = allTeamsRequestedActivities.subList(0, truncateIndex);\n\t\t\t\t\t\tlog.info(\"Activity list truncated. New list size = \" + allTeamsRequestedActivities.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Package requested activities into JSON\n\t\t\tJSONArray jsonActivitiesArray = new JSONArray();\n\t\t\tfor(Activity a : allTeamsRequestedActivities) {\n\t\t\t\tJSONObject jsonActivityObj = new JSONObject();\n\t\t\t\tjsonActivityObj.put(\"activityId\", KeyFactory.keyToString(a.getKey()));\n\t\t\t\tjsonActivityObj.put(\"text\", a.getText());\n\t\t\t\t// TODO is the Twitter Date returned GMT? -- if not fix this code\n\t\t\t\tjsonActivityObj.put(\"createdDate\", GMT.convertToLocalDate(a.getCreatedGmtDate(), tz));\n\t\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\t\tjsonActivityObj.put(\"teamId\", a.getTeamId());\n\t\t\t\t\tjsonActivityObj.put(\"teamName\", a.getTeamName());\n\t\t\t\t}\n\t\t\t\tjsonActivityObj.put(\"cacheId\", a.getCacheId());\n\t\t\t\tjsonActivityObj.put(\"numberOfLikeVotes\", a.getNumberOfLikeVotes());\n\t\t\t\tjsonActivityObj.put(\"numberOfDislikeVotes\", a.getNumberOfDislikeVotes());\n\t\t\t\tif(a.getThumbNailBase64() != null) {\n\t\t\t\t\tjsonActivityObj.put(\"thumbNail\",a.getThumbNailBase64());\n\t\t\t\t\tBoolean isVideo = a.getVideoBase64() == null ? false : true;\n\t\t\t\t\tjsonActivityObj.put(\"isVideo\", isVideo);\n\t\t\t\t}\n\t\t\t\tBoolean useTwitterRet = a.getTwitterId() == null ? false : true;\n\t\t\t\tjsonActivityObj.put(\"useTwitter\", useTwitterRet);\n\t\t\t\tjsonActivitiesArray.put(jsonActivityObj);\n\t\t\t}\n\t\t\tlog.info(\"JSON object built successfully\");\n\t\t\tjsonReturn.put(\"activities\", jsonActivitiesArray);\n\n } catch (JSONException e) {\n\t\t\tlog.severe(\"error converting json representation into a JSON object\");\n\t\t\te.printStackTrace();\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t} catch (NoResultException e) {\n\t\t\tlog.severe(\"team not found\");\n\t\t\tapiStatus = ApiStatusCode.TEAM_NOT_FOUND;\n\t\t} catch (NonUniqueResultException e) {\n\t\t\tlog.severe(\"should never happen - two or more teams have same team id\");\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t} catch (JSONException e) {\n\t\t\tlog.severe(\"error creating JSON return object\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new JsonRepresentation(jsonReturn);\n }", "public interface Api {\n @GET(\"topher/2017/May/59121517_baking/baking.json\")\n Call<List<Recipe>> getRecipes();\n}", "@GET\n @Path(\"/\")\n @Produces(\"application/json\")\n public Response all() {\n // Return some cliched textual content\n return Response.ok(\"clients list goes here\", MediaType.APPLICATION_JSON).build();\n }", "public interface DetailMovie {\n @GET(\"{id}\")\n Call<DetailMovies> getData(@Path(\"id\") int id,\n @Query(\"api_key\") String api_key,\n @Query(\"language\") String language,\n @Query(\"append_to_response\") String append_to_response\n );\n}", "@GetMapping(\"/receta/all\")\t\n\tpublic List<Receta> listarReceta(){\n\t\t\treturn this.recetaService.findAll();\n\t}", "public interface ReposApi {\n @GET(\"/users/JakeWharton/repos\")\n Observable<List<Repository>> loadRepositories(@Query(\"page\") long page, @Query(\"per_page\") int perPage);\n}", "public interface MovieDatabaseService {\n\n @GET(\"3/movie/{sort_by}\")\n Call<Movies> fetchMovies(@Path(\"sort_by\") String sortBy, @Query(\"api_key\") String apiKey);\n\n @GET(\"3/movie/{id}/videos\")\n Call<Trailers> findTrailersById(@Path(\"id\") long movieId, @Query(\"api_key\") String apiKey);\n\n @GET(\"3/movie/{id}/reviews\")\n Call<Reviews> findReviewsById(@Path(\"id\") long movieId, @Query(\"api_key\") String apiKey);\n}", "public void getAllBook(){\n Call<Book> call = api.testBooks();\n call.enqueue(\n new Callback<Book>() {\n @Override\n public void onResponse(Call<Book> call, Response<Book> response) {\n Log.e(\"Test API\", \"on Response \"+response.body());\n Book book = response.body();\n Log.e(\"Test API\", \"on Response \"+book.getAuthor());\n Log.e(\"Test API\", \"on Response \"+book.getTitle());\n Log.e(\"Test API\", \"on Response \"+book.getLanguage());\n Log.e(\"Test API\", \"on Response \"+book.getDescription());\n view.onGetSuccess(book);\n }\n\n @Override\n public void onFailure(Call<Book> call, Throwable t) {\n Log.i(\"Test API\", \"on Failure \"+t.getLocalizedMessage());\n }\n }\n );\n }", "public interface MovieApiService {\n\n @GET(\"movie/popular\")\n Call<MoviesResponse> getPopularMovies(@Query(\"page\") int page);\n\n @GET(\"movie/top_rated\")\n Call<MoviesResponse> getTopRatedMovies(@Query(\"page\") int page);\n\n @GET(\"movie/{id}\")\n Call<MoviesResponse> getMovieDetails(@Path(\"id\") long id);\n}", "public RapidViewDataCollection getAllRapidViews(ClientCredentials clientCredentials) throws JSONException {\n\n RapidViewDataCollection rapidViewDataCollection = new RapidViewDataCollection();\n JSONArray rapidViews = jiraAgileRestService.getAllRapidViewsLight(clientCredentials);\n JSONObject currentView;\n Integer currentId;\n String currentName;\n Boolean sprintSupportEnabled;\n \n for(int i=0;i<rapidViews.length();i++) {\n currentView = rapidViews.optJSONObject(i);\n \n if(currentView != null) {\n currentId = currentView.getInt(\"id\");\n currentName = currentView.getString(\"name\");\n sprintSupportEnabled = currentView.getBoolean(\"sprintSupportEnabled\");\n \n rapidViewDataCollection.addRapidView(currentId, currentName, sprintSupportEnabled);\n }\n \n }\n \n return rapidViewDataCollection;\n\n }", "@GET(\"montaje/proyectos/ver/\")\n Call<List<clsProyecto>> getProyectos();", "@GET(\"match\")\n Call<Matches> getMatches();", "Collection<Book> getAll();", "@GetMapping(\"/restaurants\")\n public ResponseEntity<?> getAllRestaurant() {\n return new ResponseEntity<List<Restaurant>>(restaurantServiceImpl.getAllUsers(), HttpStatus.OK);\n }", "public interface GenreService {\r\n\r\n /**\r\n * Returns a hierarchical map of all genres and subgenres.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/genres\")\r\n void getGenres( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n Callback<Collection<GenreData>> callBack);\r\n\r\n /**\r\n * Returns a list of all new releases by genre.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param genreId\r\n * the ID of the genre to load new releases\r\n * @param limit\r\n * the number of releases which are loaded, if <code>null</code> the servers default value is used\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/genres/{genreId}/albums/new\")\r\n void getNewReleases( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"genreId\") String genreId, //\r\n @Query(\"limit\") Integer limit, //\r\n Callback<Collection<AlbumData>> callBack);\r\n}", "ImmutableList<SchemaOrgType> getReviewsList();", "@GetMapping(\"/api/rents\")\r\n public ResponseEntity<List<Rent>> findAll(){\r\n final List<Rent> rentList = rentService.findAll();\r\n return rentList != null && !rentList.isEmpty()\r\n ? new ResponseEntity<>(rentList, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }", "private void populateReviews(Bundle savedInstanceState) {\n LinearLayoutManager layoutManager =\n new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\n mBinding.movieReviews.reviewsList.setLayoutManager(layoutManager);\n mBinding.movieReviews.reviewsList.setHasFixedSize(true);\n mBinding.movieReviews.reviewsList.setNestedScrollingEnabled(false);\n\n RecyclerView.ItemDecoration itemDecoration = new HorizontalItemDecoration(this);\n mBinding.movieReviews.reviewsList.addItemDecoration(itemDecoration);\n\n mReviewAdapter = new ReviewAdapter(this);\n mBinding.movieReviews.reviewsList.setAdapter(mReviewAdapter);\n\n if (savedInstanceState != null && savedInstanceState.containsKey(BUNDLE_REVIEWS)) {\n mReviewAdapter.addReviewsList(savedInstanceState.\n <Review>getParcelableArrayList(BUNDLE_REVIEWS));\n if (mReviewAdapter.getItemCount() == 0) {\n mBinding.movieReviews.reviewsLabel.setVisibility(View.GONE);\n }\n } else {\n Call<ApiResponse<Review>> call = mApiClient.getReviews(movie.movieId);\n\n call.enqueue(new Callback<ApiResponse<Review>>() {\n @Override\n public void onResponse(Call<ApiResponse<Review>> call,\n Response<ApiResponse<Review>> response) {\n List<Review> result = response.body().results;\n mReviewAdapter.addReviewsList(result);\n if (result.size() == 0) {\n mBinding.movieReviews.reviewsLabel.setVisibility(View.GONE);\n }\n }\n\n @Override\n public void onFailure(Call<ApiResponse<Review>> call, Throwable t) {\n Toast.makeText(DetailActivity.this,\n getString(R.string.connection_error), Toast.LENGTH_LONG).show();\n }\n });\n }\n }", "@GetMapping(\"/username/{username}\")\r\n public List<ReviewDetails> getReviewByUserName(@PathVariable(\"username\") String username){\r\n return reviewRepository.getReviewByUsername(username);\r\n }", "public void getCommentList(){\n Retrofit retrofit = ApiClient.getApiClient();\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n\n final SharedPreferences sharedPref = getSharedPreferences(\"TOKENSHARED\", Context.MODE_PRIVATE);\n final String token = sharedPref.getString(\"TOKEN\", null);\n\n Call<List<JsonResponseComment>> call = apiInterface.getComments(heritageId, \"Token \" + token);\n call.enqueue(new Callback<List<JsonResponseComment>>() {\n @Override\n public void onResponse(Call<List<JsonResponseComment>> call, Response<List<JsonResponseComment>> response) {\n if (response.isSuccessful()) {\n final ArrayList<JsonResponseComment> heritageList = (ArrayList<JsonResponseComment>) response.body();\n //Log.d(\"RESPONSE\", response.body());\n setCommentRecyclerView(heritageList);\n } else {\n Toast.makeText(getApplicationContext(), \"Sorry for inconvince server is down\" + response.code(), Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<List<JsonResponseComment>> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"Sorry for inconvince server is down\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@GetMapping(\"/revisions\")\n @Timed\n @Secured({RoleAuthority.SYS_ADMIN_AUTHORITY})\n public ResponseEntity<List<RevisionInfoDTO>> getRevisions(\n @PageableDefault(page = 0, size = Integer.MAX_VALUE) Pageable pageable) {\n log.debug(\"REST request to get page of revisions\");\n Page<RevisionInfoDTO> page = revisionService.getRevisions(pageable);\n return new ResponseEntity<>(page.getContent(), PaginationUtil\n .generatePaginationHttpHeaders(page, \"/api/revisions\"), HttpStatus.OK);\n }", "public interface MovieService {\n @GET(\"/json/movies.json\")\n Call<List<MovieModel>> getDealModel();\n\n}", "@Override\n\t@GET\n\t@Path(\"/airports\")\n @Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getAirports() {\n\t\t\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.addAll(mapAirportData.keySet());\n\t\tlog.debug(\"Resource requested to print all the known airports.\");\n\t\t log.debug(\"Success :\" + Response.Status.OK);\n\t\t return Response.status(Response.Status.OK).entity(list).build();\n\t}", "public ArrayList<Review> getReviews() {\n\t\treturn reviews;\n\t}", "public List<R> getAll();", "@GET\n public List<Lehrer> getAllLehrer() {\n Log.d(\"Webservice Lehrer Get:\");\n Query query = em.createNamedQuery(\"findAllTeachers\");\n List<Lehrer> lehrer = query.getResultList();\n return lehrer;\n }", "@GET(\"movie/top_rated\")\n Call<MovieResponse>getTopRatedMovies(@Query(\"api_key\") String apiKey);", "public interface RuntService {\n @Headers({\n \"Accept: application/json\"\n })\n @GET(\"runt/co.com.runt.local.domain.persona/{id}/{placa}\")\n Call<List<RuntVO>> consultaRunt(@Path(\"id\") Integer numeroCedula, @Path(\"placa\") String placa);\n}", "@Override\n\tpublic List<Recipe> getAllRecipe() {\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tResponseEntity<List<Recipe>> rateResponse =\n\t\t restTemplate.exchange(BASE_URL + RECIPE_URL, HttpMethod.GET, \n\t\t \t\tnull, new ParameterizedTypeReference<List<Recipe>>() {\n\t\t });\n\t\tList<Recipe> recipeList = rateResponse.getBody();\n\t\tlogger.debug(\"RECIPE Info :\" + recipeList);\n\t\treturn recipeList;\n\t}", "public ArrayList<String> getReviews() {\n return reviews;\n }", "private void loadPopularMovies() {\n\n try {\n\n if (API_KEY.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Invalid API key\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n return;\n\n }\n Client Client = new Client();\n MovieService apiMovieService =\n Client.getClient().create(MovieService.class);\n Call<MovieResult> call = apiMovieService.getPopularMovies(API_KEY);\n call.enqueue(new Callback<MovieResult>() {\n @Override\n public void onResponse(Call<MovieResult> call, Response<MovieResult> response) {\n List<Movie> movies = response.body().getResults();\n recyclerView.setAdapter(new MovieAdapter(getApplicationContext(), movies));\n recyclerView.smoothScrollToPosition(0);\n\n\n }\n\n @Override\n public void onFailure(Call<MovieResult> call, Throwable t) {\n Log.d(\"Error\", t.getMessage());\n Toast.makeText(MainActivity.this, \"Error fetching data\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n } catch (Exception e) {\n Log.d(\"Error\", e.getMessage());\n Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "@GET(\"v1/competitions/\")\n Call<List<Leagues>> getAllData();", "@Headers({\n \t\"Content-Type:application/vnd.api+json\" \n })\n @GET(\"api/v2/reports/{id}.json_api\")\n Call<Report> show(\n @retrofit2.http.Path(\"id\") Integer id, @retrofit2.http.Query(\"include\") String include\n );", "Request<List<SimpleTravelProxy>> findAllSimpleTravels();", "List<ViewDefinition> list();", "private void loadTopRatedMovies() {\n\n try {\n if (API_KEY.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Invalid API key\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n return;\n\n }\n Client Client = new Client();\n MovieService apiMovieService =\n Client.getClient().create(MovieService.class);\n Call<MovieResult> call = apiMovieService.getTopRatedMovies(API_KEY);\n call.enqueue(new Callback<MovieResult>() {\n @Override\n public void onResponse(Call<MovieResult> call, Response<MovieResult> response) {\n List<Movie> movies = response.body().getResults();\n recyclerView.setAdapter(new MovieAdapter(getApplicationContext(), movies));\n recyclerView.smoothScrollToPosition(0);\n\n\n }\n\n @Override\n public void onFailure(Call<MovieResult> call, Throwable t) {\n Log.d(\"Error\", t.getMessage());\n Toast.makeText(MainActivity.this, \"Error fetching data\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n } catch (Exception e) {\n Log.d(\"Error\", e.getMessage());\n Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "@GET(\"w/api.php?action=query&format=json&redirects\")\n Call<JsonElement> getPageFromTitle(@Query(\"titles\") String titles);", "@Path(\"info/{title}\")\n @GET\n public Response getMovie(@PathParam(\"title\") String title){\n return movieBean.getMovie(title);\n }", "@RequestMapping(path = \"drugprescription\", method = RequestMethod.GET)\n public List<DrugPrescription> getAllDrugPres(){\n return drugPrescriptionService.getAllDrugPres();\n }", "@GET\r\n @Produces({MediaType.APPLICATION_XML})\r\n public Set<Document> findAll() throws InternalServerErrorException{\r\n LOGGER.info(\"Peticion de todos los documentos\");\r\n Set<Document> collection = null;\r\n try {\r\n collection = ejb.getDocumentList();\r\n } catch (GetCollectionException ex) {\r\n LOGGER.warning(\"ERROR en la obtencion de la lista de documentos\");\r\n throw new InternalServerErrorException();\r\n }\r\n LOGGER.info(\"Respuesta de obtencion de lista de documentos\");\r\n return collection;\r\n }", "@Override\n public List<Revue> getAll() {\n return null;\n }", "@GetMapping(\"/getRE\")\n\tpublic List<EnquiryDetails> getDataRE()\n\t{\n\t\tString url=\"http://localhost:8083/getclient/getalldatafor_re\";\n\t\tList<EnquiryDetails> list=rt.getForObject(url, List.class);\n\t\tSystem.out.println(list);\n\t\treturn list;\n\t}", "@RequestMapping(value = \"/getRecomended\", method = RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic List<Show> getReclist(HttpServletRequest request, HttpServletResponse response) throws IOException{\n\t\tUser user = new User();\n\t\tSystem.out.println(\"SE INSTANCIRA USER\");\n\t\t//Getting user authentication token\n\t\tString authToken = checkToken(request, response);\n\t\t\n\t\t//Check validation of user token\n\t\ttry{\n\t\t\tuser = validateToken(authToken);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\t//If token isnt valid send Unauthorized error\n\t\tif (user == null)\n\t\t\tresponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);\n\t\telse{\t\n\t\t\tList<Show> shows = user.getShows();\n\t\t\treturn shows;\n\t\t}\n\t\treturn null;\t\t\n\t}", "List<Review> getReviewByProductId(Integer productId);", "@Override\n public void getReviews(ArrayList<String> author, ArrayList<String> content) {\n if (author.size() > 0 && content.size() > 0 && author.size() == content.size()) {\n ContentValues[] reviewsArray = new ContentValues[author.size()];\n for (int i = 0; i < author.size(); i++) {\n ContentValues reviewsData = new ContentValues();\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_MOVIE_ID, movieObject.getId());\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_AUTHOR, author.get(i));\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_CONTENT, content.get(i));\n reviewsArray[i] = reviewsData;\n }\n Uri reviewsUri = MovieContract.ReviewEntry.CONTENT_URI.buildUpon().appendPath(Integer.toString(movieObject.getId())).build();\n getContext().getContentResolver().bulkInsert(reviewsUri, reviewsArray);\n }\n currentPage++;\n if (currentPage <= maxPage) {\n GetReviewsFromApi getReviewsFromApi = new GetReviewsFromApi(getContext(), MovieDetailsFragment.this, movieObject.getId());\n getReviewsFromApi.execute();\n }\n }", "public void listAllCustomers () {\r\n\t\t\r\n customersList = my.resturnCustomers();\r\n\t\t\r\n\t}", "@RequestMapping(value = \"/customer-addres\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<CustomerAddres> getAllCustomerAddres() {\n log.debug(\"REST request to get all CustomerAddres\");\n List<CustomerAddres> customerAddres = customerAddresRepository.findAll();\n return customerAddres;\n }", "public ListaResponse<G> listar();" ]
[ "0.6661866", "0.64716494", "0.63645", "0.60562927", "0.60100377", "0.597142", "0.5960234", "0.59572744", "0.59062123", "0.5895709", "0.5849172", "0.584878", "0.58207434", "0.5820127", "0.58148545", "0.5786213", "0.5782671", "0.5772473", "0.57391816", "0.57141376", "0.56970036", "0.5695625", "0.56752694", "0.5641679", "0.563941", "0.5639234", "0.56338686", "0.5620887", "0.56086874", "0.5598318", "0.5581325", "0.55804676", "0.55800474", "0.5579902", "0.55709255", "0.55606633", "0.5560433", "0.5551257", "0.5550434", "0.55431575", "0.55340827", "0.55287904", "0.5527422", "0.5519994", "0.55175596", "0.5514621", "0.5497904", "0.54962134", "0.5479745", "0.5477013", "0.54755944", "0.5466349", "0.54409957", "0.5440556", "0.54387724", "0.5431678", "0.543072", "0.5424367", "0.5418268", "0.5410449", "0.54071456", "0.540574", "0.5399292", "0.5396855", "0.5389956", "0.5385057", "0.53849435", "0.5381985", "0.5378973", "0.53723484", "0.5369255", "0.53691536", "0.5365355", "0.5355319", "0.5348453", "0.5347577", "0.5347074", "0.53435546", "0.5341522", "0.5340889", "0.53366524", "0.5334616", "0.53255135", "0.53236353", "0.5317165", "0.5314638", "0.5304339", "0.5300732", "0.5297098", "0.5296934", "0.52946734", "0.52930605", "0.5289039", "0.528774", "0.52845174", "0.5281948", "0.5279471", "0.5278999", "0.5274766", "0.5269075" ]
0.604043
4
REST API CALL TO GET A REVIEW //
@GetMapping(value = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> getReview(HttpServletResponse response, @PathVariable("id") int id) { response.addHeader("Date", new Date().toString()); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate"); response.setHeader("Pragma","no-cache"); response.setHeader("Version","Mechanic API V-2.0"); response.setDateHeader("Expires", 0); return new ResponseEntity<>( reviewService.getReview(id), HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(\"movie/{id}\")\n Call<PersonagemResponse> getMovieDetails(@Path(\"id\") int id, @Query(\"api_key\") String apiKey);", "@GET(\"replays/{id}\")\n Call<DataResponse<ReplayData>> getReplayData(@Path(\"id\") String replayId);", "@GET(\"movie/top_rated\")\n Call<MovieResponse>getTopRatedMovies(@Query(\"api_key\") String apiKey);", "@GET(\"top_rated\")\n Call<MoviesClass> listTopRated(@Query(\"api_key\") String api_key);", "@GET(\"genre/movie/list\")\n Call<GenreResponse> getGenreList(@Query(\"api_key\") String apikey);", "@GET(\"characters/\")\n Call<PersonagemResponse> getTopRatedMovies(@Query(\"api_key\") String apiKey);", "@GET\n\t@Path(\"{id}/reviews\")\n\t@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n\tpublic Response getApplicationReviews(\n\t\t\t@HeaderParam(\"ORSKey\") String orsKey,\n\t\t\t@HeaderParam(\"ShortKey\") String shortKey,\n\t\t\t@PathParam(\"id\") String id) {\n\t\tif (!Security.instance.isInternalUser(orsKey, shortKey)) {\n\t\t\tthrow new ForbiddenException(\"User does not have permission\");\n\t\t}\n\t\tList<Review> list = ReviewsDao.instance.getByApplication(id);\n\t\tif (list == null) {\n\t\t\tthrow new NotFoundException(\"Review list not found\");\n\t\t} else {\n\t\t\tGenericEntity<List<Review>> returnList = new GenericEntity<List<Review>>(list) {};\n\t\t\treturn Response.ok(returnList).build();\n\t\t}\n\t}", "public interface IMovieRankApi {\n @GET(\"boxoffice/searchDailyBoxOfficeList.json?key=\" + Util.MOVIE_API_KEY)\n Call<MovieRankingOriginModel> getMovieRankingList(@Query(\"targetDt\")String targetDt);\n\n @GET(\"boxoffice/searchDailyBoxOfficeList.json?key=\" + Util.MOVIE_API_KEY)\n Call<String> getMovieRankingListString(@Query(\"targetDt\")String targetDt);\n}", "public interface DetailMovie {\n @GET(\"{id}\")\n Call<DetailMovies> getData(@Path(\"id\") int id,\n @Query(\"api_key\") String api_key,\n @Query(\"language\") String language,\n @Query(\"append_to_response\") String append_to_response\n );\n}", "@GET(\"match\")\n Call<Matches> getMatches();", "@Path(\"info/{title}\")\n @GET\n public Response getMovie(@PathParam(\"title\") String title){\n return movieBean.getMovie(title);\n }", "@Headers({\n \t\"Content-Type:application/vnd.api+json\" \n })\n @GET(\"api/v2/reports/{id}.json_api\")\n Call<Report> show(\n @retrofit2.http.Path(\"id\") Integer id, @retrofit2.http.Query(\"include\") String include\n );", "@Test\n\t \n\t public void getApi() {\n\t\t \n\t\t Response getIt=get(\"https://reqres.in/api/users?page=2\");\n\t\t getIt.prettyPrint();\n\t\t System.out.println(getIt.getStatusCode());\n\t\t System.out.println(getIt.getTime());\n\t\t \n\t\t //to validate\n\t\t int validGstatus=getIt.getStatusCode();\n\t\t Assert.assertEquals(validGstatus,200);\n\t\t \n\t }", "private String getReviewApiLink(String id) {\n String reviewLink = \"https://api.themoviedb.org/3/movie/\" + id + \"/reviews?api_key=8f067240d8717f510b4c79abe9f714b7&language=en-US\";\n return reviewLink;\n }", "@GET(\"posts/1\")\n public Call<Post> getPost();", "@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)\n\t\tpublic ResponseEntity<Object> getReviews(HttpServletResponse response) {\n\t\t\t\n\t\t\tresponse.addHeader(\"Date\", new Date().toString());\n\t\t\tresponse.setHeader(\"Cache-Control\",\"no-cache,no-store,must-revalidate\");\n\t\t response.setHeader(\"Pragma\",\"no-cache\");\n\t\t response.setHeader(\"Version\",\"Mechanic API V-2.0\");\n\t\t response.setDateHeader(\"Expires\", 0);\n\t\t \n\t\t\treturn new ResponseEntity<>( reviewService.getReviews(), HttpStatus.OK);\n\t\t}", "private void GetRetrofitResponseAccordingToID(){\n\n IMovieApi IMovieApi = Servicey.getMovieApi();\n Call<MovieModel> responseCall = IMovieApi\n .getMovie(\n 343611,\n Credentials.API_KEY);\n\n responseCall.enqueue(new Callback<MovieModel>() {\n @Override\n public void onResponse(Call<MovieModel> call, Response<MovieModel> response) {\n if (response.code() == 200){\n MovieModel model = response.body();\n Log.v(TAG, \"The Response: \" +model.getTitle());\n }else {\n\n try {\n Log.v(TAG, \"Error \" + response.errorBody().string());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }\n\n @Override\n public void onFailure(Call<MovieModel> call, Throwable t) {\n t.printStackTrace();\n }\n });\n\n }", "@GET(\"posts/1\")\n Call<Post> getPostOne();", "@GET(\"list_movies.json\")\n Call<MoviesResponse> getMoviesList(\n @Query(\"genre\") String genre,\n @Query(\"sort_by\") String sortBy,\n @Query(\"page\") int page);", "@GET(\"movie_details.json?with_cast=true&with_images=true\")\n Call<MovieDetailsResponse> getMovieDetails(@Query(\"movie_id\") String id);", "public interface Api {\n @GET(\"ikds.do\")\n Call<List<Movie>> getMovies(@Query(\"since\") int since, @Query(\"pagesize\") int pagesize);\n}", "private void getVideo() {\n // create the url\n String temp = movie.getId().toString();\n String url = API_BASE_URL+\"/movie/\"+temp+\"/videos\";\n // set the request parameters\n RequestParams params = new RequestParams();\n params.put(API_KEY_PARAM, getString(R.string.api_key)); // Always needs API key\n // request a GET response expecting a JSON object response\n\n client.get(url,params, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n // load the results into movies list\n\n try {\n JSONArray results = response.getJSONArray(\"results\");\n JSONObject curMovie = results.getJSONObject(0);\n key = curMovie.getString(\"key\");\n\n } catch (JSONException e) {\n logError(\"Failed to parse play_video endpoint\", e, true);\n }\n\n\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n logError(\"Failed to get data from Now_playing endpoint\", throwable, true);\n }\n });\n\n }", "@Test\n public void GetMEthod() {\n\n RestAssured.baseURI = \"http://www.omdbapi.com/\";\n\n RequestSpecification request = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response = request\n\n .when()\n\n .get(\"/?apikey=5148dbc1&s=Harry Potter\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n int responseCode = response.getStatusCode();\n ResponseBody responseBody = response.getBody();\n ArrayList<String> list=new ArrayList<String>();\n\n //System.out.println(response.asString());\n Gson gson=new Gson();\n String json=response.asString();\n Search obj=gson.fromJson(json,Search.class);\n String imdb=\"\";\n for (Element e:obj.Search\n ) {\n String title=e.getTitle();\n if (title.equals(\"Harry Potter and the Sorcerer's Stone\")){\n imdb=e.getimdbID();\n }\n }\n System.out.println(\"imdbID:\"+imdb);\n //http://www.omdbapi.com/?apikey=5148dbc1&i=tt0241527&type=movie\n RequestSpecification request1 = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response1 = request1\n\n .when()\n\n .get(\"/?apikey=5148dbc1&i=\"+imdb+\"&type=movie\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n String json1=response1.asString();\n Movie obj1=gson.fromJson(json1,Movie.class);\n\n System.out.println(\"Title:\" +obj1.getTitle() + \" Year: \" + obj1.getYear()+ \" Released: \"+obj1.getReleased());\n\n System.out.println(\"---------------------\");\n\n\n\n\n\n }", "public interface VideoApi {\n\n @GET(\"tabs/selected\")\n Observable<Video> getVideoList(@Query(\"date\") String date);\n\n}", "public interface RestApi {\n\n @GET(\"/ride.asp\")\n Call<List<Model>> getData (@Query(\"userid\") int userId,\n @Query(\"from_name\") String fromName,\n @Query(\"from_lat\") double lat,\n @Query(\"from_lng\") double lng,\n @Query(\"to_name\") String toName,\n @Query(\"to_lat\") double toLat,\n @Query(\"to_lng\") double toLng,\n @Query(\"time\") long time);\n}", "public interface ApiInterface {\n @GET(\"movie/top_rated\")\n Call<MoviesResponse> getTopRatedMovies(@Query(\"api_key\") String apiKey);\n\n @GET(\"movie/{id}\")\n Call<MoviesResponse> getMovieDetails(@Path(\"id\") int id, @Query(\"api_key\") String apiKey);\n\n}", "QueryRequest<Review> query();", "@GET(\"test/{testNo}\")\n Observable<TestDetailResponse> getTestData(@Path(\"testNo\") int testNo);", "public interface ApiInterface {\n @GET(\"json/movies.json\")\n Call<List<Movie>> getStudentDetails();\n}", "@GET(\"planetary/apod\")\n Call<APOD> getApod(\n @Query(\"date\") String date,\n @Query(\"api_key\") String API_KEY\n );", "@Headers(\"Authorization:{WRITE_YOURS_TOKEN}\")\n @GET(\"/api/rest/issues?page_size=10&page=1\")\n Call<Issues> getData();", "@GET(\"w/api.php?action=query&format=json&redirects\")\n Call<JsonElement> getPageFromTitle(@Query(\"titles\") String titles);", "public void getBookByTitle(String base64){\n Call<Book> call = api.postBook(base64);\n call.enqueue(\n new Callback<Book>() {\n @Override\n public void onResponse(Call<Book> call, Response<Book> response) {\n Log.e(\"Test API\", \"on Response \"+response.body());\n Book book = response.body();\n Log.e(\"Test API\", \"on Response \"+book.getAuthor());\n Log.e(\"Test API\", \"on Response \"+book.getTitle());\n Log.e(\"Test API\", \"on Response \"+book.getLanguage());\n Log.e(\"Test API\", \"on Response \"+book.getDescription());\n view.onGetSuccess(book);\n }\n\n @Override\n public void onFailure(Call<Book> call, Throwable t) {\n Log.i(\"Test API\", \"on Failure \"+t.getLocalizedMessage());\n }\n }\n );\n }", "@RequestMapping(value = \"/recomend\", method = RequestMethod.POST, produces = \"application/json\")\n\t@ResponseBody\n\tpublic void recomendShow(\n\t\t\t@RequestParam(\"tmdb_id\") String tmdb_id,\n\t\t\t@RequestParam(\"title\") String title,\n\t\t\t@RequestParam(\"overview\") String overview, \n\t\t\t@RequestParam(\"poster_path\") String poster_path,\n\t\t\t@RequestParam(\"genres\") String genres,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException{\n\t\tUser user = new User();\n\t\t\n\t\t//Getting user authentication token\n\t\tString authToken = checkToken(request, response);\n\t\t\t\t\n\t\t//Check validation of user token\n\t\ttry{\n\t\t\tuser = validateToken(authToken);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\t//If token isnt valid send Unauthorized error\n\t\tif (user == null)\n\t\t\tresponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);\n\t\telse{\n\t\t\t\n\t\t\t//Get show ovject from show tmdb id\t\t\t\n\t\t\tList<Show> showWithId = service.findByTmdbId(tmdb_id);\n\t\t\t\n\t\t\t//If show is in database get it, else create object and put it in database\n\t\t\tShow show = null;\n\t\t\tif (showWithId.size() > 0){\n\t\t\t\tSystem.out.println(showWithId.get(0).getTitle());\n\t\t\t\tshow = showWithId.get(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\n\t\t\tshow = createShow(tmdb_id, title, overview, poster_path, genres);\t\t\t\n\t\t\tservice.save(show);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Check if user has already recommended show\n\t\t\tboolean check = service.checkIfShowIsRecomendedByUser(show, user);\n\t\t\tSystem.out.println(\"GLASAL: \" + check);\n\t\t\t\n\t\t\tif (!check)\n\t\t\t{\n\t\t\t\tList<Show> shows = user.getShows();\n\t\t\t\tif(!shows.contains(show)){\n\t\t\t\t\tSystem.out.println(\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \" + show.getTitle());\n\t\t\t\t\tshows.add(show);\n\t\t\t\t\tuser.setShows(shows);\n\t\t\t \tuserService.save(user);\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t }\t\n\t}", "public interface TMDbService {\n\n public static final String BASE_URL = \"http://api.themoviedb.org/\";\n\n //https://api.themoviedb.org/3/movie/popular?api_key=<<api_key>>&language=en-US&page=1\n @GET(\"3/movie/{category}\")\n Call<MovieResultSet> getMoviesList(@Path(\"category\") @MovieFilterDescriptor.MovieFilterDef String category, @Query(\"api_key\") String apiKey, @Query(\"language\")String language, @Query(\"page\") int page);\n\n //https://api.themoviedb.org/3/movie/328111?api_key=<<api_key>>&language=en-U\n @GET(\"3/movie/{movie_id}\")\n Call<DetailedMovie> getMovieDetail(@Path(\"movie_id\") int movieId, @Query(\"api_key\") String apiKey, @Query(\"language\")String language);\n\n //https://api.themoviedb.org/3/movie/{movie_id}/videos?api_key=<<api_key>>&language=en-US\n @GET(\"3/movie/{movie_id}/videos\")\n Call<VideoResultSet> getMovieVideos(@Path(\"movie_id\") int movieId, @Query(\"api_key\") String apiKey, @Query(\"language\")String language);\n\n //https://api.themoviedb.org/3/movie/{movie_id}/reviews?api_key=<<api_key>>&language=en-US&page=1\n @GET(\"3/movie/{movie_id}/reviews\")\n Call<ReviewResultSet> getMovieReviews(@Path(\"movie_id\") int movieId, @Query(\"api_key\") String apiKey, @Query(\"language\")String language, @Query(\"page\") int page);\n\n}", "public interface Service {\n @GET(\"/orama-media/json/fund_detail_full.json?limit=1000&offset=0&serializer=fund_detail_full\")\n Call<List<Example>> getExample();\n\n}", "@Test\n void getVotesForToday() throws Exception {\n TestUtil.print(mockMvc.perform(get(REST_URL + \"restaurantVotes\")\n .with(userHttpBasic(USER1))))\n .andExpect(status().isOk())\n .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n .andExpect(getToMatcher(RESTAURANT_TO_CURRENT_DATE));\n }", "@Get \n public JsonRepresentation getActivities(Variant variant) {\n \tlog.info(\"getActivities(@Get) entered ..... \");\n \tJSONObject jsonReturn = new JSONObject();\n\t\t\n\t\tString apiStatus = ApiStatusCode.SUCCESS;\n\t\tthis.setStatus(Status.SUCCESS_OK);\n\t\tUser currentUser = null;\n\t\tTimeZone tz = null;\n\t\t// teamId is provided only if getting activities for a single team. \n\t\tboolean isGetActivitiesForAllTeamsApi = this.teamId == null;\n try {\n \t\tcurrentUser = (User)this.getRequest().getAttributes().get(RteamApplication.CURRENT_USER);\n \t\tif(currentUser == null) {\n\t\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n \t\t\tlog.severe(\"user could not be retrieved from Request attributes!!\");\n \t\t}\n \t\t//::BUSINESSRULE:: user must be network authenticated to get activities\n \t\telse if(!currentUser.getIsNetworkAuthenticated()) {\n \t\t\tapiStatus = ApiStatusCode.USER_NOT_NETWORK_AUTHENTICATED;\n \t\t}\n \t\t//::BUSINESSRULE:: user must be a member of the team, if teamId was specified\n \t\telse if(this.teamId != null && !currentUser.isUserMemberOfTeam(this.teamId)) {\n\t\t\t\tapiStatus = ApiStatusCode.USER_NOT_MEMBER_OF_SPECIFIED_TEAM;\n\t\t\t\tlog.info(apiStatus);\n \t}\n \t\t// timeZone check \n \t\telse if(this.timeZoneStr == null || this.timeZoneStr.length() == 0) {\n \t\t\tlog.info(\"getActivities(): timeZone null or zero length\");\n \t \tapiStatus = ApiStatusCode.TIME_ZONE_REQUIRED;\n \t\t} else {\n \t\t\ttz = GMT.getTimeZone(this.timeZoneStr);\n \t\t\tif(tz == null) {\n \t\tapiStatus = ApiStatusCode.INVALID_TIME_ZONE_PARAMETER;\n \t\t\t}\n \t\t}\n\t\n \t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_OK)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n \t\t//////////////////////////////////////\n\t\t\t// verify and default input parameters\n \t\t//////////////////////////////////////\n\t\t\tboolean refreshFirst = false;\n\t\t\tif(this.refreshFirstStr != null) {\n\t\t\t\tif(refreshFirstStr.equalsIgnoreCase(\"true\")) {\n\t\t\t\t\trefreshFirst = true;\n\t\t\t\t} else if(refreshFirstStr.equalsIgnoreCase(\"false\")) {\n\t\t\t\t\trefreshFirst = false;\n\t\t\t\t} else {\n\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_REFRESH_FIRST_PARAMETER;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tboolean newOnly = false;\n\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\tif(this.newOnlyStr != null) {\n\t\t\t\t\tif(newOnlyStr.equalsIgnoreCase(\"true\")) {\n\t\t\t\t\t\tnewOnly = true;\n\t\t\t\t\t} else if(newOnlyStr.equalsIgnoreCase(\"false\")) {\n\t\t\t\t\t\tnewOnly = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_NEW_ONLY_PARAMETER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint maxCount = DEFAULT_MAX_COUNT;\n\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS) && maxCountStr != null) {\n\t\t\t\ttry {\n\t\t\t\t\tmaxCount = new Integer(maxCountStr);\n\t\t\t\t\tif(maxCount > MAX_MAX_COUNT) maxCount = MAX_MAX_COUNT;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_MAX_COUNT_PARAMETER;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t///////////////////////////////////\n\t\t\t// some parameters are API specific\n\t\t\t///////////////////////////////////\n\t\t\tLong maxCacheId = null;\n\t\t\tDate mostCurrentDate = null;\n\t\t\tInteger totalNumberOfDays = null;\n\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\t////////////////////////////////////////////////////////\n\t\t\t\t// Get Activity for All Teams: Parameters and Validation\n\t\t\t\t////////////////////////////////////////////////////////\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS) && mostCurrentDateStr != null) {\n\t\t\t\t\tmostCurrentDate = GMT.convertToGmtDate(mostCurrentDateStr, false, tz);\n\t\t\t\t\tif(mostCurrentDate == null) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_MOST_CURRENT_DATE_PARAMETER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS) && this.totalNumberOfDaysStr != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttotalNumberOfDays = new Integer(this.totalNumberOfDaysStr);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_TOTAL_NUMBER_OF_DAYS_PARAMETER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//::BUSINESSRULE:: if newOnly=true, then refreshFirst must also be true\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\t\tif(newOnly && !refreshFirst) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.REFRESH_FIRST_AND_NEW_ONLY_MUST_BE_SPECIFIED_TOGETHER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//::BUSINESSRULE:: if newOnly=false, date interval must be specified\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\t\tif(!newOnly && (mostCurrentDate == null || totalNumberOfDays == null)) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.DATE_INTERVAL_REQUIRED;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//::BUSINESSRULE:: newOnly=true is mutually exclusive with date interval\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\t\tif(newOnly && (mostCurrentDate != null || totalNumberOfDays != null)) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.NEW_ONLY_AND_DATE_INTERVAL_MUTUALLY_EXCLUSIVE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t///////////////////////////////////////////////////////////////////////\n\t\t\t\t// Get Activity for a Single, Specified Team: Parameters and Validation\n\t\t\t\t///////////////////////////////////////////////////////////////////////\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS) && maxCacheIdStr != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmaxCacheId = new Long(maxCacheIdStr);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.INVALID_MAX_CACHE_ID_PARAMETER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//::BUSINESSRULE:: refreshFirst=true is mutually exclusive with maxCacheId\n\t\t\t\tif(apiStatus.equals(ApiStatusCode.SUCCESS)) {\n\t\t\t\t\tif(refreshFirst && maxCacheId != null) {\n\t\t\t\t\t\tapiStatus = ApiStatusCode.REFRESH_FIRST_AND_MAX_CACHE_ID_MUTUALLY_EXCLUSIVE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_OK)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n\t\t\tList<Team> teams = new ArrayList<Team>();\n\t\t\tList<Key> teamKeys = null;\n\t\t\tEntityManager em = EMF.get().createEntityManager();\n\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\tteamKeys = currentUser.getTeams();\n\t\t\t\tif(teamKeys.size() > 0) {\n\t\t\t\t\t//::JPA_BUG:: ?? if I get all teams by passing in a list of keys, the list of teams is not in same order as keys!!!!\n//\t \t\t\tList<Team> teams = (List<Team>) em.createQuery(\"select from \" + Team.class.getName() + \" where key = :keys\")\n//\t\t\t\t\t\t.setParameter(\"keys\", teamKeys)\n//\t\t\t\t\t\t.getResultList();\n\t\t\t\t\t\n\t\t\t\t\tfor(Key tk : teamKeys) {\n\t\t\t\t\t\tTeam aTeam = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t aTeam = (Team)em.createNamedQuery(\"Team.getByKey\")\n\t\t\t\t\t\t\t\t.setParameter(\"key\", tk)\n\t\t\t\t\t\t\t\t.getSingleResult();\n\t\t\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t\t\tlog.severe(\"should never happen. Could not find team with the team key\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(aTeam != null) {teams.add(aTeam);}\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(\"number of teams retrieved for current user = \" + teams.size());\n\t\t\t\t} else {\n\t\t\t\t\tlog.info(\"user has no teams\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttry {\n \t\t\t\t\tTeam team = (Team)em.createNamedQuery(\"Team.getByKey\")\n \t\t\t\t\t\t.setParameter(\"key\", KeyFactory.stringToKey(this.teamId))\n \t\t\t\t\t\t.getSingleResult();\n \t\t\t\t\tlog.info(\"team retrieved = \" + team.getTeamName());\n \t\t\t\t\tteams.add(team);\n \t\t\t\t} catch (NoResultException e) {\n \t\t\t\t\tapiStatus = ApiStatusCode.TEAM_NOT_FOUND;\n \t\t\t\t\tlog.info(\"invalid team id\");\n \t\t\t\t} catch (NonUniqueResultException e) {\n \t\t\t\t\tlog.severe(\"should never happen - two teams have the same key\");\n \t\t\t\t}\n\t\t\t}\n \t\t\n\t\t\tList<Activity> allTeamsRequestedActivities = new ArrayList<Activity>();\n\t\t\t\n\t\t\t// All teams support activity so all teams are processed\n\t\t\tfor(Team userTeam : teams) {\n\t\t\t\tBoolean teamUsesTwitter = userTeam.getUseTwitter() != null && userTeam.getUseTwitter();\n\t\t\t\t\n\t\t\t\tList<Activity> teamRequestedActivities = null;\n\t\t\t\tLong cacheId = userTeam.getNewestCacheId();\n\t\t\t\t\n\t\t\t\t////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\t// If a refresh has been requested and team uses Twitter, get the latest activities from Twitter and store in cache\n\t\t\t\t////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\tif(teamUsesTwitter && refreshFirst) {\n\t\t\t\t\tlog.info(\"refreshFirst is true - updating the cache\");\n\t\t\t\t\t\n\t\t\t\t\tif(newOnly) {teamRequestedActivities = new ArrayList<Activity>();}\n\n\t\t\t\t\t// Twitter refresh is done at most once per minute, so see if the refresh has been done in the last minute.\n\t\t\t\t\tDate lastRefreshDate = userTeam.getLastTwitterRefresh();\n\t\t\t\t\tLong howLongSinceLastRefresh = null;\n\t\t\t\t\tDate now = new Date();\n\t\t\t\t\tif(lastRefreshDate != null) {\n\t\t\t\t\t\thowLongSinceLastRefresh = now.getTime() - lastRefreshDate.getTime();\n\t\t\t\t\t\tlog.info(\"howLongSinceLastRefresh = \" + howLongSinceLastRefresh);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"lastTwitterRefresh in User null, so refresh will proceed\"); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(lastRefreshDate == null || (howLongSinceLastRefresh > ONE_MINUTE_IN_MILLI_SECONDS)) {\n\t\t\t\t\t\tlog.info(\"has been over a minute so do a Twitter refresh\");\n\t\t\t\t\t\tLong newestTwitterId = userTeam.getNewestTwitterId();\n\t\t\t\t\t\tList<Activity> twitterActivities = TwitterClient.getTeamActivities(userTeam, newestTwitterId);\n\t\t\t\t\t\tif(twitterActivities == null) {\n\t\t\t\t\t\t\tapiStatus = ApiStatusCode.TWITTER_ERROR;\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_OK)) {\n\t\t\t\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// because twitterActivities doesn't have the cacheId set, this will get sorted by twitterId\n\t\t\t\t\t\tCollections.sort(twitterActivities);\n\t\t\t\t\t\t\n\t\t\t\t\t\t////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\t// persist the activities retrieved from Twitter that aren't already stored in the cache\n\t\t\t\t\t\t////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\tint requestedActivityCount = maxCount;\n\n\t\t\t\t\t\tLong largestTwitterId = newestTwitterId;\n\t\t\t\t\t\tlog.info(\"before processing activities, newestTwitterId = \" + newestTwitterId);\n\t\t\t\t\t\tEntityManager em0 = EMF.get().createEntityManager();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor(Activity a: twitterActivities) {\n\t\t\t\t\t\t\t\tem0.getTransaction().begin();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tActivity precachedActivity = (Activity)em0.createNamedQuery(\"Activity.getByTwitterId\")\n\t\t\t\t\t\t\t\t\t\t.setParameter(\"twitterId\", a.getTwitterId())\n\t\t\t\t\t\t\t\t\t\t.getSingleResult();\n\t\t\t\t\t\t\t\t\t// if already cached, there is no work to do ...\n\t\t\t\t\t\t\t\t} catch (NoResultException e) {\n\t\t\t\t\t \t// not an error - we have found a Twitter update that was a direct post to Twitter\n\t\t\t\t\t\t\t\t\tlog.info(\"uncached activity retrieved with twitter ID = \" + a.getTwitterId());\n\t\t\t\t\t\t\t\t\tif(newOnly && requestedActivityCount != 0) {\n\t\t\t\t\t\t\t\t\t\tteamRequestedActivities.add(a);\n\t\t\t\t\t\t\t\t\t\trequestedActivityCount--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcacheId += 1;\n\t\t\t\t\t\t\t\t\ta.setCacheId(cacheId);\n\t\t\t\t\t\t\t\t\tem0.persist(a);\n\t\t\t\t\t\t\t\t\tif(a.getTwitterId() > largestTwitterId) {largestTwitterId = a.getTwitterId();}\n\t\t\t\t\t \t\t} catch (NonUniqueResultException e) {\n\t\t\t\t\t \t\t\tlog.severe(\"should never happen - two or more activities have the same twitter ID\");\n\t\t\t\t\t \t\t}\n\t\t\t\t\t\t\t\tem0.getTransaction().commit();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlog.info(\"after processing activities, largestTwitterId = \" + largestTwitterId);\n\t\t\t\t\t\t\tnewestTwitterId = largestTwitterId;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tem0.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Update team in a separate transaction\n\t\t\t\t\t\t// at this point, newestTwitterId holds the largest, most recent Twitter Id\n\t\t\t\t\t\t// at this point, cachId holds the largest, most recent cache Id\n\t\t\t\t\t\tEntityManager em2 = EMF.get().createEntityManager();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tem2.getTransaction().begin();\n\t\t\t\t\t\t\tTeam teamInTransaction = (Team)em2.createNamedQuery(\"Team.getByKey\")\n\t\t\t\t\t\t\t\t.setParameter(\"key\", userTeam.getKey())\n\t\t\t\t\t\t\t\t.getSingleResult();\n\t\t\t\t\t\t\tlog.info(\"team2 retrieved = \" + teamInTransaction.getTeamName());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// update the activity IDs\n\t\t\t\t\t\t\tteamInTransaction.setNewestCacheId(cacheId);\n\t\t\t\t\t\t\tteamInTransaction.setNewestTwitterId(newestTwitterId);\n\t\t\t\t\t\t\tteamInTransaction.setLastTwitterRefresh(new Date());\n\t\t\t\t\t\t\tem2.getTransaction().commit();\n\t\t\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t\t\tlog.severe(\"Should never happen. Could not find team using teamKey from User entity.\");\n\t\t\t\t\t\t\t// no matter what, the teamsWithPossibleUpdates team list MUST be complete if this is a refresh!\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t if (em2.getTransaction().isActive()) {\n\t\t\t\t\t\t em2.getTransaction().rollback();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t em2.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // end of if(teamUsesTwitter && refreshFirst)\n\t\t\t\t\n\t\t\t\t// If this team uses Twitter and this is a refreshFirst with newOnly, then teamRequestedActivities \n\t\t\t\t// already initialized in the code above.\n\t\t\t\tif(!(teamUsesTwitter && refreshFirst && newOnly)) {\n\t\t\t\t\tif(refreshFirst && newOnly) {\n\t\t\t\t\t\t// teamUsesTwitter must be false. If no Twitter, then a refreshFirst-newOnly request has no work to do,\n\t\t\t\t\t\t// but must create a teamRequestedActivities for code below, so make the empty list.\n\t\t\t\t\t\tteamRequestedActivities = new ArrayList<Activity>();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// To get into this leg of code, newOnly must be FALSE\n\t\t\t\t\t\t\n\t\t\t\t\t\t//////////////////////////////////////////////////////////////\n\t\t\t\t\t\t// Build the teamRequestedActivities list from the local cache\n\t\t\t\t\t\t//////////////////////////////////////////////////////////////\n\t\t\t\t\t\tEntityManager em3 = EMF.get().createEntityManager();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tlog.info(\"getting activities from the cache ...\");\n\t\t\t\t\t\t\t//////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\t\t// return activities from cache (which may include some new stuff too)\n\t\t\t\t\t\t\t//////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\t\t\t\t\t// Since newOnly must be false (see comment above) the mostCurrentDate and totalNumberOfDays\n\t\t\t\t\t\t\t\t// must be specified according to the API business rules.\n\n\t\t\t\t\t\t\t\t//////////////////////////////////\n\t\t\t\t\t\t\t\t// get activities by date interval\n\t\t\t\t\t\t\t\t//////////////////////////////////\n\t\t\t\t\t\t\t\tDate leastCurrentDate = GMT.subtractDaysFromDate(mostCurrentDate, totalNumberOfDays-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tteamRequestedActivities = (List<Activity>)em3.createNamedQuery(\"Activity.getByTeamIdAndUpperAndLowerCreatedDates\")\n\t\t\t\t\t\t\t\t\t.setParameter(\"teamId\", KeyFactory.keyToString(userTeam.getKey()))\n\t\t\t\t\t\t\t\t\t.setParameter(\"mostCurrentDate\", GMT.setTimeToEndOfTheDay(mostCurrentDate))\n\t\t\t\t\t\t\t\t\t.setParameter(\"leastCurrentDate\", GMT.setTimeToTheBeginningOfTheDay(leastCurrentDate))\n\t\t\t\t\t\t\t\t\t.getResultList();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//////////////////////////////////\n\t\t\t\t\t\t\t\t// get activities by cacheId range\n\t\t\t\t\t\t\t\t//////////////////////////////////\n\t\t\t\t\t\t\t\tLong upperCacheId = null; // non-inclusive, upper cache ID used in activity query\n\t\t\t\t\t\t\t\tLong lowerCacheId = null; // \n\t\t\t\t\t\t\t\tif(maxCacheId != null) {\n\t\t\t\t\t\t\t\t\t// typically used to request activities that are not the most recent\n\t\t\t\t\t\t\t\t\tif(maxCacheId > cacheId + 1) {maxCacheId = cacheId + 1;}\n\t\t\t\t\t\t\t\t\tupperCacheId = maxCacheId;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// the most recent activities are being requested\n\t\t\t\t\t\t\t\t\t// make upper cache ID large enough so newest item in cache will be returned\n\t\t\t\t\t\t\t\t\tupperCacheId = cacheId + 1; \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlowerCacheId = upperCacheId - maxCount;\n\t\t\t\t\t\t\t\t// number of available activities might be less than maxCount\n\t\t\t\t\t\t\t\tif(lowerCacheId < 0) {lowerCacheId = 0L;}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tteamRequestedActivities = (List<Activity>)em3.createNamedQuery(\"Activity.getByTeamIdAndUpperAndLowerCacheIds\")\n\t\t\t\t\t\t\t\t\t.setParameter(\"teamId\", KeyFactory.keyToString(userTeam.getKey()))\n\t\t\t\t\t\t\t\t\t.setParameter(\"upperCacheId\", upperCacheId)\n\t\t\t\t\t\t\t\t\t.setParameter(\"lowerCacheId\", lowerCacheId)\n\t\t\t\t\t\t\t\t\t.getResultList();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlog.info(\"number of teamRequestedActivities found = \" + teamRequestedActivities.size());\n\t\t\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t\t\tlog.severe(\"Failed in getting Activity from cache. Exception = \" + e.getMessage());\n\t\t\t\t\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tem3.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tallTeamsRequestedActivities.addAll(teamRequestedActivities);\n\t\t\t} // end of for(Team userTeam : teams)\n\t\t\tlog.info(\"number of allTeamsRequestedActivities found = \" + allTeamsRequestedActivities.size());\n\t\t\t\n\t\t\t/////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t// Update newestCacheIds in User Entity. newestCacheIds are used to determine if a user\n\t\t\t// has any new activity. All the user's teams that were updated by this API call need\n\t\t\t// to be updated. Note that the team.newestCacheId may not have been updated in this\n\t\t\t// API but rather by the Create Activity API, but it doesn't matter. Any user team\n\t\t\t// that has had activity retrieved by this API call should the associated user.newestCacheId\n\t\t\t// updated.\n\t\t\t/////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\tif(teams.size() > 0) {\n\t \tEntityManager em4= EMF.get().createEntityManager();\n\t \ttry {\n\t \t\tem4.getTransaction().begin();\n\t \t\t// re-get the user inside this transaction\n\t\t\t\t\tUser withinTransactionUser = (User)em4.createNamedQuery(\"User.getByKey\")\n\t\t\t\t\t\t.setParameter(\"key\", currentUser.getKey())\n\t\t\t\t\t\t.getSingleResult();\n\t\t\t\t\tlog.info(\"updating newCachIds for User = \" + withinTransactionUser.getFullName() + \". Number of updated teams = \" + teams.size());\n\t\t\t\t\t\n\t\t\t\t\tList<Long> newestCacheIds = withinTransactionUser.getTeamNewestCacheIds();\n\t\t\t\t\t// If a teamId was specified in the API call, then only ONE TEAM will be in the teamsWithPossibleUpdates list\n\t\t\t\t\t// so we must find the 'matching' team in the User's team list and update just that one team.\n\t\t\t\t\tif(teams.size() == 1) {\n\t\t\t\t\t\tTeam specifiedTeam = teams.get(0);\n\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\tfor(Key teamKey : withinTransactionUser.getTeams()) {\n\t\t\t\t\t\t\tif(teamKey.equals(specifiedTeam.getKey())) {\n\t\t\t\t\t\t\t\tnewestCacheIds.set(index, specifiedTeam.getNewestCacheId());\n\t\t\t\t\t\t\t\tlog.info(\"updating cacheID for specified team = \" + specifiedTeam.getTeamName());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ALL the User's team could have been updated. In this case, the code above guarantees that\n\t\t\t\t\t\t// the teamsWithPossibleUpdates list will contain ALL the user's teams -- both updated\n\t\t\t\t\t\t// teams and teams not updated. For simplicity, just completely rebuild newestCacheIds list.\n\t\t\t\t\t\tnewestCacheIds = new ArrayList<Long>();\n\t\t\t\t\t\tfor(Team t : teams) {\n\t\t\t\t\t\t\t// even if Activity not active for this team, getNewestCacheId() guaranteed to return 0L\n\t\t\t\t\t\t\tlog.info(\"updating cacheID for team = \" + t.getTeamName());\n\t\t\t\t\t\t\tnewestCacheIds.add(t.getNewestCacheId());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\twithinTransactionUser.setTeamNewestCacheIds(newestCacheIds);\n\t\t\t\t\tem4.getTransaction().commit();\n\t \t} catch (NoResultException e) {\n\t \tlog.severe(\"user not found\");\n\t \te.printStackTrace();\n\t \t\t} catch (NonUniqueResultException e) {\n\t \t\t\tlog.severe(\"should never happen - two or more users have same key\");\n\t \t\t\te.printStackTrace();\n\t \t\t} finally {\n\t \t\t if (em4.getTransaction().isActive()) {\n\t \t\t \tem4.getTransaction().rollback();\n\t \t\t }\n\t \t\t em4.close();\n\t \t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// because cacheId has been set, this will get sorted by created date - reverse chronological order\n\t\t\tCollections.sort(allTeamsRequestedActivities);\n\t\t\t\n\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\t// enforce the maxCount for Date Interval algorithm\n\t\t\t\tif(allTeamsRequestedActivities.size() > maxCount) {\n\t\t\t\t\t// activity list needs to be truncated, but truncation only happens on full day boundaries\n\t\t\t\t\tDate dateBoundary = allTeamsRequestedActivities.get(maxCount-1).getCreatedGmtDate();\n\t\t\t\t\tdateBoundary = GMT.setTimeToTheBeginningOfTheDay(dateBoundary);\n\t\t\t\t\tlog.info(\"Activity list exceeded max size of \" + maxCount + \". List size = \" + allTeamsRequestedActivities.size() + \" Date boundary = \" + dateBoundary.toString());\n\t\t\t\t\t\n\t\t\t\t\t// find the index of the first activity with a date greater than the boundary date\n\t\t\t\t\tInteger truncateIndex = null;\n\t\t\t\t\tfor(int searchIndex = maxCount; searchIndex<allTeamsRequestedActivities.size(); searchIndex++) {\n\t\t\t\t\t\tDate activityDate = allTeamsRequestedActivities.get(searchIndex).getCreatedGmtDate();\n\t\t\t\t\t\tactivityDate = GMT.setTimeToTheBeginningOfTheDay(activityDate);\n\t\t\t\t\t\tif(activityDate.before(dateBoundary)) {\n\t\t\t\t\t\t\ttruncateIndex = searchIndex;\n\t\t\t\t\t\t\tlog.info(\"truncate index found and = \" + truncateIndex);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// possible that no activity exceeded the boundary date, so modify activity list only if appropriate\n\t\t\t\t\tif(truncateIndex != null) {\n\t\t\t\t\t\t// for subList call, first index is inclusive and second is exclusive\n\t\t\t\t\t\tallTeamsRequestedActivities = allTeamsRequestedActivities.subList(0, truncateIndex);\n\t\t\t\t\t\tlog.info(\"Activity list truncated. New list size = \" + allTeamsRequestedActivities.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Package requested activities into JSON\n\t\t\tJSONArray jsonActivitiesArray = new JSONArray();\n\t\t\tfor(Activity a : allTeamsRequestedActivities) {\n\t\t\t\tJSONObject jsonActivityObj = new JSONObject();\n\t\t\t\tjsonActivityObj.put(\"activityId\", KeyFactory.keyToString(a.getKey()));\n\t\t\t\tjsonActivityObj.put(\"text\", a.getText());\n\t\t\t\t// TODO is the Twitter Date returned GMT? -- if not fix this code\n\t\t\t\tjsonActivityObj.put(\"createdDate\", GMT.convertToLocalDate(a.getCreatedGmtDate(), tz));\n\t\t\t\tif(isGetActivitiesForAllTeamsApi) {\n\t\t\t\t\tjsonActivityObj.put(\"teamId\", a.getTeamId());\n\t\t\t\t\tjsonActivityObj.put(\"teamName\", a.getTeamName());\n\t\t\t\t}\n\t\t\t\tjsonActivityObj.put(\"cacheId\", a.getCacheId());\n\t\t\t\tjsonActivityObj.put(\"numberOfLikeVotes\", a.getNumberOfLikeVotes());\n\t\t\t\tjsonActivityObj.put(\"numberOfDislikeVotes\", a.getNumberOfDislikeVotes());\n\t\t\t\tif(a.getThumbNailBase64() != null) {\n\t\t\t\t\tjsonActivityObj.put(\"thumbNail\",a.getThumbNailBase64());\n\t\t\t\t\tBoolean isVideo = a.getVideoBase64() == null ? false : true;\n\t\t\t\t\tjsonActivityObj.put(\"isVideo\", isVideo);\n\t\t\t\t}\n\t\t\t\tBoolean useTwitterRet = a.getTwitterId() == null ? false : true;\n\t\t\t\tjsonActivityObj.put(\"useTwitter\", useTwitterRet);\n\t\t\t\tjsonActivitiesArray.put(jsonActivityObj);\n\t\t\t}\n\t\t\tlog.info(\"JSON object built successfully\");\n\t\t\tjsonReturn.put(\"activities\", jsonActivitiesArray);\n\n } catch (JSONException e) {\n\t\t\tlog.severe(\"error converting json representation into a JSON object\");\n\t\t\te.printStackTrace();\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t} catch (NoResultException e) {\n\t\t\tlog.severe(\"team not found\");\n\t\t\tapiStatus = ApiStatusCode.TEAM_NOT_FOUND;\n\t\t} catch (NonUniqueResultException e) {\n\t\t\tlog.severe(\"should never happen - two or more teams have same team id\");\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t} catch (JSONException e) {\n\t\t\tlog.severe(\"error creating JSON return object\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new JsonRepresentation(jsonReturn);\n }", "@GET\n Call<Post> getByDirectUrlRequest(@Url String url);", "@GET(\"rest/emprego\")\n Call<List<Posto>> callListPostoSINE();", "public List<Movie> dVD() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/new_releases.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "@GET\r\n @Produces(\"text/plain\")\r\n public Response getResearchObjectList() {\r\n UserProfile user = (UserProfile) request.getAttribute(Constants.USER);\r\n \r\n Set<URI> list;\r\n if (user.getRole() == Role.PUBLIC) {\r\n list = ROSRService.SMS.get().findResearchObjects();\r\n } else {\r\n list = ROSRService.SMS.get().findResearchObjectsByCreator(user.getUri());\r\n }\r\n StringBuilder sb = new StringBuilder();\r\n for (URI id : list) {\r\n sb.append(id.toString());\r\n sb.append(\"\\r\\n\");\r\n }\r\n \r\n ContentDisposition cd = ContentDisposition.type(\"text/plain\").fileName(\"ROs.txt\").build();\r\n \r\n return Response.ok().entity(sb.toString()).header(\"Content-disposition\", cd).build();\r\n }", "@GET(\"/tours/{tourId}\")\n Call<Tour> getTour(\n @Path(\"tourId\") int tourId\n );", "@Override\r\n\tpublic ReviewDTO review_detail(int r_idx) throws Exception {\n\t\treturn null;\r\n\t}", "public interface Api {\n @GET(\"topher/2017/May/59121517_baking/baking.json\")\n Call<List<Recipe>> getRecipes();\n}", "private void loadTopRatedMovies() {\n\n try {\n if (API_KEY.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Invalid API key\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n return;\n\n }\n Client Client = new Client();\n MovieService apiMovieService =\n Client.getClient().create(MovieService.class);\n Call<MovieResult> call = apiMovieService.getTopRatedMovies(API_KEY);\n call.enqueue(new Callback<MovieResult>() {\n @Override\n public void onResponse(Call<MovieResult> call, Response<MovieResult> response) {\n List<Movie> movies = response.body().getResults();\n recyclerView.setAdapter(new MovieAdapter(getApplicationContext(), movies));\n recyclerView.smoothScrollToPosition(0);\n\n\n }\n\n @Override\n public void onFailure(Call<MovieResult> call, Throwable t) {\n Log.d(\"Error\", t.getMessage());\n Toast.makeText(MainActivity.this, \"Error fetching data\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n } catch (Exception e) {\n Log.d(\"Error\", e.getMessage());\n Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "@GET(\"v1/competitions/\")\n Call<List<Leagues>> getAllData();", "@GET(\"/api/users\")\n Call<Example> getUserDetails(@Query(\"page\") Integer sort);", "public static void main(String[] args) {\n\t\tRestTemplate restTemplate = new RestTemplate(); \r\n\t\t String url = \"http://www.omdbapi.com/?t=titanic&y=&plot=short&r=json\";\r\n\t\t //restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\r\n\t\t \r\n\t\t Pelicula peli = restTemplate.getForObject(url, Pelicula.class); \r\n\t\t \r\n\t\t \r\n\t\t System.out.println(peli.getDirector());\r\n\t}", "FetchRequest<Review> byId(String id);", "public interface MovieApiService {\n\n @GET(\"movie/popular\")\n Call<MoviesResponse> getPopularMovies(@Query(\"page\") int page);\n\n @GET(\"movie/top_rated\")\n Call<MoviesResponse> getTopRatedMovies(@Query(\"page\") int page);\n\n @GET(\"movie/{id}\")\n Call<MoviesResponse> getMovieDetails(@Path(\"id\") long id);\n}", "@GET(\"posts/\")\n Call<List<Post>>getPosts();", "@GET \n@Produces(\"application/json\")\n@Path(\"/reviewApplications/{reviewerID}\")\npublic GetReviewerJobApplicationResponseDTO getReviewerJobApplications(@PathParam(\"reviewerID\")String reviewerID)\n{\tArrayList<ArrayList<String>> jobApplications=new ArrayList<ArrayList<String>>();\n\tGetReviewerJobApplicationResponseDTO response=new GetReviewerJobApplicationResponseDTO();\n\tsecurityKey=headers.getRequestHeaders().getFirst(\"SecurityKey\");\n\tshortKey=headers.getRequestHeaders().getFirst(\"ShortKey\");\n\tif(securityKey==null)\n\t{\n\t\tsecurityKey=\"default\";\n\t}\n\tif(shortKey==null)\n\t{\n\t\tshortKey=\"default\";\n\t}\n\tif(securityKey.equalsIgnoreCase(\"i-am-foundit\")&& shortKey.equalsIgnoreCase(\"app-reviewer\"))\n\t{\n\t\ttry{\n\t\t\t\n\t\t\tjobApplications=ReviewerUtil.getJobApplications(reviewerID, con);\n\t\t\tresponse.setJobApplications(jobApplications);\n\t\t\tstatus=200;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Error Occured in Reviewer getReviewerJobApplication\");\n\t\t\tstatus=500;\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}\n\telse\n\t{\n\t\tstatus=403;\n\t\tSystem.out.println(\"Access Forbidden\");\n\t}\n\t\n\tresponse.setStatus(status);\n\t\n\treturn response;\n}", "public interface Service {\n\n @GET(\"movie/{sub_type}\")\n Call<MovieResponse> getMovie(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"tv/{sub_type}\")\n Call<TvShowResponse> getTvShow(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"movie/{movie_id}/recommendations\")\n Call<MovieResponse> getMovieRecommendations(@Path(\"movie_id\")int movie_id,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"tv/{tv_id}/recommendations\")\n Call<TvShowResponse> getTvShowRecommendations(@Path(\"tv_id\")int tv_id, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"search/movie\")\n Call<MovieResponse> getMovieSearch(@Query(\"query\")String query,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"search/tv\")\n Call<TvShowResponse> getTvShowSearch(@Query(\"query\")String query, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n}", "public String getAPI()\n {\n ResponseEntity<String> person;\n\n /*\n\t\t * Headers for the response type if we want to return JSON response then we\n\t\t * require to add.\n */\n HttpHeaders headers = new HttpHeaders();\n\n /*\n\t\t * Adding of the response header with application/json type\n */\n headers.add(\"Accept\", \"application/json\");\n\n /*\n\t\t * Creation of the Entity object for the adding the headers into request.\n */\n entity = new HttpEntity<>(headers);\n\n /*\n\t\t * Creation of REST TEMPLET object for the executing of the REST calls.\n */\n restTemplate = new RestTemplate();\n\n /*\n\t\t * Adding the basic type of authentication on the REST TEMPLETE.\n */\n restTemplate.getInterceptors()\n .add(new BasicAuthorizationInterceptor(\"Administrator\", \"Oneeight@admin18\"));\n\n /*\n\t\t * Execution of the REST call with basic authentication and JSON response type\n */\n person = restTemplate.exchange(\"http://52.172.222.197:8080/versa/login?username=Administrator&password=Oneeight@admin18\", HttpMethod.POST, entity, String.class);\n System.out.println(\"\"+person.toString());\n //headers.add(\"Cookie\", \"JSESSIONID=0FC37952D64B545C46969EFEC0E4FD12\");\n headers.add(\"Cookie\", person.getHeaders().getFirst(HttpHeaders.SET_COOKIE));\n entity = new HttpEntity<>(headers);\n person = restTemplate.exchange(\"http://52.172.222.197:8080/versa/analytics/v1.0.0/data/provider/tenants/OneEight/features/SDWAN/?qt=summary&start-date=1daysAgo&end-date=today&q=linkusage(site)&metrics=volume-rx&metrics=volume-tx&metrics=volume-rx&metrics=volume-tx&metrics=bandwidth&ds=aggregate&count=10\", HttpMethod.GET, entity, String.class);\n\n /*\n\t\t * Returning the response body with string format that easily readable.\n */\n return person.getBody();\n }", "public interface Rtf_egone_MoviesInterface {\n\n @GET(\"/aws1994/f583d54e5af8e56173492d3f60dd5ebf/raw/c7796ba51d5a0d37fc756cf0fd14e54434c547bc/anime.json\")\n Call <List<Rtf_egone_Movies>> getJSON();\n}", "private void makeRequest() {\n\t\tRequest request = new Request(RequestCode.GET_REVISION_HISTORY);\n\t\trequest.setDocumentName(tabs.getTitleAt(tabs.getSelectedIndex()));\n\t\ttry {\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "private void getReviewListData() {\n final ProgressDialog progressDialog = new ProgressDialog(getActivity());\n progressDialog.setCancelable(false); // set cancelable to false\n progressDialog.setMessage(\"Please Wait\"); // set message\n progressDialog.show(); // show progress dialog\n\n\n (RetrofitClient.getInstance().getResponse().getReviewsByJob(JobName)).enqueue(new Callback<List<ReviewDTO>>() {\n @Override\n public void onResponse(Call<List<ReviewDTO>> call, Response<List<ReviewDTO>> response) {\n //Log.d(\"responseGET\", response.body().get(0).getName());\n progressDialog.dismiss(); //dismiss progress dialog\n reviewListResponseData = response.body();\n setDataInRecyclerView();\n }\n\n @Override\n public void onFailure(Call<List<ReviewDTO>> call, Throwable t) {\n // if error occurs in network transaction then we can get the error in this method.\n Toast.makeText(getActivity(), t.toString(), Toast.LENGTH_LONG).show();\n progressDialog.dismiss(); //dismiss progress dialog\n }\n });\n }", "@Test\n void testGetRequest() {\n String OAUTH_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/oauth2\";\n raboUtilUnderTest.get(OAUTH_BASE, \"/token\", \"payload\");\n\n // Verify the results\n verify(webClient).get(anyString(),any());\n }", "public interface TvApi {\n\n /*\n 获取电视节目表\n */\n @POST(\"getProgram\")\n Call<TvShowData> getProgram(@Query(\"code\") String code, @Query(\"date\") String date, @Query(\"key\") String key);\n\n /*\n 获取频道类型列表\n */\n @POST(\"getCategory\")\n Call<TvTypeData> getCategory(@Query(\"key\") String key);\n\n /*\n\n */\n @POST(\"getChannel\")\n Call<TvChannelData> getChannel(@Query(\"pId\") String pId, @Query(\"key\") String key);\n}", "public interface MovieService {\n @GET(\"/json/movies.json\")\n Call<List<MovieModel>> getDealModel();\n\n}", "@GetMapping(\"/recommendations\")\n public ResponseEntity<?> getMovies() {\n Movie[] result = restTemplate.getForObject(\"http://movie-service/movies\", Movie[].class);\n System.out.println(result);\n return new ResponseEntity<>(result, HttpStatus.OK);\n }", "@GetMapping(\"/movie/{name}\")\r\n public List<ReviewDetails> getReviewByMovieName(@PathVariable(\"name\") String name){\r\n return reviewRepository.getReviewByMovieName(name);\r\n }", "@Nullable\n public AccessReviewHistoryDefinition get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "public interface d2ticker {\n @GET(\"/match/{id}\")\n void getMatchesList(@Path(\"id\") long id, Callback<Api> api);\n}", "public interface RankClient {\n @POST(\"api/givefeedback\")\n @FormUrlEncoded\n Call<Response> giverank (@Field(\"reviewer\") String reviewer,\n @Field(\"reviewee\") String reviewee,\n @Field(\"rank\") int rank);\n}", "public interface ApiInterfaceSchoolSec {\n @GET(\"schoolSec.php\")\n Call<List<schoolSecModel>> getTopRatedMovies();\n}", "public interface RemoteMovieDataSource {\n\n @GET(\"movie/now\")\n Call<DataMovie> nowShowing();\n\n @GET(\"movie/upcoming\")\n Call<DataMovie> upcoming();\n}", "@Override\n protected Void doInBackground(Integer... params) {\n try {\n\n Intent itnt = getIntent();\n String url = getResources().getString(R.string.jobServiceUrl) + \"statistics/getTehnologyTrend?\" + itnt.getStringExtra(\"searchParams\");\n\n// String url = \"http://192.168.1.1:8080/webService/statistics/getTehnologyTrend?tehnologyIds=1,3,6,4,7,10,13&startDate=2014-08-03&endDate=2015-03-03\";\n\n RestService rs = new RestService();\n\n monthlyTrendsList = new ArrayList<MonthlyTrend>();\n monthlyTrendsList = rs.getList(url, MonthlyTrend[].class);\n\n\n } catch (Exception e) {\n Log.e(\"JobListActivity\", e.getMessage(), e);\n }\n\n return null;\n }", "public interface ApiService {\n\n @GET(\"/api/v1/rates/daily/\")\n Call<List<ExchangeRate>> getTodayExchangeRates();\n\n}", "@RequestMapping(value=\"reviews\", method=RequestMethod.GET,\n\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\t\t@ResponseBody\n\t\tpublic ResponseEntity<List<ReviewBean>> getReviews(){\n\t\t\t//Call on session to get current user's reviews\n\t\t\t//For now it just grabs hardcoded user's reviews\n\t\t\treturn new ResponseEntity<List<ReviewBean>>(this.dao.getAllReviewsByUserId(72), HttpStatus.OK);\n\t\t}", "public interface MovieApiService {\n\n @GET(\"movie/upcoming\")\n Call<JsonRequestDiscoverMovieResult> getDiscoverMovieFeed(\n @Query(\"api_key\") String apiKey\n );\n\n// @GET(\"movie/{id}/videos\")\n// Call<JsonRequestMovieVideoResult> getMovieVideoFeed(\n// @Path(\"id\") String movieId,\n// @Query(\"api_key\") String apiKey\n// );\n}", "public GetMovieReviewsResponse getMovieReviews(int movieId, String language, Integer page) {\n // /movie/{movie_id}/reviews\n String path = String.format(\"/movie/%s/reviews\", movieId);\n Map<String, Object> requestParams = new HashMap<>();\n requestParams.put(\"language\", language);\n requestParams.put(\"page\", page);\n return restClient.get(path, requestParams, new TypeReference<>() {\n\n\n }\n );\n }", "public interface MovieService {\n @GET(\"movie/{type}\")\n Observable<MovieGsonResponse> getMovieData(@Path(\"type\")String sortType,\n @Query(\"api_key\")String api);\n}", "public static void getDocument(Client client, String index, String type, String id) {\n\r\n GetResponse getResponse = client.prepareGet(index, type, id).get();\r\n Map<String, Object> source = getResponse.getSource();\r\n\r\n System.out.println(\"------------------------------\");\r\n System.out.println(\"Index: \" + getResponse.getIndex());\r\n System.out.println(\"Type: \" + getResponse.getType());\r\n System.out.println(\"Id: \" + getResponse.getId());\r\n System.out.println(\"Version: \" + getResponse.getVersion());\r\n System.out.println(source);\r\n System.out.println(\"------------------------------\");\r\n\r\n }", "public interface MovieDatabaseService {\n\n @GET(\"3/movie/{sort_by}\")\n Call<Movies> fetchMovies(@Path(\"sort_by\") String sortBy, @Query(\"api_key\") String apiKey);\n\n @GET(\"3/movie/{id}/videos\")\n Call<Trailers> findTrailersById(@Path(\"id\") long movieId, @Query(\"api_key\") String apiKey);\n\n @GET(\"3/movie/{id}/reviews\")\n Call<Reviews> findReviewsById(@Path(\"id\") long movieId, @Query(\"api_key\") String apiKey);\n}", "@GET(\"get_invoice\")\n Call<ResponseBody> getInvoice(@Query(\"token\") String token,@Query(\"trip_id\") String TripId,@Query(\"user_type\") String userType);", "@NonNull\n public String getAction() {\n return \"GET\";\n }", "@GET\n\t@Produces({\"application/json\",\"application/xml\"}) //we want to send the pnrdetails in the json form\n\tpublic List<Train> getPNRDetails(@QueryParam(\"pnrNo\") long pnrNo){\n\t\t\n\t\tRailwayReservationSystem rs=new RailwayReservationSystem();\n\t\t//PNRDetails pnrDetails=rs.getPNRDetails(pnrNo);\n\t\tList<Train> a=rs.getTrainList();\n\t\treturn a;\n\t\t\n\t}", "@Override\n\tprotected String doInBackground(String... params) {\n\t\t RESTClient request=new RESTClient(getURL());\n\t try {\n\t\t\t\trequest.Execute(RequestMethod.GET);\n\t\t\t\treturn request.getResponse();\n\t\t\t} \n\t catch (Exception e) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t \n\t}", "public void getAllBook(){\n Call<Book> call = api.testBooks();\n call.enqueue(\n new Callback<Book>() {\n @Override\n public void onResponse(Call<Book> call, Response<Book> response) {\n Log.e(\"Test API\", \"on Response \"+response.body());\n Book book = response.body();\n Log.e(\"Test API\", \"on Response \"+book.getAuthor());\n Log.e(\"Test API\", \"on Response \"+book.getTitle());\n Log.e(\"Test API\", \"on Response \"+book.getLanguage());\n Log.e(\"Test API\", \"on Response \"+book.getDescription());\n view.onGetSuccess(book);\n }\n\n @Override\n public void onFailure(Call<Book> call, Throwable t) {\n Log.i(\"Test API\", \"on Failure \"+t.getLocalizedMessage());\n }\n }\n );\n }", "@GetMapping(path=\"{id}\")\n public Review retrieveReview(@PathVariable int id){\n Review review = ReviewDAOService.findReview(id);\n String response= \"User Not found or non-existent!\";\n if(review==null){\n return null;}\n else{\n return review;}\n }", "public interface Service {\n\n\n @GET(\"/3/search/movie\")\n Call<Lista> getSearch(@Query(\"api_key\") String apiKey, @Query(\"query\") String queryString);\n\n}", "@GetMapping(\"/getRE\")\n\tpublic List<EnquiryDetails> getDataRE()\n\t{\n\t\tString url=\"http://localhost:8083/getclient/getalldatafor_re\";\n\t\tList<EnquiryDetails> list=rt.getForObject(url, List.class);\n\t\tSystem.out.println(list);\n\t\treturn list;\n\t}", "public interface RetroiftService {\n @GET(\"catalog\")\n Call<CgBaseEntity> getCategories(@Query(\"key\") String key);\n\n @FormUrlEncoded\n @POST(\"query\")\n Call<BookBaseEntity> getBookList(@Field(\"catalog_id\") String id, @Field(\"pn\") String\n pn, @Field(\"rn\") String rn, @Field(\"key\") String key);\n\n}", "public interface StarWarsAPI {\r\n\r\n @GET\r\n Call<Character> getCharacter(@Url String url);\r\n\r\n @GET\r\n Call<Film> getFilm(@Url String url);\r\n}", "@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public String getIt() {\r\n // return \"Got it!\";\r\n \treturn appObj.readAppointment();\r\n }", "private OpenDataLIVEResponse getOpenDataLIVEReview(String name) throws IOException {\n\t\tOpenDataLIVEResponse openDataLIVEResponses[] = OPEN_DATA_LIVE_SERVICE.getLatestRestaurantReviewByName(name);\r\n\t\tfor (OpenDataLIVEResponse response : openDataLIVEResponses) {\r\n\t\t\tif (response.getRiskCategory() != null)\r\n\t\t\t\treturn response;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public interface RestDetalle {\n\n @GET(\"RS_Consulta/consulta/pedido/{numPedido}\")\n Call<ObResponse> getDetalle(@Path(\"numPedido\") String numPedido);\n}", "public interface MoviesDB {\n @GET(\"3/discover/movie?sort_by=popularity.desc\")\n Call<MovieResults> getMoviesByPopularity();\n\n @GET(\"3/discover/movie?sort_by=vote_average.desc\")\n Call<MovieResults> getMoviesByRating();\n}", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"TDVoice Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "public interface ApiService {\n @GET(\"questcms/floorplan\")\n Call<List<FloorPlan>> listFloorPlan();\n}", "public interface GetVersionInterface {\n\n @GET\n Call<NativeVersionResBean> getVersionRes(@Url String url, @QueryMap Map<String, String> params);\n\n}", "public interface ArticleClient {\n @GET(\"v2/top-headlines?apiKey=\" + BuildConfig.api_key)\n Call<ArticleResponse> getArticles(@Query(\"country\") String country,\n @Query(\"category\") String category);\n}", "public interface FilmService {\n @Headers(\"Cache-Control:public ,max-age=3600\")\n @GET(\"v2/movie/search\")\n Call<FilmRoot> getFilm(@Query(\"tag\") String tag, @Query(\"start\") String start,@Query(\"count\") String count);\n\n\n @GET(\"v2/movie/subject/{id}\")\n Call<MainFilmRoot> getFilmItem(@Path(\"id\") String id);\n}", "@Test(enabled=true)\npublic void getRequest() {\n\t\tString url = \"https://reqres.in/api/users?page=2\";\n\t\t\n\t\t//create an object of response class\n\t\t\n\t\t//Restassured will send get request to the url and store response in response object\n\t\tResponse response = RestAssured.get(url);\n\t\t\n\t\t//We have to put assertion in response code and response data\n\t\tAssert.assertEquals(response.getStatusCode(), 200 , \"Response code Mismatch\");\n\t\t\n\t\tint total_pages = response.jsonPath().get(\"total_pages\");\n\t\tAssert.assertEquals(total_pages, 2 , \"Total Pages value Mismatch\");\n \n}", "@GET(\"/v1/genres\")\r\n void getGenres( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n Callback<Collection<GenreData>> callBack);", "private void loadPopularMovies() {\n\n try {\n\n if (API_KEY.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Invalid API key\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n return;\n\n }\n Client Client = new Client();\n MovieService apiMovieService =\n Client.getClient().create(MovieService.class);\n Call<MovieResult> call = apiMovieService.getPopularMovies(API_KEY);\n call.enqueue(new Callback<MovieResult>() {\n @Override\n public void onResponse(Call<MovieResult> call, Response<MovieResult> response) {\n List<Movie> movies = response.body().getResults();\n recyclerView.setAdapter(new MovieAdapter(getApplicationContext(), movies));\n recyclerView.smoothScrollToPosition(0);\n\n\n }\n\n @Override\n public void onFailure(Call<MovieResult> call, Throwable t) {\n Log.d(\"Error\", t.getMessage());\n Toast.makeText(MainActivity.this, \"Error fetching data\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n } catch (Exception e) {\n Log.d(\"Error\", e.getMessage());\n Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "@GET\n @Produces({ \"application/json\" })\n public abstract Response get(@QueryParam(\"sort\") String sort);", "public abstract RestURL getURL();" ]
[ "0.6097326", "0.6090285", "0.603287", "0.59789103", "0.5827233", "0.5770909", "0.5751087", "0.5691706", "0.56676185", "0.56539685", "0.5642333", "0.5621537", "0.56162095", "0.5562897", "0.5553974", "0.55023456", "0.5491059", "0.5484024", "0.54412234", "0.5418125", "0.5414759", "0.5396448", "0.5396344", "0.5378991", "0.53785336", "0.53679305", "0.53543717", "0.5351182", "0.53121334", "0.5307995", "0.5300295", "0.5298575", "0.5292034", "0.5281352", "0.5277744", "0.5277455", "0.52709776", "0.526033", "0.52593327", "0.5249807", "0.5238926", "0.5238512", "0.52316755", "0.5227898", "0.5227245", "0.52228665", "0.5215801", "0.5210894", "0.5204984", "0.5194481", "0.5194155", "0.5191932", "0.51899856", "0.51842636", "0.51834273", "0.517566", "0.5165993", "0.51637125", "0.5151238", "0.51481044", "0.51368785", "0.5129718", "0.51288676", "0.51141906", "0.51045775", "0.5099023", "0.509533", "0.5088479", "0.5086575", "0.50797313", "0.5075217", "0.50712967", "0.5065842", "0.5064979", "0.5063223", "0.5057293", "0.5056741", "0.50559187", "0.5051989", "0.50514394", "0.50508237", "0.5050451", "0.50499314", "0.5049622", "0.50278574", "0.5016829", "0.5016234", "0.5005805", "0.50047684", "0.50040823", "0.5002199", "0.49988052", "0.49986458", "0.49975747", "0.49949205", "0.49908593", "0.49893194", "0.4988053", "0.49877372", "0.4987056" ]
0.5466675
18
REST API CALL TO CREATE A REVIEW //
@PostMapping(produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> createReview(Review review, HttpServletRequest request, HttpServletResponse response) { Review newReview = reviewService.createReview(review); response.addHeader("Job Created", request.getServerName() + ":" + request.getServerPort() + "/reviews/" + newReview.getId()); response.addHeader("Date", new Date().toString()); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate"); response.setHeader("Pragma","no-cache"); response.setHeader("Version","Mechanic API V-2.0"); response.setDateHeader("Expires", 0); return new ResponseEntity<>(newReview, HttpStatus.CREATED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RankClient {\n @POST(\"api/givefeedback\")\n @FormUrlEncoded\n Call<Response> giverank (@Field(\"reviewer\") String reviewer,\n @Field(\"reviewee\") String reviewee,\n @Field(\"rank\") int rank);\n}", "@RequestMapping(value = \"/recomend\", method = RequestMethod.POST, produces = \"application/json\")\n\t@ResponseBody\n\tpublic void recomendShow(\n\t\t\t@RequestParam(\"tmdb_id\") String tmdb_id,\n\t\t\t@RequestParam(\"title\") String title,\n\t\t\t@RequestParam(\"overview\") String overview, \n\t\t\t@RequestParam(\"poster_path\") String poster_path,\n\t\t\t@RequestParam(\"genres\") String genres,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException{\n\t\tUser user = new User();\n\t\t\n\t\t//Getting user authentication token\n\t\tString authToken = checkToken(request, response);\n\t\t\t\t\n\t\t//Check validation of user token\n\t\ttry{\n\t\t\tuser = validateToken(authToken);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\t//If token isnt valid send Unauthorized error\n\t\tif (user == null)\n\t\t\tresponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);\n\t\telse{\n\t\t\t\n\t\t\t//Get show ovject from show tmdb id\t\t\t\n\t\t\tList<Show> showWithId = service.findByTmdbId(tmdb_id);\n\t\t\t\n\t\t\t//If show is in database get it, else create object and put it in database\n\t\t\tShow show = null;\n\t\t\tif (showWithId.size() > 0){\n\t\t\t\tSystem.out.println(showWithId.get(0).getTitle());\n\t\t\t\tshow = showWithId.get(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\n\t\t\tshow = createShow(tmdb_id, title, overview, poster_path, genres);\t\t\t\n\t\t\tservice.save(show);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Check if user has already recommended show\n\t\t\tboolean check = service.checkIfShowIsRecomendedByUser(show, user);\n\t\t\tSystem.out.println(\"GLASAL: \" + check);\n\t\t\t\n\t\t\tif (!check)\n\t\t\t{\n\t\t\t\tList<Show> shows = user.getShows();\n\t\t\t\tif(!shows.contains(show)){\n\t\t\t\t\tSystem.out.println(\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \" + show.getTitle());\n\t\t\t\t\tshows.add(show);\n\t\t\t\t\tuser.setShows(shows);\n\t\t\t \tuserService.save(user);\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t }\t\n\t}", "@Test\n public void create_405() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n addMOToDb(2);\n Integer id = addMOToDb(3).getId();\n\n // PREPARE THE TEST\n // Change the name\n Workflow mo = new Workflow();\n mo.setName(\"Different name\");\n mo.setDescription(\"Different description\");\n mo.setRaw(\"Different raw\");\n\n\n // DO THE TEST\n Response response = callAPI(VERB.POST, \"/mo/\" + id.toString(), mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(405, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"HTTP 405 Method Not Allowed\", body);\n }", "@POST\r\n public Response createResearchObject()\r\n throws BadRequestException, IllegalArgumentException, UriBuilderException, ConflictException,\r\n DigitalLibraryException, NotFoundException {\r\n LOGGER.debug(String.format(\"%s\\t\\tInit create RO\", new DateTime().toString()));\r\n String researchObjectId = request.getHeader(Constants.SLUG_HEADER);\r\n if (researchObjectId == null || researchObjectId.isEmpty()) {\r\n throw new BadRequestException(\"Research object ID is null or empty\");\r\n }\r\n URI uri = uriInfo.getAbsolutePathBuilder().path(researchObjectId).path(\"/\").build();\r\n ResearchObject researchObject = ResearchObject.findByUri(uri);\r\n if (researchObject != null) {\r\n throw new ConflictException(\"RO already exists\");\r\n }\r\n researchObject = new ResearchObject(uri);\r\n URI researchObjectURI = ROSRService.createResearchObject(researchObject);\r\n LOGGER.debug(String.format(\"%s\\t\\tRO created\", new DateTime().toString()));\r\n \r\n RDFFormat format = RDFFormat.forMIMEType(request.getHeader(Constants.ACCEPT_HEADER), RDFFormat.RDFXML);\r\n InputStream manifest = ROSRService.SMS.get().getNamedGraph(researchObject.getManifestUri(), format);\r\n ContentDisposition cd = ContentDisposition.type(format.getDefaultMIMEType())\r\n .fileName(ResearchObject.MANIFEST_PATH).build();\r\n \r\n LOGGER.debug(String.format(\"%s\\t\\tReturning\", new DateTime().toString()));\r\n return Response.created(researchObjectURI).entity(manifest).header(\"Content-disposition\", cd).build();\r\n }", "public void postTest(LabTest labTest) {\n URL url = null;\n try {\n url = new URL(apiAddress+\"postTest\");\n\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(labTest);\n String encodedString = Base64.getEncoder().encodeToString(json.getBytes());\n\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setDoOutput(true);\n con.setInstanceFollowRedirects( false );\n con.setRequestMethod( \"GET\" );\n con.setRequestProperty( \"Content-Type\", \"application/json\");\n con.setRequestProperty( \"charset\", \"utf-8\");\n con.setRequestProperty( \"Content-Length\", Integer.toString( encodedString.getBytes().length ));\n con.setRequestProperty(\"Data\", encodedString);\n con.setUseCaches( false );\n BufferedReader in = null;\n try {\n in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Post \n public JsonRepresentation createActivity(Representation entity) {\n \tJSONObject jsonReturn = new JSONObject();\n \tlog.info(\"createActivity(@Post) entered ..... \");\n\t\tEntityManager em = EMF.get().createEntityManager();\n\t\t\n\t\tString apiStatus = ApiStatusCode.SUCCESS;\n\t\tthis.setStatus(Status.SUCCESS_CREATED);\n\t\tUser currentUser = null;\n try {\n \t\tcurrentUser = (User)this.getRequest().getAttributes().get(RteamApplication.CURRENT_USER);\n \t\tif(currentUser == null) {\n\t\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n \t\t\tlog.severe(\"user could not be retrieved from Request attributes!!\");\n \t\t}\n \t\t//::BUSINESSRULE:: user must be network authenticated to send a message\n \t\telse if(!currentUser.getIsNetworkAuthenticated()) {\n \t\t\tapiStatus = ApiStatusCode.USER_NOT_NETWORK_AUTHENTICATED;\n \t\t}\n \t\t// teamId is required if this is 'Create a new activity' API\n \t\telse if(this.userVote == null) {\n \t\tif(this.teamId == null || this.teamId.length() == 0) {\n \t\t\t\tapiStatus = ApiStatusCode.TEAM_ID_REQUIRED;\n \t\t} else if(!currentUser.isUserMemberOfTeam(this.teamId)) {\n \t\t\t\tapiStatus = ApiStatusCode.USER_NOT_MEMBER_OF_SPECIFIED_TEAM;\n \t\t\t\tlog.info(apiStatus);\n \t}\n \t\t}\n \t\t\n\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_CREATED)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n \t\tJsonRepresentation jsonRep = new JsonRepresentation(entity);\n\t\t\tJSONObject json = jsonRep.toJsonObject();\n\n\t\t\t//////////////////////////////////////////\n \t\t// 'Get Status of Activities for User' API\n \t\t//////////////////////////////////////////\n \t\tif(this.userVote != null) {\n \t\t\t// remainder of processing for this API is delegated to another method\n \t\t\tgetStatusOfActivitiesForUser(currentUser, json, jsonReturn);\n \t\t\treturn new JsonRepresentation(jsonReturn);\n \t\t}\n \t\t\n\t\t\tTeam team = (Team)em.createNamedQuery(\"Team.getByKey\")\n\t\t\t\t.setParameter(\"key\", KeyFactory.stringToKey(this.teamId))\n\t\t\t\t.getSingleResult();\n\t\t\tlog.info(\"team retrieved = \" + team.getTeamName());\n\t\t\t\n\t\t\tString statusUpdate = null;\n\t\t\tif(json.has(\"statusUpdate\")) {\n\t\t\t\tstatusUpdate = json.getString(\"statusUpdate\");\n\t\t\t}\n\t\t\t\n\t\t\tString photoBase64 = null;\n\t\t\tif(json.has(\"photo\")) {\n\t\t\t\tphotoBase64 = json.getString(\"photo\");\n\t\t\t}\n\t\t\t\n\t\t\tBoolean isPortrait = null;\n\t\t\tif(json.has(\"isPortrait\")) {\n\t\t\t\tisPortrait = json.getBoolean(\"isPortrait\");\n\t\t\t\tlog.info(\"json isPortrait = \" + isPortrait);\n\t\t\t}\n\n\t\t\tString videoBase64 = null;\n\t\t\tif(json.has(\"video\")) {\n\t\t\t\tvideoBase64 = json.getString(\"video\");\n\t\t\t}\n\t\t\t\n\t\t\t// Enforce Rules\n\t\t\tif((statusUpdate == null || statusUpdate.length() == 0) && (photoBase64 == null || photoBase64.length() == 0)) {\n\t\t\t\tapiStatus = ApiStatusCode.STATUS_UPDATE_OR_PHOTO_REQUIRED;\n\t\t\t\tlog.info(\"required statusUpdate or photo field required\");\n\t\t\t} else if(statusUpdate != null && statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT){\n\t\t\t\tapiStatus = ApiStatusCode.INVALID_STATUS_UPDATE_MAX_SIZE_EXCEEDED;\n\t\t\t} else if(videoBase64 != null && photoBase64 == null) {\n\t\t\t\tapiStatus = ApiStatusCode.VIDEO_AND_PHOTO_MUST_BE_SPECIFIED_TOGETHER;\n\t\t\t} else if(photoBase64 != null && isPortrait == null) {\n\t\t\t\tapiStatus = ApiStatusCode.IS_PORTRAIT_AND_PHOTO_MUST_BE_SPECIFIED_TOGETHER;\n\t\t\t}\n \t\t\n\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_CREATED)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n\t\t\t// No anonymous Activity posts.\n\t\t\t// TODO once twitter API supports the meta data, then user name will not have to be inserted into update\n\t\t\tif(statusUpdate == null || statusUpdate.length() == 0) {\n\t\t\t\tstatusUpdate = currentUser.getFullName() + \" shared a photo fr loc \" + TF.getPassword();\n\t\t\t} else {\n\t\t\t\tstatusUpdate = currentUser.getDisplayName() + \" post: \" + statusUpdate;\n\t\t\t}\n\t\t\t\n\t\t\t///////////////////////////////////////////////////////////////////\n\t\t\t// Cache the activity post whether the team is using Twitter or not\n\t\t\t///////////////////////////////////////////////////////////////////\n\t\t\t// abbreviate only if necessary\n\t\t\tif(statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT) {\n\t\t\t\tstatusUpdate = Language.abbreviate(statusUpdate);\n\t\t\t}\n\t\t\t\t\n\t\t\tActivity newActivity = new Activity();\n\t\t\tnewActivity.setText(statusUpdate);\n\t\t\tnewActivity.setCreatedGmtDate(new Date());\n\t\t\tnewActivity.setTeamId(this.teamId);\n\t\t\tnewActivity.setTeamName(team.getTeamName());\n\t\t\t\n\t\t\t// cacheId held in team is the last used.\n\t\t\tLong cacheId = team.getNewestCacheId() + 1;\n\t\t\tnewActivity.setCacheId(cacheId);\n\t\t\tteam.setNewestCacheId(cacheId);\n\t\t\t\n\t\t\t// Only send activity to Twitter if team is using Twitter\n\t\t\ttwitter4j.Status twitterStatus = null;\n\t\t\tif(team.getUseTwitter()) {\n\t\t\t\t// truncate if necessary\n\t\t\t\tif(statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT) {\n\t\t\t\t\tstatusUpdate = statusUpdate.substring(0, TwitterClient.MAX_TWITTER_CHARACTER_COUNT - 2) + \"..\";\n\t\t\t\t}\n\n\t\t\t\ttwitterStatus = TwitterClient.updateStatus(statusUpdate, team.getTwitterAccessToken(), team.getTwitterAccessTokenSecret());\n\t\t\t\t\n\t\t\t\t// if Twitter update failed, log error, but continue because activity post will be stored by rTeam\n\t\t\t\tif(twitterStatus == null) {\n\t\t\t\t\tlog.severe(\"Twitter update failed, but continuing on ...\");\n\t\t\t\t\tapiStatus = ApiStatusCode.TWITTER_ERROR;\n\t\t\t\t} else {\n\t\t\t\t\tnewActivity.setTwitterId(twitterStatus.getId());\n\t\t\t\t\t// if posted to twitter, match the exact twitter date\n\t\t\t\t\tnewActivity.setCreatedGmtDate(twitterStatus.getCreatedAt());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tEntityManager emActivity = EMF.get().createEntityManager();\n\t\t\ttry {\n\t\t\t\tif(photoBase64 != null) {\n\t\t\t\t\t// decode the base64 encoding to create the thumb nail\n\t\t\t\t\tbyte[] rawPhoto = Base64.decode(photoBase64);\n\t\t\t\t\tImagesService imagesService = ImagesServiceFactory.getImagesService();\n\t\t\t\t\tImage oldImage = ImagesServiceFactory.makeImage(rawPhoto);\n\t\t\t\t\t\n\t\t\t\t\tint tnWidth = isPortrait == true ? THUMB_NAIL_SHORT_SIDE : THUMB_NAIL_LONG_SIDE;\n\t\t\t\t\tint tnHeight = isPortrait == true ? THUMB_NAIL_LONG_SIDE : THUMB_NAIL_SHORT_SIDE;\n\t\t\t\t\tTransform resize = ImagesServiceFactory.makeResize(tnWidth, tnHeight);\n\t\t\t\t\tImage newImage = imagesService.applyTransform(resize, oldImage);\n\t\t\t\t\tString thumbNailBase64 = Base64.encode(newImage.getImageData());\n\t\t\t\t\tnewActivity.setThumbNailBase64(thumbNailBase64);\n\t\t\t\t\tnewActivity.setPhotoBase64(photoBase64);\n\t\t\t\t\tif(videoBase64 != null) newActivity.setVideoBase64(videoBase64);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\temActivity.persist(newActivity);\n\t\t\t\tlog.info(\"new Activity was successfully persisted\");\n\t\t\t} catch(Exception e) {\n\t\t\t\tlog.severe(\"createActivity() exception = \" + e.getMessage());\n\t\t\t} finally {\n\t\t\t\temActivity.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlog.severe(\"error extracting JSON object from Post\");\n\t\t\te.printStackTrace();\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t} catch (JSONException e) {\n\t\t\tlog.severe(\"error converting json representation into a JSON object\");\n\t\t\te.printStackTrace();\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t} catch (NoResultException e) {\n\t\t\tlog.severe(\"team not found\");\n\t\t\tapiStatus = ApiStatusCode.TEAM_NOT_FOUND;\n\t\t} catch (NonUniqueResultException e) {\n\t\t\tlog.severe(\"should never happen - two or more teams have same team id\");\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t em.close();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t} catch (JSONException e) {\n\t\t\tlog.severe(\"error creating JSON return object\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new JsonRepresentation(jsonReturn);\n }", "@Test\n public void createTeam1() {\n\n //GETTING AUTHORIZED BY PROVIDING WHO I AM\n //PROVIDE WHO I AM, THEN GET THE AUTHORIZATION/THE POWER TO ACCESS/TOKEN\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"[email protected]\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n\n String token =response.jsonPath().get(\"accessToken\");\n\n\n System.out.println(token);\n\n\n //USE THE TOKEN TO SEND MY REQUEST\n String team =\"HAAGSJGAJDS\";\n String batch = \"8\";\n\n RestAssured.given().\n header(\"Authorization\", token).\n header(\"Content-Type\", \"application/json\").\n queryParam(\"campus-location\", \"VA\").\n queryParam(\"batch-number\", batch).\n queryParam(\"team-name\", team).\n when().post(\"/api/teams/team\").\n then().log().all().\n statusCode(201).\n body(is(\"team \"+team+\" has been added to the batch \"+batch+\".\"));\n\n }", "private void makeRequest() {\n\t\tRequest request = new Request(RequestCode.GET_REVISION_HISTORY);\n\t\trequest.setDocumentName(tabs.getTitleAt(tabs.getSelectedIndex()));\n\t\ttry {\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@GET(\"movie/{id}\")\n Call<PersonagemResponse> getMovieDetails(@Path(\"id\") int id, @Query(\"api_key\") String apiKey);", "@Test (groups = \"create_post\")\n public void DTest_Show_Post_success(){\n\n System.out.println(\"Show PostID# \"+ createdPost);\n System.out.println(\"Generated Post Title: \"+ createdTitle);\n System.out.println(\"Generated Post Content: \"+ createdContent);\n System.out.println(\"Request to: \" + resourcePath + \"/\" + createdPost);\n\n given()\n .spec(RequestSpecs.generateToken())\n .get(String.format(\"%s/%s\",resourcePath,createdPost.toString()))\n .then()\n .body(\"data.id\", equalTo(createdPost))\n .and()\n .body(\"data.title\", equalTo(createdTitle))\n .and()\n .body(\"data.content\", equalTo(createdContent))\n .and()\n .statusCode(200)\n .spec(ResponseSpecs.defaultSpec());\n }", "@FormUrlEncoded\n @POST(\"posts/\")\n Call<Post> createPostUrlFormatted(\n @Field(\"userId\") Integer id,\n @Field(\"title\") String title,\n @Field(\"body\") String body\n );", "@Test\n\t\tpublic void createTweet() {\n\t\t\t\n\t\t\tRestAssured.baseURI=\"https://api.twitter.com/1.1/statuses\";\n\t\t\tResponse res=given().auth().oauth(ConsumerKey,ConsumerSecret,Token,TokenSecret).\n\t\t\tqueryParam(\"status\",\"I am learning API testing using RestAssured Java #Qualitest\").\n\t\t\twhen().post(\"/update.json\").then().extract().response();\n\t\t\t\n\t\t\tString responseString=res.asString();\n\t\t\t//System.out.println(responseString);\n\t\t\tlog.info(responseString);\n\t\t \n\t\t\tJsonPath js=new JsonPath(responseString);\n\t\t\tString id=js.get(\"id\").toString();\n\t\t\tlog.info(id);\n\t\t\tString text=js.get(\"text\").toString();\n\t\t\tlog.info(text);\n\t\t \n\t\t\t\n//\t\t\tString responseString=res.asString();\n//\t\t\tlog.info(responseString);\n//\t\t \n//\t\t\tJsonPath js=new JsonPath(responseString);\n//\t\t\tString id=js.get(\"id\").toString();\n//\t\t\tlog.info(id);\n//\t\t\tString text=js.get(\"text\").toString();\n//\t\t\tlog.info(text);\n//\t\t \n\t\t}", "@Test\n public void createTeam2(){\n\n //GETTING AUTHORIZED BY PROVIDING WHO I AM\n //PROVIDE WHO I AM, THEN GET THE AUTHORIZATION/THE POWER TO ACCESS/TOKEN\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"[email protected]\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n\n String token =response.jsonPath().get(\"accessToken\");\n\n // RestAssured.baseURI=\"https://cybertek-reservation-api-qa.herokuapp.com\";\n RequestSpecification request = RestAssured.given();\n\n JSONObject requestParams = new JSONObject();\n requestParams.put(\"campus-location\", \"VA\");\n requestParams.put(\"batch-number\", \"11\");\n requestParams.put(\"team-name\", \"simpleuser001\");\n\n request.\n header(\"Content-Type\", \"application/json\").\n header(\"Authorization\", token).\n body(requestParams.toJSONString()).\n post(\"/api/teams/team\").then().log().all().statusCode(201);\n\n }", "API createAPI();", "public interface TvApi {\n\n /*\n 获取电视节目表\n */\n @POST(\"getProgram\")\n Call<TvShowData> getProgram(@Query(\"code\") String code, @Query(\"date\") String date, @Query(\"key\") String key);\n\n /*\n 获取频道类型列表\n */\n @POST(\"getCategory\")\n Call<TvTypeData> getCategory(@Query(\"key\") String key);\n\n /*\n\n */\n @POST(\"getChannel\")\n Call<TvChannelData> getChannel(@Query(\"pId\") String pId, @Query(\"key\") String key);\n}", "@Test\n public void create() throws RazorpayException{\n JSONObject request = new JSONObject(\"{\" +\n \"\\\"amount\\\":\\\"100\\\",\" +\n \"\\\"speed\\\":\\\"normal\\\",\" +\n \"\\\"notes\\\":{\\\"notes_key_1\\\":\\\"BeammeupScotty.\\\",\" +\n \"\\\"notes_key_2\\\":\\\"Engage\\\"},\" +\n \"\\\"receipt\\\":\\\"ReceiptNo.31\\\"}\");\n\n String mockedResponseJson = \"{\\n\" +\n \" \\\"id\\\": \"+REFUND_ID+\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 500100,\\n\" +\n \" \\\"receipt\\\": \\\"Receipt No. 31\\\",\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FCXKPFtYfPXJPy\\\",\\n\" +\n \" \\\"notes\\\": [],\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": null\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078866,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\"\\n\" +\n \"}\";\n\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n Refund fetch = refundClient.create(request);\n assertNotNull(fetch);\n assertEquals(REFUND_ID,fetch.get(\"id\"));\n assertEquals(\"refund\",fetch.get(\"entity\"));\n assertEquals(500100,(int)fetch.get(\"amount\"));\n assertEquals(\"INR\",fetch.get(\"currency\"));\n String createRequest = getHost(Constants.REFUNDS);\n verifySentRequest(true, request.toString(), createRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "public void testCreateOfficeAction77() {\n UrlInputDto urlInput = new UrlInputDto(TradeMarkDocumentTypes.TYPE_OFFICE_ACTION.getAlfrescoTypeName());\n urlInput.setSerialNumber(ParameterValues.VALUE_SERIAL_77777777_NUMBER.toString());\n urlInput.setFileName(VALUE_OFFACTN_FILE_NAME_TWO);\n String OFFICEACTION_CREATE_WEBSCRIPT_URL = CaseCreateUrl.returnGenericCreateUrl(urlInput);\n Map<String, String> offActnParam = new HashMap<String, String>();\n offActnParam.put(ParameterKeys.URL.toString(), OFFICEACTION_CREATE_WEBSCRIPT_URL);\n offActnParam.put(ParameterKeys.METADATA.toString(), VALUE_OFFICEACTION_METADATA_TWO);\n offActnParam.put(ParameterKeys.CONTENT_ATTACHEMENT.toString(), OfficeActionBaseTest.CONTENT_OFFICEACTION_ATTACHMENT);\n ClientResponse response = createDocument(offActnParam);\n //String str = response.getEntity(String.class);\n //System.out.println(str);\n assertEquals(400, response.getStatus());\n }", "public void testCreateSampleNoteForOffActn() {\n UrlInputDto urlInput = new UrlInputDto(TradeMarkDocumentTypes.TYPE_NOTE.getAlfrescoTypeName());\n urlInput.setSerialNumber(ParameterValues.VALUE_SERIAL_77777777_NUMBER.toString());\n urlInput.setFileName(\"NoteForOffActnAssoc.pdf\");\n String NOTE_CREATE_WEBSCRIPT_URL = CaseCreateUrl.returnGenericCreateUrl(urlInput);\n Map<String, String> noteParam = new HashMap<String, String>();\n noteParam.put(ParameterKeys.URL.toString(), NOTE_CREATE_WEBSCRIPT_URL);\n noteParam.put(ParameterKeys.METADATA.toString(), NoteBaseTest.VALUE_NOTE_METADATA);\n noteParam.put(ParameterKeys.CONTENT_ATTACHEMENT.toString(), NoteBaseTest.CONTENT_NOTE_TTACHMENT);\n ClientResponse response = createDocument(noteParam);\n // String str = response.getEntity(String.class);\n // System.out.println(str);\n assertEquals(201, response.getStatus());\n }", "@FormUrlEncoded\n @POST(\"posts\")\n Call<Post> createPost(@Field(\"userId\") int userId, @Field(\"title\") String title, @Field(\"body\") String text);", "public Reviews() { }", "@Test\n\tpublic void postExample() {\n\t\tString APIUrl = \"http://34.210.101.131:8081/topics\";\n\t\tString APIBody=\"{\\\"topicComplexity\\\":\\\"5\\\",\\\"topicName\\\":\\\"MCQ\\\"}\";\n\t\t// Building request using requestSpecBuilder\n\t\tRequestSpecBuilder builder = new RequestSpecBuilder();\n\t\t \n\t\tbuilder.setBody(APIBody);\n\t\tbuilder.setContentType(\"application/json\");\n\t\t//RequestSpecification requestSpec = (RequestSpecification) builder.build();\n\t\tRequestSpecification request = RestAssured.given();\n\t\tRestAssured.given().auth().preemptive().basic(\"[email protected]\",\"testdata@123\");\n\t\t//com.jayway.restassured.specification.RequestSpecification requestSpec = builder.build();\t \n\t\t \n\t\n\t\t\t\t\n\t\tResponse response = request.post(\"http://34.210.101.131:8081/topics\");\n\t\tfloat code = response.getStatusCode();\n\t\tSystem.out.println(\"status code is\"+code);\n\t\tString data =response.asString();\n\t\tSystem.out.println(\"Data is\"+data);\n\t\t\n\n\t\t\n\t\t\n\t}", "@RequestMapping(\"/create\")\r\n\t@Produces({ MediaType.TEXT_PLAIN })\r\n\tpublic String createOrder() {\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"in EO calling Validate REST API : \"+System.currentTimeMillis()); \r\n\t\t\tStopWatch watch = new StopWatch();\r\n\t\t\tHttpUriRequest request = new HttpGet(\"http://localhost:\" + \"\" + \"9091\" + \"/eo/validate\");\r\n\t\t\tHttpResponse httpResponse;\r\n\t\t\twatch.start();\r\n\t\t\thttpResponse = HttpClientBuilder.create().build().execute(request);\r\n\t\t\twatch.stop();\r\n\t\t\tresponse = EntityUtils.toString(httpResponse.getEntity());\r\n\t\t\tSystem.out.println(\">>>>>>>Response:\" + response + \" Response time(hh:mm:SS:mS): \" + watch.toString());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif (response.contains(\"Order Validated\"))\r\n\t\t\treturn \"Order Created!!\";\r\n\t\telse\r\n\t\t\tthrow new InternalServerErrorException();\r\n\t}", "@GET(\"replays/{id}\")\n Call<DataResponse<ReplayData>> getReplayData(@Path(\"id\") String replayId);", "private String getReviewApiLink(String id) {\n String reviewLink = \"https://api.themoviedb.org/3/movie/\" + id + \"/reviews?api_key=8f067240d8717f510b4c79abe9f714b7&language=en-US\";\n return reviewLink;\n }", "@Test\r\n\tpublic void createProductDetails() {\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"id\", \"7\"); // Cast\r\n\t\trequestParams.put(\"name\", \"Mangao\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.post(\"\");\r\n\t\tSystem.out.println(\"POST Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 201);\r\n\r\n\t}", "@FormUrlEncoded\n @POST(Service.PATH_TIME_PLAN_BY_DATE)\n Call<ApiTimePlanByDateObject> postTimePlanByDate(\n @Field(\"UserId\") int doctorId,\n @Field(\"DateTimeSelect\") String date\n );", "public interface DetailMovie {\n @GET(\"{id}\")\n Call<DetailMovies> getData(@Path(\"id\") int id,\n @Query(\"api_key\") String api_key,\n @Query(\"language\") String language,\n @Query(\"append_to_response\") String append_to_response\n );\n}", "private void createInstance() throws DefectException{\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString username = TestBedManager.INSTANCE.getDefectConfig().getUsername();\r\n\t\t\t\r\n\t\t\tString password = encrypt_decrypt.getDecodedValue(TestBedManager.INSTANCE.getDefectConfig().getPassword());\r\n\t\t\t\r\n\t\t\t//restApi = new RallyRestApi(new URI(rallyInfo.getUrl()), rallyInfo.getUserName(), rallyInfo.getPassword());\r\n\t\t\trestApi = new RallyRestApi(new URI(rallyInfo.getUrl()),username ,password);\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\tlog.error(\"failed to connect to rally instance, message : \" + e.toString() + \"RallyInfo -\" + rallyInfo);\r\n\t\t\tthrow new DefectException(\"failed to connect to rally instance, message : \" + e.toString()); \t\r\n\t\t}\r\n\t\tif(rallyInfo.getWsapiVersion() != null)\r\n\t\t\trestApi.setWsapiVersion(rallyInfo.getWsapiVersion());\r\n\t\trestApi.setApplicationName(rallyInfo.getAppName());\r\n\t\t\r\n\t}", "ResourceAPI createResourceAPI();", "public interface InterfaceReportMistakeAPI {\n\n\n @FormUrlEncoded\n @POST(\"reportmistake\")\n public Call<ModelResponseGeneral> postReportWithID(@Field(\"key\") String key,\n @Field(\"messageText\") String messageText,\n @Field(\"venueID\") int venueID);\n\n\n\n @FormUrlEncoded\n @POST(\"reportmistake\")\n public Call<ModelResponseGeneral> postReportWithName(@Field(\"key\") String key,\n @Field(\"messageText\") String messageText,\n @Field(\"venueName\") String venueName);\n\n}", "int createSurvey(List<Question> questions, String userId);", "@Test\n void postTest() {\n URI uri = URI.create(endBody + \"/post\");\n\n // create a dummy body for easy JSON conversion\n QuestionText newQuestion = new QuestionText(\"Test\");\n\n // convert to json and send / store the response\n HttpResponse<String> response = HttpMethods.post(uri, gson.toJson(newQuestion));\n\n assertEquals(200, response.statusCode());\n }", "public interface IMovieRankApi {\n @GET(\"boxoffice/searchDailyBoxOfficeList.json?key=\" + Util.MOVIE_API_KEY)\n Call<MovieRankingOriginModel> getMovieRankingList(@Query(\"targetDt\")String targetDt);\n\n @GET(\"boxoffice/searchDailyBoxOfficeList.json?key=\" + Util.MOVIE_API_KEY)\n Call<String> getMovieRankingListString(@Query(\"targetDt\")String targetDt);\n}", "public interface ContentApi {\n\n @FormUrlEncoded\n @POST(\"/Random/RandomParagraph\")\n Call<String> getContent(@Field(\"Subject1\") String subject1,\n @Field(\"Subject2\") String subject2);\n}", "@Test\n public void a_create() {\n String url = baseUrl + \"create\";\n System.out.println();\n System.out.println(\"volunteerProvince being posted: \"+volunteerProvince);\n ResponseEntity<VolunteerProvince> postResponse = testRestTemplate\n .withBasicAuth(SECURITY_USERNAME, SECURITY_PASSWORD)\n .postForEntity(url, volunteerProvince, VolunteerProvince.class);\n volunteerProvince = postResponse.getBody();\n assertNotNull(postResponse.getBody());\n assertEquals(volunteerProvince.getVolunteerNum(), postResponse.getBody().getVolunteerNum());\n System.out.println(\"Volunteer Province saved on the data structure: \"+postResponse.getBody());\n\n }", "FetchRequest<Review> byId(String id);", "@POST(\"orders/new_order/\")\n Call<ApiStatus> createNewOrderByUser(@Body Order myOrder);", "private void add_ratereview(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tint hotel_userid;\n\t\tString name_user = (String) request.getSession().getAttribute(\"username\");\n\t\tServletContext servletContext = getServletContext();\n\t\tWebApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\t\tuserDaoImplementation userDaoImplementation = (userDaoImplementation) appContext\n\t\t\t\t.getBean(\"userDaoImplementation\");\n\t\tUser user1 = null;\n\t\tuser1 = userDaoImplementation.getuserbyid(name_user);\n\t\thotel_userid = user1.getUserId();\n\t\tString hotel_id = request.getParameter(\"key\");\n\t\tString hotel_name = request.getParameter(\"key_Name\");\n\t\tString hotel_loc = request.getParameter(\"key_loc\");\n\t\tString rrate = request.getParameter(\"review_rate\");\n\t\tString rreview = request.getParameter(\"rate_review\");\n\t\tRateReview rateReview = new RateReview();\n\t\trateReview.setRest_id(Integer.parseInt(hotel_id));\n\t\tSystem.out.println(\"sddede\"+hotel_id);\n\t\trateReview.setUser_id(hotel_userid);\n\t\trateReview.setRate(Integer.parseInt(rrate));\n\t\trateReview.setReview(rreview);\n\t\trestDaoImplementation restDaoImplementation = (restDaoImplementation) appContext\n\t\t\t\t.getBean(\"restDaoImplementation\");\n\t\tRest rest1 = null;\n\t\trest1 = restDaoImplementation.getrestbyid(Integer.parseInt(hotel_id));\n\t\tint count = rest1.getCount();\n\t\tfloat ratefrmrest = rest1.getRate_avg();\n\t\tfloat totalrating = (count * ratefrmrest) + (Integer.parseInt(rrate));\n\t\tint updated_count = count + 1;\n\t\tfloat final_rate = totalrating / updated_count;\n\t\tRest rest = new Rest();\n\t\trest.setCount(updated_count);\n\t\trest.setRate_avg(final_rate);\n\t\trest.setLocation(hotel_loc);\n\t\trest.setRestId(Integer.parseInt(hotel_id));\n\t\trest.setRestName(hotel_name);\n\t\trestDaoImplementation.updateRest_info(rest);\n\t\trrDaoImplementation rrDaoImplementation = (rrDaoImplementation) appContext.getBean(\"rrDaoImplementation\");\n\t\trrDaoImplementation.insert(rateReview);\n\t\tresponse.sendRedirect(\"restaurant\");\n\n\t}", "public void getBookByTitle(String base64){\n Call<Book> call = api.postBook(base64);\n call.enqueue(\n new Callback<Book>() {\n @Override\n public void onResponse(Call<Book> call, Response<Book> response) {\n Log.e(\"Test API\", \"on Response \"+response.body());\n Book book = response.body();\n Log.e(\"Test API\", \"on Response \"+book.getAuthor());\n Log.e(\"Test API\", \"on Response \"+book.getTitle());\n Log.e(\"Test API\", \"on Response \"+book.getLanguage());\n Log.e(\"Test API\", \"on Response \"+book.getDescription());\n view.onGetSuccess(book);\n }\n\n @Override\n public void onFailure(Call<Book> call, Throwable t) {\n Log.i(\"Test API\", \"on Failure \"+t.getLocalizedMessage());\n }\n }\n );\n }", "@Headers({\n \t\"Content-Type:application/vnd.api+json\" \n })\n @GET(\"api/v2/reports/{id}.json_api\")\n Call<Report> show(\n @retrofit2.http.Path(\"id\") Integer id, @retrofit2.http.Query(\"include\") String include\n );", "private String urlBuilder(){\n String timelineURL = \"curgas/timeline.json\";\n final RequestBuilder.UrlBuilder url = new RequestBuilder.UrlBuilder();\n url.setUrl(timelineURL);\n url.appendUrlQuery(\"apikey\", Constants.API_KEY);\n url.appendUrlQuery(\"sort\", SORT_TYPE);\n url.appendUrlQuery(\"jumlah\",TOTAL_POSTS);\n url.appendUrlQuery(\"page\",Integer.toString(PAGE_LOADED));\n\n String buildURL = url.build();\n\n return buildURL;\n }", "private void createPostXML() {\n Call<PostModel> call = jsonPlaceHolderAPI.createPostXML(23, \"New Title\", \"New Text\");\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "@Test(enabled = true)\n public String createIssue() throws Exception {\n JSONParser parser = new JSONParser();\n Object obj = parser.parse(new FileReader(JSON_FILE_2));\n JSONObject jsonObject = (JSONObject) obj;\n\n Response res =\n given().\n header(\"Cookie\",\"JSESSIONID=\"+createSession()).and().\n header(\"Content-Type\",\"application/json\").\n body(jsonObject.toJSONString()).\n when().\n post(\"/rest/api/2/issue\").\n then().\n statusCode(201).log().all().extract().response();\n\n //extracting values from the RestAssured Response\n JsonPath jp = res.jsonPath();\n String issueID = jp.get(\"id\");\n System.out.println(\"New Issue ID:\" +issueID);//10005\n return issueID;\n }", "@ApiOperation(\"Creates a Team\")\n @PostMapping(\"/API/v1/team\")\n public ResponseEntity<TeamAPI> createTeam(@RequestParam String nombreEquipo){\n TeamString salida = teamService.crearTeam(nombreEquipo, false);\n\n if(salida.getSalida().equals(\"OK\")){\n return new ResponseEntity<>(salida.getTeam().toTeamAPI(), HttpStatus.OK);\n }\n else {\n return new ResponseEntity(salida.getSalida(), HttpStatus.NOT_FOUND);\n }\n\n }", "QueryRequest<Review> query();", "@POST(\"posts\")\n Call<Post> createPost(@Body Post post);", "public interface APIService {\n\n @FormUrlEncoded\n @POST(\"receipts.php\")\n Call<Receipt> verifyParticipant(@Field(\"regID\") int regID, @Field(\"mobile\") String mobile);\n}", "private void createPost() {\n PostModel model = new PostModel(23, \"New Title\", \"New Text\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPost(model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "@Test\n public void getWorkflow_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db with a new macro operator\n Workflow mo = addMOToDb(1);\n\n // PREPARE THE TEST\n // Nothing to do\n\n // DO THE TEST\n Response response = callAPI(VERB.GET, \"/mo/\" + mo.getId().toString(), null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n Workflow readWorkflow = response.readEntity(new GenericType<Workflow>() {\n });\n assertEquals(mo.getId(), readWorkflow.getId());\n assertEquals(mo.getName(), readWorkflow.getName());\n assertEquals(mo.getDescription(), readWorkflow.getDescription());\n assertEquals(mo.getRaw(), readWorkflow.getRaw());\n }", "@GET(\"posts/1\")\n public Call<Post> getPost();", "@RequestMapping(value=\"/addToWatchlist\", method = RequestMethod.POST, produces = \"application/json\")\n\t@ResponseBody\n\tpublic void addToWatchlist(@RequestParam(\"tmdb_id\") String tmdb_id,\n\t\t\t@RequestParam(\"title\") String title,\n\t\t\t@RequestParam(\"overview\") String overview, \n\t\t\t@RequestParam(\"poster_path\") String poster_path,\n\t\t\t@RequestParam(\"genres\") String genres,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException{\n\t\t\t\tUser user = new User();\n\t\t\t\t\n\t\t\t\t//Getting user authentication token\n\t\t\t\tString authToken = checkToken(request, response);\n\t\t\t\t\n\t\t\t\t//Check validation of user token\n\t\t\t\ttry{\n\t\t\t\t\tuser = validateToken(authToken);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If token isnt valid send Unauthorized error\n\t\t\t\tif (user == null)\n\t\t\t\t\tresponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\t//Get show object from show tmdb id\n\t\t\t\t\t\n\t\t\t\t\tList<Show> showWithId = service.findByTmdbId(tmdb_id);\n\t\t\t\t\t\n\t\t\t\t\t//If show is in database get it, else create object and put it in database\n\t\t\t\t\tShow show = null;\n\t\t\t\t\tif (showWithId.size() > 0){\n\t\t\t\t\t\tSystem.out.println(showWithId.get(0).getTitle());\n\t\t\t\t\t\tshow = showWithId.get(0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t show = createShow(tmdb_id, title, overview, poster_path, genres);\n\t\t\t\t\tshow.setUsers(new ArrayList<User>());\n\t\t\t\t\tSystem.out.println(\"///////Creating show: \" + title);\n\t\t\t\t\tservice.save(show);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tList<Show> watchList = user.getWatchlist();\n\t\t\t\t\tSystem.out.println(\"watchList: \");\n\t\t\t\t\tfor (Show show1 : watchList) {\n\t\t\t\t\t\tSystem.out.println(show1.getTitle());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!watchList.contains(show)){\n\t\t\t\t\t\twatchList.add(show);\n\t\t\t\t\t\tuser.setWatchlist(watchList);\n\t \n\t\t\t\t\t\tuserService.save(user);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t}", "@Test(groups = { \"wso2.esb\" }, description = \"agilezen {createStory} integration test with mandatory parameters.\", dependsOnMethods = { \"testListProjectsWithMandatoryParameters\" })\n public void testCreateStoryWithMandatoryParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:createStory\");\n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_createStory_mandatory.json\");\n \n final String storyid = esbRestResponse.getBody().getString(\"id\");\n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + storyid;\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getString(\"text\"), apiRestResponse.getBody().getString(\"text\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"color\"), apiRestResponse.getBody().getString(\"color\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"size\"), apiRestResponse.getBody().getString(\"size\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"status\"), apiRestResponse.getBody()\n .getString(\"status\"));\n \n }", "public interface TopVideoService {\n @FormUrlEncoded\n @POST(\"api/v3/ranklist\")\n rx.Observable<TopVideoEntity> getVideo(@Field(\"strategy\")String type, @Field(\"udid\") String data);\n}", "@Test(dataProvider = \"Data\")\r\n\tpublic void createNewInc(String filename) {\n\t\tRestAssured.baseURI = \"https://dev78371.service-now.com/api/now/table/incident\";\r\n\t\t\r\n\t\t//Authentication (basic)\r\n\t\tRestAssured.authentication = RestAssured.basic(\"admin\", \"bv0MMhw0tUXC\");\r\n\t\t\r\n\t\t//Create a new File\r\n\t\tFile filesrc = new File(filename);\r\n\t\t\r\n\t\t/*//Create a new File\r\n\t\tFile filesrc = new File(\"./data1.json\");*/\r\n\t\t\r\n\t\t\r\n\t//Request type - post -> Response using file src\r\n\t\tResponse response = RestAssured\r\n\t\t\t\t.given()\r\n\t\t\t\t.contentType(ContentType.JSON)\r\n\t\t\t\t.body(filesrc)\r\n\t\t\t\t.post();\r\n\t\t\r\n\t\t\r\n\t\t/*Request type - post -> Response directly\r\n\t\tResponse response = RestAssured\r\n\t\t\t\t.given()\r\n\t\t\t\t.contentType(ContentType.JSON)\r\n\t\t\t\t.body(\"{\\r\\n\" + \r\n\t\t\t\t\t\t\" \\\"short_description\\\": \\\"Short description created\\\",\\r\\n\" + \r\n\t\t\t\t\t\t\" \\\"description\\\": \\\"Description created via postman\\\",\\r\\n\" + \r\n\t\t\t\t\t\t\" \\\"category\\\": \\\"Rest API\\\"\\r\\n\" + \r\n\t\t\t\t\t\t\"}\")\r\n\t\t\t\t.post()*/\r\n\t\t\r\n\t\t//Validate Response code\r\n\t\tSystem.out.println(response.getStatusCode());\r\n\t\t\r\n\t\t//Check the response format\r\n\t\tSystem.out.println(response.getContentType());\r\n\t\t\r\n\t\t//print the response from postman console\r\n\t\tresponse.prettyPrint();\r\n\t\t\r\n\t\t//to get the response in json\r\n\t\tJsonPath jsonresponse = response.jsonPath();\r\n\t\t\r\n\t\t//to get a single record\r\n\t\tString sys_id = jsonresponse.get(\"result.sys_id\");\r\n\t\tSystem.out.println(\"The sys_id is: \"+sys_id);\r\n\t\t\r\n\t\t\r\n\r\n\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@GET(\"genre/movie/list\")\n Call<GenreResponse> getGenreList(@Query(\"api_key\") String apikey);", "@FormUrlEncoded\n @POST(\"apiutil/reqforpack\")\n Call<SubPackageResponse> subscribePackages(@Field(\"razorpayPaymentID\") String razorpayPaymentID,@Field(\"pack_id\") String postId, @Field(\"user_id\") String userId);", "@Test(enabled = true)\n public String createComment() throws Exception{\n JSONParser parser = new JSONParser();\n Object obj = parser.parse(new FileReader(JSON_FILE_3));\n JSONObject jsonObject = (JSONObject) obj;\n\n Response res =\n given().\n header(\"cookie\",\"JSESSIONID=\"+createSession()).and().\n header(\"Content-Type\",\"application/json\").\n body(jsonObject.toJSONString()).\n when().\n post(\"/rest/api/2/issue/10008/comment\").\n then().\n statusCode(201).log().all().extract().response();\n //extracting values from the RestAssured Response\n JsonPath jp = res.jsonPath();\n String commentID = jp.get(\"id\");\n System.out.println(\"New Comment ID:\" +commentID);//10002\n return commentID;\n }", "@GET(\"posts/1\")\n Call<Post> getPostOne();", "@org.junit.Test\r\n public void testGetReviewById1() throws Exception {\r\n System.out.println(\"getReviewById1\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n review = service.insertReview(review);\r\n Review result = service.getReviewById(id);\r\n assertEquals(review, result);\r\n }", "private void hitApiForCreateDeal() {\n appUtils.showProgressDialog(mActivity,false);\n\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.DEAL_TITLE, etTitle.getText().toString().trim());\n params.put(ApiKeys.DEAL_DESCRIPTION, etDescription.getText().toString().trim());\n params.put(ApiKeys.TOTAL_ITEMS, etTotalItems.getText().toString().trim());\n params.put(ApiKeys.ORIGINAL_PRICE, etOriginalPrice.getText().toString().trim());\n params.put(ApiKeys.NEW_PRICE, tvNewPrice.getText().toString());\n params.put(ApiKeys.START_DATE_TIME, parseTime(etBeginTime.getText().toString().trim()));\n params.put(ApiKeys.END_DATE_TIME, parseTime(etEndTime.getText().toString().trim()));\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.createDeal(AppSharedPrefs.getInstance(mActivity).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(mActivity, call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n CreateDealModel createDealModel = new Gson().fromJson(response, CreateDealModel.class);\n if (createDealModel.getCODE() == 200) {\n /*Intent intent = new Intent(mActivity, MerchantActivity.class);\n startActivity(intent);*/\n setResult(Constants.CREATE_DEAL_REQ_CODE);\n\n Intent intent1 = new Intent(Constants.REFRESH_RECCEIVER_KEY);\n // You can also include some extra data.\n intent1.putExtra(\"refresh\", true);\n LocalBroadcastManager.getInstance(mActivity).sendBroadcast(intent1);\n\n mActivity.finish();\n\n } else if (createDealModel.getCODE() == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(mActivity, createDealModel.getMESSAGE());\n } else {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), createDealModel.getMESSAGE());\n }\n\n appUtils.hideProgressDialog(mActivity);\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n appUtils.hideProgressDialog(mActivity);\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.txt_something_went_wrong));\n\n }\n });\n\n }", "@Test(groups = { \"wso2.esb\" }, description = \"agilezen {createStory} integration test with optional parameters.\", dependsOnMethods = { \"testListProjectsWithMandatoryParameters\" })\n public void testCreateStoryWithOptionalParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:createStory\");\n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_createStory_optional.json\");\n \n String storyId = esbRestResponse.getBody().getString(\"id\");\n connectorProperties.setProperty(\"storyId\", storyId);\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + storyId;\n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getString(\"text\"), apiRestResponse.getBody().getString(\"text\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"color\"), apiRestResponse.getBody().getString(\"color\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"size\"), apiRestResponse.getBody().getString(\"size\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"priority\"), apiRestResponse.getBody().getString(\n \"priority\"));\n Assert.assertEquals(esbRestResponse.getBody().getJSONObject(\"creator\").getString(\"id\"), apiRestResponse\n .getBody().getJSONObject(\"creator\").getString(\"id\"));\n \n }", "public String createReseracher(Researcher res);", "@POST\r\n\t@Path(\"/createMovie\")\r\n\t@Produces(MediaType.TEXT_HTML)\r\n\t@Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n\tpublic void newMovie(@FormParam(\"name\") String name, @FormParam(\"rate\") String rate,\r\n\t\t\t@FormParam(\"type\") String type, @FormParam(\"actor\") String actor, @FormParam(\"producer\") String producer,\r\n\t\t\t@FormParam(\"length\") String length, @FormParam(\"country\") String country,\r\n\t\t\t@FormParam(\"on_screen_date\") Date on_screen_date, @FormParam(\"language\") String language,\r\n\t\t\t@FormParam(\"file\") String file,\r\n\t\t\t@FormParam(\"description\") String description, @Context HttpServletResponse servletResponse,\r\n\t\t\t@Context HttpServletRequest request) throws IOException, ServletException {\r\n\t\tSystem.out.println(\"name : \" + name);\r\n\t\tSystem.out.println(\"rate : \" + rate);\r\n\t\tSystem.out.println(\"type : \" + type);\r\n\t\tSystem.out.println(\"actor : \" + actor);\r\n\t\tSystem.out.println(\"producer : \" + producer);\r\n\t\tSystem.out.println(\"length : \" + length);\r\n\t\tSystem.out.println(\"country : \" + country);\r\n\t\tSystem.out.println(\"on_screen_date\" + on_screen_date);\r\n\t\tSystem.out.println(\"language : \" + language);\r\n\t\tSystem.out.println(\"file : \" + file);\r\n\t\tSystem.out.println(\"description : \" + description);\r\n\r\n\t\t//collect data from Database\r\n\t Connection con;\r\n\t\tString driver = Constants.driver;\r\n\t\tString url = Constants.url;\r\n\t\tString user = Constants.user;\r\n\t\tString password = Constants.password;\r\n\r\n\t\t//begin adding\r\n\t\ttry {\r\n\t\t\t //Load driver\r\n\t\t\t Class.forName(driver);\r\n\t\t\t //Connect to the MySQL database! !\r\n\t\t\t con = DriverManager.getConnection(url,user,password);\r\n\r\n\t\t\t PreparedStatement ps=con.prepareStatement(\"insert into movie(name,rate,type,actor,producer,length,country,on_screen_date,language,image,description) values(?,?,?,?,?,?,?,?,?,?,?)\");\r\n\t\t\t //ps.setInt(1,4);\r\n\t\t\t ps.setString(1,name);\r\n\t\t\t ps.setInt(2, Integer.parseInt(rate));\r\n\t\t\t ps.setString(3, type);\r\n\t\t\t ps.setString(4, actor);\r\n\t\t\t ps.setString(5, producer);\r\n\t\t\t ps.setInt(6, Integer.parseInt(length));\r\n\t\t\t ps.setString(7, country);\r\n\t\t\t //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t ps.setDate(8,on_screen_date);\r\n\t\t\t ps.setString(9,language);\r\n\t\t\t ps.setString(10, file);\r\n\t\t\t ps.setString(11, description);\r\n\t\t\t ps.executeUpdate();\r\n\r\n\t\t\t con.close();\r\n\r\n\t //driver Exception & connection Exception\r\n\t\t}catch(ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Sorry,can`t find the Driver!\"); \r\n\t\t\te.printStackTrace(); \r\n\t\t}catch(SQLException e) {\r\n\t\t\t e.printStackTrace(); \r\n\t\t}catch (Exception e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t}finally{\r\n\t\t\t//System.out.println(\"Success access to Database£¡£¡\");\r\n\t\t}\r\n\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/administration.html\").forward(request, servletResponse);\r\n\t}", "public static void createResident(Resident resident) {\n // initialize\n URL url = null;\n HttpURLConnection connection = null;\n final String methodPath = \"/entities.resident/\";\n try {\n Gson gson = new Gson();\n String stringResidentJson = gson.toJson(resident);\n url = new URL(BASE_URI + methodPath);\n // open connection\n connection = (HttpURLConnection) url.openConnection();\n // set time out\n connection.setReadTimeout(10000);\n connection.setConnectTimeout(15000);\n // set connection method to POST\n connection.setRequestMethod(\"POST\");\n // set the output to true\n connection.setDoOutput(true);\n // set length of the data you want to send\n connection.setFixedLengthStreamingMode(stringResidentJson.getBytes().length);\n // add HTTP headers\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n // send the POST out\n PrintWriter out = new PrintWriter(connection.getOutputStream());\n out.print(stringResidentJson);\n out.close();\n Log.i(\"error\", new Integer(connection.getResponseCode()).toString());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n connection.disconnect();\n }\n }", "@POST\n Call<Post> createPost(@Body Post post);", "public interface Api {\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"anslogsave\")\n Call<ResponseBody> anslogsave(@Body RequestBody anslog);\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"robotlogsave\")\n Call<ResponseBody> robotlogsave(@Body RequestBody robotlogsave);\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"robotstatsave\")\n Call<ResponseBody> robotstatsave(@Body RequestBody robotstatsave);\n\n @FormUrlEncoded\n @POST(\"borr\")\n Call<String> borr(@Field(\"title\")String title,\n @Field(\"inflag\")int inflag);\n @FormUrlEncoded\n @POST(\"guide\")\n Call<String> guide(@Field(\"title\")String title);\n @FormUrlEncoded\n @POST(\"\")\n Call<String> baidu();\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"data\")\n Call<ResponseBody> upCewen(@Body RequestBody upCewen);\n\n @GET(\"doc_list?\")\n Call<String> search(@Query(\"search_txt\")String search);\n}", "@Test\n\tpublic void test() throws UnsupportedEncodingException {\n\t\t\t\t\n\t\tClientConfig config = new ClientConfig();\n\t\tClient client = ClientBuilder.newClient(config);\n\t\tWebTarget target = client.target(getBaseURI());\t\n\t\t\n\t\tString id = \"123\";\n\t\tString params = \"Testing if different bytes are known\";\n\t\t\n\t\tbyte[] byteArray = params.getBytes(\"UTF-8\"); \n\t\t\n\t\tString docBase64String = \n\t\t\t\torg.apache.commons.codec.binary.StringUtils.newStringUtf8(org.apache.\n\t\t\t\tcommons.codec.binary.Base64.encodeBase64(byteArray));\n\t\t\n\t\t\n\t\tString jsonString = \"\";\n\t\tjsonString += \"{\";\n\t\tjsonString += \"\\\"value\\\":\\\"\" + docBase64String + \"\\\"\";\n\t\tjsonString += \"}\";\n\t\t\n\t\tString result;\n\t\tResponse response;\n\t\t\n\t Entity<String> data = Entity.entity(jsonString, MediaType.APPLICATION_JSON);\n\t\t\n\t\t//Create Right Revision and Document - Expects 201 Created\n\t\tresponse = target.path(\"diff\").path(id).path(\"right\").request(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).post(data, Response.class);\n\t\tAssert.assertEquals(response.getStatus()==201,true);\n\t\tresult = target.path(\"diff\").path(id).path(\"right\").request(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).post(data, String.class);\n\t\tAssert.assertEquals(result.contains(\"Document 123 Revision Uploaded to Right with Success\"),true);\n\t\t\n\t\t//Create Left Revision and Document - Expects 201 Created\t\t\n\t\tresponse = target.path(\"diff\").path(id).path(\"left\").request(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).post(data, Response.class);\n\t\tAssert.assertEquals(response.getStatus()==201,true);\n\t\tresult = target.path(\"diff\").path(id).path(\"left\").request(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).post(data, String.class);\n\t\tAssert.assertEquals(result.contains(\"Document 123 Revision Uploaded to Left with Success\"),true);\n\t\t\n\t\t//View Diff with revisions already uploaded - Expects 200 OK\n\t\tresponse = target.path(\"diff\").path(id).request().accept(MediaType.APPLICATION_JSON).get(Response.class);\n\t\tAssert.assertEquals(response.getStatus()==200,true);\n\t\tDiffResponse diffResponse = target.path(\"diff\").path(id).request().accept(MediaType.APPLICATION_JSON).get(DiffResponse.class);\n\t\tAssert.assertEquals(diffResponse.getResult().contains(\"Documents are identical\"),true);\n\t\t\n\t\t//Remove Diff document with revisions already created - Expects 200 OK\n\t\tresponse = target.path(\"diff\").path(id).request().accept(MediaType.APPLICATION_JSON).delete(Response.class);\n\t\tAssert.assertEquals(response.getStatus()==200,true);\t\t\n\t\t\n\t}", "@POST(\"replays/upload\")\n @Multipart\n Call<DataResponse<JobData>> createJob(@Part MultipartBody.Part replay);", "public void createSurvey(int tid);", "@Test\n public void create_databaseEmpty_201() throws Exception {\n\n // PREPARE THE DATABASE\n // No data needed in database \n\n // PREPARE THE TEST\n Workflow mo = new Workflow();\n mo.setName(\"My_Macro_Operator\");\n mo.setDescription(\"Description of my new macro operator\");\n mo.setRaw(\"Macro operator content\");\n\n // DO THE TEST\n Response response = callAPI(VERB.POST, \"/mo/\", mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(201, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n\n URI headerLocation = response.getLocation();\n Pattern pattern = Pattern.compile(\".*/mo/([0-9]+)\");\n Matcher matcher = pattern.matcher(headerLocation.toString());\n assertEquals(true, matcher.matches());\n String expectedId = matcher.group(1);\n assertEquals(getAPIURL() + \"/mo/\" + expectedId, headerLocation.toString());\n\n List<WorkflowEntitySummary> macroOpList = Facade.listAllMacroOp();\n assertEquals(1, macroOpList.size());\n\n Response response2 = callAPI(VERB.GET, \"/mo/\" + expectedId, mo);\n assertEquals(200, response2.getStatus());\n\n\n }", "@Test\r\n\tpublic void testCRUDOperations() {\r\n\t\t\r\n\t\tfinal String DESCRIPTION = \"Test Backlog Task\";\r\n\t\tfinal int STATUS_ID = 1;\r\n\t\t\r\n\t\tRestTemplate restTemplate = new RestTemplate();\r\n\t\t//TODO Externalize URL??\r\n\t\tString postURL = \"http://localhost:8080/api/v1/backlog-tasks\";\r\n\t\t\r\n\t\tBacklogTask backlogTask = new BacklogTask();\r\n\t\tbacklogTask.setId(0);\r\n\t\tbacklogTask.setDescription(DESCRIPTION);\r\n\t\tbacklogTask.setStatusId(STATUS_ID);\r\n\t\t\r\n\t\tResponseEntity<BacklogTask> response = restTemplate.postForEntity(postURL, backlogTask, BacklogTask.class);\r\n\t\tBacklogTask postTask = response.getBody();\r\n\t\tassertThat(postTask.getId(), greaterThan(0));\r\n\t\t\r\n\t\tString getURL = String.format(\"http://localhost:8080/api/v1/backlog-tasks\", postTask.getId());\r\n\t\tResponseEntity<List<BacklogTask>> getResponse = restTemplate.exchange(\r\n\t\t\t\tgetURL,\r\n\t\t\t\tHttpMethod.GET,\r\n\t\t\t\tnull,\r\n\t\t\t\tnew ParameterizedTypeReference<List<BacklogTask>>() {});\r\n\t\tList<BacklogTask> getTasks = getResponse.getBody();\r\n\t\t\r\n\t\tassertThat(getTasks, hasItem(hasProperty(\"description\", equalTo(DESCRIPTION))));\r\n\t\tassertThat(getTasks, hasItem(hasProperty(\"id\", equalTo(postTask.getId()))));\r\n\t\t\r\n\t\tString deleteURL = String.format(\"http://localhost:8080/api/v1/backlog-task/%s\", postTask.getId());\r\n\t\trestTemplate.delete(deleteURL);\r\n\r\n\r\n\t\t\r\n\t}", "@Test\n public void create_databaseFilled_201() throws Exception {\n\n // PREPARE THE DATABASE\n addMOToDb(1);\n\n // PREPARE THE TEST\n Workflow mo = new Workflow();\n mo.setName(\"My_Macro_Operator\");\n mo.setDescription(\"Description of my new macro operator\");\n mo.setRaw(\"Macro operator content\");\n\n // DO THE TEST\n Response response = callAPI(VERB.POST, \"/mo/\", mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(201, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n\n URI headerLocation = response.getLocation();\n Pattern pattern = Pattern.compile(\".*/mo/([0-9]+)\");\n Matcher matcher = pattern.matcher(headerLocation.toString());\n assertEquals(true, matcher.matches());\n String expectedId = matcher.group(1);\n assertEquals(getAPIURL() + \"/mo/\" + expectedId, headerLocation.toString());\n\n List<WorkflowEntitySummary> macroOpList = Facade.listAllMacroOp();\n assertEquals(2, macroOpList.size());\n\n Response response2 = callAPI(VERB.GET, \"/mo/\" + expectedId, mo);\n assertEquals(200, response2.getStatus());\n\n }", "public void test0() {\r\n\t\t// step 1. create a dialog with empty leaderDrawStatus\r\n\t\tString urlString = \"http://localhost:8082/Slot/createdialog?userId=dialogpostest\";\r\n\t\tString dialogId = null;\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(urlString)).openConnection();\r\n\t\t\tconn.setRequestMethod(\"POST\");\r\n\t\t\tconn.setDoOutput(true);\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tJsonObject obj = Json.createObjectBuilder()\r\n\t\t\t\t\t.add(\"weekdayLine\", \"0101010\")\r\n\t\t\t\t\t.add(\"startTime\", 8)\r\n\t\t\t\t\t.add(\"endTime\", 20)\r\n\t\t\t\t\t.add(\"numOfMembers\", 2)\r\n\t\t\t\t\t.add(\"leaderDrawStatus\", \"000\").build();\r\n\t\t\tPrintWriter writer = new PrintWriter(conn.getOutputStream());\r\n\t\t\twriter.write(obj.toString()); writer.flush();\r\n\t\t\tdialogId = Networks.getResponseFromHttpConnection(conn);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\tif (dialogId == null) fail(\"fail to get dialogId\");\r\n\t\t\r\n\t\t// step 2. publish your availability as memeber1 (your userId)\r\n\t\tStringBuffer postUrl = new StringBuffer();\r\n\t\tpostUrl.append(\"http://localhost:8082/Slot/dialog?id=\");\r\n\t\tpostUrl.append(dialogId);\r\n\t\tString myAvailability = \"011\";\r\n\t\tpostUrl.append(\"&userId=member1&drawStatus=\");\r\n\t\tpostUrl.append(myAvailability);\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(postUrl.toString())).openConnection();\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tString response = Networks.getResponseFromHttpConnection(conn);\r\n\t\t\tSystem.out.println(\"Response from /dialog post request is: \" + response);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\t\r\n\t\t// step 3. refresh the page, assert that drawStatus is your availability\r\n\t\tStringBuffer getUrl = new StringBuffer();\r\n\t\tgetUrl.append(\"http://localhost:8082/Slot/dialog?id=\");\r\n\t\tgetUrl.append(dialogId);\r\n\t\tgetUrl.append(\"&userId=member1\");\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(getUrl.toString())).openConnection();\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tString jsonString = Networks.getResponseFromHttpConnection(conn);\r\n\t\t\tJSONObject jsonObj = (JSONObject) (new JSONParser()).parse(jsonString);\r\n\t\t\tassertTrue(((String) jsonObj.get(\"drawStatus\")).startsWith(myAvailability));\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "@Override\n protected Void doInBackground(Object... params) {\n //Get parameters\n option = (String) params[0];\n title = (String) params[1];\n content = (String) params[2];\n type = (String) params[3];\n\n if(type.equals(COURSE_TYPE)) {\n\n if(option.equals(SUBMIT_OPERATION)) {\n //Construct Course Review\n CourseReview review = new CourseReview(\n id, uid, title,content,locationStr, null);\n //Insert into DB\n CourseReviewUtil courseReviewUtil =\n new CourseReviewUtil();\n result = courseReviewUtil.insertCourseReview(review);\n if(courseReviewDraft != null) {\n CourseReviewDraftUtil courseReviewDraftUtil = new CourseReviewDraftUtil();\n courseReviewDraftUtil.deleteDraft(courseReviewDraft.getId());\n }\n } else {\n if(courseReviewDraft == null) {\n //Construct Course Review Draft\n CourseReviewDraft review = new CourseReviewDraft(\n id, uid, title, content);\n //Insert into DB\n CourseReviewDraftUtil courseReviewDraftUtil =\n new CourseReviewDraftUtil();\n result = courseReviewDraftUtil.insertCourseReviewDraft(review);\n }else {\n courseReviewDraft.setTitle(title);\n Log.d(\"save and update\", title);\n courseReviewDraft.setContent(content);\n Log.d(\"save and update\", content);\n CourseReviewDraftUtil courseReviewDraftUtil = new CourseReviewDraftUtil();\n result = courseReviewDraftUtil.updateDraft(courseReviewDraft.getId(),courseReviewDraft);\n Log.d(\"save and update\", Boolean.toString(result));\n }\n }\n\n } else {\n\n if(option.equals(SUBMIT_OPERATION)) {\n //Construct Faculty Review\n FacultyReview review = new FacultyReview(\n uid, id, title, content, locationStr, null);\n //Insert into DB\n FacultyReviewUtil facultyReviewUtil =\n new FacultyReviewUtil();\n result = facultyReviewUtil.insertFacultyReview(review);\n if(facultyReviewDraft != null) {\n FacultyReviewDraftUtil facultyReviewDraftUtil = new FacultyReviewDraftUtil();\n facultyReviewDraftUtil.deleteDraft(facultyReviewDraft.getFid());\n }\n } else {\n if(facultyReviewDraft==null) {\n //Construct Faculty Review Draft\n FacultyReviewDraft facultyReviewDraft = new FacultyReviewDraft(\n id, uid, title, content);\n //Insert into DB\n FacultyReviewDraftUtil facultyReviewDraftUtil =\n new FacultyReviewDraftUtil();\n result = facultyReviewDraftUtil.insertFacultyReviewDraft(facultyReviewDraft);\n }else{\n facultyReviewDraft.setTitle(title);\n Log.d(\"save and update\", title);\n facultyReviewDraft.setContent(content);\n Log.d(\"save and update\", content);\n FacultyReviewDraftUtil facultyReviewDraftUtil = new FacultyReviewDraftUtil();\n result = facultyReviewDraftUtil.updateDraft(facultyReviewDraft.getFid(), facultyReviewDraft);\n Log.d(\"save and update\", Boolean.toString(result));\n }\n\n }\n }\n return null;\n }", "public interface RetroiftService {\n @GET(\"catalog\")\n Call<CgBaseEntity> getCategories(@Query(\"key\") String key);\n\n @FormUrlEncoded\n @POST(\"query\")\n Call<BookBaseEntity> getBookList(@Field(\"catalog_id\") String id, @Field(\"pn\") String\n pn, @Field(\"rn\") String rn, @Field(\"key\") String key);\n\n}", "public static void main(String[] args) {\n RestAdapter restAdapter;\n restAdapter = (RestAdapter) new RestAdapter.Builder().setEndpoint(API_URL)\n .build().create(MyAPI.class);\n\n\n }", "public interface RestApi {\n\n @GET(\"/ride.asp\")\n Call<List<Model>> getData (@Query(\"userid\") int userId,\n @Query(\"from_name\") String fromName,\n @Query(\"from_lat\") double lat,\n @Query(\"from_lng\") double lng,\n @Query(\"to_name\") String toName,\n @Query(\"to_lat\") double toLat,\n @Query(\"to_lng\") double toLng,\n @Query(\"time\") long time);\n}", "RESTElement createRESTElement();", "@PostMapping(path=\"/add\") // Map ONLY POST Requests\n public @ResponseBody String addNewReview (@RequestParam Integer index, @RequestParam String comment,\n @RequestParam String client, @RequestParam String date, @RequestParam Integer rating, @RequestParam String location) {\n // @ResponseBody means the returned String is the response, not a view name\n // @RequestParam means it is a parameter from the GET or POST request\n\n Review n = new Review();\n n.setIndex(index);\n n.setComment(comment);\n n.setClient(client);\n n.setDate(date);\n n.setRating(rating);\n n.setLocation(location);\n reviewRepository.save(n);\n return \"Saved\";\n }", "@Test\n public void createBillingLineTestHappyPath() {\n\n Billinglines BillingLineObj = new Billinglines();\n\n BillingLineObj.setOrderId(\"b1375915-6c3d-4df5-aac2-aaf400e3ebab\");\n BillingLineObj.setPlannerId(\"90C44CAE-2A4A-4B5D-A5EC-AA9500A6C839\");\n BillingLineObj.setProductId(\"3B50FC9A-26B1-42C7-A7B4-AACB0084B9E4\");\n BillingLineObj.setStartMonth(\"2019-11-30\");\n BillingLineObj.setDurationInMonths(2);\n\n // final JSONArray arr = new JSONArray();\n\n /*for(int i = 0 ; i< list.size() ; i++) {\n final JSONObject obj = new JSONObject();\n p = list.get(i);\n obj.add(\"id\", p.getId());\n arr.add(obj);\n }\n\n\n for(int i = 0 ; i< list.size() ; i++) {\n final JSONObject obj = new JSONObject();\n p = list.get(i);\n obj.add(\"date\", new MyDateFormatter().getStringFromDateDifference(p.getCreationDate()));\n obj.add(\"value\", p.getValue());\n }*/\n\n BillingLineObj.setBillingLineBuyingAreaRevenues(Arrays.asList(new String[]{\"id\",\"8798f1f5-cd1b-455e-b44a-aacb00845536\"}));\n BillingLineObj.setMonthBuyingAreaRevenues(Arrays.asList(new String[]{\"date\",\"2019-11-30\"}));\n //BillingLineObj.setValue(444);\n BillingLineObj.setRevenue(444);\n String json = Utilities.createJsonObject(BillingLineObj);\n System.out.println(\">>>>>>>\\n\\n\\n\" + json);\n\n Response response = APIRequests.PostAPI(path, json);\n Assert.assertEquals(\"Check status codes for successful response \", 200,response.getStatusCode());\n System.out.println(\">>>>> \" + response.getStatusCode());\n\n }", "public interface RestApi {\n @GET(\"house_list\")\n Call<List<HouseInfo>> getHouseInfoList();\n\n @POST(\"landlordLogin\")\n Call<Landlord> landlordLogin(\n @Body Landlord landlord\n );\n\n @POST(\"landlordUpdate\")\n Call<Landlord> landlordUpdate(\n @Body Landlord landlord\n );\n\n @POST(\"incrementViewCount\")\n Call<RestHttpResponse> incrementViewCount(\n @Body HouseInfo houseInfo\n );\n\n @POST(\"tenantLogin\")\n Call<Tenant> tenantLogin(\n @Body Tenant tenant\n );\n\n @POST(\"tenantUpdate\")\n Call<Tenant> tenantUpdate(\n @Body Tenant tenant\n );\n\n @POST(\"search_house_list\")\n Call<List<HouseInfo>> getSearchHouseInfoList(@Body HouseSchCri criteria);\n\n @POST(\"getFavoriteList\")\n Call<List<HouseInfo>> getFavoriteList(@Body List<Favorite> favoriteList);\n\n}", "@GET(\"test/{testNo}\")\n Observable<TestDetailResponse> getTestData(@Path(\"testNo\") int testNo);", "@Test\n void getVotesForToday() throws Exception {\n TestUtil.print(mockMvc.perform(get(REST_URL + \"restaurantVotes\")\n .with(userHttpBasic(USER1))))\n .andExpect(status().isOk())\n .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n .andExpect(getToMatcher(RESTAURANT_TO_CURRENT_DATE));\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"{exam}/{start}/{section}/{exam}\")\n public String examination(@QueryParam(\"matric\") String matric,@QueryParam(\"exam\")String exam,@QueryParam(\"type\")String type,@QueryParam(\"status\") String status,@QueryParam(\"time\") String time,@QueryParam(\"score\")String score,@QueryParam(\"attempt\")String attempt,@QueryParam(\"complete\") boolean complete){\n System.out.println(\"touching registered Exams to get information)\");\n \n \n \n if(status == null){\n if(type != null){\n StudentResourceGetRegisteredExams regExam = new StudentResourceGetRegisteredExams();\n \n String typeF = \"\";\n if(Integer.parseInt(type) == 5){\n typeF = \"1\";\n }\n if(Integer.parseInt(type) == 6){\n typeF = \"2\"; \n }\n if(Integer.parseInt(type) == 7){\n typeF = \"3\";\n }\n if(Integer.parseInt(type) == 8){\n typeF = \"4\";\n }\n \n return new Gson().toJson(regExam.createExams(matric, exam, typeF,type));\n \n }\n else{\n return new Gson().toJson(\"Log In\");\n \n }\n }\n \n \n if(status.equals(\"result\")){\n StudentResourceResult results = new StudentResourceResult();\n \n \n try{\n \n return new Gson().toJson(results.postResult(matric, exam, attempt, time, score, type,complete));\n }\n catch(ArrayIndexOutOfBoundsException e){\n e.printStackTrace();\n \n }\n \n \n \n }\n \n \n // return StudentResourceGetRegisteredExams.getStudentsExams(matric, exam);\n \n \n return \"\";\n }", "public interface TravelApiService {\n @GET(\"api/users/{userCode}/travels\")\n Call<List<Travel>> getTravel(@Path(value = \"userCode\") String userCode);\n\n @POST(\"api/users/{userCode}/travels\")\n Call<PostTravelGsonResponce> postTravel(@Path(value = \"userCode\") String userCode, @Field(\"travel_date\") String travelDate, @Field(\"latitude\") Double latitude, @Field(\"longitude\") Double longitude, @Field(\"area_name\") String areaName, @Field(\"contry_name\") String countryName, @Field(\"token\") String token);\n}", "@SuppressWarnings(\"unchecked\")\n public static List<?> create(List<?> previews, User user) throws Exception {\n List<PaymentPreview> previewList = new ArrayList<>();\n for (Object preview : previews){\n if (preview instanceof Map){\n previewList.add(new PaymentPreview((Map<String, Object>) preview));\n continue;\n }\n if (preview instanceof PaymentPreview){\n previewList.add((PaymentPreview) preview);\n continue;\n }\n throw new Exception(\"Unknown type \\\"\" + preview.getClass() + \"\\\", use PaymentPreview or HashMap\");\n }\n return Rest.post(data, previewList, user);\n }", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"TDVoice Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "@GET(\"/v1/genres/{genreId}/albums/new\")\r\n void getNewReleases( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"genreId\") String genreId, //\r\n @Query(\"limit\") Integer limit, //\r\n Callback<Collection<AlbumData>> callBack);", "@Test(enabled=false)\n\tpublic void basicPost() {\t\n\t\tResponse res = \n\t\tgiven().\n\t\tbody(\" { \\\"id\\\": \\\"2\\\",\"\n\t\t\t\t+ \"\\\"title\\\": \\\"Cleveland\\\", \"\n\t\t\t\t+ \"\\\"author\\\": \\\"Kyrie\\\" }\").\n\t\twhen().\n\t\tcontentType(ContentType.JSON).\n\t\tpost(\"http://localhost:3000/posts/\");\n\t\n\t\tSystem.out.println(res.asString());\n\t}", "@Consumes(MediaType.APPLICATION_JSON)\r\n\t@POST\r\n\t@Path(\"flightsList\")\r\n\t//public List<Flight> getFlightsFromCriteria(@PathParam(\"plane\") String plane,@PathParam(\"price\") int price,@PathParam(\"destination\") String destination,@PathParam(\"seats\") int seats) {\r\n\tpublic List<Flight> getFlightsFromCriteria(SearchCriteria sc) {\r\n\t\tList<Flight> l = DaoFactory.getFlightDao().getFlightsFromCriteria(sc);\r\n\t\tSystem.out.print(l);\r\n\t\treturn l;\r\n\t}", "@Test\r\n\tpublic void testAcceptInterview() throws Exception {\r\n\t\twhen(interviewerService.acceptInterview(anyLong())).thenReturn(getInterview());\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/acceptinterview/\" + INTERVIEW_ID + \"\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isCreated());\r\n\t}", "@Test\n public void GetMEthod() {\n\n RestAssured.baseURI = \"http://www.omdbapi.com/\";\n\n RequestSpecification request = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response = request\n\n .when()\n\n .get(\"/?apikey=5148dbc1&s=Harry Potter\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n int responseCode = response.getStatusCode();\n ResponseBody responseBody = response.getBody();\n ArrayList<String> list=new ArrayList<String>();\n\n //System.out.println(response.asString());\n Gson gson=new Gson();\n String json=response.asString();\n Search obj=gson.fromJson(json,Search.class);\n String imdb=\"\";\n for (Element e:obj.Search\n ) {\n String title=e.getTitle();\n if (title.equals(\"Harry Potter and the Sorcerer's Stone\")){\n imdb=e.getimdbID();\n }\n }\n System.out.println(\"imdbID:\"+imdb);\n //http://www.omdbapi.com/?apikey=5148dbc1&i=tt0241527&type=movie\n RequestSpecification request1 = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response1 = request1\n\n .when()\n\n .get(\"/?apikey=5148dbc1&i=\"+imdb+\"&type=movie\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n String json1=response1.asString();\n Movie obj1=gson.fromJson(json1,Movie.class);\n\n System.out.println(\"Title:\" +obj1.getTitle() + \" Year: \" + obj1.getYear()+ \" Released: \"+obj1.getReleased());\n\n System.out.println(\"---------------------\");\n\n\n\n\n\n }", "@Test\n @WithMockUser(username=\"supervisor_admin\",roles={\"PM\",\"ADMIN\"})\n public void shouldBadRequestCreateAssessmentRubricEmptyTitle() throws Exception {\n String rubricTitle = \"\";\n int rubricRank = 4;\n boolean rubricIsEnabled = true;\n\n AssessmentRubric rubricObject = new AssessmentRubric();\n rubricObject.setTitle(rubricTitle);\n rubricObject.setStarting_date_time(LocalDateTime.now());\n rubricObject.setEnd_date_time(LocalDateTime.now());\n rubricObject.setEnabled(rubricIsEnabled);\n rubricObject.setRank(rubricRank);\n\n rubricObject.setRubricType(getMockTestRubricType());\n rubricObject.setLearningProcess(getMockTestLearningProcess());\n\n // Creating process JSON\n byte[] rubricJSON = this.mapper.writeValueAsString(rubricObject).getBytes();\n\n // invoke Create\n MvcResult results = mvc.perform(post(BASE_URL).content(rubricJSON)\n .contentType(MediaType.APPLICATION_JSON)\n .accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isBadRequest())\n .andReturn();\n }", "private RESTResource getRestResource(GeobatchRunInfo runInfo) {\n // Mapping og run status\n RESTResource resource = new RESTResource();\n // Category it's our category for geobatch execution\n resource.setCategory(getGeobatchExecutionCategory());\n // Name it's the run UID for the execution\n resource.setName(runInfo.getFlowUid());\n // Description it's the composite id\n resource.setDescription(runInfo.getInternalUid());\n // Metadata it's the status of the execution\n resource.setMetadata(runInfo.getFlowStatus());\n resource.setId(runInfo.getId());\n return resource;\n }", "@POST(\"/attractions/{attractionId}/reviews\")\n Call<Review> postReview(\n @Path(\"attractionId\") int attractionId,\n @Header(\"Authorization\") String bearer,\n @Body Review review\n );", "public static String getCreateTestRunURL() {\n\n\t\treturn baseURL + login_required_string + \"/rest/domains/\" + domain + \"/projects/\" + project + \"/runs\";\n\t}", "@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n JSONObject movieJSON = new JSONObject();\n int pubID = 1;\n int prodID = 2;\n String name = \"Name\";\n int age = 12;\n String desc = \"This is my description\";\n int runtime = 12;\n String genre = \"Action\";\n double price = 22.22;\n movieJSON.put(\"productID\", prodID);\n movieJSON.put(\"name\", name);\n movieJSON.put(\"price\", price);\n movieJSON.put(\"ageRating\",age);\n movieJSON.put(\"description\", desc);\n movieJSON.put(\"runtime\", runtime);\n movieJSON.put(\"genre\", genre);\n movieJSON.put(\"publisherID\", pubID);\n MovieStorePageInfoFactory instance = new MovieStorePageInfoFactory();\n StoreListing result = instance.create(movieJSON);\n assertEquals(prodID, result.getProductID());\n assertEquals(name, result.getName());\n }", "@GetMapping(\"/posts/create\")\n @ResponseBody\n public String postCreateGet() {\n return \"view the form for creating a post 'Create a post'\";\n //http://localhost:8080/posts/create\n }", "public interface SimpleHabitApi {\n @FormUrlEncoded\n @POST(\"getCurrentProgram.php\")\n Call<GetCurrentProgramResponse> getCurrentProgram (@Field(\"access_token\") String accessToken,\n @Field(\"page\") int page);\n\n @FormUrlEncoded\n @POST(\"getCategoriesPrograms.php\")\n Call<GetCategoriesAndProgramsResponse> getCategoriesAndPrograms (@Field(\"access_token\") String accessToken,\n @Field(\"page\") int page);\n\n @FormUrlEncoded\n @POST(\"getTopics.php\")\n Call<GetTopicsResponses> getTopics (@Field(\"access_token\") String accessToken,\n @Field(\"page\") int page);\n}", "@GET(\"rest/emprego\")\n Call<List<Posto>> callListPostoSINE();" ]
[ "0.55679375", "0.5504043", "0.5456362", "0.5398274", "0.53479946", "0.53284264", "0.5289597", "0.52650785", "0.526227", "0.52544636", "0.52537495", "0.52469385", "0.5208741", "0.51727444", "0.5133269", "0.5129325", "0.5127194", "0.5122195", "0.5092337", "0.50922", "0.5077228", "0.5076407", "0.5074492", "0.50610435", "0.5035276", "0.50349087", "0.50328773", "0.5029474", "0.50278395", "0.5003963", "0.5000122", "0.499291", "0.49855185", "0.4974751", "0.49658817", "0.49575013", "0.4955711", "0.49518242", "0.4948296", "0.49444464", "0.49410114", "0.49393204", "0.49366394", "0.4930837", "0.4915097", "0.49072284", "0.49016184", "0.48991978", "0.4896948", "0.48884135", "0.48830616", "0.48760185", "0.48668888", "0.48617375", "0.48611683", "0.48554415", "0.48506692", "0.48486185", "0.48434177", "0.48363593", "0.4829476", "0.48263702", "0.48255306", "0.48249972", "0.48219085", "0.4819635", "0.4818621", "0.48164535", "0.48128906", "0.48105723", "0.48093197", "0.4806737", "0.48030865", "0.48016647", "0.47968873", "0.47962657", "0.47943464", "0.4791078", "0.47883794", "0.4785215", "0.47835755", "0.47790313", "0.47779784", "0.47628334", "0.47621667", "0.4757494", "0.47519878", "0.47502768", "0.4750238", "0.4741346", "0.47406942", "0.4740246", "0.47296202", "0.47275198", "0.47227225", "0.4722273", "0.47212508", "0.47212294", "0.47140062", "0.47103405" ]
0.534349
5